summaryrefslogtreecommitdiffstats
path: root/kdevdesigner
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2014-03-02 20:05:33 +0100
committerSlávek Banko <slavek.banko@axis.cz>2014-03-02 20:05:33 +0100
commit722ce1efbac31c61b1d4b13f7e075c9f311e3e73 (patch)
treedb1b6b28566e5fe9accb4a688f7257673cecb080 /kdevdesigner
parentafb74575caf7dd8ccb6c235b1c8d788e320c19da (diff)
downloadtdevelop-722ce1efbac31c61b1d4b13f7e075c9f311e3e73.tar.gz
tdevelop-722ce1efbac31c61b1d4b13f7e075c9f311e3e73.zip
Finish renaming tdevelop components
Diffstat (limited to 'kdevdesigner')
-rw-r--r--kdevdesigner/AUTHORS4
-rw-r--r--kdevdesigner/CMakeLists.txt15
-rw-r--r--kdevdesigner/LICENSE.GPL340
-rw-r--r--kdevdesigner/Makefile.am4
-rw-r--r--kdevdesigner/NEWS1
-rw-r--r--kdevdesigner/README25
-rw-r--r--kdevdesigner/TODO1
-rw-r--r--kdevdesigner/designer/CMakeLists.txt107
-rw-r--r--kdevdesigner/designer/Makefile.am21
-rw-r--r--kdevdesigner/designer/about.ui219
-rw-r--r--kdevdesigner/designer/actiondnd.cpp728
-rw-r--r--kdevdesigner/designer/actiondnd.h254
-rw-r--r--kdevdesigner/designer/actioneditor.ui227
-rw-r--r--kdevdesigner/designer/actioneditorimpl.cpp321
-rw-r--r--kdevdesigner/designer/actioneditorimpl.h82
-rw-r--r--kdevdesigner/designer/actionlistview.cpp110
-rw-r--r--kdevdesigner/designer/actionlistview.h82
-rw-r--r--kdevdesigner/designer/asciivalidator.cpp94
-rw-r--r--kdevdesigner/designer/asciivalidator.h53
-rw-r--r--kdevdesigner/designer/command.cpp2475
-rw-r--r--kdevdesigner/designer/command.h1260
-rw-r--r--kdevdesigner/designer/configtoolboxdialog.ui326
-rw-r--r--kdevdesigner/designer/configtoolboxdialog.ui.h215
-rw-r--r--kdevdesigner/designer/connectiondialog.ui219
-rw-r--r--kdevdesigner/designer/connectiondialog.ui.h318
-rw-r--r--kdevdesigner/designer/connectionitems.cpp517
-rw-r--r--kdevdesigner/designer/connectionitems.h226
-rw-r--r--kdevdesigner/designer/connectiontable.cpp56
-rw-r--r--kdevdesigner/designer/connectiontable.h47
-rw-r--r--kdevdesigner/designer/createtemplate.ui195
-rw-r--r--kdevdesigner/designer/customwidgeteditor.ui1378
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.cpp842
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.h99
-rw-r--r--kdevdesigner/designer/database.cpp122
-rw-r--r--kdevdesigner/designer/database.h85
-rw-r--r--kdevdesigner/designer/dbconnection.ui222
-rw-r--r--kdevdesigner/designer/dbconnectioneditor.ui147
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.cpp80
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.h58
-rw-r--r--kdevdesigner/designer/dbconnections.ui321
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.cpp196
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.h61
-rw-r--r--kdevdesigner/designer/defs.cpp84
-rw-r--r--kdevdesigner/designer/defs.h42
-rw-r--r--kdevdesigner/designer/designer_pch.h44
-rw-r--r--kdevdesigner/designer/designeraction.cpp38
-rw-r--r--kdevdesigner/designer/designeraction.h52
-rw-r--r--kdevdesigner/designer/designerapp.cpp176
-rw-r--r--kdevdesigner/designer/designerapp.h58
-rw-r--r--kdevdesigner/designer/designerappiface.cpp1093
-rw-r--r--kdevdesigner/designer/designerappiface.h277
-rw-r--r--kdevdesigner/designer/editfunctions.ui714
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.cpp534
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.h95
-rw-r--r--kdevdesigner/designer/filechooser.cpp90
-rw-r--r--kdevdesigner/designer/filechooser.h69
-rw-r--r--kdevdesigner/designer/finddialog.ui274
-rw-r--r--kdevdesigner/designer/finddialog.ui.h61
-rw-r--r--kdevdesigner/designer/formfile.cpp905
-rw-r--r--kdevdesigner/designer/formfile.h146
-rw-r--r--kdevdesigner/designer/formsettings.ui549
-rw-r--r--kdevdesigner/designer/formsettingsimpl.cpp118
-rw-r--r--kdevdesigner/designer/formsettingsimpl.h50
-rw-r--r--kdevdesigner/designer/formwindow.cpp2773
-rw-r--r--kdevdesigner/designer/formwindow.h323
-rw-r--r--kdevdesigner/designer/gotolinedialog.ui169
-rw-r--r--kdevdesigner/designer/gotolinedialog.ui.h50
-rw-r--r--kdevdesigner/designer/hierarchyview.cpp1508
-rw-r--r--kdevdesigner/designer/hierarchyview.h252
-rw-r--r--kdevdesigner/designer/iconvieweditor.ui461
-rw-r--r--kdevdesigner/designer/iconvieweditorimpl.cpp165
-rw-r--r--kdevdesigner/designer/iconvieweditorimpl.h59
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.cpp565
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.desktop16
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.h148
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.rc121
-rw-r--r--kdevdesigner/designer/kdevdesigner_part_sh.rc116
-rw-r--r--kdevdesigner/designer/layout.cpp1017
-rw-r--r--kdevdesigner/designer/layout.h191
-rw-r--r--kdevdesigner/designer/listboxdnd.cpp305
-rw-r--r--kdevdesigner/designer/listboxdnd.h64
-rw-r--r--kdevdesigner/designer/listboxeditor.ui457
-rw-r--r--kdevdesigner/designer/listboxeditorimpl.cpp245
-rw-r--r--kdevdesigner/designer/listboxeditorimpl.h62
-rw-r--r--kdevdesigner/designer/listboxrename.cpp157
-rw-r--r--kdevdesigner/designer/listboxrename.h58
-rw-r--r--kdevdesigner/designer/listdnd.cpp142
-rw-r--r--kdevdesigner/designer/listdnd.h64
-rw-r--r--kdevdesigner/designer/listeditor.ui179
-rw-r--r--kdevdesigner/designer/listeditor.ui.h72
-rw-r--r--kdevdesigner/designer/listviewdnd.cpp432
-rw-r--r--kdevdesigner/designer/listviewdnd.h67
-rw-r--r--kdevdesigner/designer/listvieweditor.ui935
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.cpp650
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.h103
-rw-r--r--kdevdesigner/designer/mainwindow.cpp3784
-rw-r--r--kdevdesigner/designer/mainwindow.h513
-rw-r--r--kdevdesigner/designer/mainwindowactions.cpp2067
-rw-r--r--kdevdesigner/designer/menubareditor.cpp1129
-rw-r--r--kdevdesigner/designer/menubareditor.h200
-rw-r--r--kdevdesigner/designer/metadatabase.cpp1692
-rw-r--r--kdevdesigner/designer/metadatabase.h269
-rw-r--r--kdevdesigner/designer/multilineeditor.ui181
-rw-r--r--kdevdesigner/designer/multilineeditorimpl.cpp415
-rw-r--r--kdevdesigner/designer/multilineeditorimpl.h112
-rw-r--r--kdevdesigner/designer/myiconloader.cpp32
-rw-r--r--kdevdesigner/designer/myiconloader.h32
-rw-r--r--kdevdesigner/designer/newform.ui238
-rw-r--r--kdevdesigner/designer/newformimpl.cpp414
-rw-r--r--kdevdesigner/designer/newformimpl.h165
-rw-r--r--kdevdesigner/designer/orderindicator.cpp112
-rw-r--r--kdevdesigner/designer/orderindicator.h58
-rw-r--r--kdevdesigner/designer/outputwindow.cpp209
-rw-r--r--kdevdesigner/designer/outputwindow.h99
-rw-r--r--kdevdesigner/designer/paletteeditor.ui496
-rw-r--r--kdevdesigner/designer/paletteeditoradvanced.ui748
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.cpp643
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.h97
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.cpp304
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.h77
-rw-r--r--kdevdesigner/designer/pics/CMakeLists.txt85
-rw-r--r--kdevdesigner/designer/pics/Makefile.am2
-rw-r--r--kdevdesigner/designer/pics/designer_adjustsize.pngbin495 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_appicon.pngbin2341 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_arrow.pngbin217 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_background.pngbin6724 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_book.pngbin825 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_buttongroup.pngbin648 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_checkbox.pngbin817 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_combobox.pngbin549 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_connecttool.pngbin553 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_cross.pngbin164 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_customwidget.pngbin1133 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_adjustsize.pngbin529 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_book.pngbin561 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_buttongroup.pngbin482 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_checkbox.pngbin547 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_combobox.pngbin420 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_connecttool.pngbin450 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_customwidget.pngbin629 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_databrowser.pngbin603 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_datatable.pngbin592 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_dataview.pngbin663 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_dateedit.pngbin452 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_datetimeedit.pngbin669 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_dial.pngbin706 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_down.pngbin441 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editbreaklayout.pngbin635 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editcopy.pngbin517 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editcut.pngbin800 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editdelete.pngbin684 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editgrid.pngbin425 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_edithlayout.pngbin272 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_edithlayoutsplit.pngbin328 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editlower.pngbin453 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editpaste.pngbin599 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editraise.pngbin454 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editslots.pngbin535 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editvlayout.pngbin272 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_editvlayoutsplit.pngbin333 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_filenew.pngbin298 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_fileopen.pngbin407 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_filesave.pngbin267 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_folder.pngbin841 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_form.pngbin274 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_frame.pngbin427 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_groupbox.pngbin465 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_help.pngbin786 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_home.pngbin743 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_iconview.pngbin548 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_image.pngbin482 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_label.pngbin670 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_layout.pngbin497 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_lcdnumber.pngbin452 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_left.pngbin422 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_line.pngbin327 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_lineedit.pngbin445 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_listbox.pngbin410 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_listview.pngbin640 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_multilineedit.pngbin482 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_newform.pngbin443 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_ordertool.pngbin533 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_pixlabel.pngbin619 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_pointer.pngbin476 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_print.pngbin593 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_progress.pngbin375 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_project.pngbin915 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_pushbutton.pngbin445 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_radiobutton.pngbin605 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_redo.pngbin465 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_richtextedit.pngbin562 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_right.pngbin425 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_scrollbar.pngbin364 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_searchfind.pngbin501 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_setbuddy.pngbin427 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_slider.pngbin548 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_spacer.pngbin519 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_spinbox.pngbin477 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_table.pngbin512 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_tabwidget.pngbin404 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textbold.pngbin519 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textbrowser.pngbin534 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textcenter.pngbin453 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textedit.pngbin526 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textfont.pngbin412 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_texth1.pngbin476 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_texth2.pngbin537 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_texth3.pngbin509 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textitalic.pngbin454 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textjustify.pngbin442 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textlarger.pngbin537 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textleft.pngbin443 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textlinebreak.pngbin528 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textparagraph.pngbin543 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textright.pngbin445 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textsmaller.pngbin513 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textteletext.pngbin463 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textunderline.pngbin498 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_textview.pngbin529 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_timeedit.pngbin827 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_toolbox.pngbin465 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_toolbutton.pngbin670 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_undo.pngbin471 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_up.pngbin444 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_widgetstack.pngbin558 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_wizarddata.pngbin294 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_wizarddialog.pngbin421 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_d_wordwrap.pngbin507 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_databrowser.pngbin907 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_datatable.pngbin923 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_dataview.pngbin1039 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_dateedit.pngbin505 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_datetimeedit.pngbin1074 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_dial.pngbin1024 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_down.pngbin595 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editbreaklayout.pngbin744 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editcopy.pngbin485 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editcut.pngbin649 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editdelete.pngbin833 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editgrid.pngbin520 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_edithlayout.pngbin295 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_edithlayoutsplit.pngbin344 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editlower.pngbin609 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editpaste.pngbin907 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editraise.pngbin614 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editslots.pngbin690 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editvlayout.pngbin289 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_editvlayoutsplit.pngbin355 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_filenew.pngbin313 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_fileopen.pngbin681 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_filesave.pngbin328 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_folder.pngbin1368 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_form.pngbin301 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_frame.pngbin400 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_groupbox.pngbin439 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_hand.pngbin198 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_help.pngbin1561 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_home.pngbin1083 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_hsplit.pngbin203 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_ibeam.pngbin162 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_iconview.pngbin613 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_image.pngbin769 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_label.pngbin953 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_layout.pngbin706 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_lcdnumber.pngbin558 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_left.pngbin678 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_line.pngbin287 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_lineedit.pngbin405 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_listbox.pngbin386 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_listview.pngbin759 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_multilineedit.pngbin454 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_newform.pngbin531 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_no.pngbin230 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_object.pngbin1065 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_ordertool.pngbin587 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_pixlabel.pngbin1229 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_pointer.pngbin586 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_print.pngbin742 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_progress.pngbin559 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_project.pngbin1275 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_pushbutton.pngbin408 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_qtlogo.pngbin12615 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_radiobutton.pngbin586 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_redo.pngbin592 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_resetproperty.pngbin184 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_richtextedit.pngbin834 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_right.pngbin656 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_s_down.pngbin574 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_s_editcut.pngbin444 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_s_left.pngbin564 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_s_right.pngbin557 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_s_up.pngbin586 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_scrollbar.pngbin408 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_searchfind.pngbin843 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_setbuddy.pngbin428 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_sizeall.pngbin208 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_sizeb.pngbin203 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_sizef.pngbin203 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_sizeh.pngbin179 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_sizev.pngbin177 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_slider.pngbin729 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_spacer.pngbin715 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_spinbox.pngbin455 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_splash.pngbin123917 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_table.pngbin483 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_tabwidget.pngbin572 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textbold.pngbin498 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textbrowser.pngbin514 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textcenter.pngbin429 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textedit.pngbin497 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textfont.pngbin494 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_texth1.pngbin462 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_texth2.pngbin512 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_texth3.pngbin486 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textitalic.pngbin442 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textjustify.pngbin409 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textlarger.pngbin733 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textleft.pngbin411 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textlinebreak.pngbin509 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textparagraph.pngbin527 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textright.pngbin410 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textsmaller.pngbin677 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textteletext.pngbin445 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textunderline.pngbin471 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_textview.pngbin498 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_timeedit.pngbin1520 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_toolbox.pngbin783 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_toolbutton.pngbin1262 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_undo.pngbin572 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_up.pngbin692 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_uparrow.pngbin169 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_vsplit.pngbin192 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_wait.pngbin216 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_widgetstack.pngbin831 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_wizarddata.pngbin323 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_wizarddialog.pngbin632 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pics/designer_wordwrap.pngbin643 -> 0 bytes
-rw-r--r--kdevdesigner/designer/pixmapchooser.cpp231
-rw-r--r--kdevdesigner/designer/pixmapchooser.h74
-rw-r--r--kdevdesigner/designer/pixmapcollection.cpp180
-rw-r--r--kdevdesigner/designer/pixmapcollection.h80
-rw-r--r--kdevdesigner/designer/pixmapcollectioneditor.ui218
-rw-r--r--kdevdesigner/designer/pixmapcollectioneditor.ui.h150
-rw-r--r--kdevdesigner/designer/pixmapfunction.ui976
-rw-r--r--kdevdesigner/designer/popupmenueditor.cpp1469
-rw-r--r--kdevdesigner/designer/popupmenueditor.h237
-rw-r--r--kdevdesigner/designer/preferences.ui648
-rw-r--r--kdevdesigner/designer/previewframe.cpp57
-rw-r--r--kdevdesigner/designer/previewframe.h61
-rw-r--r--kdevdesigner/designer/previewwidget.ui304
-rw-r--r--kdevdesigner/designer/previewwidgetimpl.cpp65
-rw-r--r--kdevdesigner/designer/previewwidgetimpl.h44
-rw-r--r--kdevdesigner/designer/project.cpp1558
-rw-r--r--kdevdesigner/designer/project.h274
-rw-r--r--kdevdesigner/designer/projectsettings.ui301
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.cpp126
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.h57
-rw-r--r--kdevdesigner/designer/propertyeditor.cpp4332
-rw-r--r--kdevdesigner/designer/propertyeditor.h891
-rw-r--r--kdevdesigner/designer/propertyobject.cpp158
-rw-r--r--kdevdesigner/designer/propertyobject.h43
-rw-r--r--kdevdesigner/designer/qcompletionedit.cpp210
-rw-r--r--kdevdesigner/designer/qcompletionedit.h80
-rw-r--r--kdevdesigner/designer/replacedialog.ui318
-rw-r--r--kdevdesigner/designer/replacedialog.ui.h75
-rw-r--r--kdevdesigner/designer/resource.cpp3328
-rw-r--r--kdevdesigner/designer/resource.h165
-rw-r--r--kdevdesigner/designer/richtextfontdialog.ui347
-rw-r--r--kdevdesigner/designer/richtextfontdialog.ui.h49
-rw-r--r--kdevdesigner/designer/sizehandle.cpp388
-rw-r--r--kdevdesigner/designer/sizehandle.h98
-rw-r--r--kdevdesigner/designer/sourceeditor.cpp320
-rw-r--r--kdevdesigner/designer/sourceeditor.h107
-rw-r--r--kdevdesigner/designer/sourcefile.cpp298
-rw-r--r--kdevdesigner/designer/sourcefile.h87
-rw-r--r--kdevdesigner/designer/startdialog.ui324
-rw-r--r--kdevdesigner/designer/startdialogimpl.cpp182
-rw-r--r--kdevdesigner/designer/startdialogimpl.h82
-rw-r--r--kdevdesigner/designer/styledbutton.cpp295
-rw-r--r--kdevdesigner/designer/styledbutton.h104
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.cpp160
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.h57
-rw-r--r--kdevdesigner/designer/tableeditor.ui828
-rw-r--r--kdevdesigner/designer/tableeditorimpl.cpp494
-rw-r--r--kdevdesigner/designer/tableeditorimpl.h83
-rw-r--r--kdevdesigner/designer/timestamp.cpp86
-rw-r--r--kdevdesigner/designer/timestamp.h64
-rw-r--r--kdevdesigner/designer/variabledialog.ui294
-rw-r--r--kdevdesigner/designer/variabledialogimpl.cpp180
-rw-r--r--kdevdesigner/designer/variabledialogimpl.h57
-rw-r--r--kdevdesigner/designer/widgetaction.cpp58
-rw-r--r--kdevdesigner/designer/widgetaction.h66
-rw-r--r--kdevdesigner/designer/widgetfactory.cpp1805
-rw-r--r--kdevdesigner/designer/widgetfactory.h515
-rw-r--r--kdevdesigner/designer/wizardeditor.ui342
-rw-r--r--kdevdesigner/designer/wizardeditorimpl.cpp253
-rw-r--r--kdevdesigner/designer/wizardeditorimpl.h75
-rw-r--r--kdevdesigner/designer/workspace.cpp711
-rw-r--r--kdevdesigner/designer/workspace.h152
-rw-r--r--kdevdesigner/interfaces/actioninterface.h78
-rw-r--r--kdevdesigner/interfaces/classbrowserinterface.h63
-rw-r--r--kdevdesigner/interfaces/designerinterface.h261
-rw-r--r--kdevdesigner/interfaces/editorinterface.h102
-rw-r--r--kdevdesigner/interfaces/filterinterface.h68
-rw-r--r--kdevdesigner/interfaces/interpreterinterface.h59
-rw-r--r--kdevdesigner/interfaces/languageinterface.h131
-rw-r--r--kdevdesigner/interfaces/preferenceinterface.h68
-rw-r--r--kdevdesigner/interfaces/projectsettingsiface.h69
-rw-r--r--kdevdesigner/interfaces/sourcetemplateiface.h65
-rw-r--r--kdevdesigner/interfaces/templatewizardiface.h60
-rw-r--r--kdevdesigner/interfaces/widgetinterface.h35
-rw-r--r--kdevdesigner/plugins/Makefile.am8
-rw-r--r--kdevdesigner/plugins/languageinterfaceimpl.cpp237
-rw-r--r--kdevdesigner/plugins/languageinterfaceimpl.h83
-rw-r--r--kdevdesigner/shared/CMakeLists.txt26
-rw-r--r--kdevdesigner/shared/Makefile.am6
-rw-r--r--kdevdesigner/shared/domtool.cpp453
-rw-r--r--kdevdesigner/shared/domtool.h53
-rw-r--r--kdevdesigner/shared/globaldefs.h62
-rw-r--r--kdevdesigner/shared/parser.cpp72
-rw-r--r--kdevdesigner/shared/parser.h39
-rw-r--r--kdevdesigner/shared/ui2uib.cpp893
-rw-r--r--kdevdesigner/shared/ui2uib.h35
-rw-r--r--kdevdesigner/shared/uib.cpp42
-rw-r--r--kdevdesigner/shared/uib.h152
-rw-r--r--kdevdesigner/shared/widgetdatabase.cpp960
-rw-r--r--kdevdesigner/shared/widgetdatabase.h96
-rw-r--r--kdevdesigner/src/CMakeLists.txt36
-rw-r--r--kdevdesigner/src/Makefile.am47
-rw-r--r--kdevdesigner/src/kdevdesigner.cpp216
-rw-r--r--kdevdesigner/src/kdevdesigner.desktop96
-rw-r--r--kdevdesigner/src/kdevdesigner.h97
-rw-r--r--kdevdesigner/src/kdevdesigner_shell.rc37
-rw-r--r--kdevdesigner/src/main.cpp94
-rw-r--r--kdevdesigner/uilib/CMakeLists.txt27
-rw-r--r--kdevdesigner/uilib/Makefile.am9
-rw-r--r--kdevdesigner/uilib/database.cpp122
-rw-r--r--kdevdesigner/uilib/database2.h90
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.cpp2606
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.h178
440 files changed, 0 insertions, 77323 deletions
diff --git a/kdevdesigner/AUTHORS b/kdevdesigner/AUTHORS
deleted file mode 100644
index 40d295ec..00000000
--- a/kdevdesigner/AUTHORS
+++ /dev/null
@@ -1,4 +0,0 @@
-KDevDesigner: Alexander Dymo <adymo@mksat.net>
-Qt Designer Copyright: (C) 2000-2003 Trolltech AS All Rights Reserved
-
-
diff --git a/kdevdesigner/CMakeLists.txt b/kdevdesigner/CMakeLists.txt
deleted file mode 100644
index 9584f4c7..00000000
--- a/kdevdesigner/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/kdevdesigner/LICENSE.GPL b/kdevdesigner/LICENSE.GPL
deleted file mode 100644
index c13faf0d..00000000
--- a/kdevdesigner/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.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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.
-
- <signature of Ty Coon>, 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
deleted file mode 100644
index 4cc5b44c..00000000
--- a/kdevdesigner/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-SUBDIRS = shared uilib designer src
-#plugins
-
-EXTRA_DIST = COPYING configure.in.in
diff --git a/kdevdesigner/NEWS b/kdevdesigner/NEWS
deleted file mode 100644
index 0519ecba..00000000
--- a/kdevdesigner/NEWS
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/kdevdesigner/README b/kdevdesigner/README
deleted file mode 100644
index 99b55648..00000000
--- a/kdevdesigner/README
+++ /dev/null
@@ -1,25 +0,0 @@
-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
deleted file mode 100644
index 0519ecba..00000000
--- a/kdevdesigner/TODO
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/kdevdesigner/designer/CMakeLists.txt b/kdevdesigner/designer/CMakeLists.txt
deleted file mode 100644
index 4cdcea2b..00000000
--- a/kdevdesigner/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}/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
deleted file mode 100644
index 1857de19..00000000
--- a/kdevdesigner/designer/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-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
deleted file mode 100644
index 48d53486..00000000
--- a/kdevdesigner/designer/about.ui
+++ /dev/null
@@ -1,219 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>AboutDialog</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>AboutDialog</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>544</width>
- <height>667</height>
- </rect>
- </property>
- <property name="caption">
- <string>Qt Designer</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLabel">
- <property name="name">
- <cstring>aboutPixmap</cstring>
- </property>
- <property name="frameShape">
- <enum>NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>Plain</enum>
- </property>
- <property name="pixmap">
- <pixmap>"designer_splash.png"</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- <property name="alignment">
- <set>AlignCenter</set>
- </property>
- <property name="hAlign" stdset="0">
- </property>
- </widget>
- <widget class="TQLabel">
- <property name="name">
- <cstring>aboutVersion</cstring>
- </property>
- <property name="text">
- <string>Version 3.2</string>
- </property>
- <property name="alignment">
- <set>AlignCenter</set>
- </property>
- <property name="hAlign" stdset="0">
- </property>
- </widget>
- <widget class="TQLabel">
- <property name="name">
- <cstring>aboutCopyright</cstring>
- </property>
- <property name="text">
- <string>Copyright (C) 2000-2003 Trolltech AS. All Rights Reserved.</string>
- </property>
- <property name="alignment">
- <set>AlignCenter</set>
- </property>
- <property name="hAlign" stdset="0">
- </property>
- </widget>
- <widget class="TQLabel">
- <property name="name">
- <cstring>aboutLicense</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;</string>
- </property>
- <property name="alignment">
- <set>WordBreak|AlignVCenter|AlignLeft</set>
- </property>
- <property name="wordwrap" stdset="0">
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer3</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>Layout1</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>PushButton1</cstring>
- </property>
- <property name="text">
- <string>&amp;OK</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- </vbox>
-</widget>
-<connections>
- <connection>
- <sender>PushButton1</sender>
- <signal>clicked()</signal>
- <receiver>AboutDialog</receiver>
- <slot>accept()</slot>
- </connection>
-</connections>
-<includes>
- <include location="local" impldecl="in implementation">myiconloader.h</include>
-</includes>
-<pixmapfunction>BarIcon2</pixmapfunction>
-
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp
deleted file mode 100644
index 33f0c4bf..00000000
--- a/kdevdesigner/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 <tqaction.h>
-#include <tqapplication.h>
-#include <tqbitmap.h>
-#include <tqdragobject.h>
-#include <tqinputdialog.h>
-#include <tqlayout.h>
-#include <tqmainwindow.h>
-#include <tqmenudata.h>
-#include <tqmessagebox.h>
-#include <tqobjectlist.h>
-#include <tqpainter.h>
-#include <tqstyle.h>
-#include <tqtimer.h>
-
-#include <tdelocale.h>
-
-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<TQPopupMenu*>(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<TQToolBar*>(w) ) {
- TQToolBar *tb = (TQToolBar*)w;
- wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
- return TRUE;
- } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) {
- idx = ( (TQPopupMenu*)w )->count();
- ( (TQPopupMenu*)w )->insertSeparator( idx );
- return TRUE;
- }
- return FALSE;
-}
-
-bool QSeparatorAction::removeFrom( TQWidget *w )
-{
- if ( ::tqqt_cast<TQToolBar*>(w) ) {
- delete wid;
- return TRUE;
- } else if ( ::tqqt_cast<TQPopupMenu*>(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<FormWindow*>(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<TQActionGroup*>(a) ) {
- ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
- actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
- } else if ( ::tqqt_cast<QSeparatorAction*>(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<QDesignerToolBar*>(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<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
- if ( it != actionMap.end() && ::tqqt_cast<QSeparatorAction*>(*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<TQWidget*, TQAction*>::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<TQWidget*, TQAction*>::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<TQWidget*, TQAction*>::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<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) :
- ::tqqt_cast<QSeparatorAction*>(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<QDesignerAction*>(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<QDesignerAction*>(ActionDrag::action());
- else
- a = ::tqqt_cast<QSeparatorAction*>(ActionDrag::action());
- } else {
- a = ::tqqt_cast<QDesignerActionGroup*>(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<TQActionGroup*>(a) ) {
- actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
- if ( ( (QDesignerActionGroup*)a )->widget() )
- ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
- } else if ( ::tqqt_cast<QDesignerAction*>(a) ) {
- actionMap.insert( ( (QDesignerAction*)a )->widget(), a );
- ( (QDesignerAction*)a )->widget()->installEventFilter( this );
- } else if ( ::tqqt_cast<QSeparatorAction*>(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<QDesignerAction*>(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
deleted file mode 100644
index 1e9f68b0..00000000
--- a/kdevdesigner/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 <tqaction.h>
-#include <tqdragobject.h>
-#include <tqmap.h>
-#include <tqmenubar.h>
-#include <tqpixmap.h>
-#include <tqpopupmenu.h>
-#include <tqptrlist.h>
-#include <tqtoolbar.h>
-#include <tqguardedptr.h>
-#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<TQActionGroup*>(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<TQAction *, TQWidget *> widgets;
- int idx;
-
-};
-
-class QDesignerAction : public TQAction
-{
- Q_OBJECT
-
-
-public:
- QDesignerAction( TQObject *parent )
- : TQAction( ::tqqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
- QDesignerAction( TQWidget *w, TQObject *parent )
- : TQAction( ::tqqt_cast<TQActionGroup*>(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<TQAction> 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<TQAction> actionList;
- TQMap<TQWidget*, TQAction*> actionMap;
- TQPoint dragStartPos;
- QDesignerIndicatorWidget *indicator;
- bool widgetInserting;
- FormWindow *formWindow;
-
-};
-
-#endif
diff --git a/kdevdesigner/designer/actioneditor.ui b/kdevdesigner/designer/actioneditor.ui
deleted file mode 100644
index 13a56a04..00000000
--- a/kdevdesigner/designer/actioneditor.ui
+++ /dev/null
@@ -1,227 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>ActionEditorBase</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQWidget">
- <property name="name">
- <cstring>ActionEditorBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>206</width>
- <height>227</height>
- </rect>
- </property>
- <property name="caption">
- <string>Edit Actions</string>
- </property>
- <property name="layoutMargin" stdset="0">
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>4</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>Layout2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQToolButton">
- <property name="name">
- <cstring>buttonNewAction</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>"designer_filenew.png"</pixmap>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Create new Action</string>
- </property>
- </widget>
- <widget class="TQToolButton">
- <property name="name">
- <cstring>buttonDeleteAction</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>"designer_s_editcut.png"</pixmap>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Delete current Action</string>
- </property>
- </widget>
- <widget class="TQToolButton">
- <property name="name">
- <cstring>buttonConnect</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>"designer_connecttool.png"</pixmap>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Connect current Action</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- <widget class="ActionListView">
- <property name="name">
- <cstring>listActions</cstring>
- </property>
- </widget>
- </vbox>
-</widget>
-<customwidgets>
- <customwidget>
- <class>ActionListView</class>
- <header location="local">actionlistview.h</header>
- <sizehint>
- <width>200</width>
- <height>200</height>
- </sizehint>
- <container>0</container>
- <sizepolicy>
- <hordata>7</hordata>
- <verdata>7</verdata>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- <pixmap>"image0"</pixmap>
- <signal>selectionChanged( TQListViewItem * )</signal>
- <signal>currentChanged( TQListViewItem * )</signal>
- <signal>clicked( TQListViewItem * )</signal>
- </customwidget>
-</customwidgets>
-<images>
- <image name="image0">
- <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
- </image>
-</images>
-<connections>
- <connection>
- <sender>listActions</sender>
- <signal>currentChanged( TQListViewItem * )</signal>
- <receiver>ActionEditorBase</receiver>
- <slot>currentActionChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>listActions</sender>
- <signal>clicked( TQListViewItem * )</signal>
- <receiver>ActionEditorBase</receiver>
- <slot>currentActionChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>listActions</sender>
- <signal>selectionChanged( TQListViewItem * )</signal>
- <receiver>ActionEditorBase</receiver>
- <slot>currentActionChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>buttonNewAction</sender>
- <signal>clicked()</signal>
- <receiver>ActionEditorBase</receiver>
- <slot>newAction()</slot>
- </connection>
- <connection>
- <sender>buttonConnect</sender>
- <signal>clicked()</signal>
- <receiver>ActionEditorBase</receiver>
- <slot>connectionsClicked()</slot>
- </connection>
- <connection>
- <sender>buttonDeleteAction</sender>
- <signal>clicked()</signal>
- <receiver>ActionEditorBase</receiver>
- <slot>deleteAction()</slot>
- </connection>
-</connections>
-<forwards>
- <forward>class TQListViewItem;</forward>
-</forwards>
-<Q_SLOTS>
- <slot access="protected">init()</slot>
- <slot access="protected">destroy()</slot>
- <slot access="protected">connectionsClicked()</slot>
- <slot access="protected">currentActionChanged( TQListViewItem * )</slot>
- <slot access="protected">deleteAction()</slot>
- <slot access="protected">newAction()</slot>
-</Q_SLOTS>
-<includes>
- <include location="local" impldecl="in implementation">myiconloader.h</include>
-</includes>
-<pixmapfunction>BarIcon2</pixmapfunction>
-
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp
deleted file mode 100644
index 294507a9..00000000
--- a/kdevdesigner/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 <tqaction.h>
-#include <tqlineedit.h>
-#include <tqlabel.h>
-#include <tqtoolbutton.h>
-#include <tqlistview.h>
-#include <tqcheckbox.h>
-#include <tqpushbutton.h>
-#include <tqpopupmenu.h>
-#include <tqobjectlist.h>
-
-#include <tdelocale.h>
-
-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<TQActionGroup*>(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<TQActionGroup*>(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<TQMainWindow*>(formWindow->mainContainer()) ) {
- setEnabled( FALSE );
- } else {
- setEnabled( TRUE );
- for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
- ActionItem *i = 0;
- if ( ::tqqt_cast<TQAction*>(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<TQActionGroup*>(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<TQAction*>(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<TQActionGroup*>(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<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(formWindow), o );
- for ( TQValueList<MetaDataBase::Connection>::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
deleted file mode 100644
index 9e67ed9a..00000000
--- a/kdevdesigner/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 <tqlistview.h>
-
-#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
deleted file mode 100644
index 3e8c95c2..00000000
--- a/kdevdesigner/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 <tqheader.h>
-
-#include <tdelocale.h>
-
-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<QDesignerActionGroup*>(ac);
- if ( !g )
- a = ::tqqt_cast<QDesignerAction*>(ac);
- setDragEnabled( TRUE );
-}
-
-ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
- : TQListViewItem( i ), a( 0 ), g( 0 )
-{
- g = ::tqqt_cast<QDesignerActionGroup*>(ac);
- if ( !g )
- a = ::tqqt_cast<QDesignerAction*>(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
deleted file mode 100644
index 047b21bd..00000000
--- a/kdevdesigner/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 <tqlistview.h>
-#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
deleted file mode 100644
index 667b0a61..00000000
--- a/kdevdesigner/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 <tqstring.h>
-
-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
deleted file mode 100644
index a284f6ab..00000000
--- a/kdevdesigner/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 <tqvalidator.h>
-
-
-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
deleted file mode 100644
index b9b97827..00000000
--- a/kdevdesigner/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 <widgetdatabase.h>
-#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 <tqfeatures.h>
-#include <tqwidget.h>
-#include <tqmetaobject.h>
-#include <tqapplication.h>
-#include <tqlayout.h>
-#include <tqmessagebox.h>
-#include <tqlistbox.h>
-#include <tqiconview.h>
-#include <tqtextedit.h>
-#include <tqptrstack.h>
-#include <tqheader.h>
-#include <tqsplitter.h>
-#ifndef TQT_NO_TABLE
-#include <tqtable.h>
-#endif
-#include <tqaction.h>
-
-#include "kdevdesigner_part.h"
-
-#include <tdelocale.h>
-
-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<Command> 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<TQPoint> op,
- const TQValueList<TQPoint> 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<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) );
- connections.insert( w, conns );
- TQValueList<MetaDataBase::Connection>::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<MetaDataBase::Connection> conns = *connections.find( w );
- TQValueList<MetaDataBase::Connection>::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<CustomWidget*>((TQObject *)widget) ) {
- MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget();
- if ( !cw )
- return FALSE;
- for ( TQValueList<MetaDataBase::Property>::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<FormWindow*>(widget->parent()) )
- formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() );
- }
- return TRUE;
-}
-
-void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &currentItemText, 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<CustomWidget*>(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<TQString> 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<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
- formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget );
- }
- if ( propName == "iconSet" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(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<TQSplitter*>(layoutBase) != 0 );
- else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(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<Command> &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<MetaDataBase::Function> lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) );
- for ( TQValueList<MetaDataBase::Function>::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<MetaDataBase::Variable> 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<MetaDataBase::Variable> lst = MetaDataBase::variables( TQT_TQOBJECT(fw) );
- for ( TQValueList<MetaDataBase::Variable>::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<Item> &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<Item>::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<Item>::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<Item> &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<Item>::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<Item>::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<TQListViewItem> fromParents, toParents;
- fromParents.push( 0 );
- toParents.push( 0 );
- TQPtrStack<TQListViewItem> 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<Row> &rows,
- const TQValueList<Column> &columns )
- : Command( n, fw ), newRows( rows ), newColumns( columns ), table( t )
-{
-#ifndef TQT_NO_TABLE
- int i = 0;
- TQMap<TQString, TQString> 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<TQString, TQString> columnFields;
- table->setNumCols( newColumns.count() );
- int i = 0;
- for ( TQValueList<Column>::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<Row>::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<TQString, TQString> columnFields;
- table->setNumCols( oldColumns.count() );
- int i = 0;
- for ( TQValueList<Column>::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<Row>::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<QDesignerAction*>(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<QDesignerActionGroup*>(action) ) {
- if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
- toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
- ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
- }
- } else if ( ::tqqt_cast<QSeparatorAction*>(action) ) {
- toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
- ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
- }
- if ( !::tqqt_cast<TQActionGroup*>(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<TQAction*>(o) )
- continue;
- // ### fix it for nested actiongroups
- if ( ::tqqt_cast<QDesignerAction*>(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<QDesignerAction*>(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<TQActionGroup*>(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<TQAction*>(o) )
- continue;
- if ( ::tqqt_cast<QDesignerAction*>(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
deleted file mode 100644
index b1c7a2a5..00000000
--- a/kdevdesigner/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 <tqstring.h>
-#include <tqrect.h>
-#include <tqvaluelist.h>
-#include <tqvariant.h>
-#include <tqobject.h>
-#include <tqlistview.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-#include <tqiconset.h>
-
-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<Command> 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<TQPoint> op,
- const TQValueList<TQPoint> 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<TQPoint> 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<MetaDataBase::Connection> > 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 &currentItemText, bool select = TRUE );
-
- TQGuardedPtr<TQObject> 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<Command> &cmds );
-
- void execute();
- void unexecute();
- Type type() const { return Macro; }
-
-private:
- TQPtrList<Command> 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<MetaDataBase::Variable> lst );
- void execute();
- void unexecute();
- Type type() const { return SetVariables; }
-
-private:
- TQValueList<MetaDataBase::Variable> 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<Item> &items );
- void execute();
- void unexecute();
- Type type() const { return PopulateListBox; }
-
- bool operator==( const PopulateListBoxCommand & ) const;
-
-private:
- TQValueList<Item> 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<Item> &items );
- void execute();
- void unexecute();
- Type type() const { return PopulateIconView; }
-
- bool operator==( const PopulateIconViewCommand & ) const;
-
-private:
- TQValueList<Item> 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<Row> &rows,
- const TQValueList<Column> &columns );
-
- void execute();
- void unexecute();
- Type type() const { return PopulateTable; }
-
-private:
- TQValueList<Row> oldRows, newRows;
- TQValueList<Column> 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
deleted file mode 100644
index 226cdd35..00000000
--- a/kdevdesigner/designer/configtoolboxdialog.ui
+++ /dev/null
@@ -1,326 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>ConfigToolboxDialog</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>ConfigToolboxDialog</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>403</width>
- <height>467</height>
- </rect>
- </property>
- <property name="caption">
- <string>Configure Toolbox</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>342</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>PushButton3</cstring>
- </property>
- <property name="text">
- <string>&amp;OK</string>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>PushButton4</cstring>
- </property>
- <property name="text">
- <string>&amp;Cancel</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="TQLayoutWidget" row="0" column="0">
- <property name="name">
- <cstring>Layout4</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQPushButton" row="1" column="1">
- <property name="name">
- <cstring>buttonAdd</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&amp;Add</string>
- </property>
- </widget>
- <spacer row="1" column="0">
- <property name="name">
- <cstring>Spacer3</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>111</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- <widget class="TQListView" row="0" column="0" rowspan="1" colspan="2">
- <column>
- <property name="text">
- <string>Available Tools</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <property name="name">
- <cstring>listViewTools</cstring>
- </property>
- <property name="selectionMode">
- <enum>Extended</enum>
- </property>
- <property name="resizeMode">
- <enum>LastColumn</enum>
- </property>
- </widget>
- </grid>
- </widget>
- <widget class="TQLayoutWidget" row="0" column="1">
- <property name="name">
- <cstring>Layout5</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQPushButton" row="1" column="0">
- <property name="name">
- <cstring>buttonRemove</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&amp;Remove</string>
- </property>
- </widget>
- <widget class="TQListView" row="0" column="0" rowspan="1" colspan="4">
- <column>
- <property name="text">
- <string>Common Widgets Page</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <property name="name">
- <cstring>listViewCommon</cstring>
- </property>
- <property name="selectionMode">
- <enum>Extended</enum>
- </property>
- <property name="resizeMode">
- <enum>LastColumn</enum>
- </property>
- </widget>
- <widget class="TQToolButton" row="1" column="3">
- <property name="name">
- <cstring>buttonDown</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>"designer_s_down.png"</pixmap>
- </property>
- </widget>
- <spacer row="1" column="1">
- <property name="name">
- <cstring>Spacer4</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>41</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- <widget class="TQToolButton" row="1" column="2">
- <property name="name">
- <cstring>buttonUp</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>"designer_s_up.png"</pixmap>
- </property>
- </widget>
- </grid>
- </widget>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>buttonAdd</sender>
- <signal>clicked()</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>addTool()</slot>
- </connection>
- <connection>
- <sender>buttonRemove</sender>
- <signal>clicked()</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>removeTool()</slot>
- </connection>
- <connection>
- <sender>buttonUp</sender>
- <signal>clicked()</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>moveToolUp()</slot>
- </connection>
- <connection>
- <sender>buttonDown</sender>
- <signal>clicked()</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>moveToolDown()</slot>
- </connection>
- <connection>
- <sender>listViewTools</sender>
- <signal>clicked(TQListViewItem*)</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>currentToolChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>listViewCommon</sender>
- <signal>clicked(TQListViewItem*)</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>currentCommonToolChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>PushButton3</sender>
- <signal>clicked()</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>PushButton4</sender>
- <signal>clicked()</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>reject()</slot>
- </connection>
- <connection>
- <sender>PushButton3</sender>
- <signal>clicked()</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>ok()</slot>
- </connection>
- <connection>
- <sender>listViewTools</sender>
- <signal>doubleClicked(TQListViewItem*)</signal>
- <receiver>ConfigToolboxDialog</receiver>
- <slot>addTool()</slot>
- </connection>
-</connections>
-<includes>
- <include location="local" impldecl="in implementation">configtoolboxdialog.ui.h</include>
-</includes>
-<Q_SLOTS>
- <slot>addTool()</slot>
- <slot>removeTool()</slot>
- <slot>moveToolUp()</slot>
- <slot>moveToolDown()</slot>
- <slot>currentToolChanged( TQListViewItem * i )</slot>
- <slot>currentCommonToolChanged( TQListViewItem * i )</slot>
- <slot>ok()</slot>
-</Q_SLOTS>
-<functions>
- <function access="private">init()</function>
-</functions>
-<includes>
- <include location="local" impldecl="in implementation">myiconloader.h</include>
-</includes>
-<pixmapfunction>BarIcon2</pixmapfunction>
-
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/kdevdesigner/designer/configtoolboxdialog.ui.h b/kdevdesigner/designer/configtoolboxdialog.ui.h
deleted file mode 100644
index 7dcd6530..00000000
--- a/kdevdesigner/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 <tqlistview.h>
-
-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<TQListViewItem> 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
deleted file mode 100644
index 51995633..00000000
--- a/kdevdesigner/designer/connectiondialog.ui
+++ /dev/null
@@ -1,219 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>ConnectionDialog</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>ConnectionDialog</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>600</width>
- <height>365</height>
- </rect>
- </property>
- <property name="caption">
- <string>View &amp; Edit Connections</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQPushButton" row="1" column="1">
- <property name="name">
- <cstring>PushButton1</cstring>
- </property>
- <property name="text">
- <string>&amp;New</string>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="0">
- <property name="name">
- <cstring>TextLabel1</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>4</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&amp;Connections:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>connectionsTable</cstring>
- </property>
- </widget>
- <widget class="TQPushButton" row="2" column="1">
- <property name="name">
- <cstring>PushButton2</cstring>
- </property>
- <property name="text">
- <string>&amp;Delete</string>
- </property>
- </widget>
- <widget class="TQPushButton" row="6" column="1">
- <property name="name">
- <cstring>PushButton3</cstring>
- </property>
- <property name="text">
- <string>&amp;Cancel</string>
- </property>
- </widget>
- <widget class="TQPushButton" row="5" column="1">
- <property name="name">
- <cstring>PushButton7</cstring>
- </property>
- <property name="text">
- <string>&amp;OK</string>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- <spacer row="4" column="1">
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton" row="3" column="1">
- <property name="name">
- <cstring>buttonEditSlots</cstring>
- </property>
- <property name="text">
- <string>&amp;Edit Slots...</string>
- </property>
- </widget>
- <widget class="ConnectionTable" row="1" column="0" rowspan="6" colspan="1">
- <property name="name">
- <cstring>connectionsTable</cstring>
- </property>
- </widget>
- </grid>
-</widget>
-<customwidgets>
- <customwidget>
- <class>ConnectionTable</class>
- <header location="local">connectiontable.h</header>
- <sizehint>
- <width>50</width>
- <height>50</height>
- </sizehint>
- <container>0</container>
- <sizepolicy>
- <hordata>7</hordata>
- <verdata>7</verdata>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- <pixmap>"image0"</pixmap>
- </customwidget>
-</customwidgets>
-<images>
- <image name="image0">
- <data format="XPM.GZ" length="4830">789c9597c972e3480e40eff5158ec2ada203cd3549c6c41cbcc9b6bccabbddd1078014bdcb9b6449ee987f9f240072caac9e4357d6c1cf5812890490f4ef3f562e8ff6577efcfeed7d4ad3bb72a5bca5b7951fd5ece969f9c79ffffeebdbf7285a69fec7f14af4fdb76fdf47d39572e5e079326e00c10304f24ff8b9c7d463ee71d9e3aac7e31ed70d67dc2ce1cb9e7cd0e3c957863eaff778d4b3bfe8c97be781a71eaff5f8e82bf37ecfff4dc314364b58fdb966096ff6ecf77af6b70d1771b3841f1b8ef366099ff7ec17bdf8faf7970847cd12f9b2e344f8b563890f5e3a96fda0ea98c45fdc71299c765c354c67c249bb1fcd3a56ff271d8b3d9d1b271a0f1d742c725874acfe9d70eef3a9f65bc2e47fa3f16a7d55411d6a3e4e1b0e03bf349e8171144a7e49ceeb295239cb79c3384ccdff76c7b23f14c269e8ccdfa9716ef6b5b18f407857d88585e57bbf65b39f18971a0fc8fd7b6fc624f723e524f9e3d2b8d4f391d49ba74ae5bed585a3c8e49b1d6b7c929f701ca5e65feac10b9dd967c2519485a9dcaf33ce952110cea3caec23e53830f9863045b5ca79ae1c8741263cec58eb59ed390ecd3e378e8d651e44651c85527f20f51cd55eae5c1b27a1f823b9bf388c0b65b831a6b090fd24be384bc24098a6d65fb5ca29ed58fd5f35eccbaf34ff320f922819ab3e487e93d4b3d6eb9b711d4abda0f44352a685d5f39d709db2ca296c380dd2c238366ee5605c1acb3c96f2d3feff148ed25aeb0d1e955d60fd22f94a63178632df79d5d8fa95971d8b9cee5b8e647ec1d038567b40e1a4d567a9d73475b1f14ecb5a7f2cf94a9d4b343eba304e357e3814ce5c6afd22f33b2d5c6ee7295bb6fc4abda4e40af3f7d972a4f52df79bb223ebff79cb2a2736e650ce470fc2652b67b9cfb4726dff5d195776bead96adbf1e3bd67a9779928ebbfdc898357f34346ee7c3a0658d07359eba5922d7fbaebd3fdd6f6e3c567d96f9e4c22cb4780a63eb7f90f7c525596cf11c1a2791ce9bd8d869bd93e4dba55eaeefc781b1dd17ee1b9b3e4b3e9dcbfcc4107f9fc671a4ef9dcc139765763fa4f6943965947a7355b3c45eceebc65965fb851deb79655e662ecfcddf93716172999759966791f67f689ceb79e9a363951f1b9b3d1e76acf36fcf98544e529fdebc954b3f67d42ce1eb86f3465df3fb2e5c14a5d53b2b53a0f316773ad6f922f32c2fa9cd9fdc6f5e79d6f8768d13ebc79d96559fe47dcd6b8a63cdcfbb71126bfcd21f45e0f5f57dbb357691c63f342e2cbea063d597f7b808c9e6151e1993c573d1b2de0fc8fd1711151a1fdf187324f393671debfe92df22a134d67e93fb2a1cd93c05630ef4fe48f25d641c683de2b171a8f399ef3a56f989b1bd273c6dd9f697f7bcc85b7dca8da348be4f41fabf2838b1f7e9cc38d5f715e4fd2888439b9f53639ba72cf55a701b3f0c8cad3ff9de38b57c4bfd15a5678d6f646cfd87857166ef95f46b51f9fdf57c609cda7b756edcbee7ceb850a671c7faf7809e7fccb9d63b6c1b93d5f7ac63d5d7fcd41c245a8fabc685e68f1f8c49ef93e5bda4c0fbd7f9b16b4c5a9ff060ccf63e4b3d52c889c6433bc685da33195bbfc2bd31dbfc947aa5982bf37fddb1c623f39c7cbbda7c94f889cac4ea4df24f55c9367fe43da47159da3c907ea39ac74ebfdfe5fe39e0dac9f71f4abed87fb02993d42b475562effb5dcb36ff243fec3f3f327d4fd1384db5ffd68c9db1bc579cb6faf8619cdafe321f39f39f33721fb46bec4cfe699c19cf3bd6f3ad1ae7c6f2de71ce2549fe71a9dcc917c685324b7eb8aac6767ff27dc763cf92afd1b4590848c8586285e3deaafc6fd94b61346df5b1c61bbcc53bbcff9bf5808ff884136ff5acfadef70dbee02bbee13b4e71861f38c7052ef1d3af555cc375dcc04d1c6069fae47dbfe2166ee30e0e7117f7701f0ff0108f7084c77882a77886e7788197a6cf3e922baf7d8d018618618c895f293acc30c702478000403831fdd247f90e8c019450610c63a8e1066efd4f15dcc13d3cc0a3d77f8256bff2fa531cc233bcc02bbcc13b4c61061f3087052ce11356c5ff1aac9bfed8ebcf701736bc741306b005dbb00343d8853def611f0ee0d0eb1fc1e827fd0f38861338f5becfe01c2ee0d26b5ec13504de4708d12ffa7388bd2481141c64907bed020f0909604944fc8bfe924a4ca8a231d5e2fb956ee896eee8deeb3fd0e32ffa0b7ac29426f041fed4f442afdee28dde694a33faa0f9aff1d0829618d327add21aadd3066dfafd06b445dbb443c3be3eedd21eed7bfd033aa4231ad1319dd0299dd1395dd0255dfd8dff6b0a28c4042af27fcc907fafc879ed73ff199053f145bfc207463c666062e6d2dfd9d2db2db9a20b1e73cd377cfbe5be4a5fb1eb7cc7f7fcc08ffcc4137ee6177ee5377ee729cff883e7bcf8a91ed8d7f7069ef1923f7995d7789d37789307bc4557bccd3b3ce45ddefba9defc4fbebecfe1fffce305eff1fe4ff50c3ea2015e00f93dd7fcb9beae35ff5bf2da5dbf788b676f71891398c03a8c7a6b1d267effcbfff5e33fe8f7fffcebdb7f01520e2ea3</data>
- </image>
-</images>
-<connections>
- <connection>
- <sender>PushButton1</sender>
- <signal>clicked()</signal>
- <receiver>ConnectionDialog</receiver>
- <slot>addConnection()</slot>
- </connection>
- <connection>
- <sender>PushButton7</sender>
- <signal>clicked()</signal>
- <receiver>ConnectionDialog</receiver>
- <slot>okClicked()</slot>
- </connection>
- <connection>
- <sender>PushButton3</sender>
- <signal>clicked()</signal>
- <receiver>ConnectionDialog</receiver>
- <slot>cancelClicked()</slot>
- </connection>
- <connection>
- <sender>PushButton2</sender>
- <signal>clicked()</signal>
- <receiver>ConnectionDialog</receiver>
- <slot>deleteClicked()</slot>
- </connection>
- <connection>
- <sender>buttonEditSlots</sender>
- <signal>clicked()</signal>
- <receiver>ConnectionDialog</receiver>
- <slot>editSlots()</slot>
- </connection>
-</connections>
-<includes>
- <include location="global" impldecl="in declaration">tqptrlist.h</include>
- <include location="local" impldecl="in declaration">connectionitems.h</include>
- <include location="local" impldecl="in implementation">connectiondialog.ui.h</include>
-</includes>
-<variables>
- <variable>TQPtrList&lt;ConnectionContainer&gt; connections;</variable>
- <variable>TQObject *defaultSender;</variable>
- <variable>TQObject *defaultReceiver;</variable>
-</variables>
-<Q_SLOTS>
- <slot>init()</slot>
- <slot>addConnection()</slot>
- <slot returnType="ConnectionContainer *">addConnection( TQObject * sender, TQObject * receiver, const TQString &amp; signal, const TQString &amp; slot )</slot>
- <slot>updateConnectionState( ConnectionContainer * c )</slot>
- <slot>okClicked()</slot>
- <slot>cancelClicked()</slot>
- <slot>deleteClicked()</slot>
- <slot>editSlots()</slot>
- <slot>setDefault( TQObject * sender, TQObject * receiver )</slot>
- <slot>updateEditSlotsButton()</slot>
- <slot>updateConnectionContainers()</slot>
- <slot>ensureConnectionVisible()</slot>
-</Q_SLOTS>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/kdevdesigner/designer/connectiondialog.ui.h b/kdevdesigner/designer/connectiondialog.ui.h
deleted file mode 100644
index 25a5d5f2..00000000
--- a/kdevdesigner/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<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) );
- for ( TQValueList<MetaDataBase::Connection>::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<MetaDataBase::Connection> oldConnections =
- MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) );
- TQPtrList<Command> newConnectionCmds;
- TQPtrList<Command> 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<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) );
- for ( TQValueList<MetaDataBase::Connection>::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<Command> 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<ConnectionContainer> 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
deleted file mode 100644
index 12b03a1d..00000000
--- a/kdevdesigner/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 <tqpainter.h>
-#include <tqcombobox.h>
-#include <tqmetaobject.h>
-#include <tqcombobox.h>
-#include <tqlistbox.h>
-#include <tqaction.h>
-#include <tqdatabrowser.h>
-
-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<TQAction*>(o) )
- continue;
- lst << o->name();
- if ( !o->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(o) )
- appendChildActions( (TQAction*)o, lst );
- }
-}
-
-static TQStringList flatActions( const TQPtrList<TQAction> &l )
-{
- TQStringList lst;
-
- TQPtrListIterator<TQAction> it( l );
- while ( it.current() ) {
- TQAction *action = it.current();
- lst << action->name();
- if ( !action->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(action) )
- appendChildActions( action, lst );
- ++it;
- }
-
- return lst;
-}
-
-// ------------------------------------------------------------------
-
-SenderItem::SenderItem( TQTable *table, FormWindow *fw )
- : ConnectionItem( table, fw )
-{
- TQStringList lst;
-
- TQPtrDictIterator<TQWidget> 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<TQLayoutWidget*>(it.current()) &&
- !::tqqt_cast<Spacer*>(it.current()) &&
- !::tqqt_cast<SizeHandle*>(it.current()) &&
- qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
- lst << it.current()->name();
- }
- ++it;
- }
-
- lst += flatActions( formWindow->actionList() );
-
- lst.prepend( "<No Sender>" );
- 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<TQWidget> 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<TQLayoutWidget*>(it.current()) &&
- !::tqqt_cast<Spacer*>(it.current()) &&
- !::tqqt_cast<SizeHandle*>(it.current()) &&
- qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
- lst << it.current()->name();
- }
- ++it;
- }
-
- lst += flatActions( formWindow->actionList() );
-
- lst.prepend( "<No Receiver>" );
- 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 << "<No Signal>";
- 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<CustomWidget*>(sender) ) {
- MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget();
- for ( TQValueList<TQCString>::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( "<No Signal>" );
-
- 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 << "<No Slot>";
- lst.sort();
- setStringList( lst );
-
- lastReceiver = 0;
- lastSignal = "<No Signal>";
-}
-
-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<TQDataBrowser*>(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 == "<No Signal>" ) {
- lst << "<No Slot>";
- 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<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) );
- if ( !moreSlots.isEmpty() ) {
- for ( TQValueList<MetaDataBase::Function>::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<CustomWidget*>(lastReceiver) ) {
- MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget();
- for ( TQValueList<MetaDataBase::Function>::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( "<No Slot>" );
- 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( "<No Slot>" );
- setCurrentItem( currSlot );
- emit currentSlotChanged( currentText() );
-}
diff --git a/kdevdesigner/designer/connectionitems.h b/kdevdesigner/designer/connectionitems.h
deleted file mode 100644
index fe5e276d..00000000
--- a/kdevdesigner/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 <tqtable.h>
-
-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
deleted file mode 100644
index 834fdc96..00000000
--- a/kdevdesigner/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 <tdelocale.h>
-
-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
deleted file mode 100644
index 60b84426..00000000
--- a/kdevdesigner/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 <tqtable.h>
-
-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
deleted file mode 100644
index e03340b1..00000000
--- a/kdevdesigner/designer/createtemplate.ui
+++ /dev/null
@@ -1,195 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>CreateTemplate</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>CreateTemplate</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>347</width>
- <height>248</height>
- </rect>
- </property>
- <property name="caption">
- <string>Create Template</string>
- </property>
- <property name="sizeGripEnabled">
- <bool>true</bool>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLabel" row="0" column="0">
- <property name="name">
- <cstring>TextLabel1</cstring>
- </property>
- <property name="text">
- <string>Template &amp;name:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editName</cstring>
- </property>
- </widget>
- <widget class="KLineEdit" row="0" column="1">
- <property name="name">
- <cstring>editName</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Name of the new template</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Enter the name of the new template</string>
- </property>
- </widget>
- <widget class="TQListBox" row="1" column="1" rowspan="2" colspan="1">
- <property name="name">
- <cstring>listClass</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Class of the new template</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Enter the name of the class which should be used as the template's base class</string>
- </property>
- </widget>
- <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout1</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonCreate</cstring>
- </property>
- <property name="text">
- <string>C&amp;reate</string>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Creates the new template</string>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>PushButton1</cstring>
- </property>
- <property name="text">
- <string>&amp;Cancel</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Closes the Dialog</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="TQLabel" row="1" column="0">
- <property name="name">
- <cstring>TextLabel2</cstring>
- </property>
- <property name="text">
- <string>&amp;Baseclass for template:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>listClass</cstring>
- </property>
- </widget>
- <spacer row="2" column="0">
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>buttonCreate</sender>
- <signal>clicked()</signal>
- <receiver>CreateTemplate</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>PushButton1</sender>
- <signal>clicked()</signal>
- <receiver>CreateTemplate</receiver>
- <slot>reject()</slot>
- </connection>
-</connections>
-<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>klineedit.h</includehint>
-</includehints>
-</UI>
diff --git a/kdevdesigner/designer/customwidgeteditor.ui b/kdevdesigner/designer/customwidgeteditor.ui
deleted file mode 100644
index db6860f0..00000000
--- a/kdevdesigner/designer/customwidgeteditor.ui
+++ /dev/null
@@ -1,1378 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>CustomWidgetEditorBase</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>CustomWidgetEditorBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>712</width>
- <height>386</height>
- </rect>
- </property>
- <property name="caption">
- <string>Edit Custom Widgets</string>
- </property>
- <property name="sizeGripEnabled">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Edit Custom Widgets&lt;/b&gt;&lt;p&gt;Add or delete custom widgets from &lt;i&gt;Qt Designer&lt;/i&gt;'s database, and edit the properties of existing widgets.&lt;/p&gt;</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQListBox" row="0" column="0" rowspan="5" colspan="1">
- <property name="name">
- <cstring>boxWidgets</cstring>
- </property>
- <property name="whatsThis" stdset="0">
- <string>The list of all custom widgets known to Qt Designer.</string>
- </property>
- </widget>
- <widget class="TQPushButton" row="0" column="1">
- <property name="name">
- <cstring>buttonNewWidget</cstring>
- </property>
- <property name="text">
- <string>&amp;New Widget</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Add new custom widget.</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Create an empty custom widget and add it to the list.&lt;/b&gt;&lt;p&gt;New custom widgets have a default name and header file, which must both be changed to appropriate values.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQPushButton" row="1" column="1">
- <property name="name">
- <cstring>buttonDeleteWidget</cstring>
- </property>
- <property name="text">
- <string>&amp;Delete Widget</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Delete custom widget</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Delete the selected custom widget.&lt;/b&gt;&lt;p&gt;You can only delete widgets that are not used in any open form.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3">
- <property name="name">
- <cstring>Layout1</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>helpButton</cstring>
- </property>
- <property name="text">
- <string>&amp;Help</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Horizontal Spacing2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonCancel</cstring>
- </property>
- <property name="text">
- <string>&amp;Close</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Closes the Dialog.</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <spacer row="2" column="1">
- <property name="name">
- <cstring>Vertical Spacing1</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton" row="3" column="1">
- <property name="name">
- <cstring>buttonLoad</cstring>
- </property>
- <property name="text">
- <string>&amp;Load Descriptions...</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Loads widget description file</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Load Descriptions&lt;/b&gt;&lt;p&gt;Loads a file which contains descriptions of custom widgets, so that these custom widgets can be used in the Qt Designer.&lt;/p&gt;
-&lt;p&gt;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&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQPushButton" row="4" column="1">
- <property name="name">
- <cstring>buttonSave</cstring>
- </property>
- <property name="text">
- <string>&amp;Save Descriptions...</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Saves widget description file</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Save Descriptions&lt;/b&gt;&lt;p&gt;Saves all the descriptions of the shown custom widgets to a file which can then be used to import the custom widgets elsewhere.</string>
- </property>
- </widget>
- <widget class="TQTabWidget" row="0" column="2" rowspan="5" colspan="1">
- <property name="name">
- <cstring>TabWidget1</cstring>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Change the properties of the selected custom widget.</string>
- </property>
- <widget class="TQWidget">
- <property name="name">
- <cstring>Widget2</cstring>
- </property>
- <attribute name="title">
- <string>De&amp;finition</string>
- </attribute>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout4</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLabel">
- <property name="name">
- <cstring>previewPixmap</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonChoosePixmap</cstring>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>22</height>
- </size>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Select a Pixmap</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Select a pixmap file.&lt;/b&gt;&lt;p&gt;The pixmap will be used to represent the widget in forms.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="TQLayoutWidget" row="1" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout5</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="KLineEdit">
- <property name="name">
- <cstring>editHeader</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Enter filename</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change the header file's name for the selected custom widget.&lt;/b&gt;&lt;p&gt;The header file will be included by forms using the widget.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonChooseHeader</cstring>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>22</height>
- </size>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Choose headerfile</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Look for the header file using a file dialog.</string>
- </property>
- </widget>
- <widget class="TQComboBox">
- <item>
- <property name="text">
- <string>Global</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Local</string>
- </property>
- </item>
- <property name="name">
- <cstring>localGlobalCombo</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Select access</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change how the include file will be included.&lt;/b&gt;&lt;p&gt;Global include files will be included using &amp;lt;&amp;gt;-brackets, while local files will included using quotation marks.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="KLineEdit" row="0" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>editClass</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change classname</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Enter the classname for the selected custom widget.&lt;/b&gt;&lt;p&gt;A class of that name must be defined in the header file.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQLabel" row="1" column="0">
- <property name="name">
- <cstring>Label11</cstring>
- </property>
- <property name="text">
- <string>Heade&amp;rfile:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editHeader</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="0">
- <property name="name">
- <cstring>Label10</cstring>
- </property>
- <property name="text">
- <string>Cl&amp;ass:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editClass</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0">
- <property name="name">
- <cstring>Label2</cstring>
- </property>
- <property name="text">
- <string>Pixmap:</string>
- </property>
- </widget>
- <widget class="TQLabel" row="3" column="0">
- <property name="name">
- <cstring>Label7</cstring>
- </property>
- <property name="text">
- <string>Si&amp;ze hint:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>spinWidth</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="4" column="0">
- <property name="name">
- <cstring>TextLabel1_2</cstring>
- </property>
- <property name="text">
- <string>Size p&amp;olicy:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>sizeHor</cstring>
- </property>
- </widget>
- <widget class="TQComboBox" row="4" column="2">
- <item>
- <property name="text">
- <string>Fixed</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Minimum</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Maximum</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Preferred</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>MinimumExpanding</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Expanding</string>
- </property>
- </item>
- <property name="name">
- <cstring>sizeVer</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Vertical Sizepolicy</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Choose theQt::Vertical size policy</string>
- </property>
- </widget>
- <widget class="TQSpinBox" row="3" column="1">
- <property name="name">
- <cstring>spinWidth</cstring>
- </property>
- <property name="maxValue">
- <number>32767</number>
- </property>
- <property name="minValue">
- <number>-1</number>
- </property>
- <property name="value">
- <number>-1</number>
- </property>
- <property name="toolTip" stdset="0">
- <string>Size hint width</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Set the size hint for the selected widget.&lt;/b&gt;&lt;p&gt;The size hint provides the recommended size for the widget. Enter a sizehint of -1/-1 if no size is recommended.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQSpinBox" row="3" column="2">
- <property name="name">
- <cstring>spinHeight</cstring>
- </property>
- <property name="maxValue">
- <number>32767</number>
- </property>
- <property name="minValue">
- <number>-1</number>
- </property>
- <property name="value">
- <number>-1</number>
- </property>
- <property name="toolTip" stdset="0">
- <string>Size hint height</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Set the size hint for the selected widget.&lt;/b&gt;&lt;p&gt;The size hint provides the recommended size for the widget. Enter a sizehint of -1/-1 if no size is recommended.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQComboBox" row="4" column="1">
- <item>
- <property name="text">
- <string>Fixed</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Minimum</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Maximum</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Preferred</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>MinimumExpanding</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Expanding</string>
- </property>
- </item>
- <property name="name">
- <cstring>sizeHor</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Horizontal Sizepolicy</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Choose the horizontal size policy for the widget</string>
- </property>
- </widget>
- <spacer row="6" column="2">
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQCheckBox" row="5" column="1">
- <property name="name">
- <cstring>checkContainer</cstring>
- </property>
- <property name="text">
- <string>Con&amp;tainer widget</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Container Widget</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;p&gt;&lt;b&gt;Container Widget&lt;/b&gt;&lt;/p&gt;
-&lt;p&gt;If this custom widget is able to contain other widgets (children), check this checkbox.&lt;/p&gt;</string>
- </property>
- </widget>
- </grid>
- </widget>
- <widget class="TQWidget">
- <property name="name">
- <cstring>Widget3</cstring>
- </property>
- <attribute name="title">
- <string>Si&amp;gnals</string>
- </attribute>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQListBox">
- <property name="name">
- <cstring>listSignals</cstring>
- </property>
- <property name="whatsThis" stdset="0">
- <string>The list of all the Q_SIGNALS that the selected widget can emit.</string>
- </property>
- </widget>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>Layout40</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer1_2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonAddSignal</cstring>
- </property>
- <property name="text">
- <string>N&amp;ew Signal</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Add new signal</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Add a new signal for the current custom widget.&lt;/b&gt;&lt;p&gt;An argument list should be provided in the signal's name, and the name must be unique.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonRemoveSignal</cstring>
- </property>
- <property name="text">
- <string>Dele&amp;te Signal</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Delete signal</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Delete the signal.&lt;/b&gt;&lt;p&gt;All connections using this signal will also be deleted.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>Layout38</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLabel">
- <property name="name">
- <cstring>TextLabel1</cstring>
- </property>
- <property name="text">
- <string>S&amp;ignal:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editSignal</cstring>
- </property>
- </widget>
- <widget class="KLineEdit">
- <property name="name">
- <cstring>editSignal</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change signal name</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change the name of the selected slot.&lt;/b&gt;&lt;p&gt;An argument list should be provided in the signal's name, and the name must be unique.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- <widget class="TQWidget">
- <property name="name">
- <cstring>Widget4</cstring>
- </property>
- <attribute name="title">
- <string>S&amp;lots</string>
- </attribute>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQListView" row="0" column="0" rowspan="1" colspan="4">
- <column>
- <property name="text">
- <string>Slot</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Access</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <property name="name">
- <cstring>listSlots</cstring>
- </property>
- <property name="allColumnsShowFocus">
- <bool>true</bool>
- </property>
- <property name="showSortIndicator">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>The list of all the custom widget's slots.</string>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0">
- <property name="name">
- <cstring>TextLabel2</cstring>
- </property>
- <property name="text">
- <string>Sl&amp;ot:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editSlot</cstring>
- </property>
- </widget>
- <widget class="KLineEdit" row="2" column="1">
- <property name="name">
- <cstring>editSlot</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change slot name</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change the name of the selected slot.&lt;/b&gt;&lt;p&gt;An argument list should be provided in the signal's name, and the name must be unique.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="2">
- <property name="name">
- <cstring>TextLabel3</cstring>
- </property>
- <property name="text">
- <string>&amp;Access:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>comboAccess</cstring>
- </property>
- </widget>
- <widget class="TQComboBox" row="2" column="3">
- <item>
- <property name="text">
- <string>public</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>protected</string>
- </property>
- </item>
- <property name="name">
- <cstring>comboAccess</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change slot access</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change the slot's access policy.&lt;/b&gt;&lt;p&gt;You can only connect to the widget's public Q_SLOTS.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="4">
- <property name="name">
- <cstring>Layout7</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonAddSlot</cstring>
- </property>
- <property name="text">
- <string>N&amp;ew Slot</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Add new slot</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Add a new slot to the current custom widget.&lt;/b&gt;&lt;p&gt;An argument list should be provided in the signal's name, and the name must be unique.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonRemoveSlot</cstring>
- </property>
- <property name="text">
- <string>Dele&amp;te Slot</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Delete slot</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Delete the slot.&lt;/b&gt;&lt;p&gt;All connections using this slot will also be deleted.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </grid>
- </widget>
- <widget class="TQWidget">
- <property name="name">
- <cstring>Widget5</cstring>
- </property>
- <attribute name="title">
- <string>&amp;Properties</string>
- </attribute>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="4">
- <property name="name">
- <cstring>Layout7_2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer2_2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonAddProperty</cstring>
- </property>
- <property name="text">
- <string>N&amp;ew Property</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Add new property</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Add a new property to the current custom widget.&lt;/b&gt;&lt;p&gt;The properties must be implemented in the class using Qt's property system.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonRemoveProperty</cstring>
- </property>
- <property name="text">
- <string>Dele&amp;te Property</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="toolTip" stdset="0">
- <string>Delete property</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Deletes the selected property.</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="TQComboBox" row="2" column="3">
- <item>
- <property name="text">
- <string>String</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>CString</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>StringList</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Bool</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Int</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>UInt</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Font</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Color</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Rect</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Point</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Size</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Pixmap</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Palette</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Cursor</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>SizePolicy</string>
- </property>
- </item>
- <property name="name">
- <cstring>comboType</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Select property type</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Select the type of the property.&lt;/b&gt;&lt;p&gt;The property must be implemented in the class using Qt's property system.&lt;/p&gt;&lt;p&gt;You can use integer types to support enumeration properties in the property editor.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQListView" row="0" column="0" rowspan="1" colspan="4">
- <column>
- <property name="text">
- <string>Property</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Type</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <property name="name">
- <cstring>listProperties</cstring>
- </property>
- <property name="allColumnsShowFocus">
- <bool>true</bool>
- </property>
- <property name="showSortIndicator">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;The list of the current widget's properties.&lt;/b&gt;&lt;p&gt;The properties of the custom widget can be changed in the property editor.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="KLineEdit" row="2" column="1">
- <property name="name">
- <cstring>editProperty</cstring>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change property name</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Enter a name for the property.&lt;/b&gt;&lt;p&gt;The properties must be implemented in the class using Qt's property system.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0">
- <property name="name">
- <cstring>TextLabel2_2</cstring>
- </property>
- <property name="text">
- <string>P&amp;roperty name:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editProperty</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="2">
- <property name="name">
- <cstring>TextLabel3_2</cstring>
- </property>
- <property name="text">
- <string>T&amp;ype:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>comboType</cstring>
- </property>
- </widget>
- </grid>
- </widget>
- </widget>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>boxWidgets</sender>
- <signal>selectionChanged(TQListBoxItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentWidgetChanged(TQListBoxItem*)</slot>
- </connection>
- <connection>
- <sender>boxWidgets</sender>
- <signal>currentChanged(TQListBoxItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentWidgetChanged(TQListBoxItem*)</slot>
- </connection>
- <connection>
- <sender>buttonNewWidget</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>addWidgetClicked()</slot>
- </connection>
- <connection>
- <sender>buttonDeleteWidget</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>deleteWidgetClicked()</slot>
- </connection>
- <connection>
- <sender>editClass</sender>
- <signal>textChanged(const TQString&amp;)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>classNameChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>editHeader</sender>
- <signal>textChanged(const TQString&amp;)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>headerFileChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>spinWidth</sender>
- <signal>valueChanged(int)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>widthChanged(int)</slot>
- </connection>
- <connection>
- <sender>spinHeight</sender>
- <signal>valueChanged(int)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>heightChanged(int)</slot>
- </connection>
- <connection>
- <sender>buttonChoosePixmap</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>pixmapChoosen()</slot>
- </connection>
- <connection>
- <sender>localGlobalCombo</sender>
- <signal>highlighted(int)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>includePolicyChanged(int)</slot>
- </connection>
- <connection>
- <sender>buttonChooseHeader</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>chooseHeader()</slot>
- </connection>
- <connection>
- <sender>buttonCancel</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>closeClicked()</slot>
- </connection>
- <connection>
- <sender>listSignals</sender>
- <signal>currentChanged(TQListBoxItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentSignalChanged(TQListBoxItem*)</slot>
- </connection>
- <connection>
- <sender>listSignals</sender>
- <signal>selectionChanged(TQListBoxItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentSignalChanged(TQListBoxItem*)</slot>
- </connection>
- <connection>
- <sender>buttonRemoveSignal</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>removeSignal()</slot>
- </connection>
- <connection>
- <sender>editSignal</sender>
- <signal>textChanged(const TQString&amp;)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>signalNameChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>listSlots</sender>
- <signal>currentChanged(TQListViewItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentSlotChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>listSlots</sender>
- <signal>selectionChanged(TQListViewItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentSlotChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>buttonRemoveSlot</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>removeSlot()</slot>
- </connection>
- <connection>
- <sender>editSlot</sender>
- <signal>textChanged(const TQString&amp;)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>slotNameChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>comboAccess</sender>
- <signal>activated(const TQString&amp;)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>slotAccessChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>listProperties</sender>
- <signal>currentChanged(TQListViewItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentPropertyChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>listProperties</sender>
- <signal>selectionChanged(TQListViewItem*)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>currentPropertyChanged(TQListViewItem*)</slot>
- </connection>
- <connection>
- <sender>buttonRemoveProperty</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>removeProperty()</slot>
- </connection>
- <connection>
- <sender>editProperty</sender>
- <signal>textChanged(const TQString&amp;)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>propertyNameChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>comboType</sender>
- <signal>activated(const TQString&amp;)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>propertyTypeChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>buttonLoad</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>loadDescription()</slot>
- </connection>
- <connection>
- <sender>buttonSave</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>saveDescription()</slot>
- </connection>
- <connection>
- <sender>sizeHor</sender>
- <signal>activated(int)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>horDataChanged(int)</slot>
- </connection>
- <connection>
- <sender>sizeVer</sender>
- <signal>activated(int)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>verDataChanged(int)</slot>
- </connection>
- <connection>
- <sender>buttonAddProperty</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>addProperty()</slot>
- </connection>
- <connection>
- <sender>checkContainer</sender>
- <signal>toggled(bool)</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>widgetIsContainer(bool)</slot>
- </connection>
- <connection>
- <sender>buttonAddSignal</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>addSignal()</slot>
- </connection>
- <connection>
- <sender>buttonAddSlot</sender>
- <signal>clicked()</signal>
- <receiver>CustomWidgetEditorBase</receiver>
- <slot>addSlot()</slot>
- </connection>
- <slot access="protected" language="C++" returnType="void">init()</slot>
- <slot access="protected" language="C++" returnType="void">destroy()</slot>
- <slot access="protected" language="C++" returnType="void">addProperty()</slot>
- <slot access="public" language="C++" returnType="void">addSignal()</slot>
- <slot access="protected" language="C++" returnType="void">addWidgetClicked()</slot>
- <slot access="protected" language="C++" returnType="void">chooseHeader()</slot>
- <slot access="protected" language="C++" returnType="void">classNameChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">closeClicked()</slot>
- <slot access="protected" language="C++" returnType="void">currentPropertyChanged( TQListViewItem * )</slot>
- <slot access="protected" language="C++" returnType="void">currentSignalChanged( TQListBoxItem * )</slot>
- <slot access="protected" language="C++" returnType="void">currentSlotChanged( TQListViewItem * )</slot>
- <slot access="protected" language="C++" returnType="void">currentWidgetChanged( TQListBoxItem * )</slot>
- <slot access="protected" language="C++" returnType="void">deleteWidgetClicked()</slot>
- <slot access="protected" language="C++" returnType="void">headerFileChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">heightChanged( int )</slot>
- <slot access="protected" language="C++" returnType="void">horDataChanged(int)</slot>
- <slot access="protected" language="C++" returnType="void">includePolicyChanged( int )</slot>
- <slot access="public" language="C++" returnType="void">loadDescription()</slot>
- <slot access="public" language="C++" returnType="void">addSlot()</slot>
- <slot access="protected" language="C++" returnType="void">pixmapChoosen()</slot>
- <slot access="protected" language="C++" returnType="void">propertyNameChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">propertyTypeChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">removeProperty()</slot>
- <slot access="protected" language="C++" returnType="void">removeSignal()</slot>
- <slot access="protected" language="C++" returnType="void">removeSlot()</slot>
- <slot access="protected" language="C++" returnType="void">saveDescription()</slot>
- <slot access="protected" language="C++" returnType="void">signalNameChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">slotAccessChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">slotNameChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">verDataChanged(int)</slot>
- <slot access="protected" language="C++" returnType="void">widgetIsContainer(bool)</slot>
- <slot access="protected" language="C++" returnType="void">widthChanged( int )</slot>
-</connections>
-<tabstops>
- <tabstop>buttonCancel</tabstop>
- <tabstop>boxWidgets</tabstop>
- <tabstop>buttonNewWidget</tabstop>
- <tabstop>buttonDeleteWidget</tabstop>
- <tabstop>buttonLoad</tabstop>
- <tabstop>buttonSave</tabstop>
- <tabstop>TabWidget1</tabstop>
- <tabstop>editClass</tabstop>
- <tabstop>editHeader</tabstop>
- <tabstop>buttonChooseHeader</tabstop>
- <tabstop>localGlobalCombo</tabstop>
- <tabstop>buttonChoosePixmap</tabstop>
- <tabstop>spinWidth</tabstop>
- <tabstop>spinHeight</tabstop>
- <tabstop>sizeHor</tabstop>
- <tabstop>sizeVer</tabstop>
- <tabstop>checkContainer</tabstop>
- <tabstop>helpButton</tabstop>
- <tabstop>listSignals</tabstop>
- <tabstop>buttonAddSignal</tabstop>
- <tabstop>buttonRemoveSignal</tabstop>
- <tabstop>editSignal</tabstop>
- <tabstop>listSlots</tabstop>
- <tabstop>buttonAddSlot</tabstop>
- <tabstop>buttonRemoveSlot</tabstop>
- <tabstop>editSlot</tabstop>
- <tabstop>comboAccess</tabstop>
- <tabstop>listProperties</tabstop>
- <tabstop>buttonAddProperty</tabstop>
- <tabstop>buttonRemoveProperty</tabstop>
- <tabstop>editProperty</tabstop>
- <tabstop>comboType</tabstop>
-</tabstops>
-</UI>
diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp
deleted file mode 100644
index f417f6f2..00000000
--- a/kdevdesigner/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 <tdefiledialog.h>
-#include <klineedit.h>
-
-#include <tqlistbox.h>
-#include <tqpushbutton.h>
-#include <tqcombobox.h>
-#include <tqspinbox.h>
-#include <tqlabel.h>
-#include <tqmessagebox.h>
-#include <tqfiledialog.h>
-#include <tqmessagebox.h>
-#include <tqtimer.h>
-#include <tqapplication.h>
-#include <tqlistview.h>
-#include <tqfile.h>
-#include <tqtextstream.h>
-#include <tqdom.h>
-#include <tqtextcodec.h>
-#include <tqcheckbox.h>
-
-#include <tdelocale.h>
-
-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<MetaDataBase::CustomWidget> *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<TQCString>::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<MetaDataBase::Function>::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<MetaDataBase::Property>::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<TQListBoxItem*, MetaDataBase::CustomWidget*>::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<TQCString>::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<MetaDataBase::Function>::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<MetaDataBase::Function>::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<MetaDataBase::Property>::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<MetaDataBase::Property>::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( "\"", "&quot;" );
- s2 = s2.replace( "&", "&amp;" );
- s2 = s2.replace( ">", "&gt;" );
- s2 = s2.replace( "<", "&lt;" );
- s2 = s2.replace( "'", "&apos;" );
- 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 << "<!DOCTYPE CW><CW>" << endl;
-
- ts << makeIndent2( indent ) << "<customwidgets>" << endl;
- indent++;
-
- TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
- for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- ts << makeIndent2( indent ) << "<customwidget>" << endl;
- indent++;
- ts << makeIndent2( indent ) << "<class>" << w->className << "</class>" << endl;
- ts << makeIndent2( indent ) << "<header location=\""
- << ( w->includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" )
- << "\">" << w->includeFile << "</header>" << endl;
- ts << makeIndent2( indent ) << "<sizehint>" << endl;
- indent++;
- ts << makeIndent2( indent ) << "<width>" << w->sizeHint.width() << "</width>" << endl;
- ts << makeIndent2( indent ) << "<height>" << w->sizeHint.height() << "</height>" << endl;
- indent--;
- ts << makeIndent2( indent ) << "</sizehint>" << endl;
- ts << makeIndent2( indent ) << "<container>" << (int)w->isContainer << "</container>" << endl;
- ts << makeIndent2( indent ) << "<sizepolicy>" << endl;
- indent++;
- ts << makeIndent2( indent ) << "<hordata>" << (int)w->sizePolicy.horData() << "</hordata>" << endl;
- ts << makeIndent2( indent ) << "<verdata>" << (int)w->sizePolicy.verData() << "</verdata>" << endl;
- indent--;
- ts << makeIndent2( indent ) << "</sizepolicy>" << endl;
- ts << makeIndent2( indent ) << "<pixmap>" << endl;
- indent++;
- Resource::saveImageData( w->pixmap->convertToImage(), ts, indent );
- indent--;
- ts << makeIndent2( indent ) << "</pixmap>" << endl;
- if ( !w->lstSignals.isEmpty() ) {
- for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
- ts << makeIndent2( indent ) << "<signal>" << entitize2( *it ) << "</signal>" << endl;
- }
- if ( !w->lstSlots.isEmpty() ) {
- for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
- ts << makeIndent2( indent ) << "<slot access=\"" << (*it).access << "\">" << entitize2( (*it).function ) << "</slot>" << endl;
- }
- if ( !w->lstProperties.isEmpty() ) {
- for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
- ts << makeIndent2( indent ) << "<property type=\"" << (*it).type << "\">" << entitize2( (*it).property ) << "</property>" << endl;
- }
- indent--;
- ts << makeIndent2( indent ) << "</customwidget>" << endl;
- }
-
- indent--;
- ts << makeIndent2( indent ) << "</customwidgets>" << endl;
- ts << "</CW>" << 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
deleted file mode 100644
index 9e53b2ce..00000000
--- a/kdevdesigner/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 <tqmap.h>
-#include <tqobjectlist.h>
-
-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<TQListBoxItem*, MetaDataBase::CustomWidget*> customWidgets;
- TQString oldName;
- TQTimer *checkTimer;
- TQListBoxItem *oldItem;
- MainWindow *mainWindow;
- TQObjectList cwLst;
-
-};
-
-#endif
diff --git a/kdevdesigner/designer/database.cpp b/kdevdesigner/designer/database.cpp
deleted file mode 100644
index b5baea28..00000000
--- a/kdevdesigner/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 <tqsqldatabase.h>
-#include <tqsqlform.h>
-#include <tqsqlcursor.h>
-#include <tqsqlrecord.h>
-
-DatabaseSupport::DatabaseSupport()
-{
- con = 0;
- frm = 0;
- parent = 0;
-}
-
-void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o,
- const TQMap<TQString, TQString> &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<TQString, TQString>::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
deleted file mode 100644
index cbde491f..00000000
--- a/kdevdesigner/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 <tqdataview.h>
-#include <tqdatabrowser.h>
-#include <tqsqlcursor.h>
-#include <tqstring.h>
-
-class TQSqlDatabase;
-class TQSqlForm;
-
-class DatabaseSupport
-{
-public:
- DatabaseSupport();
- virtual ~DatabaseSupport() {}
-
- void initPreview( const TQString &connection, const TQString &table, TQObject *o,
- const TQMap<TQString, TQString> &databaseControls );
-
-protected:
- TQSqlDatabase* con;
- TQSqlForm* frm;
- TQString tbl;
- TQMap<TQString, TQString> 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
deleted file mode 100644
index 75b7d5cb..00000000
--- a/kdevdesigner/designer/dbconnection.ui
+++ /dev/null
@@ -1,222 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>DatabaseConnectionWidget</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQWidget">
- <property name="name">
- <cstring>DatabaseConnectionWidget</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>199</width>
- <height>185</height>
- </rect>
- </property>
- <property name="caption">
- <string>Edit Database Connection</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLabel" row="2" column="0">
- <property name="name">
- <cstring>TextLabel3</cstring>
- </property>
- <property name="text">
- <string>&amp;Database name:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editDatabase</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="3" column="0">
- <property name="name">
- <cstring>TextLabel4</cstring>
- </property>
- <property name="text">
- <string>&amp;Username:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editUsername</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="4" column="0">
- <property name="name">
- <cstring>TextLabel4_2</cstring>
- </property>
- <property name="text">
- <string>&amp;Password:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editPassword</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="1" column="0">
- <property name="name">
- <cstring>TextLabel2</cstring>
- </property>
- <property name="text">
- <string>D&amp;river:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>comboDriver</cstring>
- </property>
- </widget>
- <widget class="KLineEdit" row="0" column="1">
- <property name="name">
- <cstring>editName</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- <widget class="TQLabel" row="5" column="0">
- <property name="name">
- <cstring>TextLabel5</cstring>
- </property>
- <property name="text">
- <string>&amp;Hostname:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editHostname</cstring>
- </property>
- </widget>
- <widget class="TQComboBox" row="1" column="1">
- <property name="name">
- <cstring>comboDriver</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="0">
- <property name="name">
- <cstring>TextLabel1</cstring>
- </property>
- <property name="text">
- <string>&amp;Name:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editName</cstring>
- </property>
- </widget>
- <widget class="KLineEdit" row="5" column="1">
- <property name="name">
- <cstring>editHostname</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- <widget class="TQLabel" row="6" column="0">
- <property name="name">
- <cstring>TextLabel1_2</cstring>
- </property>
- <property name="text">
- <string>P&amp;ort:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editPort</cstring>
- </property>
- </widget>
- <widget class="KLineEdit" row="3" column="1">
- <property name="name">
- <cstring>editUsername</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- <widget class="KLineEdit" row="4" column="1">
- <property name="name">
- <cstring>editPassword</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="echoMode">
- <enum>Password</enum>
- </property>
- </widget>
- <widget class="KLineEdit" row="2" column="1">
- <property name="name">
- <cstring>editDatabase</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- <widget class="TQSpinBox" row="6" column="1">
- <property name="name">
- <cstring>editPort</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="specialValueText">
- <string>Default</string>
- </property>
- <property name="maxValue">
- <number>65535</number>
- </property>
- <property name="minValue">
- <number>-1</number>
- </property>
- <property name="value">
- <number>-1</number>
- </property>
- </widget>
- </grid>
-</widget>
-<connections>
-</connections>
-<tabstops>
- <tabstop>editName</tabstop>
- <tabstop>comboDriver</tabstop>
- <tabstop>editDatabase</tabstop>
- <tabstop>editUsername</tabstop>
- <tabstop>editPassword</tabstop>
- <tabstop>editHostname</tabstop>
- <tabstop>editPort</tabstop>
-</tabstops>
-<Q_SLOTS>
- <slot access="protected">init()</slot>
- <slot access="protected">destroy()</slot>
-</Q_SLOTS>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/kdevdesigner/designer/dbconnectioneditor.ui b/kdevdesigner/designer/dbconnectioneditor.ui
deleted file mode 100644
index 40ef0a9b..00000000
--- a/kdevdesigner/designer/dbconnectioneditor.ui
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>DatabaseConnectionEditorBase</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>DatabaseConnectionEditorBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>393</width>
- <height>286</height>
- </rect>
- </property>
- <property name="caption">
- <string>Connect</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQPushButton" row="1" column="2">
- <property name="name">
- <cstring>PushButton2</cstring>
- </property>
- <property name="text">
- <string>&amp;Cancel</string>
- </property>
- </widget>
- <widget class="TQPushButton" row="1" column="1">
- <property name="name">
- <cstring>PushButton1</cstring>
- </property>
- <property name="text">
- <string>&amp;OK</string>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- <spacer row="1" column="0">
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="3">
- <property name="name">
- <cstring>grp</cstring>
- </property>
- <property name="title">
- <string>Connection Details</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer row="0" column="0">
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
- </widget>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>PushButton2</sender>
- <signal>clicked()</signal>
- <receiver>DatabaseConnectionEditorBase</receiver>
- <slot>reject()</slot>
- </connection>
- <connection>
- <sender>PushButton1</sender>
- <signal>clicked()</signal>
- <receiver>DatabaseConnectionEditorBase</receiver>
- <slot>accept()</slot>
- </connection>
- <slot access="protected" language="C++" returnType="void">init()</slot>
- <slot access="protected" language="C++" returnType="void">destroy()</slot>
-</connections>
-<tabstops>
- <tabstop>PushButton1</tabstop>
- <tabstop>PushButton2</tabstop>
-</tabstops>
-</UI>
diff --git a/kdevdesigner/designer/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp
deleted file mode 100644
index 3cfd1fdc..00000000
--- a/kdevdesigner/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 <tqgroupbox.h>
-#include <tqcombobox.h>
-#include <tqspinbox.h>
-#include <klineedit.h>
-#include <tqlayout.h>
-#include <tqsqldatabase.h>
-
-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
deleted file mode 100644
index e2db2286..00000000
--- a/kdevdesigner/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/kdevdesigner/designer/dbconnections.ui b/kdevdesigner/designer/dbconnections.ui
deleted file mode 100644
index 27d7d127..00000000
--- a/kdevdesigner/designer/dbconnections.ui
+++ /dev/null
@@ -1,321 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>DatabaseConnectionBase</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>DatabaseConnectionBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>512</width>
- <height>309</height>
- </rect>
- </property>
- <property name="caption">
- <string>Edit Database Connections</string>
- </property>
- <property name="sizeGripEnabled">
- <bool>true</bool>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQPushButton" row="0" column="1">
- <property name="name">
- <cstring>buttonNew</cstring>
- </property>
- <property name="text">
- <string>&amp;New Connection</string>
- </property>
- </widget>
- <widget class="TQListBox" row="0" column="0" rowspan="5" colspan="1">
- <property name="name">
- <cstring>listConnections</cstring>
- </property>
- </widget>
- <widget class="TQPushButton" row="1" column="1">
- <property name="name">
- <cstring>buttonDelete</cstring>
- </property>
- <property name="text">
- <string>&amp;Delete Connection</string>
- </property>
- </widget>
- <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3">
- <property name="name">
- <cstring>Layout5</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonHelp</cstring>
- </property>
- <property name="text">
- <string>&amp;Help</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Horizontal Spacing2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonClose</cstring>
- </property>
- <property name="text">
- <string>&amp;Close</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Close the dialog and discard any changes.</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <spacer row="2" column="1" rowspan="3" colspan="1">
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQGroupBox" row="0" column="2" rowspan="3" colspan="1">
- <property name="name">
- <cstring>grp</cstring>
- </property>
- <property name="title">
- <string>Connection</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer row="0" column="0">
- <property name="name">
- <cstring>Spacer3</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
- </widget>
- <widget class="TQLayoutWidget" row="3" column="2">
- <property name="name">
- <cstring>Layout4</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer4</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>buttonConnect</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Connec&amp;t</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer5</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- <spacer row="4" column="2">
- <property name="name">
- <cstring>Spacer6</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>buttonClose</sender>
- <signal>clicked()</signal>
- <receiver>DatabaseConnectionBase</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>buttonNew</sender>
- <signal>clicked()</signal>
- <receiver>DatabaseConnectionBase</receiver>
- <slot>newConnection()</slot>
- </connection>
- <connection>
- <sender>buttonDelete</sender>
- <signal>clicked()</signal>
- <receiver>DatabaseConnectionBase</receiver>
- <slot>deleteConnection()</slot>
- </connection>
- <connection>
- <sender>buttonConnect</sender>
- <signal>clicked()</signal>
- <receiver>DatabaseConnectionBase</receiver>
- <slot>doConnect()</slot>
- </connection>
- <connection>
- <sender>listConnections</sender>
- <signal>highlighted(const TQString&amp;)</signal>
- <receiver>DatabaseConnectionBase</receiver>
- <slot>currentConnectionChanged(const TQString&amp;)</slot>
- </connection>
- <connection>
- <sender>listConnections</sender>
- <signal>selected(const TQString&amp;)</signal>
- <receiver>DatabaseConnectionBase</receiver>
- <slot>currentConnectionChanged(const TQString&amp;)</slot>
- </connection>
- <slot access="protected" language="C++" returnType="void">init()</slot>
- <slot access="protected" language="C++" returnType="void">destroy()</slot>
- <slot access="protected" language="C++" returnType="void">currentConnectionChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">deleteConnection()</slot>
- <slot access="protected" language="C++" returnType="void">newConnection()</slot>
- <slot access="protected" language="C++" returnType="void">connectionNameChanged( const TQString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">doConnect()</slot>
-</connections>
-<tabstops>
- <tabstop>buttonClose</tabstop>
- <tabstop>listConnections</tabstop>
- <tabstop>buttonNew</tabstop>
- <tabstop>buttonDelete</tabstop>
- <tabstop>buttonConnect</tabstop>
- <tabstop>buttonHelp</tabstop>
-</tabstops>
-</UI>
diff --git a/kdevdesigner/designer/dbconnectionsimpl.cpp b/kdevdesigner/designer/dbconnectionsimpl.cpp
deleted file mode 100644
index e589679b..00000000
--- a/kdevdesigner/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 <tqptrlist.h>
-#include <tqgroupbox.h>
-#include <tqlayout.h>
-#include "project.h"
-#include <tqlistbox.h>
-#include <tqcombobox.h>
-#include <tqspinbox.h>
-#include <klineedit.h>
-#include <tqpushbutton.h>
-#include <tqsqldatabase.h>
-#include <tqmessagebox.h>
-#include <tqapplication.h>
-#include "mainwindow.h"
-#include "asciivalidator.h"
-
-#include <tdelocale.h>
-
-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<DatabaseConnection> 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
deleted file mode 100644
index e06cc06a..00000000
--- a/kdevdesigner/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/kdevdesigner/designer/defs.cpp b/kdevdesigner/designer/defs.cpp
deleted file mode 100644
index c1aa36de..00000000
--- a/kdevdesigner/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/kdevdesigner/designer/defs.h b/kdevdesigner/designer/defs.h
deleted file mode 100644
index 45143b81..00000000
--- a/kdevdesigner/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 <tqsizepolicy.h>
-#include <tqstring.h>
-
-#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
deleted file mode 100644
index fa840181..00000000
--- a/kdevdesigner/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 <private/tqucomextra_p.h>
-#include <tqaction.h>
-#include <tqapplication.h>
-#include <tqcheckbox.h>
-#include <tqcombobox.h>
-#include <tqdialog.h>
-#include <tqheader.h>
-#include <tqlabel.h>
-#include <tqlayout.h>
-#include <tqlineedit.h>
-#include <tqlistbox.h>
-#include <tqlistview.h>
-#include <tqmap.h>
-#include <tqmessagebox.h>
-#include <tqmetaobject.h>
-#include <tqobjectlist.h>
-#include <tqpainter.h>
-#include <tqpixmap.h>
-#include <tqpushbutton.h>
-#include <tqspinbox.h>
-#include <tqstring.h>
-#include <tqtooltip.h>
-#include <tqvariant.h>
-#include <tqwhatsthis.h>
-#include <tqwidget.h>
-
-#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
deleted file mode 100644
index 66ecb438..00000000
--- a/kdevdesigner/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/kdevdesigner/designer/designeraction.h b/kdevdesigner/designer/designeraction.h
deleted file mode 100644
index 85efef6b..00000000
--- a/kdevdesigner/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 <tqaction.h>
-
-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
deleted file mode 100644
index 22d1e531..00000000
--- a/kdevdesigner/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 <kiconloader.h>
-
-#include <tqfile.h>
-#include <tqdir.h>
-#include <tqsettings.h>
-#include <tqsplashscreen.h>
-
-#ifdef TQ_WS_WIN
-#include <tqt_windows.h>
-#include <process.h>
-#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
deleted file mode 100644
index b3c62a11..00000000
--- a/kdevdesigner/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 <tqapplication.h>
-
-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
deleted file mode 100644
index 57ee992e..00000000
--- a/kdevdesigner/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 <tqmenubar.h>
-#include <tqpopupmenu.h>
-#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 <tqvariant.h>
-#include <tqlistview.h>
-#include <tqtextedit.h>
-#include <tqstatusbar.h>
-#include "pixmapcollection.h"
-#include "hierarchyview.h"
-#include <stdlib.h>
-#include <tqmetaobject.h>
-#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<DesignerProject> 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<DesignerFormWindow> DesignerProjectImpl::formList() const
-{
- TQPtrList<DesignerFormWindow> list;
- TQObjectList *forms = project->formList();
- if ( !forms )
- return list;
-
- TQPtrListIterator<TQObject> it( *forms );
- while ( it.current() ) {
- TQObject *obj = it.current();
- ++it;
- TQWidget *par = ::tqqt_cast<FormWindow*>(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<FormFile> 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<FormFile> 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<DesignerDatabase> DesignerProjectImpl::databaseConnections() const
-{
- TQPtrList<DesignerDatabase> lst;
-#ifndef TQT_NO_SQL
- TQPtrList<DatabaseConnection> 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<TQString, TQValueList<uint> > &bps ) const
-{
- MainWindow::self->saveAllBreakPoints();
- for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
- sources.current(); ++sources ) {
- SourceFile* f = sources.current();
- bps.insert( project->makeRelative( f->fileName() ) + " <Source-File>", MetaDataBase::breakPoints( f ) );
- }
- for ( TQPtrListIterator<FormFile> forms = project->formFiles();
- forms.current(); ++forms ) {
- if ( forms.current()->formWindow() )
- bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", 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<uint> empty;
- for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
- sources.current(); ++sources ) {
- SourceFile* f = sources.current();
- MetaDataBase::setBreakPoints( f, empty );
- }
- for ( TQPtrListIterator<FormFile> 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<TQString, TQStringList> 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<TQString, TQStringList> & )
-{
-}
-
-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<TQAction> DesignerFormWindowImpl::actionList() const
-{
- return TQPtrList<TQAction>();
-}
-
-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<TQString, TQString> &f )
-{
- MetaDataBase::setColumnFields( o, f );
-}
-
-TQStringList DesignerFormWindowImpl::implementationIncludes() const
-{
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
- TQStringList lst;
- for ( TQValueList<MetaDataBase::Include>::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<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
- TQStringList lst;
- for ( TQValueList<MetaDataBase::Include>::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<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
- TQValueList<MetaDataBase::Include> includes;
- for ( TQValueList<MetaDataBase::Include>::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<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
- TQValueList<MetaDataBase::Include> includes;
- for ( TQValueList<MetaDataBase::Include>::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<TQMainWindow*>(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<TQMainWindow*>(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<TQMainWindow*>(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<TQMainWindow*>(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<TQMainWindow*>(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<TQMainWindow*>(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<uint> 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
deleted file mode 100644
index 2ddcd47c..00000000
--- a/kdevdesigner/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<DesignerProject> 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<DesignerFormWindow> 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<DesignerDatabase> 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<TQString, TQValueList<uint> > &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<TQString, TQStringList> fields() const;
- void setFields( const TQMap<TQString, TQStringList> & );
- 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<TQAction> 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<TQString, TQString> & );
- 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
deleted file mode 100644
index ea59e46a..00000000
--- a/kdevdesigner/designer/editfunctions.ui
+++ /dev/null
@@ -1,714 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>EditFunctionsBase</class>
-<comment>*********************************************************************
-** 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.
-**
-*********************************************************************</comment>
-<widget class="TQDialog">
- <property name="name">
- <cstring>EditFunctionsBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>600</width>
- <height>371</height>
- </rect>
- </property>
- <property name="caption">
- <string>Edit Functions</string>
- </property>
- <property name="sizeGripEnabled">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Edit Functions&lt;/b&gt;&lt;p&gt;Add, edit or delete the current form's slots or functions.&lt;/p&gt;&lt;p&gt;Click the &lt;b&gt;Add Function&lt;/b&gt;-button to create a new function; enter a name, choose an access mode and specify if it should be a slot or normal function.&lt;/p&gt;&lt;p&gt;Select an entry from the list and click the &lt;b&gt;Delete Function&lt;/b&gt;-button to remove a function; in case of a slot all connections using this slot will also be removed.&lt;/p&gt;</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQListView">
- <column>
- <property name="text">
- <string>Function</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Return Type</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Specifier</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Access</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Type</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>In Use</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
- <property name="name">
- <cstring>functionListView</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>7</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>Sunken</enum>
- </property>
- <property name="allColumnsShowFocus">
- <bool>true</bool>
- </property>
- <property name="showSortIndicator">
- <bool>true</bool>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;This form's functions.&lt;/b&gt;&lt;p&gt;Select the function you want to change or delete.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>Layout11</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>6</number>
- </property>
- <widget class="TQCheckBox">
- <property name="name">
- <cstring>showOnlySlots</cstring>
- </property>
- <property name="focusPolicy">
- <enum>StrongFocus</enum>
- </property>
- <property name="text">
- <string>Only d&amp;isplay slots</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change displaying mode for functions</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Check this button if only the slots should be displayed&lt;/b&gt;&lt;p&gt;Otherwise all functions, i.e. normal C++ functions and slots are displayed.&lt;/p&gt;
-</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Vertical Spacing1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>addFunction</cstring>
- </property>
- <property name="text">
- <string>&amp;New Function</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Add new function</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Add a new function.&lt;/b&gt;&lt;p&gt;New functions have a default name and public access.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQPushButton">
- <property name="name">
- <cstring>deleteFunction</cstring>
- </property>
- <property name="text">
- <string>&amp;Delete Function</string>
- </property>
- <property name="toolTip" stdset="0">
- <string>Delete function</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Delete the selected function.&lt;/b&gt;&lt;p&gt;All connections using this function are also removed.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="TQGroupBox">
- <property name="name">
- <cstring>boxProperties</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Function Properties</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>Layout14</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <widget class="TQLayoutWidget">
- <property name="name">
- <cstring>Layout5</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="TQLabel">
- <property name="name">
- <cstring>Label8</cstring>
- </property>
- <property name="text">
- <string>&amp;Function:</string>
- </property>
- <property name="alignment">
- <set>AlignVCenter|AlignRight</set>
- </property>
- <property name="buddy" stdset="0">
- <cstring>functionName</cstring>
- </property>
- </widget>
- <widget class="KLineEdit">
- <property name="name">
- <cstring>functionName</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change function name</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change the name of the selected function.&lt;/b&gt;&lt;p&gt;The name should include the argument list and must be syntactically correct.&lt;/p&gt;</string>
- </property>
- </widget>
- <widget class="TQLabel">
- <property name="name">
- <cstring>labelType</cstring>
- </property>
- <property name="text">
- <string>&amp;Return type:</string>
- </property>
- <property name="alignment">
- <set>AlignVCenter|AlignRight</set>
- </property>
- <property name="buddy" stdset="0">
- <cstring>editType</cstring>
- </property>
- </widget>
- <widget class="KLineEdit">
- <property name="name">
- <cstring>editType</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" stdset="0">
- <string>Change the return type of the function</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change the return type of the selected function.&lt;/b&gt;&lt;p&gt;Specifiy here the datatype which should be returned by the function.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer6_2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">