summaryrefslogtreecommitdiffstats
path: root/umbrello
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello')
-rw-r--r--umbrello/umbrello/activitywidget.cpp38
-rw-r--r--umbrello/umbrello/activitywidget.h8
-rw-r--r--umbrello/umbrello/actor.cpp8
-rw-r--r--umbrello/umbrello/actor.h6
-rw-r--r--umbrello/umbrello/actorwidget.cpp18
-rw-r--r--umbrello/umbrello/actorwidget.h6
-rw-r--r--umbrello/umbrello/aligntoolbar.cpp10
-rw-r--r--umbrello/umbrello/aligntoolbar.h6
-rw-r--r--umbrello/umbrello/artifact.cpp10
-rw-r--r--umbrello/umbrello/artifact.h6
-rw-r--r--umbrello/umbrello/artifactwidget.cpp72
-rw-r--r--umbrello/umbrello/artifactwidget.h18
-rw-r--r--umbrello/umbrello/association.cpp74
-rw-r--r--umbrello/umbrello/association.h30
-rw-r--r--umbrello/umbrello/associationwidget.cpp370
-rw-r--r--umbrello/umbrello/associationwidget.h108
-rw-r--r--umbrello/umbrello/associationwidgetlist.h6
-rw-r--r--umbrello/umbrello/attribute.cpp72
-rw-r--r--umbrello/umbrello/attribute.h24
-rw-r--r--umbrello/umbrello/autolayout/autolayoutdlg.cpp12
-rw-r--r--umbrello/umbrello/autolayout/autolayoutdlg.h8
-rw-r--r--umbrello/umbrello/autolayout/simplecanvas.h2
-rw-r--r--umbrello/umbrello/boxwidget.cpp10
-rw-r--r--umbrello/umbrello/boxwidget.h6
-rw-r--r--umbrello/umbrello/classifier.cpp108
-rw-r--r--umbrello/umbrello/classifier.h32
-rw-r--r--umbrello/umbrello/classifiercodedocument.cpp70
-rw-r--r--umbrello/umbrello/classifiercodedocument.h24
-rw-r--r--umbrello/umbrello/classifierlistitem.cpp10
-rw-r--r--umbrello/umbrello/classifierlistitem.h10
-rw-r--r--umbrello/umbrello/classifierwidget.cpp98
-rw-r--r--umbrello/umbrello/classifierwidget.h22
-rw-r--r--umbrello/umbrello/clipboard/idchangelog.h14
-rw-r--r--umbrello/umbrello/clipboard/umlclipboard.cpp22
-rw-r--r--umbrello/umbrello/clipboard/umlclipboard.h18
-rw-r--r--umbrello/umbrello/clipboard/umldrag.cpp258
-rw-r--r--umbrello/umbrello/clipboard/umldrag.h46
-rw-r--r--umbrello/umbrello/cmdlineexportallviewsevent.cpp14
-rw-r--r--umbrello/umbrello/cmdlineexportallviewsevent.h8
-rw-r--r--umbrello/umbrello/codeaccessormethod.cpp14
-rw-r--r--umbrello/umbrello/codeaccessormethod.h10
-rw-r--r--umbrello/umbrello/codeaccessormethodlist.h6
-rw-r--r--umbrello/umbrello/codeblock.cpp14
-rw-r--r--umbrello/umbrello/codeblock.h14
-rw-r--r--umbrello/umbrello/codeblockwithcomments.cpp40
-rw-r--r--umbrello/umbrello/codeblockwithcomments.h16
-rw-r--r--umbrello/umbrello/codeclassfield.cpp64
-rw-r--r--umbrello/umbrello/codeclassfield.h22
-rw-r--r--umbrello/umbrello/codeclassfielddeclarationblock.cpp12
-rw-r--r--umbrello/umbrello/codeclassfielddeclarationblock.h8
-rw-r--r--umbrello/umbrello/codeclassfieldlist.h6
-rw-r--r--umbrello/umbrello/codecomment.cpp8
-rw-r--r--umbrello/umbrello/codecomment.h8
-rw-r--r--umbrello/umbrello/codedocument.cpp96
-rw-r--r--umbrello/umbrello/codedocument.h58
-rw-r--r--umbrello/umbrello/codedocumentlist.h6
-rw-r--r--umbrello/umbrello/codegenerationpolicy.cpp72
-rw-r--r--umbrello/umbrello/codegenerationpolicy.h32
-rw-r--r--umbrello/umbrello/codegenerator.cpp152
-rw-r--r--umbrello/umbrello/codegenerator.h46
-rw-r--r--umbrello/umbrello/codegenerators/adawriter.cpp86
-rw-r--r--umbrello/umbrello/codegenerators/adawriter.h16
-rw-r--r--umbrello/umbrello/codegenerators/aswriter.cpp36
-rw-r--r--umbrello/umbrello/codegenerators/aswriter.h6
-rw-r--r--umbrello/umbrello/codegenerators/classifierinfo.h6
-rw-r--r--umbrello/umbrello/codegenerators/codegen_utils.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/codegen_utils.h8
-rw-r--r--umbrello/umbrello/codegenerators/codegenpolicyext.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppcodeclassfield.cpp8
-rw-r--r--umbrello/umbrello/codegenerators/cppcodeclassfield.h10
-rw-r--r--umbrello/umbrello/codegenerators/cppcodecomment.cpp26
-rw-r--r--umbrello/umbrello/codegenerators/cppcodecomment.h12
-rw-r--r--umbrello/umbrello/codegenerators/cppcodedocumentation.cpp34
-rw-r--r--umbrello/umbrello/codegenerators/cppcodedocumentation.h12
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationform.cpp46
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationform.h18
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp60
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h44
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp6
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerator.cpp18
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerator.h12
-rw-r--r--umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp16
-rw-r--r--umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h10
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp28
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp10
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodedocument.cpp62
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodedocument.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp30
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeoperation.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppmakecodedocument.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/cppmakecodedocument.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp26
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodedocument.h4
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp38
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeoperation.h4
-rw-r--r--umbrello/umbrello/codegenerators/cppwriter.cpp256
-rw-r--r--umbrello/umbrello/codegenerators/cppwriter.h100
-rw-r--r--umbrello/umbrello/codegenerators/csharpwriter.cpp58
-rw-r--r--umbrello/umbrello/codegenerators/csharpwriter.h24
-rw-r--r--umbrello/umbrello/codegenerators/dwriter.cpp148
-rw-r--r--umbrello/umbrello/codegenerators/dwriter.h72
-rw-r--r--umbrello/umbrello/codegenerators/idlwriter.cpp64
-rw-r--r--umbrello/umbrello/codegenerators/idlwriter.h8
-rw-r--r--umbrello/umbrello/codegenerators/javaantcodedocument.cpp42
-rw-r--r--umbrello/umbrello/codegenerators/javaantcodedocument.h16
-rw-r--r--umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp16
-rw-r--r--umbrello/umbrello/codegenerators/javaclassdeclarationblock.h10
-rw-r--r--umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp52
-rw-r--r--umbrello/umbrello/codegenerators/javaclassifiercodedocument.h10
-rw-r--r--umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp42
-rw-r--r--umbrello/umbrello/codegenerators/javacodeaccessormethod.h6
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfield.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfield.h10
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/javacodecomment.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/javacodecomment.h10
-rw-r--r--umbrello/umbrello/codegenerators/javacodedocumentation.cpp34
-rw-r--r--umbrello/umbrello/codegenerators/javacodedocumentation.h12
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp2
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicy.h4
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp8
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h2
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerator.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerator.h14
-rw-r--r--umbrello/umbrello/codegenerators/javacodeoperation.cpp24
-rw-r--r--umbrello/umbrello/codegenerators/javacodeoperation.h4
-rw-r--r--umbrello/umbrello/codegenerators/javawriter.cpp174
-rw-r--r--umbrello/umbrello/codegenerators/javawriter.h58
-rw-r--r--umbrello/umbrello/codegenerators/jswriter.cpp36
-rw-r--r--umbrello/umbrello/codegenerators/jswriter.h6
-rw-r--r--umbrello/umbrello/codegenerators/pascalwriter.cpp62
-rw-r--r--umbrello/umbrello/codegenerators/pascalwriter.h14
-rw-r--r--umbrello/umbrello/codegenerators/perlwriter.cpp104
-rw-r--r--umbrello/umbrello/codegenerators/perlwriter.h18
-rw-r--r--umbrello/umbrello/codegenerators/php5writer.cpp46
-rw-r--r--umbrello/umbrello/codegenerators/php5writer.h12
-rw-r--r--umbrello/umbrello/codegenerators/phpwriter.cpp44
-rw-r--r--umbrello/umbrello/codegenerators/phpwriter.h12
-rw-r--r--umbrello/umbrello/codegenerators/pythonwriter.cpp58
-rw-r--r--umbrello/umbrello/codegenerators/pythonwriter.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp38
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp52
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeaccessormethod.h6
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfield.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfield.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/rubycodecomment.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/rubycodecomment.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubycodedocumentation.cpp32
-rw-r--r--umbrello/umbrello/codegenerators/rubycodedocumentation.h12
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp2
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h4
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp8
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h2
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerator.cpp44
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerator.h14
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeoperation.cpp52
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeoperation.h4
-rw-r--r--umbrello/umbrello/codegenerators/rubywriter.cpp110
-rw-r--r--umbrello/umbrello/codegenerators/rubywriter.h22
-rw-r--r--umbrello/umbrello/codegenerators/simplecodegenerator.cpp48
-rw-r--r--umbrello/umbrello/codegenerators/simplecodegenerator.h18
-rw-r--r--umbrello/umbrello/codegenerators/sqlwriter.cpp40
-rw-r--r--umbrello/umbrello/codegenerators/sqlwriter.h8
-rw-r--r--umbrello/umbrello/codegenerators/tclwriter.cpp130
-rw-r--r--umbrello/umbrello/codegenerators/tclwriter.h44
-rw-r--r--umbrello/umbrello/codegenerators/xmlcodecomment.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/xmlcodecomment.h6
-rw-r--r--umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp26
-rw-r--r--umbrello/umbrello/codegenerators/xmlelementcodeblock.h20
-rw-r--r--umbrello/umbrello/codegenerators/xmlschemawriter.cpp112
-rw-r--r--umbrello/umbrello/codegenerators/xmlschemawriter.h56
-rw-r--r--umbrello/umbrello/codegenobjectwithtextblocks.cpp42
-rw-r--r--umbrello/umbrello/codegenobjectwithtextblocks.h26
-rw-r--r--umbrello/umbrello/codeimport/adaimport.cpp108
-rw-r--r--umbrello/umbrello/codeimport/adaimport.h14
-rw-r--r--umbrello/umbrello/codeimport/classimport.cpp12
-rw-r--r--umbrello/umbrello/codeimport/classimport.h8
-rw-r--r--umbrello/umbrello/codeimport/cppimport.cpp22
-rw-r--r--umbrello/umbrello/codeimport/cppimport.h8
-rw-r--r--umbrello/umbrello/codeimport/idlimport.cpp86
-rw-r--r--umbrello/umbrello/codeimport/idlimport.h8
-rw-r--r--umbrello/umbrello/codeimport/import_utils.cpp102
-rw-r--r--umbrello/umbrello/codeimport/import_utils.h42
-rw-r--r--umbrello/umbrello/codeimport/javaimport.cpp106
-rw-r--r--umbrello/umbrello/codeimport/javaimport.h18
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast.cpp66
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast.h104
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp50
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h8
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp146
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h18
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/driver.cpp104
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/driver.h104
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/errors.h6
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp92
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lexer.h68
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp12
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lookup.h14
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/parser.cpp70
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/parser.h16
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp12
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp98
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/urlutil.h44
-rw-r--r--umbrello/umbrello/codeimport/nativeimportbase.cpp104
-rw-r--r--umbrello/umbrello/codeimport/nativeimportbase.h46
-rw-r--r--umbrello/umbrello/codeimport/pascalimport.cpp54
-rw-r--r--umbrello/umbrello/codeimport/pascalimport.h2
-rw-r--r--umbrello/umbrello/codeimport/pythonimport.cpp40
-rw-r--r--umbrello/umbrello/codeimport/pythonimport.h4
-rw-r--r--umbrello/umbrello/codemethodblock.cpp40
-rw-r--r--umbrello/umbrello/codemethodblock.h22
-rw-r--r--umbrello/umbrello/codeoperation.cpp24
-rw-r--r--umbrello/umbrello/codeoperation.h16
-rw-r--r--umbrello/umbrello/codeparameter.cpp34
-rw-r--r--umbrello/umbrello/codeparameter.h16
-rw-r--r--umbrello/umbrello/codeviewerstate.h20
-rw-r--r--umbrello/umbrello/component.cpp18
-rw-r--r--umbrello/umbrello/component.h6
-rw-r--r--umbrello/umbrello/componentwidget.cpp30
-rw-r--r--umbrello/umbrello/componentwidget.h6
-rw-r--r--umbrello/umbrello/configurable.cpp8
-rw-r--r--umbrello/umbrello/configurable.h8
-rw-r--r--umbrello/umbrello/datatypewidget.cpp24
-rw-r--r--umbrello/umbrello/datatypewidget.h8
-rw-r--r--umbrello/umbrello/dialog_utils.cpp26
-rw-r--r--umbrello/umbrello/dialog_utils.h26
-rw-r--r--umbrello/umbrello/dialogs/activitydialog.cpp26
-rw-r--r--umbrello/umbrello/dialogs/activitydialog.h16
-rw-r--r--umbrello/umbrello/dialogs/activitypage.cpp94
-rw-r--r--umbrello/umbrello/dialogs/activitypage.h26
-rw-r--r--umbrello/umbrello/dialogs/assocgenpage.cpp30
-rw-r--r--umbrello/umbrello/dialogs/assocgenpage.h32
-rw-r--r--umbrello/umbrello/dialogs/assocpage.cpp48
-rw-r--r--umbrello/umbrello/dialogs/assocpage.h22
-rw-r--r--umbrello/umbrello/dialogs/assocpropdlg.cpp18
-rw-r--r--umbrello/umbrello/dialogs/assocpropdlg.h2
-rw-r--r--umbrello/umbrello/dialogs/assocrolepage.cpp96
-rw-r--r--umbrello/umbrello/dialogs/assocrolepage.h32
-rw-r--r--umbrello/umbrello/dialogs/classgenpage.cpp136
-rw-r--r--umbrello/umbrello/dialogs/classgenpage.h32
-rw-r--r--umbrello/umbrello/dialogs/classifierlistpage.cpp112
-rw-r--r--umbrello/umbrello/dialogs/classifierlistpage.h34
-rw-r--r--umbrello/umbrello/dialogs/classoptionspage.cpp50
-rw-r--r--umbrello/umbrello/dialogs/classoptionspage.h22
-rw-r--r--umbrello/umbrello/dialogs/classpropdlg.cpp64
-rw-r--r--umbrello/umbrello/dialogs/classpropdlg.h6
-rw-r--r--umbrello/umbrello/dialogs/classwizard.cpp24
-rw-r--r--umbrello/umbrello/dialogs/classwizard.h2
-rw-r--r--umbrello/umbrello/dialogs/codeeditor.cpp190
-rw-r--r--umbrello/umbrello/dialogs/codeeditor.h44
-rw-r--r--umbrello/umbrello/dialogs/codegenerationoptionspage.cpp24
-rw-r--r--umbrello/umbrello/dialogs/codegenerationoptionspage.h6
-rw-r--r--umbrello/umbrello/dialogs/codegenerationpolicypage.cpp4
-rw-r--r--umbrello/umbrello/dialogs/codegenerationpolicypage.h4
-rw-r--r--umbrello/umbrello/dialogs/codegenerationwizard.cpp62
-rw-r--r--umbrello/umbrello/dialogs/codegenerationwizard.h10
-rw-r--r--umbrello/umbrello/dialogs/codeviewerdialog.cpp18
-rw-r--r--umbrello/umbrello/dialogs/codeviewerdialog.h14
-rw-r--r--umbrello/umbrello/dialogs/codevieweroptionspage.cpp2
-rw-r--r--umbrello/umbrello/dialogs/codevieweroptionspage.h4
-rw-r--r--umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp6
-rw-r--r--umbrello/umbrello/dialogs/defaultcodegenpolicypage.h8
-rw-r--r--umbrello/umbrello/dialogs/diagramprintpage.cpp66
-rw-r--r--umbrello/umbrello/dialogs/diagramprintpage.h22
-rw-r--r--umbrello/umbrello/dialogs/exportallviewsdialog.cpp14
-rw-r--r--umbrello/umbrello/dialogs/exportallviewsdialog.h6
-rw-r--r--umbrello/umbrello/dialogs/notedialog.cpp20
-rw-r--r--umbrello/umbrello/dialogs/notedialog.h6
-rw-r--r--umbrello/umbrello/dialogs/overwritedialogue.cpp18
-rw-r--r--umbrello/umbrello/dialogs/overwritedialogue.h12
-rw-r--r--umbrello/umbrello/dialogs/parmpropdlg.cpp48
-rw-r--r--umbrello/umbrello/dialogs/parmpropdlg.h42
-rw-r--r--umbrello/umbrello/dialogs/pkgcontentspage.cpp50
-rw-r--r--umbrello/umbrello/dialogs/pkgcontentspage.h22
-rw-r--r--umbrello/umbrello/dialogs/selectopdlg.cpp32
-rw-r--r--umbrello/umbrello/dialogs/selectopdlg.h34
-rw-r--r--umbrello/umbrello/dialogs/settingsdlg.cpp128
-rw-r--r--umbrello/umbrello/dialogs/settingsdlg.h92
-rw-r--r--umbrello/umbrello/dialogs/statedialog.cpp36
-rw-r--r--umbrello/umbrello/dialogs/statedialog.h8
-rw-r--r--umbrello/umbrello/dialogs/umlattributedialog.cpp50
-rw-r--r--umbrello/umbrello/dialogs/umlattributedialog.h18
-rw-r--r--umbrello/umbrello/dialogs/umlentityattributedialog.cpp56
-rw-r--r--umbrello/umbrello/dialogs/umlentityattributedialog.h22
-rw-r--r--umbrello/umbrello/dialogs/umloperationdialog.cpp130
-rw-r--r--umbrello/umbrello/dialogs/umloperationdialog.h38
-rw-r--r--umbrello/umbrello/dialogs/umlroledialog.cpp8
-rw-r--r--umbrello/umbrello/dialogs/umlroledialog.h2
-rw-r--r--umbrello/umbrello/dialogs/umlroleproperties.cpp10
-rw-r--r--umbrello/umbrello/dialogs/umlroleproperties.h2
-rw-r--r--umbrello/umbrello/dialogs/umltemplatedialog.cpp28
-rw-r--r--umbrello/umbrello/dialogs/umltemplatedialog.h12
-rw-r--r--umbrello/umbrello/dialogs/umlviewdialog.cpp34
-rw-r--r--umbrello/umbrello/dialogs/umlviewdialog.h16
-rw-r--r--umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp34
-rw-r--r--umbrello/umbrello/dialogs/umlwidgetcolorpage.h16
-rw-r--r--umbrello/umbrello/docgenerators/docbookgenerator.cpp28
-rw-r--r--umbrello/umbrello/docgenerators/docbookgenerator.h2
-rw-r--r--umbrello/umbrello/docgenerators/main.cpp2
-rw-r--r--umbrello/umbrello/docgenerators/xhtmlgenerator.cpp40
-rw-r--r--umbrello/umbrello/docgenerators/xhtmlgenerator.h2
-rw-r--r--umbrello/umbrello/docwindow.cpp18
-rw-r--r--umbrello/umbrello/docwindow.h10
-rw-r--r--umbrello/umbrello/entity.cpp42
-rw-r--r--umbrello/umbrello/entity.h10
-rw-r--r--umbrello/umbrello/entityattribute.cpp28
-rw-r--r--umbrello/umbrello/entityattribute.h24
-rw-r--r--umbrello/umbrello/entitywidget.cpp32
-rw-r--r--umbrello/umbrello/entitywidget.h8
-rw-r--r--umbrello/umbrello/enum.cpp36
-rw-r--r--umbrello/umbrello/enum.h10
-rw-r--r--umbrello/umbrello/enumliteral.cpp12
-rw-r--r--umbrello/umbrello/enumliteral.h8
-rw-r--r--umbrello/umbrello/enumwidget.cpp34
-rw-r--r--umbrello/umbrello/enumwidget.h8
-rw-r--r--umbrello/umbrello/floatingtextwidget.cpp82
-rw-r--r--umbrello/umbrello/floatingtextwidget.h42
-rw-r--r--umbrello/umbrello/floatingtextwidgetcontroller.cpp12
-rw-r--r--umbrello/umbrello/floatingtextwidgetcontroller.h10
-rw-r--r--umbrello/umbrello/folder.cpp104
-rw-r--r--umbrello/umbrello/folder.h28
-rw-r--r--umbrello/umbrello/forkjoinwidget.cpp22
-rw-r--r--umbrello/umbrello/forkjoinwidget.h12
-rw-r--r--umbrello/umbrello/hierarchicalcodeblock.cpp60
-rw-r--r--umbrello/umbrello/hierarchicalcodeblock.h36
-rw-r--r--umbrello/umbrello/import_rose.cpp110
-rw-r--r--umbrello/umbrello/import_rose.h4
-rw-r--r--umbrello/umbrello/kplayerslideraction.cpp152
-rw-r--r--umbrello/umbrello/kplayerslideraction.h36
-rw-r--r--umbrello/umbrello/kstartuplogo.cpp20
-rw-r--r--umbrello/umbrello/kstartuplogo.h10
-rw-r--r--umbrello/umbrello/linepath.cpp248
-rw-r--r--umbrello/umbrello/linepath.h70
-rw-r--r--umbrello/umbrello/linkwidget.cpp4
-rw-r--r--umbrello/umbrello/linkwidget.h16
-rw-r--r--umbrello/umbrello/listpopupmenu.cpp30
-rw-r--r--umbrello/umbrello/listpopupmenu.h10
-rw-r--r--umbrello/umbrello/main.cpp6
-rw-r--r--umbrello/umbrello/messagewidget.cpp94
-rw-r--r--umbrello/umbrello/messagewidget.h46
-rw-r--r--umbrello/umbrello/messagewidgetcontroller.cpp6
-rw-r--r--umbrello/umbrello/messagewidgetcontroller.h10
-rw-r--r--umbrello/umbrello/messagewidgetlist.h6
-rw-r--r--umbrello/umbrello/model_utils.cpp92
-rw-r--r--umbrello/umbrello/model_utils.h42
-rw-r--r--umbrello/umbrello/node.cpp8
-rw-r--r--umbrello/umbrello/node.h6
-rw-r--r--umbrello/umbrello/nodewidget.cpp28
-rw-r--r--umbrello/umbrello/nodewidget.h6
-rw-r--r--umbrello/umbrello/notewidget.cpp66
-rw-r--r--umbrello/umbrello/notewidget.h20
-rw-r--r--umbrello/umbrello/notewidgetcontroller.cpp6
-rw-r--r--umbrello/umbrello/notewidgetcontroller.h12
-rw-r--r--umbrello/umbrello/object_factory.cpp20
-rw-r--r--umbrello/umbrello/object_factory.h12
-rw-r--r--umbrello/umbrello/objectwidget.cpp58
-rw-r--r--umbrello/umbrello/objectwidget.h20
-rw-r--r--umbrello/umbrello/objectwidgetcontroller.cpp2
-rw-r--r--umbrello/umbrello/objectwidgetcontroller.h2
-rw-r--r--umbrello/umbrello/operation.cpp82
-rw-r--r--umbrello/umbrello/operation.h14
-rw-r--r--umbrello/umbrello/optionstate.h10
-rw-r--r--umbrello/umbrello/ownedcodeblock.cpp10
-rw-r--r--umbrello/umbrello/ownedcodeblock.h10
-rw-r--r--umbrello/umbrello/ownedhierarchicalcodeblock.cpp6
-rw-r--r--umbrello/umbrello/ownedhierarchicalcodeblock.h12
-rw-r--r--umbrello/umbrello/package.cpp18
-rw-r--r--umbrello/umbrello/package.h8
-rw-r--r--umbrello/umbrello/packagewidget.cpp24
-rw-r--r--umbrello/umbrello/packagewidget.h6
-rw-r--r--umbrello/umbrello/petalnode.cpp10
-rw-r--r--umbrello/umbrello/petalnode.h24
-rw-r--r--umbrello/umbrello/petaltree2uml.cpp94
-rw-r--r--umbrello/umbrello/plugin.cpp12
-rw-r--r--umbrello/umbrello/plugin.h12
-rw-r--r--umbrello/umbrello/pluginloader.cpp14
-rw-r--r--umbrello/umbrello/pluginloader.h22
-rw-r--r--umbrello/umbrello/refactoring/refactoringassistant.cpp138
-rw-r--r--umbrello/umbrello/refactoring/refactoringassistant.h26
-rw-r--r--umbrello/umbrello/seqlinewidget.cpp26
-rw-r--r--umbrello/umbrello/seqlinewidget.h14
-rw-r--r--umbrello/umbrello/statewidget.cpp66
-rw-r--r--umbrello/umbrello/statewidget.h28
-rw-r--r--umbrello/umbrello/stereotype.cpp10
-rw-r--r--umbrello/umbrello/stereotype.h6
-rw-r--r--umbrello/umbrello/template.cpp18
-rw-r--r--umbrello/umbrello/template.h14
-rw-r--r--umbrello/umbrello/textblock.cpp78
-rw-r--r--umbrello/umbrello/textblock.h50
-rw-r--r--umbrello/umbrello/textblocklist.h6
-rw-r--r--umbrello/umbrello/toolbarstate.cpp44
-rw-r--r--umbrello/umbrello/toolbarstate.h24
-rw-r--r--umbrello/umbrello/toolbarstatearrow.cpp6
-rw-r--r--umbrello/umbrello/toolbarstatearrow.h4
-rw-r--r--umbrello/umbrello/toolbarstateassociation.cpp10
-rw-r--r--umbrello/umbrello/toolbarstateassociation.h4
-rw-r--r--umbrello/umbrello/toolbarstatemessages.cpp8
-rw-r--r--umbrello/umbrello/toolbarstatemessages.h6
-rw-r--r--umbrello/umbrello/uml.cpp312
-rw-r--r--umbrello/umbrello/uml.h50
-rw-r--r--umbrello/umbrello/umlassociationlist.h6
-rw-r--r--umbrello/umbrello/umlattributelist.h10
-rw-r--r--umbrello/umbrello/umlcanvasobject.cpp14
-rw-r--r--umbrello/umbrello/umlcanvasobject.h8
-rw-r--r--umbrello/umbrello/umlclassifierlist.h6
-rw-r--r--umbrello/umbrello/umlclassifierlistitemlist.h10
-rw-r--r--umbrello/umbrello/umldoc.cpp330
-rw-r--r--umbrello/umbrello/umldoc.h72
-rw-r--r--umbrello/umbrello/umlentityattributelist.h10
-rw-r--r--umbrello/umbrello/umlenumliterallist.h6
-rw-r--r--umbrello/umbrello/umllistview.cpp262
-rw-r--r--umbrello/umbrello/umllistview.h54
-rw-r--r--umbrello/umbrello/umllistviewitem.cpp76
-rw-r--r--umbrello/umbrello/umllistviewitem.h28
-rw-r--r--umbrello/umbrello/umllistviewitemlist.h6
-rw-r--r--umbrello/umbrello/umlnamespace.cpp18
-rw-r--r--umbrello/umbrello/umlnamespace.h14
-rw-r--r--umbrello/umbrello/umlobject.cpp106
-rw-r--r--umbrello/umbrello/umlobject.h66
-rw-r--r--umbrello/umbrello/umlobjectlist.h10
-rw-r--r--umbrello/umbrello/umloperationlist.h6
-rw-r--r--umbrello/umbrello/umlpackagelist.h6
-rw-r--r--umbrello/umbrello/umlrole.cpp34
-rw-r--r--umbrello/umbrello/umlrole.h10
-rw-r--r--umbrello/umbrello/umlstereotypelist.h6
-rw-r--r--umbrello/umbrello/umltemplatelist.h6
-rw-r--r--umbrello/umbrello/umlview.cpp340
-rw-r--r--umbrello/umbrello/umlview.h108
-rw-r--r--umbrello/umbrello/umlviewcanvas.cpp8
-rw-r--r--umbrello/umbrello/umlviewcanvas.h6
-rw-r--r--umbrello/umbrello/umlviewimageexporter.cpp16
-rw-r--r--umbrello/umbrello/umlviewimageexporter.h6
-rw-r--r--umbrello/umbrello/umlviewimageexporterall.cpp14
-rw-r--r--umbrello/umbrello/umlviewimageexportermodel.cpp152
-rw-r--r--umbrello/umbrello/umlviewimageexportermodel.h46
-rw-r--r--umbrello/umbrello/umlviewlist.h4
-rw-r--r--umbrello/umbrello/umlwidget.cpp150
-rw-r--r--umbrello/umbrello/umlwidget.h96
-rw-r--r--umbrello/umbrello/umlwidgetcontroller.cpp50
-rw-r--r--umbrello/umbrello/umlwidgetcontroller.h68
-rw-r--r--umbrello/umbrello/umlwidgetlist.h6
-rw-r--r--umbrello/umbrello/usecase.cpp8
-rw-r--r--umbrello/umbrello/usecase.h6
-rw-r--r--umbrello/umbrello/usecasewidget.cpp18
-rw-r--r--umbrello/umbrello/usecasewidget.h6
-rw-r--r--umbrello/umbrello/widget_factory.cpp8
-rw-r--r--umbrello/umbrello/widget_factory.h6
-rw-r--r--umbrello/umbrello/widget_utils.cpp20
-rw-r--r--umbrello/umbrello/widget_utils.h8
-rw-r--r--umbrello/umbrello/widgetbase.cpp20
-rw-r--r--umbrello/umbrello/widgetbase.h24
-rw-r--r--umbrello/umbrello/worktoolbar.cpp26
-rw-r--r--umbrello/umbrello/worktoolbar.h26
466 files changed, 8221 insertions, 8221 deletions
diff --git a/umbrello/umbrello/activitywidget.cpp b/umbrello/umbrello/activitywidget.cpp
index 26ab29fd..c0f0c836 100644
--- a/umbrello/umbrello/activitywidget.cpp
+++ b/umbrello/umbrello/activitywidget.cpp
@@ -13,7 +13,7 @@
#include "activitywidget.h"
// qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
// kde includes
#include <klocale.h>
@@ -38,7 +38,7 @@ ActivityWidget::ActivityWidget(UMLView * view, ActivityType activityType, Uml::I
ActivityWidget::~ActivityWidget() {}
-void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ActivityWidget::draw(TQPainter & p, int offsetX, int offsetY) {
int w = width();
int h = height();
switch ( m_ActivityType )
@@ -49,7 +49,7 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.setBrush( UMLWidget::getFillColour() );
}
{
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
//int middleX = w / 2;
int textStartY = (h / 2) - (fontHeight / 2);
@@ -62,12 +62,12 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
break;
case Initial :
- p.setPen( QPen(m_LineColour, 1) );
+ p.setPen( TQPen(m_LineColour, 1) );
p.setBrush( WidgetBase::getLineColor() );
p.drawEllipse( offsetX, offsetY, w, h );
break;
case End :
- p.setPen( QPen(m_LineColour, 1) );
+ p.setPen( TQPen(m_LineColour, 1) );
p.setBrush( WidgetBase::getLineColor() );
p.drawEllipse( offsetX, offsetY, w, h );
p.setBrush( Qt::white );
@@ -79,11 +79,11 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
p.setBrush( UMLWidget::getFillColour() );
{
- QPointArray array( 4 );
- array[ 0 ] = QPoint( offsetX + w / 2, offsetY );
- array[ 1 ] = QPoint( offsetX + w, offsetY + h / 2 );
- array[ 2 ] = QPoint( offsetX + w / 2, offsetY + h );
- array[ 3 ] = QPoint( offsetX, offsetY + h / 2 );
+ TQPointArray array( 4 );
+ array[ 0 ] = TQPoint( offsetX + w / 2, offsetY );
+ array[ 1 ] = TQPoint( offsetX + w, offsetY + h / 2 );
+ array[ 2 ] = TQPoint( offsetX + w / 2, offsetY + h );
+ array[ 3 ] = TQPoint( offsetX, offsetY + h / 2 );
p.drawPolygon( array );
p.drawPolyline( array );
}
@@ -95,7 +95,7 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
void ActivityWidget::constrain(int& width, int& height) {
if (m_ActivityType == Normal) {
- QSize minSize = calculateSize();
+ TQSize minSize = calculateSize();
if (width < minSize.width())
width = minSize.width();
if (height < minSize.height())
@@ -125,10 +125,10 @@ void ActivityWidget::constrain(int& width, int& height) {
}
}
-QSize ActivityWidget::calculateSize() {
+TQSize ActivityWidget::calculateSize() {
int width, height;
if ( m_ActivityType == Normal ) {
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
const int textWidth = fm.width(getName());
height = fontHeight;
@@ -139,7 +139,7 @@ QSize ActivityWidget::calculateSize() {
} else {
width = height = 20;
}
- return QSize(width, height);
+ return TQSize(width, height);
}
ActivityWidget::ActivityType ActivityWidget::getActivityType() const {
@@ -156,7 +156,7 @@ void ActivityWidget::slotMenuSelection(int sel) {
bool done = false;
bool ok = false;
- QString name = m_Text;
+ TQString name = m_Text;
switch( sel ) {
case ListPopupMenu::mt_Rename:
@@ -211,8 +211,8 @@ bool ActivityWidget::isActivity(WorkToolBar::ToolBar_Buttons tbb,
return status;
}
-void ActivityWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement activityElement = qDoc.createElement( "activitywidget" );
+void ActivityWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement activityElement = qDoc.createElement( "activitywidget" );
UMLWidget::saveToXMI( qDoc, activityElement );
activityElement.setAttribute( "activityname", m_Text );
activityElement.setAttribute( "documentation", m_Doc );
@@ -220,12 +220,12 @@ void ActivityWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( activityElement );
}
-bool ActivityWidget::loadFromXMI( QDomElement & qElement ) {
+bool ActivityWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
m_Text = qElement.attribute( "activityname", "" );
m_Doc = qElement.attribute( "documentation", "" );
- QString type = qElement.attribute( "activitytype", "1" );
+ TQString type = qElement.attribute( "activitytype", "1" );
setActivityType( (ActivityType)type.toInt() );
return true;
}
diff --git a/umbrello/umbrello/activitywidget.h b/umbrello/umbrello/activitywidget.h
index f23d4b65..8e40838c 100644
--- a/umbrello/umbrello/activitywidget.h
+++ b/umbrello/umbrello/activitywidget.h
@@ -61,7 +61,7 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Overrides Method from UMLWidget.
@@ -98,18 +98,18 @@ public:
/**
* Saves the widget to the "activitywidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads the widget from the "activitywidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Type of activity.
diff --git a/umbrello/umbrello/actor.cpp b/umbrello/umbrello/actor.cpp
index 6e09c506..37a39a2e 100644
--- a/umbrello/umbrello/actor.cpp
+++ b/umbrello/umbrello/actor.cpp
@@ -11,7 +11,7 @@
#include "actor.h"
-UMLActor::UMLActor(const QString & name, Uml::IDType id) : UMLCanvasObject(name, id) {
+UMLActor::UMLActor(const TQString & name, Uml::IDType id) : UMLCanvasObject(name, id) {
init();
}
@@ -27,12 +27,12 @@ UMLObject* UMLActor::clone() const {
return clone;
}
-void UMLActor::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement actorElement = UMLObject::save("UML:Actor", qDoc);
+void UMLActor::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement actorElement = UMLObject::save("UML:Actor", qDoc);
qElement.appendChild(actorElement);
}
-bool UMLActor::load(QDomElement&) {
+bool UMLActor::load(TQDomElement&) {
return true;
}
diff --git a/umbrello/umbrello/actor.h b/umbrello/umbrello/actor.h
index 479482e0..a3bff4c3 100644
--- a/umbrello/umbrello/actor.h
+++ b/umbrello/umbrello/actor.h
@@ -34,7 +34,7 @@ public:
* @param name The name of the Actor.
* @param id The unique id to assign to this Actor.
*/
- explicit UMLActor(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLActor(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -54,13 +54,13 @@ public:
/**
* Creates the <UML:Actor> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads the <UML:Actor> XMI element (empty.)
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
};
#endif
diff --git a/umbrello/umbrello/actorwidget.cpp b/umbrello/umbrello/actorwidget.cpp
index 0001e146..38ddb4f5 100644
--- a/umbrello/umbrello/actorwidget.cpp
+++ b/umbrello/umbrello/actorwidget.cpp
@@ -13,7 +13,7 @@
#include "actorwidget.h"
// system includes
-#include <qpainter.h>
+#include <tqpainter.h>
// local includes
#include "actor.h"
@@ -26,14 +26,14 @@ ActorWidget::ActorWidget(UMLView * view, UMLActor *a) : UMLWidget(view, a) {
ActorWidget::~ActorWidget() {}
-void ActorWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ActorWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
const int w = width();
const int h = height();
p.setFont( UMLWidget::getFont() );
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int textWidth = fm.width(getName());
const int fontHeight = fm.lineSpacing();
const int a_height = h - fontHeight - A_MARGIN;
@@ -54,25 +54,25 @@ void ActorWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.drawLine(offsetX + middleX - a_width / 2, offsetY + thirdY + thirdY / 2,
offsetX + middleX + a_width / 2, offsetY + thirdY + thirdY / 2); //arms
//draw text
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
p.drawText(offsetX + A_MARGIN, offsetY + h - fontHeight,
w - A_MARGIN * 2, fontHeight, Qt::AlignCenter, getName());
if(m_bSelected)
drawSelected(&p, offsetX, offsetY);
}
-QSize ActorWidget::calculateSize() {
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+TQSize ActorWidget::calculateSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
const int textWidth = fm.width(getName());
int width = textWidth > A_WIDTH ? textWidth : A_WIDTH;
int height = A_HEIGHT + fontHeight + A_MARGIN;
width += A_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void ActorWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement actorElement = qDoc.createElement( "actorwidget" );
+void ActorWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement actorElement = qDoc.createElement( "actorwidget" );
UMLWidget::saveToXMI( qDoc, actorElement );
qElement.appendChild( actorElement );
}
diff --git a/umbrello/umbrello/actorwidget.h b/umbrello/umbrello/actorwidget.h
index 6d19290c..6b62bc98 100644
--- a/umbrello/umbrello/actorwidget.h
+++ b/umbrello/umbrello/actorwidget.h
@@ -60,19 +60,19 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves the widget to the "actorwidget" XMI element.
* Note: For loading from XMI, the inherited parent method is used.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
};
#endif
diff --git a/umbrello/umbrello/aligntoolbar.cpp b/umbrello/umbrello/aligntoolbar.cpp
index 3be8689a..1e41eee7 100644
--- a/umbrello/umbrello/aligntoolbar.cpp
+++ b/umbrello/umbrello/aligntoolbar.cpp
@@ -17,7 +17,7 @@
#include <vector>
// qt includes
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
// kde includes
#include <klocale.h>
@@ -31,7 +31,7 @@
#include "umlwidget.h"
#include "umlwidgetlist.h"
-AlignToolBar::AlignToolBar(QMainWindow* parentWindow, const char* )
+AlignToolBar::AlignToolBar(TQMainWindow* parentWindow, const char* )
: KToolBar(parentWindow,Qt::DockRight,false) {
// load images for the buttons
loadPixmaps();
@@ -50,7 +50,7 @@ AlignToolBar::AlignToolBar(QMainWindow* parentWindow, const char* )
setVerticalStretchable( true );
// gets called whenever a button in the toolbar is clicked
- connect( this, SIGNAL( released( int ) ), this, SLOT( slotButtonChanged (int ) ) );
+ connect( this, TQT_SIGNAL( released( int ) ), this, TQT_SLOT( slotButtonChanged (int ) ) );
}
AlignToolBar::~AlignToolBar() {
@@ -68,7 +68,7 @@ bool AlignToolBar::hasWidgetSmallerY(const UMLWidget* widget1, const UMLWidget*
void AlignToolBar::loadPixmaps() {
KStandardDirs* dirs = KGlobal::dirs();
- QString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
+ TQString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
dataDir += "/umbrello/pics/";
m_Pixmaps[alac_align_left].load( dataDir + "align_left.png" );
@@ -381,7 +381,7 @@ void AlignToolBar::slotButtonChanged(int btn) {
} else {
KMessageBox::messageBox(0, KMessageBox::Information,
i18n("For alignment you have to select at least 2 objects like classes or actors. You can not align associations."),
- i18n("Information"), i18n("&OK"), QString(""),
+ i18n("Information"), i18n("&OK"), TQString(""),
"showAlignInformation");
} // if (widgetList.count() > 1)
diff --git a/umbrello/umbrello/aligntoolbar.h b/umbrello/umbrello/aligntoolbar.h
index 271e9c0b..f417244f 100644
--- a/umbrello/umbrello/aligntoolbar.h
+++ b/umbrello/umbrello/aligntoolbar.h
@@ -12,7 +12,7 @@
#ifndef ALIGNTOOLBAR_H
#define ALIGNTOOLBAR_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <ktoolbar.h>
#include "umlnamespace.h"
#include "umlwidgetlist.h"
@@ -38,7 +38,7 @@ public:
* @param parentWindow The parent of the toolbar.
* @param name The name of the toolbar.
*/
- AlignToolBar(QMainWindow* parentWindow, const char* name);
+ AlignToolBar(TQMainWindow* parentWindow, const char* name);
/**
* Standard deconstructor.
@@ -209,7 +209,7 @@ private:
/**
* Holds the icons for the different buttons.
*/
- QPixmap m_Pixmaps[nrAlignButtons];
+ TQPixmap m_Pixmaps[nrAlignButtons];
private slots:
diff --git a/umbrello/umbrello/artifact.cpp b/umbrello/umbrello/artifact.cpp
index 12f77966..8576ca8b 100644
--- a/umbrello/umbrello/artifact.cpp
+++ b/umbrello/umbrello/artifact.cpp
@@ -15,7 +15,7 @@
#include <kdebug.h>
#include <klocale.h>
-UMLArtifact::UMLArtifact(const QString & name, Uml::IDType id)
+UMLArtifact::UMLArtifact(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -34,14 +34,14 @@ UMLObject* UMLArtifact::clone() const {
return clone;
}
-void UMLArtifact::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement artifactElement = UMLObject::save("UML:Artifact", qDoc);
+void UMLArtifact::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement artifactElement = UMLObject::save("UML:Artifact", qDoc);
artifactElement.setAttribute("drawas", m_drawAsType);
qElement.appendChild(artifactElement);
}
-bool UMLArtifact::load(QDomElement& element) {
- QString drawAs = element.attribute("drawas", "0");
+bool UMLArtifact::load(TQDomElement& element) {
+ TQString drawAs = element.attribute("drawas", "0");
m_drawAsType = (Draw_Type)drawAs.toInt();
return true;
}
diff --git a/umbrello/umbrello/artifact.h b/umbrello/umbrello/artifact.h
index 8b76f154..d5087545 100644
--- a/umbrello/umbrello/artifact.h
+++ b/umbrello/umbrello/artifact.h
@@ -46,7 +46,7 @@ public:
* @param Name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLArtifact(const QString & Name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLArtifact(const TQString & Name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -67,7 +67,7 @@ public:
* Creates the UML:Artifact element including its operations,
* attributes and templates
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* sets m_drawAsType for which method to draw the artifact as
@@ -84,7 +84,7 @@ protected:
* Loads the UML:Artifact element including its operations,
* attributes and templates
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
/**
diff --git a/umbrello/umbrello/artifactwidget.cpp b/umbrello/umbrello/artifactwidget.cpp
index 931f757a..7356f260 100644
--- a/umbrello/umbrello/artifactwidget.cpp
+++ b/umbrello/umbrello/artifactwidget.cpp
@@ -13,8 +13,8 @@
#include "artifactwidget.h"
// qt/kde includes
-#include <qpainter.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
#include <kdebug.h>
// app includes
@@ -36,19 +36,19 @@ void ArtifactWidget::init() {
ArtifactWidget::~ArtifactWidget() {}
-void ArtifactWidget::drawAsNormal(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsNormal(TQPainter& p, int offsetX, int offsetY) {
int w = width();
int h = height();
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
- QString stereotype = m_pObject->getStereotype();
+ TQString name = getName();
+ TQString stereotype = m_pObject->getStereotype();
p.drawRect(offsetX, offsetY, w, h);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
if (!stereotype.isEmpty()) {
@@ -76,17 +76,17 @@ void ArtifactWidget::drawAsNormal(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::drawAsFile(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsFile(TQPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- QFont font = UMLWidget::getFont();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ TQFont font = UMLWidget::getFont();
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- const QString name = getName();
+ const TQString name = getName();
int startX = offsetX + (w/2) - 25;
int iconHeight = h - fontHeight;
- QPointArray pointArray(5);
+ TQPointArray pointArray(5);
pointArray.setPoint(0, startX, offsetY);
pointArray.setPoint(1, startX + 40, offsetY);
pointArray.setPoint(2, startX + 50, offsetY + 10);
@@ -98,7 +98,7 @@ void ArtifactWidget::drawAsFile(QPainter& p, int offsetX, int offsetY) {
p.drawLine(startX + 40, offsetY + 10, startX + 50, offsetY + 10);
p.drawLine(startX + 40, offsetY, startX + 50, offsetY + 10);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
p.drawText(offsetX, offsetY + h - fontHeight,
@@ -109,18 +109,18 @@ void ArtifactWidget::drawAsFile(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::drawAsLibrary(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsLibrary(TQPainter& p, int offsetX, int offsetY) {
//FIXME this should have gears on it
const int w = width();
const int h = height();
- const QFont font = UMLWidget::getFont();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFont font = UMLWidget::getFont();
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- const QString name = getName();
+ const TQString name = getName();
const int startX = offsetX + (w/2) - 25;
const int iconHeight = h - fontHeight;
- QPointArray pointArray(5);
+ TQPointArray pointArray(5);
pointArray.setPoint(0, startX, offsetY);
pointArray.setPoint(1, startX + 40, offsetY);
pointArray.setPoint(2, startX + 50, offsetY + 10);
@@ -132,7 +132,7 @@ void ArtifactWidget::drawAsLibrary(QPainter& p, int offsetX, int offsetY) {
p.drawLine(startX + 40, offsetY + 10, startX + 50, offsetY + 10);
p.drawLine(startX + 40, offsetY, startX + 50, offsetY + 10);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
p.drawText(offsetX, offsetY + h - fontHeight,
@@ -143,13 +143,13 @@ void ArtifactWidget::drawAsLibrary(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::drawAsTable(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsTable(TQPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QFont font = UMLWidget::getFont();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFont font = UMLWidget::getFont();
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- const QString name = getName();
+ const TQString name = getName();
const int startX = offsetX + (w/2) - 25;
const int iconHeight = h - fontHeight;
@@ -162,13 +162,13 @@ void ArtifactWidget::drawAsTable(QPainter& p, int offsetX, int offsetY) {
p.drawLine(startX, offsetY + (iconHeight/2) + (iconHeight/4),
startX + 49, offsetY + (iconHeight/2) + (iconHeight/4));
- QPen thickerPen = p.pen();
+ TQPen thickerPen = p.pen();
thickerPen.setWidth(2);
p.setPen(thickerPen);
p.drawLine(startX + 10, offsetY, startX + 10, offsetY + iconHeight);
p.drawLine(startX, offsetY + (iconHeight/4), startX + 50, offsetY + (iconHeight/4));
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
p.drawText(offsetX, offsetY + h - fontHeight,
@@ -179,7 +179,7 @@ void ArtifactWidget::drawAsTable(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
p.setBrush( UMLWidget::getFillColour() );
@@ -208,8 +208,8 @@ void ArtifactWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize ArtifactWidget::calculateIconSize() {
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+TQSize ArtifactWidget::calculateIconSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
int width = fm.width( m_pObject->getName() );
@@ -218,11 +218,11 @@ QSize ArtifactWidget::calculateIconSize() {
int height = 50 + fontHeight;
- return QSize(width, height);
+ return TQSize(width, height);
}
-QSize ArtifactWidget::calculateNormalSize() {
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+TQSize ArtifactWidget::calculateNormalSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
int width = fm.width( m_pObject->getName() );
@@ -236,10 +236,10 @@ QSize ArtifactWidget::calculateNormalSize() {
int height = (2*fontHeight) + (ARTIFACT_MARGIN * 2);
- return QSize(width, height);
+ return TQSize(width, height);
}
-QSize ArtifactWidget::calculateSize() {
+TQSize ArtifactWidget::calculateSize() {
if ( !m_pObject) {
return UMLWidget::calculateSize();
}
@@ -251,8 +251,8 @@ QSize ArtifactWidget::calculateSize() {
}
}
-void ArtifactWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("artifactwidget");
+void ArtifactWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("artifactwidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/artifactwidget.h b/umbrello/umbrello/artifactwidget.h
index a68f3acc..3fdd26c2 100644
--- a/umbrello/umbrello/artifactwidget.h
+++ b/umbrello/umbrello/artifactwidget.h
@@ -48,19 +48,19 @@ public:
/**
* Overrides standard method
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves the widget to the "artifactwidget" XMI element.
* Note: For loading from XMI, the inherited parent method is used.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
@@ -71,32 +71,32 @@ private:
/**
* calculates the size when drawing as an icon (it's the same size for all icons)
*/
- QSize calculateIconSize();
+ TQSize calculateIconSize();
/**
* calculates the size for drawing as a box
*/
- QSize calculateNormalSize();
+ TQSize calculateNormalSize();
/**
* draw as a file icon
*/
- void drawAsFile(QPainter& p, int offsetX, int offsetY);
+ void drawAsFile(TQPainter& p, int offsetX, int offsetY);
/**
* draw as a library file icon
*/
- void drawAsLibrary(QPainter& p, int offsetX, int offsetY);
+ void drawAsLibrary(TQPainter& p, int offsetX, int offsetY);
/**
* draw as a database table icon
*/
- void drawAsTable(QPainter& p, int offsetX, int offsetY);
+ void drawAsTable(TQPainter& p, int offsetX, int offsetY);
/**
* draw as a box
*/
- void drawAsNormal(QPainter& p, int offsetX, int offsetY);
+ void drawAsNormal(TQPainter& p, int offsetX, int offsetY);
/**
* The right mouse button menu
diff --git a/umbrello/umbrello/association.cpp b/umbrello/umbrello/association.cpp
index eacc8d13..62f47a43 100644
--- a/umbrello/umbrello/association.cpp
+++ b/umbrello/umbrello/association.cpp
@@ -14,7 +14,7 @@
// qt/kde includes
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// app includes
#include "classifier.h"
#include "folder.h"
@@ -78,7 +78,7 @@ bool UMLAssociation::operator==(UMLAssociation &rhs) {
m_pRole[B] == rhs.m_pRole[B] );
}
-const QString UMLAssociation::assocTypeStr[UMLAssociation::nAssocTypes] = {
+const TQString UMLAssociation::assocTypeStr[UMLAssociation::nAssocTypes] = {
/* The elements must be listed in the same order as in the
Uml::Association_Type. */
i18n("Generalization"), // at_Generalization
@@ -103,9 +103,9 @@ Uml::Association_Type UMLAssociation::getAssocType() const {
return m_AssocType;
}
-QString UMLAssociation::toString ( ) const
+TQString UMLAssociation::toString ( ) const
{
- QString string;
+ TQString string;
if(m_pRole[A])
{
string += m_pRole[A]->getObject()->getName();
@@ -122,7 +122,7 @@ QString UMLAssociation::toString ( ) const
return string;
}
-QString UMLAssociation::typeAsString (Uml::Association_Type atype)
+TQString UMLAssociation::typeAsString (Uml::Association_Type atype)
{
if (atype < atypeFirst || atype > atypeLast)
return "";
@@ -159,9 +159,9 @@ bool UMLAssociation::resolveRef() {
return false;
}
-void UMLAssociation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
+void UMLAssociation::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
if (m_AssocType == Uml::at_Generalization) {
- QDomElement assocElement = UMLObject::save("UML:Generalization", qDoc);
+ TQDomElement assocElement = UMLObject::save("UML:Generalization", qDoc);
assocElement.setAttribute( "discriminator", "" );
assocElement.setAttribute( "child", ID2STR(getObjectId(A)) );
assocElement.setAttribute( "parent", ID2STR(getObjectId(B)) );
@@ -169,28 +169,28 @@ void UMLAssociation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
return;
}
if (m_AssocType == Uml::at_Realization) {
- QDomElement assocElement = UMLObject::save("UML:Abstraction", qDoc);
+ TQDomElement assocElement = UMLObject::save("UML:Abstraction", qDoc);
assocElement.setAttribute( "client", ID2STR(getObjectId(A)) );
assocElement.setAttribute( "supplier", ID2STR(getObjectId(B)) );
qElement.appendChild( assocElement );
return;
}
if (m_AssocType == Uml::at_Dependency) {
- QDomElement assocElement = UMLObject::save("UML:Dependency", qDoc);
+ TQDomElement assocElement = UMLObject::save("UML:Dependency", qDoc);
assocElement.setAttribute( "client", ID2STR(getObjectId(A)) );
assocElement.setAttribute( "supplier", ID2STR(getObjectId(B)) );
qElement.appendChild( assocElement );
return;
}
- QDomElement associationElement = UMLObject::save("UML:Association", qDoc);
- QDomElement connElement = qDoc.createElement("UML:Association.connection");
+ TQDomElement associationElement = UMLObject::save("UML:Association", qDoc);
+ TQDomElement connElement = qDoc.createElement("UML:Association.connection");
getUMLRole(A)->saveToXMI (qDoc, connElement);
getUMLRole(B)->saveToXMI (qDoc, connElement);
associationElement.appendChild (connElement);
qElement.appendChild( associationElement );
}
-bool UMLAssociation::load( QDomElement & element ) {
+bool UMLAssociation::load( TQDomElement & element ) {
if (getID() == Uml::id_None)
return false; // old style XMI file. No real info in this association.
@@ -200,10 +200,10 @@ bool UMLAssociation::load( QDomElement & element ) {
m_AssocType == Uml::at_Realization ||
m_AssocType == Uml::at_Dependency) {
for (unsigned r = Uml::A; r <= Uml::B; r++) {
- const QString fetch = (m_AssocType == Uml::at_Generalization ?
+ const TQString fetch = (m_AssocType == Uml::at_Generalization ?
r == Uml::A ? "child" : "parent"
: r == Uml::A ? "client" : "supplier");
- QString roleIdStr = element.attribute(fetch, "");
+ TQString roleIdStr = element.attribute(fetch, "");
if (roleIdStr.isEmpty()) {
// Might be given as a child node instead - see below.
continue;
@@ -225,23 +225,23 @@ bool UMLAssociation::load( QDomElement & element ) {
}
}
if (obj[A] == NULL || obj[B] == NULL) {
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(tag))
continue;
// Permitted tag names:
// roleA: "child" "subtype" "client"
// roleB: "parent" "supertype" "supplier"
- QString idStr = tempElement.attribute( "xmi.id", "" );
+ TQString idStr = tempElement.attribute( "xmi.id", "" );
if (idStr.isEmpty())
idStr = tempElement.attribute( "xmi.idref", "" );
if (idStr.isEmpty()) {
- QDomNode inner = node.firstChild();
- QDomElement tmpElem = inner.toElement();
+ TQDomNode inner = node.firstChild();
+ TQDomElement tmpElem = inner.toElement();
idStr = tmpElem.attribute( "xmi.id", "" );
if (idStr.isEmpty())
idStr = tmpElem.attribute( "xmi.idref", "" );
@@ -271,13 +271,13 @@ bool UMLAssociation::load( QDomElement & element ) {
return true;
}
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
// uml13.dtd compliant format (new style)
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(tag))
continue;
if (!tagEq(tag, "Association.connection") &&
@@ -352,11 +352,11 @@ bool UMLAssociation::load( QDomElement & element ) {
}
// From here on it's old-style stuff.
- QString assocTypeStr = element.attribute( "assoctype", "-1" );
+ TQString assocTypeStr = element.attribute( "assoctype", "-1" );
Uml::Association_Type assocType = Uml::at_Unknown;
if (assocTypeStr[0] >= 'a' && assocTypeStr[0] <= 'z') {
// In an earlier version, the natural assoctype names were saved.
- const QString assocTypeString[nAssocTypes] = {
+ const TQString assocTypeString[nAssocTypes] = {
"generalization", // at_Generalization
"aggregation", // at_Aggregation
"dependency", // at_Dependency
@@ -426,16 +426,16 @@ bool UMLAssociation::load( QDomElement & element ) {
setRoleDoc(element.attribute( "docb", "" ), B);
// Visibility defaults to Public if it cant set it here..
- QString visibilityA = element.attribute( "visibilitya", "0");
- QString visibilityB = element.attribute( "visibilityb", "0");
+ TQString visibilityA = element.attribute( "visibilitya", "0");
+ TQString visibilityB = element.attribute( "visibilityb", "0");
if (visibilityA.toInt() > 0)
setVisibility((Uml::Visibility::Value)visibilityA.toInt(), A);
if (visibilityB.toInt() > 0)
setVisibility((Uml::Visibility::Value)visibilityB.toInt(), B);
// Changeability defaults to Changeable if it cant set it here..
- QString changeabilityA = element.attribute( "changeabilitya", "0");
- QString changeabilityB = element.attribute( "changeabilityb", "0");
+ TQString changeabilityA = element.attribute( "changeabilitya", "0");
+ TQString changeabilityB = element.attribute( "changeabilityb", "0");
if (changeabilityA.toInt() > 0)
setChangeability ( (Uml::Changeability_Type) changeabilityA.toInt(), A);
if (changeabilityB.toInt() > 0)
@@ -452,7 +452,7 @@ Uml::IDType UMLAssociation::getObjectId(Uml::Role_Type role) {
UMLRole *roleObj = m_pRole[role];
UMLObject *o = roleObj->getObject();
if (o == NULL) {
- QString auxID = roleObj->getSecondaryId();
+ TQString auxID = roleObj->getSecondaryId();
if (auxID.isEmpty()) {
kError() << "UMLAssociation::getObjectId(" << role
<< "): getObject returns NULL" << endl;
@@ -480,15 +480,15 @@ Uml::Visibility UMLAssociation::getVisibility(Uml::Role_Type role) const {
return m_pRole[role]->getVisibility();
}
-QString UMLAssociation::getMulti(Uml::Role_Type role) const {
+TQString UMLAssociation::getMulti(Uml::Role_Type role) const {
return m_pRole[role]->getMultiplicity();
}
-QString UMLAssociation::getRoleName(Uml::Role_Type role) const {
+TQString UMLAssociation::getRoleName(Uml::Role_Type role) const {
return m_pRole[role]->getName();
}
-QString UMLAssociation::getRoleDoc(Uml::Role_Type role) const {
+TQString UMLAssociation::getRoleDoc(Uml::Role_Type role) const {
return m_pRole[role]->getDoc();
}
@@ -531,19 +531,19 @@ void UMLAssociation::setChangeability(Uml::Changeability_Type value, Uml::Role_T
m_pRole[role]->setChangeability(value);
}
-void UMLAssociation::setMulti(const QString &value, Uml::Role_Type role) {
+void UMLAssociation::setMulti(const TQString &value, Uml::Role_Type role) {
m_pRole[role]->setMultiplicity(value);
}
-void UMLAssociation::setRoleName(const QString &value, Uml::Role_Type role) {
+void UMLAssociation::setRoleName(const TQString &value, Uml::Role_Type role) {
m_pRole[role]->setName(value);
}
-void UMLAssociation::setRoleDoc(const QString &doc, Uml::Role_Type role) {
+void UMLAssociation::setRoleDoc(const TQString &doc, Uml::Role_Type role) {
m_pRole[role]->setDoc(doc);
}
-QString UMLAssociation::ChangeabilityToString(Uml::Changeability_Type type) {
+TQString UMLAssociation::ChangeabilityToString(Uml::Changeability_Type type) {
switch (type) {
case Uml::chg_Frozen:
return "frozen";
diff --git a/umbrello/umbrello/association.h b/umbrello/umbrello/association.h
index 3b0ef94d..01fb357e 100644
--- a/umbrello/umbrello/association.h
+++ b/umbrello/umbrello/association.h
@@ -12,7 +12,7 @@
#ifndef ASSOCIATION_H
#define ASSOCIATION_H
-#include <qdom.h>
+#include <tqdom.h>
#include "umlnamespace.h"
#include "umlobject.h"
@@ -66,7 +66,7 @@ public:
/**
* Returns a String representation of this UMLAssociation.
*/
- QString toString( ) const;
+ TQString toString( ) const;
/**
* Converts a Uml::Association_Type to its string representation.
@@ -74,7 +74,7 @@ public:
* @param atype The Association_Type enum value to convert.
* @return The string representation of the Association_Type.
*/
- static QString typeAsString(Uml::Association_Type atype);
+ static TQString typeAsString(Uml::Association_Type atype);
/**
* Returns true if the given Association_Type has a representation as a
@@ -131,21 +131,21 @@ public:
*
* @return The multiplicity assigned to the given role.
*/
- QString getMulti(Uml::Role_Type role) const;
+ TQString getMulti(Uml::Role_Type role) const;
/**
* Returns the name assigned to the role A.
*
* @return The name assigned to the given role.
*/
- QString getRoleName(Uml::Role_Type role) const;
+ TQString getRoleName(Uml::Role_Type role) const;
/**
* Returns the documentation assigned to the given role.
*
* @return Documentation text of given role.
*/
- QString getRoleDoc(Uml::Role_Type role) const;
+ TQString getRoleDoc(Uml::Role_Type role) const;
/**
* Sets the assocType of the UMLAssociation.
@@ -184,7 +184,7 @@ public:
* @param multi The multiplicity of the given role.
* @param role The Uml::Role_Type to which the multiplicity is being applied
*/
- void setMulti(const QString &multi, Uml::Role_Type role);
+ void setMulti(const TQString &multi, Uml::Role_Type role);
/**
* Sets the name of the given role of the UMLAssociation.
@@ -192,7 +192,7 @@ public:
* @param roleName The name to set for the given role.
* @param role The Uml::Role_Type for which to set the name.
*/
- void setRoleName(const QString &roleName, Uml::Role_Type role);
+ void setRoleName(const TQString &roleName, Uml::Role_Type role);
/**
* Sets the documentation on the given role in the association.
@@ -200,14 +200,14 @@ public:
* @param doc The string with the documentation.
* @param role The Uml::Role_Type to which the documentation is being applied
*/
- void setRoleDoc(const QString &doc, Uml::Role_Type role);
+ void setRoleDoc(const TQString &doc, Uml::Role_Type role);
/**
- * Convert Changeability_Type value into QString representation.
+ * Convert Changeability_Type value into TQString representation.
*
* @param type The Changeability_Type enum value to convert.
*/
- static QString ChangeabilityToString(Uml::Changeability_Type type);
+ static TQString ChangeabilityToString(Uml::Changeability_Type type);
/**
* Get the underlying UMLRole object for the given role.
@@ -248,14 +248,14 @@ public:
* Creates the <UML:Generalization> or <UML:Association> XMI element
* including its role objects.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Creates the <UML:Generalization> or <UML:Association> XMI element
* including its role objects.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
// keep track of number of parent widgets
int nrof_parent_widgets;
@@ -278,12 +278,12 @@ protected:
static const Uml::Association_Type atypeFirst;
static const Uml::Association_Type atypeLast;
static const unsigned int nAssocTypes;
- static const QString assocTypeStr[];
+ static const TQString assocTypeStr[];
UMLRole * m_pRole[2];
Uml::Association_Type m_AssocType;
- QString m_Name;
+ TQString m_Name;
bool m_bOldLoadMode;
};
diff --git a/umbrello/umbrello/associationwidget.cpp b/umbrello/umbrello/associationwidget.cpp
index 3f2fe0b7..825308a9 100644
--- a/umbrello/umbrello/associationwidget.cpp
+++ b/umbrello/umbrello/associationwidget.cpp
@@ -15,8 +15,8 @@
#include <cstdlib>
#include <cmath>
// qt/kde includes
-#include <qcanvas.h>
-#include <qvalidator.h>
+#include <tqcanvas.h>
+#include <tqvalidator.h>
#include <kdebug.h>
#include <klocale.h>
#include <kinputdialog.h>
@@ -117,7 +117,7 @@ AssociationWidget::AssociationWidget(UMLView *view, UMLWidget* pWidgetA,
if (isCollaboration()) {
// Create a temporary name to bring on setName()
int collabID = m_pView->generateCollaborationId();
- setName('m' + QString::number(collabID));
+ setName('m' + TQString::number(collabID));
}
}
@@ -245,7 +245,7 @@ FloatingTextWidget* AssociationWidget::getMultiWidget(Uml::Role_Type role) {
return m_role[role].m_pMulti;
}
-QString AssociationWidget::getMulti(Uml::Role_Type role) const
+TQString AssociationWidget::getMulti(Uml::Role_Type role) const
{
if (m_role[role].m_pMulti == NULL)
return "";
@@ -257,7 +257,7 @@ FloatingTextWidget* AssociationWidget::getNameWidget()
return m_pName;
}
-QString AssociationWidget::getName() const {
+TQString AssociationWidget::getName() const {
if (m_pName == NULL)
return "";
return m_pName->getText();
@@ -294,20 +294,20 @@ FloatingTextWidget* AssociationWidget::getTextWidgetByRole(Uml::Text_Role tr) {
return NULL;
}
-QString AssociationWidget::getRoleName(Uml::Role_Type role) const {
+TQString AssociationWidget::getRoleName(Uml::Role_Type role) const {
if (m_role[role].m_pRole == NULL)
return "";
return m_role[role].m_pRole->getText();
}
-QString AssociationWidget::getRoleDoc(Uml::Role_Type role) const {
+TQString AssociationWidget::getRoleDoc(Uml::Role_Type role) const {
if (m_pObject == NULL || m_pObject->getBaseType() != ot_Association)
return "";
UMLAssociation *umla = static_cast<UMLAssociation*>(m_pObject);
return umla->getRoleDoc(role);
}
-void AssociationWidget::setName(const QString &strName) {
+void AssociationWidget::setName(const TQString &strName) {
// set attribute of UMLAssociation associated with this associationwidget
UMLAssociation *umla = getAssociation();
if (umla)
@@ -342,7 +342,7 @@ void AssociationWidget::setName(const QString &strName) {
}
void AssociationWidget::setFloatingText(Uml::Text_Role tr,
- const QString &text,
+ const TQString &text,
FloatingTextWidget* &ft) {
if (! FloatingTextWidget::isTextValid(text)) {
if (ft) {
@@ -369,7 +369,7 @@ void AssociationWidget::setFloatingText(Uml::Text_Role tr,
ft->show();
}
-void AssociationWidget::setMulti(const QString &strMulti, Uml::Role_Type role) {
+void AssociationWidget::setMulti(const TQString &strMulti, Uml::Role_Type role) {
Text_Role tr = (role == A ? tr_MultiA : tr_MultiB);
setFloatingText(tr, strMulti, m_role[role].m_pMulti);
@@ -378,7 +378,7 @@ void AssociationWidget::setMulti(const QString &strMulti, Uml::Role_Type role) {
getAssociation()->setMulti(strMulti, role);
}
-void AssociationWidget::setRoleName (const QString &strRole, Uml::Role_Type role) {
+void AssociationWidget::setRoleName (const TQString &strRole, Uml::Role_Type role) {
Uml::Association_Type type = getAssocType();
//if the association is not supposed to have a Role FloatingTextWidget
if (!AssocRules::allowRole(type)) {
@@ -403,7 +403,7 @@ void AssociationWidget::setRoleName (const QString &strRole, Uml::Role_Type role
getAssociation()->setRoleName(strRole, role);
}
-void AssociationWidget::setRoleDoc (const QString &doc, Uml::Role_Type role) {
+void AssociationWidget::setRoleDoc (const TQString &doc, Uml::Role_Type role) {
if (m_pObject && m_pObject->getBaseType() == ot_Association)
getAssociation()->setRoleDoc(doc, role);
else
@@ -411,7 +411,7 @@ void AssociationWidget::setRoleDoc (const QString &doc, Uml::Role_Type role) {
}
void AssociationWidget::setMessageText(FloatingTextWidget *ft) {
- QString message;
+ TQString message;
if (isCollaboration()) {
if (m_pObject != NULL) {
message = getMulti(A) + ": " + getOperationText(m_pView);
@@ -449,7 +449,7 @@ void AssociationWidget::setVisibility(Uml::Visibility value, Uml::Role_Type role
m_role[role].m_Visibility = value;
// update role pre-text attribute as appropriate
if (m_role[role].m_pRole) {
- QString scopeString = value.toString(true);
+ TQString scopeString = value.toString(true);
m_role[role].m_pRole->setPreText(scopeString);
}
}
@@ -466,7 +466,7 @@ void AssociationWidget::setChangeability (Uml::Changeability_Type value, Uml::Ro
{
if (value == getChangeability(role))
return;
- QString changeString = UMLAssociation::ChangeabilityToString(value);
+ TQString changeString = UMLAssociation::ChangeabilityToString(value);
if (m_pObject && m_pObject->getBaseType() == ot_Association) // update our model object
getAssociation()->setChangeability(value, role);
m_role[role].m_Changeability = value;
@@ -474,7 +474,7 @@ void AssociationWidget::setChangeability (Uml::Changeability_Type value, Uml::Ro
setChangeWidget(changeString, role);
}
-void AssociationWidget::setChangeWidget(const QString &strChangeWidget, Uml::Role_Type role) {
+void AssociationWidget::setChangeWidget(const TQString &strChangeWidget, Uml::Role_Type role) {
bool newLabel = false;
Text_Role tr = (role == A ? tr_ChangeA : tr_ChangeB);
@@ -508,7 +508,7 @@ void AssociationWidget::setChangeWidget(const QString &strChangeWidget, Uml::Rol
}
bool AssociationWidget::linePathStartsAt(const UMLWidget* widget) {
- QPoint lpStart = m_LinePath.getPoint(0);
+ TQPoint lpStart = m_LinePath.getPoint(0);
int startX = lpStart.x();
int startY = lpStart.y();
int wX = widget->getX();
@@ -520,7 +520,7 @@ bool AssociationWidget::linePathStartsAt(const UMLWidget* widget) {
return result;
}
-void AssociationWidget::setText(FloatingTextWidget *ft, const QString &text) {
+void AssociationWidget::setText(FloatingTextWidget *ft, const TQString &text) {
Uml::Text_Role role = ft->getRole();
switch (role) {
case tr_Name:
@@ -819,7 +819,7 @@ void AssociationWidget::setUMLAssociation (UMLAssociation * assoc)
assoc->nrof_parent_widgets = 0;
assoc->nrof_parent_widgets++;
- connect(assoc, SIGNAL(modified()), this, SLOT(syncToModel()));
+ connect(assoc, TQT_SIGNAL(modified()), this, TQT_SLOT(syncToModel()));
}
}
@@ -888,9 +888,9 @@ Uml::IDType AssociationWidget::getWidgetID(Uml::Role_Type role) const {
return id;
}
-/** Returns a QString Object representing this AssociationWidget */
-QString AssociationWidget::toString() {
- QString string = "";
+/** Returns a TQString Object representing this AssociationWidget */
+TQString AssociationWidget::toString() {
+ TQString string = "";
if(m_role[A].m_pWidget) {
string = m_role[A].m_pWidget -> getName();
@@ -915,7 +915,7 @@ QString AssociationWidget::toString() {
return string;
}
-void AssociationWidget::mouseDoubleClickEvent(QMouseEvent * me) {
+void AssociationWidget::mouseDoubleClickEvent(TQMouseEvent * me) {
if (me->button() != Qt::RightButton && me->button() != Qt::LeftButton)
return;
int i = m_LinePath.onLinePath(me->pos());
@@ -925,13 +925,13 @@ void AssociationWidget::mouseDoubleClickEvent(QMouseEvent * me) {
}
if (me->button() != Qt::LeftButton)
return;
- const QPoint mp(me->pos());
+ const TQPoint mp(me->pos());
/* if there is no point around the mouse pointer, we insert a new one */
if (! m_LinePath.isPoint(i, mp, POINT_DELTA)) {
m_LinePath.insertPoint(i + 1, mp);
if (m_nLinePathSegmentIndex == i) {
- QPoint segStart = m_LinePath.getPoint(i);
- QPoint segEnd = m_LinePath.getPoint(i + 2);
+ TQPoint segStart = m_LinePath.getPoint(i);
+ TQPoint segEnd = m_LinePath.getPoint(i + 2);
const int midSegX = segStart.x() + (segEnd.x() - segStart.x()) / 2;
const int midSegY = segStart.y() + (segEnd.y() - segStart.y()) / 2;
/*
@@ -975,7 +975,7 @@ void AssociationWidget::mouseDoubleClickEvent(QMouseEvent * me) {
m_umldoc->setModified(true);
}
-void AssociationWidget::moveEvent(QMoveEvent* me) {
+void AssociationWidget::moveEvent(TQMoveEvent* me) {
// 2004-04-30: Achim Spangler
// Simple Approach to block moveEvent during load of
// XMI
@@ -1001,13 +1001,13 @@ void AssociationWidget::moveEvent(QMoveEvent* me) {
*/
//first see if either the first or last segments moved, else no need to recalculate their point positions
- QPoint oldNamePoint = calculateTextPosition(tr_Name);
- QPoint oldMultiAPoint = calculateTextPosition(tr_MultiA);
- QPoint oldMultiBPoint = calculateTextPosition(tr_MultiB);
- QPoint oldChangeAPoint = calculateTextPosition(tr_ChangeA);
- QPoint oldChangeBPoint = calculateTextPosition(tr_ChangeB);
- QPoint oldRoleAPoint = calculateTextPosition(tr_RoleAName);
- QPoint oldRoleBPoint = calculateTextPosition(tr_RoleBName);
+ TQPoint oldNamePoint = calculateTextPosition(tr_Name);
+ TQPoint oldMultiAPoint = calculateTextPosition(tr_MultiA);
+ TQPoint oldMultiBPoint = calculateTextPosition(tr_MultiB);
+ TQPoint oldChangeAPoint = calculateTextPosition(tr_ChangeA);
+ TQPoint oldChangeBPoint = calculateTextPosition(tr_ChangeB);
+ TQPoint oldRoleAPoint = calculateTextPosition(tr_RoleAName);
+ TQPoint oldRoleBPoint = calculateTextPosition(tr_RoleBName);
m_LinePath.setPoint( m_nMovingPoint, me->pos() );
int pos = m_LinePath.count() - 1;//set to last point for widget b
@@ -1100,14 +1100,14 @@ void AssociationWidget::calculateEndingPoints() {
int w = pWidgetA -> getWidth();
//see if above widget ok to start
if( y - DISTANCE > 0 ) {
- m_LinePath.setStartEndPoints( QPoint( x + w / 4, y ) , QPoint( x + w * 3 / 4, y ) );
- m_LinePath.insertPoint( 1, QPoint( x + w / 4, y - DISTANCE ) );
- m_LinePath.insertPoint( 2 ,QPoint( x + w * 3 / 4, y - DISTANCE ) );
+ m_LinePath.setStartEndPoints( TQPoint( x + w / 4, y ) , TQPoint( x + w * 3 / 4, y ) );
+ m_LinePath.insertPoint( 1, TQPoint( x + w / 4, y - DISTANCE ) );
+ m_LinePath.insertPoint( 2 ,TQPoint( x + w * 3 / 4, y - DISTANCE ) );
m_role[A].m_WidgetRegion = m_role[B].m_WidgetRegion = North;
} else {
- m_LinePath.setStartEndPoints( QPoint( x + w / 4, y + h ), QPoint( x + w * 3 / 4, y + h ) );
- m_LinePath.insertPoint( 1, QPoint( x + w / 4, y + h + DISTANCE ) );
- m_LinePath.insertPoint( 2, QPoint( x + w * 3 / 4, y + h + DISTANCE ) );
+ m_LinePath.setStartEndPoints( TQPoint( x + w / 4, y + h ), TQPoint( x + w * 3 / 4, y + h ) );
+ m_LinePath.insertPoint( 1, TQPoint( x + w / 4, y + h + DISTANCE ) );
+ m_LinePath.insertPoint( 2, TQPoint( x + w * 3 / 4, y + h + DISTANCE ) );
m_role[A].m_WidgetRegion = m_role[B].m_WidgetRegion = South;
}
return;
@@ -1118,7 +1118,7 @@ void AssociationWidget::calculateEndingPoints() {
int xB = pWidgetB->getX() + pWidgetB->getWidth() / 2;
int yB = pWidgetB->getY() + pWidgetB->getHeight() / 2;
if( size > 2 ) {
- QPoint p = m_LinePath.getPoint( 1 );
+ TQPoint p = m_LinePath.getPoint( 1 );
xB = p.x();
yB = p.y();
}
@@ -1130,7 +1130,7 @@ void AssociationWidget::calculateEndingPoints() {
int xA = pWidgetA->getX() + pWidgetA->getWidth() / 2;
int yA = pWidgetA->getY() + pWidgetA->getHeight() / 2;
if (size > 2 ) {
- QPoint p = m_LinePath.getPoint( size - 2 );
+ TQPoint p = m_LinePath.getPoint( size - 2 );
xA = p.x();
yA = p.y();
}
@@ -1143,7 +1143,7 @@ void AssociationWidget::doUpdates(int otherX, int otherY, Uml::Role_Type role) {
// Find widget region.
Region oldRegion = m_role[role].m_WidgetRegion;
UMLWidget *pWidget = m_role[role].m_pWidget;
- QRect rc(pWidget->getX(), pWidget->getY(),
+ TQRect rc(pWidget->getX(), pWidget->getY(),
pWidget->getWidth(), pWidget->getHeight());
Region& region = m_role[role].m_WidgetRegion; // alias for brevity
region = findPointRegion( rc, otherX, otherY);
@@ -1297,7 +1297,7 @@ void AssociationWidget::widgetMoved(UMLWidget* widget, int x, int y ) {
// Assoc to self - move all points:
if( m_role[A].m_pWidget == m_role[B].m_pWidget ) {
for( int i=1 ; i < (int)pos ; i++ ) {
- QPoint p = m_LinePath.getPoint( i );
+ TQPoint p = m_LinePath.getPoint( i );
int newX = p.x() - dx;
int newY = p.y() - dy;
// safety. We DON'T want to go off the screen
@@ -1363,7 +1363,7 @@ void AssociationWidget::widgetMoved(UMLWidget* widget, int x, int y ) {
8 = On diagonal 1 between Region 4 and 1
9 = On diagonal 1 and On diagonal 2 (the center)
*/
-AssociationWidget::Region AssociationWidget::findPointRegion(const QRect& Rect, int PosX, int PosY) {
+AssociationWidget::Region AssociationWidget::findPointRegion(const TQRect& Rect, int PosX, int PosY) {
float w = (float)Rect.width();
float h = (float)Rect.height();
float x = (float)Rect.x();
@@ -1416,8 +1416,8 @@ AssociationWidget::Region AssociationWidget::findPointRegion(const QRect& Rect,
return result;
}
-QPoint AssociationWidget::swapXY(const QPoint &p) {
- QPoint swapped( p.y(), p.x() );
+TQPoint AssociationWidget::swapXY(const TQPoint &p) {
+ TQPoint swapped( p.y(), p.x() );
return swapped;
}
@@ -1429,8 +1429,8 @@ float AssociationWidget::totalLength() {
float total_length = 0;
for(uint i = 0; i < size - 1; i++) {
- QPoint pi = m_LinePath.getPoint( i );
- QPoint pj = m_LinePath.getPoint( i+1 );
+ TQPoint pi = m_LinePath.getPoint( i );
+ TQPoint pj = m_LinePath.getPoint( i+1 );
int xi = pi.y();
int xj = pj.y();
int yi = pi.x();
@@ -1446,7 +1446,7 @@ float AssociationWidget::totalLength() {
Lets say such point is P3, the distance from P1 to P3 must be equal to Distance
and if P3 is not a point of the segment P1P2 then the function returns (-1,-1)
*/
-QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoint &P2, float Distance) {
+TQPoint AssociationWidget::calculatePointAtDistance(const TQPoint &P1, const TQPoint &P2, float Distance) {
/*
the distance D between points (x1, y1) and (x3, y3) has the following formula:
--- ------------------------------
@@ -1508,7 +1508,7 @@ QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoin
int y2 = P2.x();
if(x2 == x1) {
- return QPoint(x1, y1 + (int)Distance);
+ return TQPoint(x1, y1 + (int)Distance);
}
float slope = ((float)y2 - (float)y1) / ((float)x2 - (float)x1);
float b = (y1 - slope*x1);
@@ -1518,16 +1518,16 @@ QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoin
float t = B*B - 4*A*C;
if(t < 0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
float sol_1 = ((-1* B) + sqrt(t) ) / (2*A);
float sol_2 = ((-1*B) - sqrt(t) ) / (2*A);
if(sol_1 < 0.0 && sol_2 < 0.0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
- QPoint sol1Point((int)(slope*sol_1 + b), (int)(sol_1));
- QPoint sol2Point((int)(slope*sol_2 + b), (int)(sol_2));
+ TQPoint sol1Point((int)(slope*sol_1 + b), (int)(sol_1));
+ TQPoint sol2Point((int)(slope*sol_2 + b), (int)(sol_2));
if(sol_1 < 0 && sol_2 >=0) {
if(x2 > x1) {
if(x1 <= sol_2 && sol_2 <= x2)
@@ -1557,14 +1557,14 @@ QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoin
return sol2Point;
}
}
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
/** Calculates which point of a perpendicular line to segment P1P2 that contains P2
has a distance equal to Distance from P2,
Lets say such point is P3, the distance from P2 to P3 must be equal to Distance
*/
-QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &P1, const QPoint &P2, float Distance) {
+TQPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const TQPoint &P1, const TQPoint &P2, float Distance) {
/*
the distance D between points (x2, y2) and (x3, y3) has the following formula:
@@ -1630,7 +1630,7 @@ QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &
to calculate
*/
if (P1.x() == P2.x()) {
- return QPoint((int)(P2.x() + Distance), P2.y());
+ return TQPoint((int)(P2.x() + Distance), P2.y());
}
const int x1 = P1.y();
const int y1 = P1.x();
@@ -1644,17 +1644,17 @@ QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &
float C = (b*b) - (Distance*Distance) + (x2*x2) + (y2*y2) - (2*b*y2);
float t = B*B - 4*A*C;
if (t < 0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
float sol_1 = ((-1* B) + sqrt(t) ) / (2*A);
float sol_2 = ((-1*B) - sqrt(t) ) / (2*A);
if(sol_1 < 0 && sol_2 < 0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
- QPoint sol1Point((int)(slope*sol_1 + b), (int)sol_1);
- QPoint sol2Point((int)(slope*sol_2 + b), (int)sol_2);
+ TQPoint sol1Point((int)(slope*sol_1 + b), (int)sol_1);
+ TQPoint sol2Point((int)(slope*sol_2 + b), (int)sol_2);
if(sol_1 < 0 && sol_2 >=0) {
return sol2Point;
} else if(sol_1 >= 0 && sol_2 < 0) {
@@ -1673,14 +1673,14 @@ QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &
}
}
- return QPoint(-1, -1); // never reached, just keep compilers happy
+ return TQPoint(-1, -1); // never reached, just keep compilers happy
}
/** Calculates the intersection (PS) between line P1P2 and a perpendicular line containing
P3, the result is returned in ResultingPoint. and result value represents the distance
between ResultingPoint and P3; if this value is negative an error ocurred. */
-float AssociationWidget::perpendicularProjection(const QPoint& P1, const QPoint& P2, const QPoint& P3,
- QPoint& ResultingPoint) {
+float AssociationWidget::perpendicularProjection(const TQPoint& P1, const TQPoint& P2, const TQPoint& P3,
+ TQPoint& ResultingPoint) {
//line P1P2 is Line 1 = y=slope1*x + b1
//line P3PS is Line 1 = y=slope2*x + b2
@@ -1721,9 +1721,9 @@ float AssociationWidget::perpendicularProjection(const QPoint& P1, const QPoint&
return distance;
}
-QPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
+TQPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
const int SPACE = 2;
- QPoint p(-1, -1), q(-1, -1);
+ TQPoint p(-1, -1), q(-1, -1);
// used to find out if association end point (p)
// is at top or bottom edge of widget.
@@ -1742,7 +1742,7 @@ QPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
} else if (role != tr_Name) {
kError() << "AssociationWidget::calculateTextPosition called with unsupported Text_Role "
<< role << endl;
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
if ( pWidget && ( pWidget->getY() == p.y() || pWidget->getY() + pWidget->height() == p.y() ))
@@ -1803,12 +1803,12 @@ QPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
if (text) {
constrainTextPos(x, y, textW, textH, role);
}
- p = QPoint( x, y );
+ p = TQPoint( x, y );
return p;
}
-QPoint AssociationWidget::midPoint(const QPoint& p0, const QPoint& p1) {
- QPoint midP;
+TQPoint AssociationWidget::midPoint(const TQPoint& p0, const TQPoint& p1) {
+ TQPoint midP;
if (p0.x() < p1.x())
midP.setX(p0.x() + (p1.x() - p0.x()) / 2);
else
@@ -1826,7 +1826,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
const int textCenterX = textX + textWidth / 2;
const int textCenterY = textY + textHeight / 2;
const uint lastSegment = m_LinePath.count() - 1;
- QPoint p0, p1;
+ TQPoint p0, p1;
switch (tr) {
case tr_RoleAName:
case tr_MultiA:
@@ -1859,7 +1859,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
for (uint i = 0; i < lastSegment; i++) {
p0 = m_LinePath.getPoint(i);
p1 = m_LinePath.getPoint(i + 1);
- QPoint midP = midPoint(p0, p1);
+ TQPoint midP = midPoint(p0, p1);
const int deltaX = textCenterX - midP.x();
const int deltaY = textCenterY - midP.y();
const int cSquare = deltaX * deltaX + deltaY * deltaY;
@@ -1886,7 +1886,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
*/
p0 = swapXY(p0); // go to the natural coordinate system
p1 = swapXY(p1); // with (0,0) in the lower left corner
- QPoint midP = midPoint(p0, p1);
+ TQPoint midP = midPoint(p0, p1);
// If (textX,textY) is not inside the circle around midP then
// constrain (textX,textY) to the nearest point on that circle.
const int x0 = p0.x();
@@ -1897,7 +1897,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
if (textWidth > r)
r = textWidth;
// swap textCenter{X,Y} to convert from Qt coord.system.
- const QPoint origTextCenter(textCenterY, textCenterX);
+ const TQPoint origTextCenter(textCenterY, textCenterX);
const int relX = abs(origTextCenter.x() - midP.x());
const int relY = abs(origTextCenter.y() - midP.y());
const double negativeWhenInsideCircle = relX * relX + relY * relY - r * r;
@@ -1976,8 +1976,8 @@ void AssociationWidget::calculateNameTextSegment() {
float total_length = 0;
float smallest_length = 0;
for(uint i = 0; i < size - 1; i++) {
- QPoint pi = m_LinePath.getPoint( i );
- QPoint pj = m_LinePath.getPoint( i+1 );
+ TQPoint pi = m_LinePath.getPoint( i );
+ TQPoint pj = m_LinePath.getPoint( i+1 );
int xtiDiff = xt - pi.x();
int xtjDiff = xt - pj.x();
int ytiDiff = yt - pi.y();
@@ -2015,7 +2015,7 @@ void AssociationWidget::setTextPosition(Uml::Text_Role role) {
FloatingTextWidget *ft = getTextWidgetByRole(role);
if (ft == NULL)
return;
- QPoint pos = calculateTextPosition(role);
+ TQPoint pos = calculateTextPosition(role);
int x = pos.x();
int y = pos.y();
if ( (x < 0 || x > FloatingTextWidget::restrictPositionMax) ||
@@ -2030,7 +2030,7 @@ void AssociationWidget::setTextPosition(Uml::Text_Role role) {
ft->setY( y );
}
-void AssociationWidget::setTextPositionRelatively(Uml::Text_Role role, const QPoint &oldPosition) {
+void AssociationWidget::setTextPositionRelatively(Uml::Text_Role role, const TQPoint &oldPosition) {
bool startMove = false;
if( m_role[A].m_pMulti && m_role[A].m_pMulti->getStartMove() )
startMove = true;
@@ -2063,7 +2063,7 @@ void AssociationWidget::setTextPositionRelatively(Uml::Text_Role role, const QPo
<< FloatingTextWidget::restrictPositionMax << "]" << endl;
return;
}
- QPoint pos = calculateTextPosition(role);
+ TQPoint pos = calculateTextPosition(role);
int relX = pos.x() - oldPosition.x();
int relY = pos.y() - oldPosition.y();
int ftNewX = ftX + relX;
@@ -2097,9 +2097,9 @@ void AssociationWidget::removeAssocClassLine() {
void AssociationWidget::createAssocClassLine() {
if (m_pAssocClassLine == NULL)
- m_pAssocClassLine = new QCanvasLine(m_pView->canvas());
+ m_pAssocClassLine = new TQCanvasLine(m_pView->canvas());
computeAssocClassLine();
- QPen pen(getLineColor(), getLineWidth(), Qt::DashLine);
+ TQPen pen(getLineColor(), getLineWidth(), Qt::DashLine);
m_pAssocClassLine->setPen(pen);
m_pAssocClassLine->setVisible(true);
}
@@ -2126,14 +2126,14 @@ void AssociationWidget::computeAssocClassLine() {
<< "m_nLinePathSegmentIndex is not set" << endl;
return;
}
- QPoint segStart = m_LinePath.getPoint(m_nLinePathSegmentIndex);
- QPoint segEnd = m_LinePath.getPoint(m_nLinePathSegmentIndex + 1);
+ TQPoint segStart = m_LinePath.getPoint(m_nLinePathSegmentIndex);
+ TQPoint segEnd = m_LinePath.getPoint(m_nLinePathSegmentIndex + 1);
const int midSegX = segStart.x() + (segEnd.x() - segStart.x()) / 2;
const int midSegY = segStart.y() + (segEnd.y() - segStart.y()) / 2;
- QPoint segmentMidPoint(midSegX, midSegY);
- QRect classRectangle = m_pAssocClassWidget->rect();
- QPoint cwEdgePoint = findIntercept(classRectangle, segmentMidPoint);
+ TQPoint segmentMidPoint(midSegX, midSegY);
+ TQRect classRectangle = m_pAssocClassWidget->rect();
+ TQPoint cwEdgePoint = findIntercept(classRectangle, segmentMidPoint);
int acwMinX = cwEdgePoint.x();
int acwMinY = cwEdgePoint.y();
@@ -2166,12 +2166,12 @@ void AssociationWidget::selectAssocClassLine(bool sel /* =true */) {
m_pAssocClassLineSel1 = Widget_Utils::decoratePoint(m_pAssocClassLine->endPoint());
}
-void AssociationWidget::mousePressEvent(QMouseEvent * me) {
+void AssociationWidget::mousePressEvent(TQMouseEvent * me) {
m_nMovingPoint = -1;
//make sure we should be here depending on the button
if(me -> button() != Qt::RightButton && me->button() != Qt::LeftButton)
return;
- QPoint mep = me->pos();
+ TQPoint mep = me->pos();
// See if `mep' is on the connecting line to the association class
if (onAssocClassLine(mep)) {
m_bSelected = true;
@@ -2186,7 +2186,7 @@ void AssociationWidget::mousePressEvent(QMouseEvent * me) {
setSelected( !m_bSelected );
}
-void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
+void AssociationWidget::mouseReleaseEvent(TQMouseEvent * me) {
if(me -> button() != Qt::RightButton && me->button() != Qt::LeftButton) {
setSelected( false );
return;
@@ -2198,15 +2198,15 @@ void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
///@todo: check for non-horizontal / -vertical lines
if (m_nMovingPoint > 0 && m_nMovingPoint < m_LinePath.count() - 1)
{
- QPoint m = m_LinePath.getPoint(m_nMovingPoint);
- QPoint b = m_LinePath.getPoint(m_nMovingPoint - 1);
- QPoint a = m_LinePath.getPoint(m_nMovingPoint + 1);
+ TQPoint m = m_LinePath.getPoint(m_nMovingPoint);
+ TQPoint b = m_LinePath.getPoint(m_nMovingPoint - 1);
+ TQPoint a = m_LinePath.getPoint(m_nMovingPoint + 1);
if ( (b.x() == m.x() && a.x() == m.x()) ||
(b.y() == m.y() && a.y() == m.y()) )
m_LinePath.removePoint(m_nMovingPoint, m, POINT_DELTA);
}
m_nMovingPoint = -1;
- const QPoint p = me->pos();
+ const TQPoint p = me->pos();
if (me->button() != Qt::RightButton) {
return;
@@ -2218,8 +2218,8 @@ void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
//also must be within a certain distance to be a multiplicity menu
ListPopupMenu::Menu_Type menuType = ListPopupMenu::mt_Undefined;
const int DISTANCE = 40;//must be within this many pixels for it to be a multi menu
- const QPoint lpStart = m_LinePath.getPoint(0);
- const QPoint lpEnd = m_LinePath.getPoint(m_LinePath.count() - 1);
+ const TQPoint lpStart = m_LinePath.getPoint(0);
+ const TQPoint lpEnd = m_LinePath.getPoint(m_LinePath.count() - 1);
const int startXDiff = lpStart.x() - p.x();
const int startYDiff = lpStart.y() - p.y();
const int endXDiff = lpEnd.x() - p.x();
@@ -2248,19 +2248,19 @@ void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
}
m_pMenu = new ListPopupMenu(m_pView, menuType);
m_pMenu->popup(me -> globalPos());
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
setSelected();
}//end method mouseReleaseEvent
bool AssociationWidget::showDialog() {
- AssocPropDlg dlg(static_cast<QWidget*>(m_pView), this );
+ AssocPropDlg dlg(static_cast<TQWidget*>(m_pView), this );
if (! dlg.exec())
return false;
- QString name = getName();
- QString doc = getDoc();
- QString roleADoc = getRoleDoc(A), roleBDoc = getRoleDoc(B);
- QString rnA = getRoleName(A), rnB = getRoleName(B);
- QString ma = getMulti(A), mb = getMulti(B);
+ TQString name = getName();
+ TQString doc = getDoc();
+ TQString roleADoc = getRoleDoc(A), roleBDoc = getRoleDoc(B);
+ TQString rnA = getRoleName(A), rnB = getRoleName(B);
+ TQString ma = getMulti(A), mb = getMulti(B);
Uml::Visibility vA = getVisibility(A), vB = getVisibility(B);
Uml::Changeability_Type cA = getChangeability(A), cB = getChangeability(B);
//rules built into these functions to stop updating incorrect values
@@ -2281,9 +2281,9 @@ bool AssociationWidget::showDialog() {
}
void AssociationWidget::slotMenuSelection(int sel) {
- QString oldText, newText;
- QFont font;
- QRegExpValidator v(QRegExp(".*"), 0);
+ TQString oldText, newText;
+ TQFont font;
+ TQRegExpValidator v(TQRegExp(".*"), 0);
Uml::Association_Type atype = getAssocType();
Uml::Role_Type r = Uml::B;
@@ -2393,7 +2393,7 @@ void AssociationWidget::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Line_Color:
case ListPopupMenu::mt_Line_Color_Selection:
{
- QColor newColour;
+ TQColor newColour;
if( KColorDialog::getColor(newColour) ) {
m_pView->selectionSetLineColor(newColour);
m_umldoc->setModified(true);
@@ -2421,7 +2421,7 @@ void AssociationWidget::slotMenuSelection(int sel) {
}
-void AssociationWidget::lwSetFont (QFont font) {
+void AssociationWidget::lwSetFont (TQFont font) {
if( m_pName) {
m_pName->setFont( font );
}
@@ -2444,8 +2444,8 @@ void AssociationWidget::lwSetFont (QFont font) {
}
// find a general font for the association
-QFont AssociationWidget::getFont() const {
- QFont font;
+TQFont AssociationWidget::getFont() const {
+ TQFont font;
if( m_role[A].m_pRole )
font = m_role[A].m_pRole -> getFont( );
@@ -2467,7 +2467,7 @@ QFont AssociationWidget::getFont() const {
return font;
}
-void AssociationWidget::setLineColor(const QColor &colour) {
+void AssociationWidget::setLineColor(const TQColor &colour) {
WidgetBase::setLineColor(colour);
m_LinePath.setLineColor(colour);
}
@@ -2477,14 +2477,14 @@ void AssociationWidget::setLineWidth(uint width) {
m_LinePath.setLineWidth(width);
}
-void AssociationWidget::checkPoints(const QPoint &p) {
+void AssociationWidget::checkPoints(const TQPoint &p) {
m_nMovingPoint = -1;
//only check if more than the two endpoints
int size = m_LinePath.count();
if( size <= 2 )
return;
//check all points except the end points to see if we clicked on one of them
- QPoint tempPoint;
+ TQPoint tempPoint;
int x, y;
const int BOUNDARY = 4; // check for pixels around the point
for(int i=1;i<size-1;i++) {
@@ -2499,7 +2499,7 @@ void AssociationWidget::checkPoints(const QPoint &p) {
}//end for
}
-void AssociationWidget::mouseMoveEvent(QMouseEvent* me) {
+void AssociationWidget::mouseMoveEvent(TQMouseEvent* me) {
if( me->state() != Qt::LeftButton) {
return;
}
@@ -2518,8 +2518,8 @@ void AssociationWidget::mouseMoveEvent(QMouseEvent* me) {
setSelected();
//new position for point
- QPoint p = me->pos();
- QPoint oldp = m_LinePath.getPoint(m_nMovingPoint);
+ TQPoint p = me->pos();
+ TQPoint oldp = m_LinePath.getPoint(m_nMovingPoint);
if( m_pView -> getSnapToGrid() ) {
int newX = m_pView->snappedX( p.x() );
@@ -2555,7 +2555,7 @@ void AssociationWidget::mouseMoveEvent(QMouseEvent* me) {
}
//move event called now
- QMoveEvent m(p, oldp);
+ TQMoveEvent m(p, oldp);
moveEvent(&m);
m_pView->resizeCanvasToItems();
}
@@ -2598,7 +2598,7 @@ int AssociationWidget::getRegionCount(AssociationWidget::Region region, Uml::Rol
return widgetCount;
}
-QPoint AssociationWidget::findIntercept(const QRect &rect, const QPoint &point) {
+TQPoint AssociationWidget::findIntercept(const TQRect &rect, const TQPoint &point) {
Region region = findPointRegion(rect, point.x(), point.y());
/*
const char *regionStr[] = { "Error",
@@ -2664,40 +2664,40 @@ QPoint AssociationWidget::findIntercept(const QRect &rect, const QPoint &point)
if (region == North)
yoff = -yoff;
if (dX == 0) {
- return QPoint(rectMidY + yoff, rectMidX); // swap back X and Y
+ return TQPoint(rectMidY + yoff, rectMidX); // swap back X and Y
}
if (dY == 0) {
kError() << "AssociationWidget::findIntercept usage error: "
<< "North/South (dY == 0)" << endl;
- return QPoint(0,0);
+ return TQPoint(0,0);
}
const float m = (float)dY / (float)dX;
const float b = (float)pY - m * pX;
const int inputY = rectMidY + yoff;
const float outputX = ((float)inputY - b) / m;
- return QPoint(inputY, (int)outputX); // swap back X and Y
+ return TQPoint(inputY, (int)outputX); // swap back X and Y
} else {
int xoff = rectHalfWidth;
if (region == East)
xoff = -xoff;
if (dY == 0)
- return QPoint(rectMidY, rectMidX + xoff); // swap back X and Y
+ return TQPoint(rectMidY, rectMidX + xoff); // swap back X and Y
if (dX == 0) {
kError() << "AssociationWidget::findIntercept usage error: "
<< "East/West (dX == 0)" << endl;
- return QPoint(0,0);
+ return TQPoint(0,0);
}
const float m = (float)dY / (float)dX;
const float b = (float)pY - m * pX;
const int inputX = rectMidX + xoff;
const float outputY = m * (float)inputX + b;
- return QPoint((int)outputY, inputX); // swap back X and Y
+ return TQPoint((int)outputY, inputX); // swap back X and Y
}
}
-int AssociationWidget::findInterceptOnEdge(const QRect &rect,
+int AssociationWidget::findInterceptOnEdge(const TQRect &rect,
AssociationWidget::Region region,
- const QPoint &point)
+ const TQPoint &point)
{
// The Qt coordinate system has (0,0) in the top left corner.
// In order to go to the regular XY coordinate system with (0,0)
@@ -2815,7 +2815,7 @@ void AssociationWidget::updateAssociations(int totalCount,
// Determine intercept position on the edge indicated by `region'.
UMLWidget * otherWidget = (inWidgetARegion ? wB : wA);
LinePath *linepath = assocwidget->getLinePath();
- QPoint refpoint;
+ TQPoint refpoint;
if (assocwidget->linePathStartsAt(otherWidget))
refpoint = linepath->getPoint(linepath->count() - 2);
else
@@ -2869,23 +2869,23 @@ void AssociationWidget::updateRegionLineCount(int index, int totalCount,
// See if above widget ok to place assoc.
switch( m_role[A].m_WidgetRegion ) {
case North:
- m_LinePath.setPoint( 0, QPoint( x + ( ww / 4 ), y ) );
- m_LinePath.setPoint( size - 1, QPoint(x + ( ww * 3 / 4 ), y ) );
+ m_LinePath.setPoint( 0, TQPoint( x + ( ww / 4 ), y ) );
+ m_LinePath.setPoint( size - 1, TQPoint(x + ( ww * 3 / 4 ), y ) );
break;
case South:
- m_LinePath.setPoint( 0, QPoint( x + ( ww / 4 ), y + wh ) );
- m_LinePath.setPoint( size - 1, QPoint( x + ( ww * 3 / 4 ), y + wh ) );
+ m_LinePath.setPoint( 0, TQPoint( x + ( ww / 4 ), y + wh ) );
+ m_LinePath.setPoint( size - 1, TQPoint( x + ( ww * 3 / 4 ), y + wh ) );
break;
case East:
- m_LinePath.setPoint( 0, QPoint( x + ww, y + ( wh / 4 ) ) );
- m_LinePath.setPoint( size - 1, QPoint( x + ww, y + ( wh * 3 / 4 ) ) );
+ m_LinePath.setPoint( 0, TQPoint( x + ww, y + ( wh / 4 ) ) );
+ m_LinePath.setPoint( size - 1, TQPoint( x + ww, y + ( wh * 3 / 4 ) ) );
break;
case West:
- m_LinePath.setPoint( 0, QPoint( x, y + ( wh / 4 ) ) );
- m_LinePath.setPoint( size - 1, QPoint( x, y + ( wh * 3 / 4 ) ) );
+ m_LinePath.setPoint( 0, TQPoint( x, y + ( wh / 4 ) ) );
+ m_LinePath.setPoint( size - 1, TQPoint( x, y + ( wh * 3 / 4 ) ) );
break;
default:
break;
@@ -2914,7 +2914,7 @@ void AssociationWidget::updateRegionLineCount(int index, int totalCount,
int cw = 0;
if (angular) {
uint nind = (role == A ? 1 : m_LinePath.count() - 2);
- QPoint neighbour = m_LinePath.getPoint(nind);
+ TQPoint neighbour = m_LinePath.getPoint(nind);
if (neighbour.x() < x)
cw = 0;
else if (neighbour.x() > x + ww)
@@ -2935,9 +2935,9 @@ void AssociationWidget::updateRegionLineCount(int index, int totalCount,
int snapX = m_pView->snappedX(x + cw);
int snapY = m_pView->snappedY(y + ch);
- QPoint pt;
+ TQPoint pt;
if (angular) {
- pt = QPoint(snapX, snapY);
+ pt = TQPoint(snapX, snapY);
} else {
switch(region) {
case West:
@@ -3011,19 +3011,19 @@ void AssociationWidget::setSelected(bool _select /* = true */) {
}
}
-bool AssociationWidget::onAssocClassLine(const QPoint &point) {
+bool AssociationWidget::onAssocClassLine(const TQPoint &point) {
if (m_pAssocClassLine == NULL)
return false;
- QCanvasItemList list = m_pView->canvas()->collisions(point);
- QCanvasItemList::iterator end(list.end());
- for (QCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it) {
+ TQCanvasItemList list = m_pView->canvas()->collisions(point);
+ TQCanvasItemList::iterator end(list.end());
+ for (TQCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it) {
if (*item_it == m_pAssocClassLine)
return true;
}
return false;
}
-bool AssociationWidget::onAssociation(const QPoint & point) {
+bool AssociationWidget::onAssociation(const TQPoint & point) {
if (m_LinePath.onLinePath(point) != -1)
return true;
return onAssocClassLine(point);
@@ -3032,7 +3032,7 @@ bool AssociationWidget::onAssociation(const QPoint & point) {
void AssociationWidget::slotRemovePopupMenu()
{
if(m_pMenu) {
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
@@ -3045,7 +3045,7 @@ void AssociationWidget::slotClearAllSelected() {
void AssociationWidget::moveMidPointsBy( int x, int y ) {
int pos = m_LinePath.count() - 1;
for( int i=1 ; i < (int)pos ; i++ ) {
- QPoint p = m_LinePath.getPoint( i );
+ TQPoint p = m_LinePath.getPoint( i );
int newX = p.x() + x;
int newY = p.y() + y;
newX = m_pView -> snappedX( newX );
@@ -3064,10 +3064,10 @@ void AssociationWidget::moveEntireAssoc( int x, int y ) {
resetTextPositions();
}
-QRect AssociationWidget::getAssocLineRectangle()
+TQRect AssociationWidget::getAssocLineRectangle()
{
- QRect rectangle;
- QPoint p;
+ TQRect rectangle;
+ TQPoint p;
uint pen_width;
/* we also want the end points connected to the other widget */
@@ -3122,15 +3122,15 @@ void AssociationWidget::setUMLObject(UMLObject *obj) {
break;
case Uml::ot_Attribute:
klass = static_cast<UMLClassifier*>(obj->parent());
- connect(klass, SIGNAL(attributeRemoved(UMLClassifierListItem*)),
- this, SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
+ connect(klass, TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
attr = static_cast<UMLAttribute*>(obj);
- connect(attr, SIGNAL(attributeChanged()), this, SLOT(slotAttributeChanged()));
+ connect(attr, TQT_SIGNAL(attributeChanged()), this, TQT_SLOT(slotAttributeChanged()));
break;
case Uml::ot_EntityAttribute:
ent = static_cast<UMLEntity*>(obj->parent());
- connect(ent, SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
- this, SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
+ connect(ent, TQT_SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
break;
default:
kError() << "UMLAssociation constructor: cannot associate UMLObject of type "
@@ -3200,8 +3200,8 @@ void AssociationWidget::init (UMLView *view)
m_umldoc = UMLApp::app()->getDocument();
m_LinePath.setAssociation( this );
- connect(m_pView, SIGNAL(sigRemovePopupMenu()), this, SLOT(slotRemovePopupMenu()));
- connect(m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
+ connect(m_pView, TQT_SIGNAL(sigRemovePopupMenu()), this, TQT_SLOT(slotRemovePopupMenu()));
+ connect(m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
}
void AssociationWidget::resetTextPositions() {
@@ -3250,10 +3250,10 @@ UMLOperation *AssociationWidget::getOperation() {
void AssociationWidget::setOperation(UMLOperation *op) {
if (m_pObject)
- disconnect(m_pObject, SIGNAL(modified()), m_pName, SLOT(setMessageText()));
+ disconnect(m_pObject, TQT_SIGNAL(modified()), m_pName, TQT_SLOT(setMessageText()));
m_pObject = op;
if (m_pObject)
- connect(m_pObject, SIGNAL(modified()), m_pName, SLOT(setMessageText()));
+ connect(m_pObject, TQT_SIGNAL(modified()), m_pName, TQT_SLOT(setMessageText()));
}
UMLClassifier *AssociationWidget::getOperationOwner() {
@@ -3269,13 +3269,13 @@ UMLClassifier *AssociationWidget::getOperationOwner() {
return c;
}
-void AssociationWidget::setSeqNumAndOp(const QString &seqNum, const QString &op) {
+void AssociationWidget::setSeqNumAndOp(const TQString &seqNum, const TQString &op) {
if (! op.isEmpty())
setName(op);
setMulti(seqNum, A);
}
-UMLClassifier *AssociationWidget::getSeqNumAndOp(QString& seqNum, QString& op) {
+UMLClassifier *AssociationWidget::getSeqNumAndOp(TQString& seqNum, TQString& op) {
seqNum = getMulti(A);
op = getName();
UMLObject *o = getWidget(B)->getUMLObject();
@@ -3283,11 +3283,11 @@ UMLClassifier *AssociationWidget::getSeqNumAndOp(QString& seqNum, QString& op) {
return c;
}
-void AssociationWidget::setCustomOpText(const QString &opText) {
+void AssociationWidget::setCustomOpText(const TQString &opText) {
setName(opText);
}
-QString AssociationWidget::getCustomOpText() {
+TQString AssociationWidget::getCustomOpText() {
return getName();
}
@@ -3300,8 +3300,8 @@ void AssociationWidget::setWidget( UMLWidget* widget, Uml::Role_Type role) {
}
}
-void AssociationWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement assocElement = qDoc.createElement( "assocwidget" );
+void AssociationWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement assocElement = qDoc.createElement( "assocwidget" );
WidgetBase::saveToXMI(qDoc, assocElement);
if (m_pObject) {
@@ -3349,7 +3349,7 @@ void AssociationWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
m_role[B].m_pChangeWidget -> saveToXMI( qDoc, assocElement );
if (m_pAssocClassWidget) {
- QString acid = ID2STR(m_pAssocClassWidget->getID());
+ TQString acid = ID2STR(m_pAssocClassWidget->getID());
assocElement.setAttribute("assocclass", acid);
assocElement.setAttribute("aclsegindex", m_nLinePathSegmentIndex);
}
@@ -3357,15 +3357,15 @@ void AssociationWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
qElement.appendChild( assocElement );
}
-bool AssociationWidget::loadFromXMI( QDomElement & qElement,
+bool AssociationWidget::loadFromXMI( TQDomElement & qElement,
const UMLWidgetList& widgets,
const MessageWidgetList* pMessages )
{
WidgetBase::loadFromXMI(qElement);
// load child widgets first
- QString widgetaid = qElement.attribute( "widgetaid", "-1" );
- QString widgetbid = qElement.attribute( "widgetbid", "-1" );
+ TQString widgetaid = qElement.attribute( "widgetaid", "-1" );
+ TQString widgetbid = qElement.attribute( "widgetbid", "-1" );
Uml::IDType aId = STR2ID(widgetaid);
Uml::IDType bId = STR2ID(widgetbid);
UMLWidget *pWidgetA = Widget_Utils::findWidget( aId, widgets, pMessages );
@@ -3383,10 +3383,10 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
setWidget(pWidgetA, A);
setWidget(pWidgetB, B);
- QString type = qElement.attribute( "type", "-1" );
+ TQString type = qElement.attribute( "type", "-1" );
Uml::Association_Type aType = (Uml::Association_Type) type.toInt();
- QString id = qElement.attribute( "xmi.id", "-1" );
+ TQString id = qElement.attribute( "xmi.id", "-1" );
bool oldStyleLoad = false;
if (id == "-1") {
// xmi.id not present, ergo either a pure widget association,
@@ -3438,20 +3438,20 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
setRoleDoc( qElement.attribute("roleBdoc", ""), B );
// visibilty defaults to Public if it cant set it here..
- QString visibilityA = qElement.attribute( "visibilityA", "0");
+ TQString visibilityA = qElement.attribute( "visibilityA", "0");
if (visibilityA.toInt() > 0)
setVisibility( (Uml::Visibility::Value)visibilityA.toInt(), A);
- QString visibilityB = qElement.attribute( "visibilityB", "0");
+ TQString visibilityB = qElement.attribute( "visibilityB", "0");
if (visibilityB.toInt() > 0)
setVisibility( (Uml::Visibility::Value)visibilityB.toInt(), B);
// Changeability defaults to "Changeable" if it cant set it here..
- QString changeabilityA = qElement.attribute( "changeabilityA", "0");
+ TQString changeabilityA = qElement.attribute( "changeabilityA", "0");
if (changeabilityA.toInt() > 0)
setChangeability( (Uml::Changeability_Type)changeabilityA.toInt(), A);
- QString changeabilityB = qElement.attribute( "changeabilityB", "0");
+ TQString changeabilityB = qElement.attribute( "changeabilityB", "0");
if (changeabilityB.toInt() > 0)
setChangeability( (Uml::Changeability_Type)changeabilityB.toInt(), B);
@@ -3485,16 +3485,16 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
setAssocType(aType);
- QString indexa = qElement.attribute( "indexa", "0" );
- QString indexb = qElement.attribute( "indexb", "0" );
- QString totalcounta = qElement.attribute( "totalcounta", "0" );
- QString totalcountb = qElement.attribute( "totalcountb", "0" );
+ TQString indexa = qElement.attribute( "indexa", "0" );
+ TQString indexb = qElement.attribute( "indexb", "0" );
+ TQString totalcounta = qElement.attribute( "totalcounta", "0" );
+ TQString totalcountb = qElement.attribute( "totalcountb", "0" );
m_role[A].m_nIndex = indexa.toInt();
m_role[B].m_nIndex = indexb.toInt();
m_role[A].m_nTotalCount = totalcounta.toInt();
m_role[B].m_nTotalCount = totalcountb.toInt();
- QString assocclassid = qElement.attribute("assocclass", "");
+ TQString assocclassid = qElement.attribute("assocclass", "");
if (! assocclassid.isEmpty()) {
Uml::IDType acid = STR2ID(assocclassid);
UMLWidget *w = Widget_Utils::findWidget(acid, widgets);
@@ -3502,7 +3502,7 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
m_pAssocClassWidget = static_cast<ClassifierWidget*>(w);
m_pAssocClassWidget->setClassAssocWidget(this);
// Preparation of the assoc class line is done in activate()
- QString aclsegindex = qElement.attribute("aclsegindex", "0");
+ TQString aclsegindex = qElement.attribute("aclsegindex", "0");
m_nLinePathSegmentIndex = aclsegindex.toInt();
} else {
kError() << "AssociationWidget::loadFromXMI: "
@@ -3512,10 +3512,10 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
}
//now load child elements
- QDomNode node = qElement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement element = node.toElement();
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "linepath" ) {
if( !m_LinePath.loadFromXMI( element ) )
return false;
@@ -3524,13 +3524,13 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
// as IF this ISNT done, then the subsequent call to
// widgetMoved will inadvertantly think we have made a
// big move in the position of the association when we haven't.
- QPoint p = m_LinePath.getPoint(0);
+ TQPoint p = m_LinePath.getPoint(0);
m_role[A].m_OldCorner.setX(p.x());
m_role[A].m_OldCorner.setY(p.y());
}
} else if (tag == "floatingtext" ||
tag == "UML:FloatingTextWidget") { // for bkwd compatibility
- QString r = element.attribute( "role", "-1");
+ TQString r = element.attribute( "role", "-1");
if( r == "-1" )
return false;
Uml::Text_Role role = (Uml::Text_Role)r.toInt();
@@ -3606,7 +3606,7 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
return true;
}
-bool AssociationWidget::loadFromXMI( QDomElement & qElement ) {
+bool AssociationWidget::loadFromXMI( TQDomElement & qElement ) {
const MessageWidgetList& messages = m_pView->getMessageList();
return loadFromXMI( qElement, m_pView->getWidgetList(), &messages );
}
diff --git a/umbrello/umbrello/associationwidget.h b/umbrello/umbrello/associationwidget.h
index 67739450..5034f016 100644
--- a/umbrello/umbrello/associationwidget.h
+++ b/umbrello/umbrello/associationwidget.h
@@ -132,7 +132,7 @@ public:
*
* @return Text of the given role's multiplicity widget.
*/
- QString getMulti(Uml::Role_Type role) const;
+ TQString getMulti(Uml::Role_Type role) const;
/**
* Read property of FloatingTextWidget* m_pName.
@@ -146,7 +146,7 @@ public:
*
* @return Text of the FloatingTextWidget name widget.
*/
- QString getName() const;
+ TQString getName() const;
/**
* Return the given role's FloatingTextWidget object.
@@ -167,24 +167,24 @@ public:
*
* @return The name set at the FloatingTextWidget.
*/
- QString getRoleName(Uml::Role_Type role) const;
+ TQString getRoleName(Uml::Role_Type role) const;
/**
* Returns the given role's documentation.
*/
- QString getRoleDoc(Uml::Role_Type role) const;
+ TQString getRoleDoc(Uml::Role_Type role) const;
/**
* Sets the text in the FloatingTextWidget widget representing the Name
* of this association.
*/
- void setName (const QString &strRole);
+ void setName (const TQString &strRole);
/**
* Sets the text in the FloatingTextWidget representing the multiplicity
* at the given side of the association.
*/
- void setMulti(const QString &strMulti, Uml::Role_Type role);
+ void setMulti(const TQString &strMulti, Uml::Role_Type role);
/**
* Gets the visibility on the given role of the association.
@@ -265,11 +265,11 @@ public:
void setAssocType(Uml::Association_Type type);
/**
- * Returns a QString object representing this AssociationWidget.
+ * Returns a TQString object representing this AssociationWidget.
*
* @return Textual representation of the AssociationWidget.
*/
- QString toString();
+ TQString toString();
/**
* Read property of bool m_bActivated.
@@ -347,27 +347,27 @@ public:
/**
* Adds a break point (if left mouse button).
*/
- void mouseDoubleClickEvent(QMouseEvent * me);
+ void mouseDoubleClickEvent(TQMouseEvent * me);
/**
* Sets the association to be selected.
*/
- void mousePressEvent(QMouseEvent * me);
+ void mousePressEvent(TQMouseEvent * me);
/**
* Displays the right mouse buttom menu if right button is pressed.
*/
- void mouseReleaseEvent(QMouseEvent * me);
+ void mouseReleaseEvent(TQMouseEvent * me);
/**
* Moves the break point being dragged.
*/
- void mouseMoveEvent(QMouseEvent * me);
+ void mouseMoveEvent(TQMouseEvent * me);
/**
* Returns true if the given point is on the Association.
*/
- bool onAssociation(const QPoint & point);
+ bool onAssociation(const TQPoint & point);
/**
* Returns true if the given point is on the connecting line to
@@ -375,7 +375,7 @@ public:
* class attached, or if the given point is not on the connecting
* line.
*/
- bool onAssocClassLine(const QPoint & point);
+ bool onAssocClassLine(const TQPoint & point);
/**
* Creates the association class connecting line.
@@ -411,18 +411,18 @@ public:
/**
* Returns the bounding rectangle of all segments of the association.
*/
- QRect getAssocLineRectangle();
+ TQRect getAssocLineRectangle();
/**
* Return the first font found being used by any child widget. (They
* could be different fonts, so this is a slightly misleading method.)
*/
- QFont getFont () const;
+ TQFont getFont () const;
/**
* Overrides the method from WidgetBase.
*/
- void setLineColor(const QColor &colour);
+ void setLineColor(const TQColor &colour);
/**
* Overrides the method from WidgetBase.
@@ -432,7 +432,7 @@ public:
/**
* Set all 'owned' child widgets to this font.
*/
- void lwSetFont (QFont font);
+ void lwSetFont (TQFont font);
/**
* Return the given role's changeability FloatingTextWidget widget.
@@ -445,12 +445,12 @@ public:
* For this function to work properly, the associated widget
* should already be set.
*/
- void setRoleName(const QString &strRole, Uml::Role_Type role);
+ void setRoleName(const TQString &strRole, Uml::Role_Type role);
/**
* Set the documentation on the given role.
*/
- void setRoleDoc(const QString &doc, Uml::Role_Type role);
+ void setRoleDoc(const TQString &doc, Uml::Role_Type role);
/**
* Overrides operation from LinkWidget.
@@ -475,13 +475,13 @@ public:
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- QString getCustomOpText();
+ TQString getCustomOpText();
/**
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void setCustomOpText(const QString &opText);
+ void setCustomOpText(const TQString &opText);
/**
* Overrides operation from LinkWidget.
@@ -512,7 +512,7 @@ public:
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void setText(FloatingTextWidget *ft, const QString &text);
+ void setText(FloatingTextWidget *ft, const TQString &text);
/**
* Calls @ref setTextPosition() on all the labels.
@@ -572,7 +572,7 @@ public:
* @param seqNum The new sequence number string to set.
* @param op The new operation string to set.
*/
- void setSeqNumAndOp(const QString &seqNum, const QString &op);
+ void setSeqNumAndOp(const TQString &seqNum, const TQString &op);
/**
* Overrides operation from LinkWidget.
@@ -581,7 +581,7 @@ public:
* @param seqNum Return this AssociationWidget's sequence number string.
* @param op Return this AssociationWidget's operation string.
*/
- UMLClassifier * getSeqNumAndOp(QString& seqNum, QString& op);
+ UMLClassifier * getSeqNumAndOp(TQString& seqNum, TQString& op);
/**
* Calculates and sets the first and last point in the association's
@@ -613,12 +613,12 @@ public:
/**
* Saves this widget to the "assocwidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads this widget from the "assocwidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
/**
* Same as above, but uses the supplied widgetList for resolving
@@ -626,7 +626,7 @@ public:
* the UMLView for these widgets.)
* Required for clipboard operations.
*/
- bool loadFromXMI( QDomElement & qElement, const UMLWidgetList& widgets,
+ bool loadFromXMI( TQDomElement & qElement, const UMLWidgetList& widgets,
const MessageWidgetList* pMessages = NULL);
/**
@@ -678,7 +678,7 @@ private:
* 8 = On diagonal 1 between Region4 and 1
* 9 = On diagonal 1 and On diagonal 2 (the center)
*/
- static Region findPointRegion(const QRect& Rect, int PosX, int PosY);
+ static Region findPointRegion(const TQRect& Rect, int PosX, int PosY);
/**
* Given a rectangle and a point, findInterceptOnEdge computes the
@@ -691,14 +691,14 @@ private:
* constant.)
* @todo This is buggy. Try replacing by findIntercept()
*/
- static int findInterceptOnEdge(const QRect &rect, Region region, const QPoint &point);
+ static int findInterceptOnEdge(const TQRect &rect, Region region, const TQPoint &point);
- static QPoint findIntercept(const QRect &rect, const QPoint &point);
+ static TQPoint findIntercept(const TQRect &rect, const TQPoint &point);
/**
* Overrides moveEvent.
*/
- void moveEvent(QMoveEvent *me);
+ void moveEvent(TQMoveEvent *me);
/**
* This function calculates which role should be set for the m_pName
@@ -710,13 +710,13 @@ private:
* Returns true if point (PosX, PosY) is close enough to any of the
* association's segments.
*/
- bool isPointInsideBoundaries(int PosX, int PosY, QPoint & SPoint,
+ bool isPointInsideBoundaries(int PosX, int PosY, TQPoint & SPoint,
uint & StartSegmentIndex, uint & EndSegmentIndex);
/**
* Returns a point with interchanged X and Y coordinates.
*/
- static QPoint swapXY(const QPoint &p);
+ static TQPoint swapXY(const TQPoint &p);
/**
* Returns the total length of the association's LinePath:
@@ -731,7 +731,7 @@ private:
* to Distance and if PX is not a point of the segment P1P2 then the
* function returns (-1,-1).
*/
- static QPoint calculatePointAtDistance(const QPoint &P1, const QPoint &P2, float Distance);
+ static TQPoint calculatePointAtDistance(const TQPoint &P1, const TQPoint &P2, float Distance);
/**
* Calculates which point of a perpendicular line to segment P1P2 that
@@ -739,7 +739,7 @@ private:
* Let's say such point is PX, the distance from P2 to PX must be equal
* to Distance.
*/
- static QPoint calculatePointAtDistanceOnPerpendicular(const QPoint &P1, const QPoint &P2, float Distance);
+ static TQPoint calculatePointAtDistanceOnPerpendicular(const TQPoint &P1, const TQPoint &P2, float Distance);
/**
* Calculates the intersection between line P1P2 and a perpendicular
@@ -748,19 +748,19 @@ private:
* P3. If this value is negative an error ocurred.
* This method is not currently used.
*/
- static float perpendicularProjection(const QPoint& P1, const QPoint& P2, const QPoint& P3, QPoint& ResultingPoint);
+ static float perpendicularProjection(const TQPoint& P1, const TQPoint& P2, const TQPoint& P3, TQPoint& ResultingPoint);
/**
* Return the mid point between p0 and p1
*/
- static QPoint midPoint(const QPoint& p0, const QPoint& p1);
+ static TQPoint midPoint(const TQPoint& p0, const TQPoint& p1);
/**
* Calculates the position of the text widget depending on the role
* that widget is playing.
* Returns the point at which to put the widget.
*/
- QPoint calculateTextPosition(Uml::Text_Role role);
+ TQPoint calculateTextPosition(Uml::Text_Role role);
/**
* Puts the text widget with the given role at the given position.
@@ -774,7 +774,7 @@ private:
* Moves the text widget with the given role by the difference between
* the two points.
*/
- void setTextPositionRelatively(Uml::Text_Role role, const QPoint &oldPosition);
+ void setTextPositionRelatively(Uml::Text_Role role, const TQPoint &oldPosition);
/**
* Returns the Region the widget to line intersection is for the given
@@ -829,7 +829,7 @@ private:
/**
* This role's old top left corner before moving.
*/
- QPoint m_OldCorner;
+ TQPoint m_OldCorner;
/**
* The region of this role's widget.
@@ -849,7 +849,7 @@ private:
// The following items are only used if m_pObject is not set.
Uml::Visibility m_Visibility;
Uml::Changeability_Type m_Changeability;
- QString m_RoleDoc;
+ TQString m_RoleDoc;
} m_role[2];
@@ -866,7 +866,7 @@ private:
* @param ft Reference to the pointer to FloatingTextWidget to change or create.
* On creation/deletion, the pointer value will be changed.
*/
- void setFloatingText(Uml::Text_Role tr, const QString &text, FloatingTextWidget* &ft);
+ void setFloatingText(Uml::Text_Role tr, const TQString &text, FloatingTextWidget* &ft);
/**
* Called to tell the association that another association has added
@@ -905,7 +905,7 @@ private:
* For internal purposes only.
* Other classes/users should use setChangeability() instead.
*/
- void setChangeWidget(const QString &strChangeWidget, Uml::Role_Type role);
+ void setChangeWidget(const TQString &strChangeWidget, Uml::Role_Type role);
/**
* Checks to see if the given point is one of the points of the line.
@@ -913,7 +913,7 @@ private:
* This is only valid if no other point id being moved and only
* while the left mouse button is down.
*/
- void checkPoints(const QPoint &p);
+ void checkPoints(const TQPoint &p);
/**
* Returns true if the line path starts at the given widget.
@@ -955,42 +955,42 @@ private:
/**
* Position of Name floatingtext saved by saveIdealTextPositions()
*/
- QPoint m_oldNamePoint;
+ TQPoint m_oldNamePoint;
/**
* Position of role A multiplicity floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldMultiAPoint;
+ TQPoint m_oldMultiAPoint;
/**
* Position of role B multiplicity floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldMultiBPoint;
+ TQPoint m_oldMultiBPoint;
/**
* Position of role A changeability floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldChangeAPoint;
+ TQPoint m_oldChangeAPoint;
/**
* Position of role B changeability floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldChangeBPoint;
+ TQPoint m_oldChangeBPoint;
/**
* Position of role A name floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldRoleAPoint;
+ TQPoint m_oldRoleAPoint;
/**
* Position of role B name floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldRoleBPoint;
+ TQPoint m_oldRoleBPoint;
int m_nLinePathSegmentIndex; ///< anchor for m_pAssocClassLine
- QCanvasLine *m_pAssocClassLine; ///< used for connecting assoc. class
+ TQCanvasLine *m_pAssocClassLine; ///< used for connecting assoc. class
/// selection adornment for the endpoints of the assoc. class connecting line
- QCanvasRectangle *m_pAssocClassLineSel0, *m_pAssocClassLineSel1;
+ TQCanvasRectangle *m_pAssocClassLineSel0, *m_pAssocClassLineSel1;
ClassifierWidget *m_pAssocClassWidget; ///< used if we have an assoc. class
diff --git a/umbrello/umbrello/associationwidgetlist.h b/umbrello/umbrello/associationwidgetlist.h
index 28271b74..4a51a615 100644
--- a/umbrello/umbrello/associationwidgetlist.h
+++ b/umbrello/umbrello/associationwidgetlist.h
@@ -18,12 +18,12 @@
#ifndef _ASSOCIATIONWIDGETLIST_H
#define _ASSOCIATIONWIDGETLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class AssociationWidget;
-typedef QPtrList<AssociationWidget> AssociationWidgetList;
-typedef QPtrListIterator<AssociationWidget> AssociationWidgetListIt;
+typedef TQPtrList<AssociationWidget> AssociationWidgetList;
+typedef TQPtrListIterator<AssociationWidget> AssociationWidgetListIt;
#endif
diff --git a/umbrello/umbrello/attribute.cpp b/umbrello/umbrello/attribute.cpp
index 3bdadeb7..9266c1f4 100644
--- a/umbrello/umbrello/attribute.cpp
+++ b/umbrello/umbrello/attribute.cpp
@@ -12,7 +12,7 @@
// own header
#include "attribute.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "classifier.h"
@@ -24,9 +24,9 @@
#include "object_factory.h"
UMLAttribute::UMLAttribute( const UMLObject *parent,
- const QString& name, Uml::IDType id,
+ const TQString& name, Uml::IDType id,
Uml::Visibility s,
- UMLObject *type, const QString& iv )
+ UMLObject *type, const TQString& iv )
: UMLClassifierListItem(parent, name, id) {
m_InitialValue = iv;
m_BaseType = Uml::ot_Attribute;
@@ -48,7 +48,7 @@ UMLAttribute::UMLAttribute(const UMLObject *parent) : UMLClassifierListItem(pare
UMLAttribute::~UMLAttribute() { }
-void UMLAttribute::setName(const QString &name) {
+void UMLAttribute::setName(const TQString &name) {
m_Name = name;
emit attributeChanged();
UMLObject::emitModified();
@@ -60,11 +60,11 @@ void UMLAttribute::setVisibility(Uml::Visibility s) {
UMLObject::emitModified();
}
-QString UMLAttribute::getInitialValue() {
+TQString UMLAttribute::getInitialValue() {
return m_InitialValue;
}
-void UMLAttribute::setInitialValue(const QString &iv) {
+void UMLAttribute::setInitialValue(const TQString &iv) {
if(m_InitialValue != iv) {
m_InitialValue = iv;
UMLObject::emitModified();
@@ -79,8 +79,8 @@ Uml::Parameter_Direction UMLAttribute::getParmKind () const {
return m_ParmKind;
}
-QString UMLAttribute::toString(Uml::Signature_Type sig) {
- QString s;
+TQString UMLAttribute::toString(Uml::Signature_Type sig) {
+ TQString s;
if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig) {
s = m_Vis.toString(true) + ' ';
@@ -101,7 +101,7 @@ QString UMLAttribute::toString(Uml::Signature_Type sig) {
<< " is not a UMLClassifier" << endl;
return "";
}
- QString typeName;
+ TQString typeName;
UMLClassifier *type = UMLClassifierListItem::getType();
if (type) {
UMLPackage *typeScope = type->getUMLPackage();
@@ -118,7 +118,7 @@ QString UMLAttribute::toString(Uml::Signature_Type sig) {
else if (m_ParmKind == Uml::pd_Out)
s += "out ";
// Construct the attribute text.
- QString string = s + getName() + " : " + typeName;
+ TQString string = s + getName() + " : " + typeName;
if(m_InitialValue.length() > 0)
string += " = " + m_InitialValue;
return string;
@@ -126,7 +126,7 @@ QString UMLAttribute::toString(Uml::Signature_Type sig) {
return s + getName();
}
-QString UMLAttribute::getFullyQualifiedName( const QString& separator,
+TQString UMLAttribute::getFullyQualifiedName( const TQString& separator,
bool includeRoot /* = false */) const {
UMLOperation *op = NULL;
UMLObject *owningObject = static_cast<UMLObject*>(parent());
@@ -141,10 +141,10 @@ QString UMLAttribute::getFullyQualifiedName( const QString& separator,
<< " is not a UMLClassifier" << endl;
return "";
}
- QString tempSeparator = separator;
+ TQString tempSeparator = separator;
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
- QString fqn = ownParent->getFullyQualifiedName(tempSeparator, includeRoot);
+ TQString fqn = ownParent->getFullyQualifiedName(tempSeparator, includeRoot);
if (op)
fqn.append(tempSeparator + op->getName());
fqn.append(tempSeparator + m_Name);
@@ -188,8 +188,8 @@ UMLObject* UMLAttribute::clone() const
}
-void UMLAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement attributeElement = UMLObject::save("UML:Attribute", qDoc);
+void UMLAttribute::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement attributeElement = UMLObject::save("UML:Attribute", qDoc);
if (m_pSecondary == NULL) {
kDebug() << "UMLAttribute::saveToXMI(" << m_Name
<< "): m_pSecondary is NULL, m_SecondaryId is '"
@@ -202,7 +202,7 @@ void UMLAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( attributeElement );
}
-bool UMLAttribute::load( QDomElement & element ) {
+bool UMLAttribute::load( TQDomElement & element ) {
m_SecondaryId = element.attribute( "type", "" );
// We use the m_SecondaryId as a temporary store for the xmi.id
// of the attribute type model object.
@@ -212,14 +212,14 @@ bool UMLAttribute::load( QDomElement & element ) {
// that has not yet been loaded.
if (m_SecondaryId.isEmpty()) {
// Perhaps the type is stored in a child node:
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while (!node.isNull()) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (!Uml::tagEq(tag, "type")) {
node = node.nextSibling();
continue;
@@ -228,8 +228,8 @@ bool UMLAttribute::load( QDomElement & element ) {
if (m_SecondaryId.isEmpty())
m_SecondaryId = tempElement.attribute( "xmi.idref", "" );
if (m_SecondaryId.isEmpty()) {
- QDomNode inner = node.firstChild();
- QDomElement tmpElem = inner.toElement();
+ TQDomNode inner = node.firstChild();
+ TQDomElement tmpElem = inner.toElement();
m_SecondaryId = tmpElem.attribute( "xmi.id", "" );
if (m_SecondaryId.isEmpty())
m_SecondaryId = tmpElem.attribute( "xmi.idref", "" );
@@ -249,28 +249,28 @@ bool UMLAttribute::load( QDomElement & element ) {
return true;
}
-bool UMLAttribute::showPropertiesDialog(QWidget* parent) {
+bool UMLAttribute::showPropertiesDialog(TQWidget* parent) {
UMLAttributeDialog dialog(parent, this);
return dialog.exec();
}
-void UMLAttribute::setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList) {
+void UMLAttribute::setTemplateParams(const TQString& templateParam, UMLClassifierList &templateParamList) {
if (templateParam.isEmpty())
return;
- QString type = templateParam.simplifyWhiteSpace();
+ TQString type = templateParam.simplifyWhiteSpace();
- int start = type.find(QChar('<'));
+ int start = type.find(TQChar('<'));
if (start >= 0 ) {
int end = start;
int count = 1;
int len = type.length();
while (count != 0 && ++end < len) {
- QChar c = type.at(end);
- if (c == QChar('<')) {
+ TQChar c = type.at(end);
+ if (c == TQChar('<')) {
count++;
}
- if (c == QChar('>')) {
+ if (c == TQChar('>')) {
count--;
}
}
@@ -281,14 +281,14 @@ void UMLAttribute::setTemplateParams(const QString& templateParam, UMLClassifier
setTemplateParams(type.mid(start + 1, end - start - 1), templateParamList);
setTemplateParams(type.left(start) + type.right(len - end - 1), templateParamList);
} else {
- QStringList paramsList = QStringList::split(QChar(','), type);
- for ( QStringList::Iterator it = paramsList.begin(); it != paramsList.end(); ++it ) {
- QString param = *it;
+ TQStringList paramsList = TQStringList::split(TQChar(','), type);
+ for ( TQStringList::Iterator it = paramsList.begin(); it != paramsList.end(); ++it ) {
+ TQString param = *it;
if (!param.isEmpty()) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
UMLObject* obj = pDoc->findUMLObject(param);
if (obj == NULL ) {
- obj = pDoc->findUMLObject(param.remove(QChar(' ')));
+ obj = pDoc->findUMLObject(param.remove(TQChar(' ')));
}
if (obj != NULL ) {
//We want to list only the params that already exist in this document
@@ -306,14 +306,14 @@ void UMLAttribute::setTemplateParams(const QString& templateParam, UMLClassifier
UMLClassifierList UMLAttribute::getTemplateParams() {
UMLClassifierList templateParamList;
- QString type = getType()->getName();
- QString templateParam;
+ TQString type = getType()->getName();
+ TQString templateParam;
// Handle C++/D/Java template/generic parameters
const Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
if (pl == Uml::pl_Cpp || pl == Uml::pl_Java || pl == Uml::pl_D) {
- int start = type.find(QChar('<'));
+ int start = type.find(TQChar('<'));
if (start >= 0 ) {
- int end = type.findRev(QChar('>'));
+ int end = type.findRev(TQChar('>'));
if (end > start) {
templateParam = type.mid(start + 1, end - start - 1);
setTemplateParams(templateParam, templateParamList);
diff --git a/umbrello/umbrello/attribute.h b/umbrello/umbrello/attribute.h
index 85253216..7749b3e4 100644
--- a/umbrello/umbrello/attribute.h
+++ b/umbrello/umbrello/attribute.h
@@ -38,10 +38,10 @@ public:
* @param type The type of this UMLAttribute.
* @param iv The initial value of the attribute.
*/
- UMLAttribute(const UMLObject *parent, const QString& name,
+ UMLAttribute(const UMLObject *parent, const TQString& name,
Uml::IDType id = Uml::id_None,
Uml::Visibility s = Uml::Visibility::Private,
- UMLObject *type = 0, const QString& iv = 0);
+ UMLObject *type = 0, const TQString& iv = 0);
/**
* Sets up an attribute.
@@ -70,7 +70,7 @@ public:
* Reimplementation of method from UMLObject is required as
* an extra signal, attributeChanged(), is emitted.
*/
- void setName(const QString &name);
+ void setName(const TQString &name);
/**
* Reimplementation of method from UMLObject is required as
@@ -88,14 +88,14 @@ public:
*
* @return The initial value of the Atrtibute.
*/
- QString getInitialValue();
+ TQString getInitialValue();
/**
* Sets the initial value of the UMLAttribute.
*
* @param iv The initial value of the UMLAttribute.
*/
- void setInitialValue( const QString &iv );
+ void setInitialValue( const TQString &iv );
/**
* Returns a string representation of the UMLAttribute.
@@ -104,23 +104,23 @@ public:
* initial value.
* @return Returns a string representation of the UMLAttribute.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Reimplement method from UMLObject.
*/
- QString getFullyQualifiedName(const QString& separator = QString::null,
+ TQString getFullyQualifiedName(const TQString& separator = TQString::null,
bool includeRoot = false) const;
/**
* Creates the <UML:Attribute> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Display the properties configuration dialog for the attribute.
*/
- virtual bool showPropertiesDialog(QWidget* parent);
+ virtual bool showPropertiesDialog(TQWidget* parent);
void setParmKind (Uml::Parameter_Direction pk);
Uml::Parameter_Direction getParmKind () const;
@@ -141,16 +141,16 @@ protected:
/**
* Loads the <UML:Attribute> XMI element.
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
- QString m_InitialValue; ///< text for the attribute's initial value.
+ TQString m_InitialValue; ///< text for the attribute's initial value.
Uml::Parameter_Direction m_ParmKind;
private:
/**
* Puts in the param templateParamList all the template params that are in templateParam
*/
- void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList);
+ void setTemplateParams(const TQString& templateParam, UMLClassifierList &templateParamList);
};
diff --git a/umbrello/umbrello/autolayout/autolayoutdlg.cpp b/umbrello/umbrello/autolayout/autolayoutdlg.cpp
index 2f6b1a4c..894dddbc 100644
--- a/umbrello/umbrello/autolayout/autolayoutdlg.cpp
+++ b/umbrello/umbrello/autolayout/autolayoutdlg.cpp
@@ -14,13 +14,13 @@
#include "../umlwidget.h"
#include "autolayout.h"
#include "newautolayoutdialog.h"
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qslider.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
#include <kdebug.h>
-AutolayoutDlg::AutolayoutDlg(KConfig* c,UMLView* v,QWidget *parent, const char *name)
+AutolayoutDlg::AutolayoutDlg(KConfig* c,UMLView* v,TQWidget *parent, const char *name)
:MyDialog1(parent, name)
{
view=v;
@@ -159,7 +159,7 @@ void AutolayoutDlg::writeConfig( KConfig * conf)
}
-void AutolayoutDlg::slotSelectAlgorithm( const QString& _algname)
+void AutolayoutDlg::slotSelectAlgorithm( const TQString& _algname)
{
algname=_algname;
@@ -167,7 +167,7 @@ void AutolayoutDlg::slotSelectAlgorithm( const QString& _algname)
Autolayout::Autolayouter * AutolayoutDlg::getAutolayouter( )
{
- const QString text = algorithmCOB->currentText();
+ const TQString text = algorithmCOB->currentText();
kDebug() << "Autolayout Algorithm " << algname << " found " << text << endl;
if (text == "dot")
return new Autolayout::DotAutolayouter();
diff --git a/umbrello/umbrello/autolayout/autolayoutdlg.h b/umbrello/umbrello/autolayout/autolayoutdlg.h
index 2e40d736..126c4a08 100644
--- a/umbrello/umbrello/autolayout/autolayoutdlg.h
+++ b/umbrello/umbrello/autolayout/autolayoutdlg.h
@@ -14,7 +14,7 @@
#include "newautolayoutdialog.h"
#include "../umlview.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kconfig.h>
#include "autolayout.h"
@@ -22,7 +22,7 @@ class AutolayoutDlg : public MyDialog1
{
Q_OBJECT
public:
- AutolayoutDlg(KConfig* c,UMLView* v, QWidget *parent = 0, const char *name = 0);
+ AutolayoutDlg(KConfig* c,UMLView* v, TQWidget *parent = 0, const char *name = 0);
public slots:
virtual void slotSetAssociationWeight(int i);
virtual void slotSetDependenciesWeight(int i);
@@ -39,7 +39,7 @@ class AutolayoutDlg : public MyDialog1
virtual void slotDoAutolayout();
void readConfig(KConfig*);
void writeConfig(KConfig*);
- virtual void slotSelectAlgorithm(const QString&);
+ virtual void slotSelectAlgorithm(const TQString&);
private:
@@ -55,7 +55,7 @@ class AutolayoutDlg : public MyDialog1
bool clusterizeHierarchies;
int shapeSeparation;
KConfig* config;
- QString algname;
+ TQString algname;
Autolayout::Autolayouter* getAutolayouter();
};
diff --git a/umbrello/umbrello/autolayout/simplecanvas.h b/umbrello/umbrello/autolayout/simplecanvas.h
index 41865f8a..29712b9e 100644
--- a/umbrello/umbrello/autolayout/simplecanvas.h
+++ b/umbrello/umbrello/autolayout/simplecanvas.h
@@ -16,7 +16,7 @@
#define AUTOLAYOUTSIMPLECANVAS_H
#include "canvas.h"
-#include <qrect.h>
+#include <tqrect.h>
namespace Autolayout {
/**
diff --git a/umbrello/umbrello/boxwidget.cpp b/umbrello/umbrello/boxwidget.cpp
index e1cff3d9..b85db401 100644
--- a/umbrello/umbrello/boxwidget.cpp
+++ b/umbrello/umbrello/boxwidget.cpp
@@ -12,7 +12,7 @@
// own header
#include "boxwidget.h"
// qt/kde includes
-#include <qevent.h>
+#include <tqevent.h>
#include <kdebug.h>
BoxWidget::BoxWidget(UMLView * view, Uml::IDType id)
@@ -20,14 +20,14 @@ BoxWidget::BoxWidget(UMLView * view, Uml::IDType id)
setSize(100,80);
UMLWidget::setBaseType( Uml::wt_Box );
WidgetBase::m_bUsesDiagramLineColour = false; // boxes be black
- WidgetBase::m_LineColour = QColor("black");
+ WidgetBase::m_LineColour = TQColor("black");
setZ(m_origZ = 0);
}
BoxWidget::~BoxWidget() {
}
-void BoxWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void BoxWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
p.drawRect( offsetX, offsetY, width(), height() );
@@ -36,8 +36,8 @@ void BoxWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-void BoxWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement boxElement = qDoc.createElement("boxwidget");
+void BoxWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement boxElement = qDoc.createElement("boxwidget");
UMLWidget::saveToXMI(qDoc, boxElement);
qElement.appendChild(boxElement);
}
diff --git a/umbrello/umbrello/boxwidget.h b/umbrello/umbrello/boxwidget.h
index f412fee6..13f7e480 100644
--- a/umbrello/umbrello/boxwidget.h
+++ b/umbrello/umbrello/boxwidget.h
@@ -12,7 +12,7 @@
#ifndef BOXWIDGET_H
#define BOXWIDGET_H
//qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
//app includes
#include "umlwidget.h"
@@ -48,13 +48,13 @@ public:
/**
* Draws a rectangle.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves the widget to the "boxwidget" XMI element.
* Note: For loading from XMI, the inherited parent method is used.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
};
#endif
diff --git a/umbrello/umbrello/classifier.cpp b/umbrello/umbrello/classifier.cpp
index 22deee10..4b8e0bc0 100644
--- a/umbrello/umbrello/classifier.cpp
+++ b/umbrello/umbrello/classifier.cpp
@@ -39,7 +39,7 @@
using namespace Uml;
-UMLClassifier::UMLClassifier(const QString & name, Uml::IDType id)
+UMLClassifier::UMLClassifier(const TQString & name, Uml::IDType id)
: UMLPackage(name, id)
{
init();
@@ -64,7 +64,7 @@ void UMLClassifier::setBaseType(Uml::Object_Type ot) {
newIcon = Uml::it_Interface;
break;
case ot_Class:
- UMLObject::setStereotype(QString());
+ UMLObject::setStereotype(TQString());
UMLObject::m_bAbstract = false;
newIcon = Uml::it_Class;
break;
@@ -93,7 +93,7 @@ bool UMLClassifier::isDatatype() const {
}
UMLOperation * UMLClassifier::checkOperationSignature(
- const QString& name,
+ const TQString& name,
UMLAttributeList opParams,
UMLOperation *exemptOp)
{
@@ -129,7 +129,7 @@ UMLOperation * UMLClassifier::checkOperationSignature(
return NULL;
}
-UMLOperation* UMLClassifier::findOperation(const QString& name,
+UMLOperation* UMLClassifier::findOperation(const TQString& name,
Model_Utils::NameAndType_List params) {
UMLOperationList list = findOperations(name);
if (list.count() == 0)
@@ -161,7 +161,7 @@ UMLOperation* UMLClassifier::findOperation(const QString& name,
return test;
}
-UMLOperation* UMLClassifier::createOperation(const QString &name /*=null*/,
+UMLOperation* UMLClassifier::createOperation(const TQString &name /*=null*/,
bool *isExistingOp /*=NULL*/,
Model_Utils::NameAndType_List *params /*=NULL*/)
{
@@ -193,7 +193,7 @@ UMLOperation* UMLClassifier::createOperation(const QString &name /*=null*/,
op->setName( uniqChildName(Uml::ot_Operation) );
do {
UMLOperationDialog operationDialogue(0, op);
- if( operationDialogue.exec() != QDialog::Accepted ) {
+ if( operationDialogue.exec() != TQDialog::Accepted ) {
delete op;
return NULL;
} else if (checkOperationSignature(op->getName(), op->getParmList())) {
@@ -236,7 +236,7 @@ bool UMLClassifier::addOperation(UMLOperation* op, int position )
m_List.insert(position,op);
UMLClassifierListItemList itemList = getFilteredList(Uml::ot_Operation);
UMLClassifierListItem* currentAtt;
- QString buf;
+ TQString buf;
for (UMLClassifierListItemListIt it0(itemList); (currentAtt = it0.current()); ++it0)
buf.append(' ' + currentAtt->getName());
kDebug() << " UMLClassifier::addOperation list after change: " << buf << endl;
@@ -244,7 +244,7 @@ bool UMLClassifier::addOperation(UMLOperation* op, int position )
m_List.append( op );
emit operationAdded(op);
UMLObject::emitModified();
- connect(op,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(op,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
@@ -270,22 +270,22 @@ int UMLClassifier::removeOperation(UMLOperation *op) {
}
// disconnection needed.
// note that we don't delete the operation, just remove it from the Classifier
- disconnect(op,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(op,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
emit operationRemoved(op);
UMLObject::emitModified();
return m_List.count();
}
-UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString()*/) {
- QString name = currentName;
+UMLObject* UMLClassifier::createTemplate(const TQString& currentName /*= TQString()*/) {
+ TQString name = currentName;
bool goodName = !name.isEmpty();
if (!goodName)
name = uniqChildName(Uml::ot_Template);
UMLTemplate* newTemplate = new UMLTemplate(this, name);
- int button = QDialog::Accepted;
+ int button = TQDialog::Accepted;
- while (button==QDialog::Accepted && !goodName) {
+ while (button==TQDialog::Accepted && !goodName) {
UMLTemplateDialog templateDialogue(0, newTemplate);
button = templateDialogue.exec();
name = newTemplate->getName();
@@ -299,7 +299,7 @@ UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString(
}
}
- if (button != QDialog::Accepted) {
+ if (button != TQDialog::Accepted) {
return NULL;
}
@@ -326,7 +326,7 @@ UMLAttributeList UMLClassifier::getAttributeList() const{
return attributeList;
}
-UMLOperationList UMLClassifier::findOperations(const QString &n) {
+UMLOperationList UMLClassifier::findOperations(const TQString &n) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
UMLOperationList list;
for (UMLObjectListIt lit(m_List); lit.current(); ++lit) {
@@ -495,12 +495,12 @@ bool UMLClassifier::acceptAssociationType(Uml::Association_Type type)
return false; //shutup compiler warning
}
-UMLAttribute* UMLClassifier::createAttribute(const QString &name,
+UMLAttribute* UMLClassifier::createAttribute(const TQString &name,
UMLObject *type,
Uml::Visibility vis,
- const QString &init) {
+ const TQString &init) {
Uml::IDType id = UniqueID::gen();
- QString currentName;
+ TQString currentName;
if (name.isNull()) {
currentName = uniqChildName(Uml::ot_Attribute);
} else {
@@ -508,15 +508,15 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
}
UMLAttribute* newAttribute = new UMLAttribute(this, currentName, id, vis, type, init);
- int button = QDialog::Accepted;
+ int button = TQDialog::Accepted;
bool goodName = false;
//check for name.isNull() stops dialog being shown
//when creating attribute via list view
- while (button == QDialog::Accepted && !goodName && name.isNull()) {
+ while (button == TQDialog::Accepted && !goodName && name.isNull()) {
UMLAttributeDialog attributeDialogue(0, newAttribute);
button = attributeDialogue.exec();
- QString name = newAttribute->getName();
+ TQString name = newAttribute->getName();
if(name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
@@ -527,7 +527,7 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
}
}
- if (button != QDialog::Accepted) {
+ if (button != TQDialog::Accepted) {
delete newAttribute;
return NULL;
}
@@ -539,7 +539,7 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
return newAttribute;
}
-UMLAttribute* UMLClassifier::addAttribute(const QString &name, Uml::IDType id /* = Uml::id_None */) {
+UMLAttribute* UMLClassifier::addAttribute(const TQString &name, Uml::IDType id /* = Uml::id_None */) {
for (UMLObjectListIt lit(m_List); lit.current(); ++lit) {
UMLObject *obj = lit.current();
if (obj->getBaseType() == Uml::ot_Attribute && obj->getName() == name)
@@ -550,11 +550,11 @@ UMLAttribute* UMLClassifier::addAttribute(const QString &name, Uml::IDType id /*
m_List.append(a);
emit attributeAdded(a);
UMLObject::emitModified();
- connect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return a;
}
-UMLAttribute* UMLClassifier::addAttribute(const QString &name, UMLObject *type, Uml::Visibility scope) {
+UMLAttribute* UMLClassifier::addAttribute(const TQString &name, UMLObject *type, Uml::Visibility scope) {
UMLAttribute *a = new UMLAttribute(this);
a->setName(name);
a->setVisibility(scope);
@@ -564,7 +564,7 @@ UMLAttribute* UMLClassifier::addAttribute(const QString &name, UMLObject *type,
m_List.append(a);
emit attributeAdded(a);
UMLObject::emitModified();
- connect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return a;
}
@@ -579,7 +579,7 @@ bool UMLClassifier::addAttribute(UMLAttribute* att, IDChangeLog* Log /* = 0 */,
m_List.append(att);
emit attributeAdded(att);
UMLObject::emitModified();
- connect(att, SIGNAL(modified()), this, SIGNAL(modified()));
+ connect(att, TQT_SIGNAL(modified()), this, TQT_SIGNAL(modified()));
return true;
} else if (Log) {
Log->removeChangeByNewID(att->getID());
@@ -596,8 +596,8 @@ int UMLClassifier::removeAttribute(UMLAttribute* a) {
emit attributeRemoved(a);
UMLObject::emitModified();
// If we are deleting the object, then we don't need to disconnect..this is done auto-magically
- // for us by QObject. -b.t.
- // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ // for us by TQObject. -b.t.
+ // disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
delete a;
return m_List.count();
}
@@ -643,7 +643,7 @@ UMLOperationList UMLClassifier::getOpList(bool includeInherited) {
UMLOperationList pops = c->getOpList(true);
// add these operations to operation list, but only if unique.
for (UMLOperation *po = pops.first(); po; po = pops.next()) {
- QString po_as_string(po->toString(Uml::st_SigNoVis));
+ TQString po_as_string(po->toString(Uml::st_SigNoVis));
UMLOperation *o = NULL;
for (o = ops.first(); o; o = ops.next())
if (o->toString(Uml::st_SigNoVis) == po_as_string)
@@ -669,7 +669,7 @@ UMLClassifierListItemList UMLClassifier::getFilteredList(Uml::Object_Type ot) co
return resultList;
}
-UMLTemplate* UMLClassifier::addTemplate(const QString &name, Uml::IDType id) {
+UMLTemplate* UMLClassifier::addTemplate(const TQString &name, Uml::IDType id) {
UMLTemplate *t = findTemplate(name);
if (t)
return t;
@@ -677,19 +677,19 @@ UMLTemplate* UMLClassifier::addTemplate(const QString &name, Uml::IDType id) {
m_List.append(t);
emit templateAdded(t);
UMLObject::emitModified();
- connect(t, SIGNAL(modified()), this, SIGNAL(modified()));
+ connect(t, TQT_SIGNAL(modified()), this, TQT_SIGNAL(modified()));
return t;
}
bool UMLClassifier::addTemplate(UMLTemplate* newTemplate, IDChangeLog* log /* = 0*/) {
- QString name = newTemplate->getName();
+ TQString name = newTemplate->getName();
if (findChildObject(name) == NULL) {
newTemplate->parent()->removeChild(newTemplate);
this->insertChild(newTemplate);
m_List.append(newTemplate);
emit templateAdded(newTemplate);
UMLObject::emitModified();
- connect(newTemplate,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(newTemplate,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
} else if (log) {
log->removeChangeByNewID( newTemplate->getID() );
@@ -700,7 +700,7 @@ bool UMLClassifier::addTemplate(UMLTemplate* newTemplate, IDChangeLog* log /* =
bool UMLClassifier::addTemplate(UMLTemplate* Template, int position)
{
- QString name = Template->getName();
+ TQString name = Template->getName();
if (findChildObject(name) == NULL) {
Template->parent()->removeChild(Template);
this->insertChild(Template);
@@ -710,7 +710,7 @@ bool UMLClassifier::addTemplate(UMLTemplate* Template, int position)
m_List.append(Template);
emit templateAdded(Template);
UMLObject::emitModified();
- connect(Template,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(Template,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
//else
@@ -724,12 +724,12 @@ int UMLClassifier::removeTemplate(UMLTemplate* umltemplate) {
}
emit templateRemoved(umltemplate);
UMLObject::emitModified();
- disconnect(umltemplate,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(umltemplate,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return m_List.count();
}
-UMLTemplate *UMLClassifier::findTemplate(const QString& name) {
+UMLTemplate *UMLClassifier::findTemplate(const TQString& name) {
UMLTemplateList templParams = getTemplateList();
for (UMLTemplate *t = templParams.first(); t; t = templParams.next()) {
if (t->getName() == name)
@@ -756,12 +756,12 @@ UMLTemplateList UMLClassifier::getTemplateList() const {
int UMLClassifier::takeItem(UMLClassifierListItem *item) {
UMLObject* currentAtt;
- QString buf;
+ TQString buf;
for (UMLObjectListIt it0(m_List);
(currentAtt = it0.current()); ++it0) {
- QString txt = currentAtt->getName();
+ TQString txt = currentAtt->getName();
if (txt.isEmpty())
- txt = "Type-" + QString::number((int) currentAtt->getBaseType());
+ txt = "Type-" + TQString::number((int) currentAtt->getBaseType());
buf.append(' ' + currentAtt->getName());
}
kDebug() << " UMLClassifier::takeItem (before): m_List is " << buf << endl;
@@ -847,7 +847,7 @@ UMLAssociationList UMLClassifier::getUniAssociationToBeImplemented() {
if (a->getObjectId(Uml::B) == getID())
continue; // we need to be at the A side
- QString roleNameB = a->getRoleName(Uml::B);
+ TQString roleNameB = a->getRoleName(Uml::B);
if (!roleNameB.isEmpty()) {
UMLAttributeList atl = getAttributeList();
bool found = false;
@@ -866,8 +866,8 @@ UMLAssociationList UMLClassifier::getUniAssociationToBeImplemented() {
return uniAssocListToBeImplemented;
}
-void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
- QString tag;
+void UMLClassifier::saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQString tag;
switch (m_BaseType) {
case Uml::ot_Class:
tag = "UML:Class";
@@ -883,7 +883,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
<< m_BaseType << endl;
return;
}
- QDomElement classifierElement = UMLObject::save(tag, qDoc);
+ TQDomElement classifierElement = UMLObject::save(tag, qDoc);
if (m_BaseType == Uml::ot_Datatype && m_pSecondary != NULL)
classifierElement.setAttribute( "elementReference",
ID2STR(m_pSecondary->getID()) );
@@ -891,7 +891,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
//save templates
UMLClassifierListItemList list = getFilteredList(Uml::ot_Template);
if (list.count()) {
- QDomElement tmplElement = qDoc.createElement( "UML:ModelElement.templateParameter" );
+ TQDomElement tmplElement = qDoc.createElement( "UML:ModelElement.templateParameter" );
for (UMLClassifierListItem *tmpl = list.first(); tmpl; tmpl = list.next() ) {
tmpl->saveToXMI(qDoc, tmplElement);
}
@@ -901,12 +901,12 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
//save generalizations (we are the subclass, the other end is the superclass)
UMLAssociationList generalizations = getSpecificAssocs(Uml::at_Generalization);
if (generalizations.count()) {
- QDomElement genElement = qDoc.createElement("UML:GeneralizableElement.generalization");
+ TQDomElement genElement = qDoc.createElement("UML:GeneralizableElement.generalization");
for (UMLAssociation *a = generalizations.first(); a; a = generalizations.next()) {
// We are the subclass if we are at the role A end.
if (m_nId != a->getObjectId(Uml::A))
continue;
- QDomElement gElem = qDoc.createElement("UML:Generalization");
+ TQDomElement gElem = qDoc.createElement("UML:Generalization");
gElem.setAttribute( "xmi.idref", ID2STR(a->getID()) );
genElement.appendChild(gElem);
}
@@ -915,7 +915,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
}
// save attributes
- QDomElement featureElement = qDoc.createElement( "UML:Classifier.feature" );
+ TQDomElement featureElement = qDoc.createElement( "UML:Classifier.feature" );
UMLClassifierListItemList attList = getFilteredList(Uml::ot_Attribute);
for (UMLClassifierListItem *pAtt = attList.first(); pAtt; pAtt = attList.next() )
pAtt -> saveToXMI( qDoc, featureElement );
@@ -929,7 +929,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
// save contained objects
if (m_objects.count()) {
- QDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
+ TQDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
for (UMLObjectListIt oit(m_objects); oit.current(); ++oit) {
UMLObject *obj = oit.current();
obj->saveToXMI (qDoc, ownedElement);
@@ -939,7 +939,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
qElement.appendChild( classifierElement );
}
-UMLClassifierListItem* UMLClassifier::makeChildObject(const QString& xmiTag) {
+UMLClassifierListItem* UMLClassifier::makeChildObject(const TQString& xmiTag) {
UMLClassifierListItem* pObject = NULL;
if (tagEq(xmiTag, "Operation")) {
pObject = new UMLOperation(this);
@@ -953,7 +953,7 @@ UMLClassifierListItem* UMLClassifier::makeChildObject(const QString& xmiTag) {
return pObject;
}
-bool UMLClassifier::load(QDomElement& element) {
+bool UMLClassifier::load(TQDomElement& element) {
UMLClassifierListItem *child = NULL;
m_SecondaryId = element.attribute( "elementReference", "" );
if (!m_SecondaryId.isEmpty()) {
@@ -961,12 +961,12 @@ bool UMLClassifier::load(QDomElement& element) {
m_isRef = true;
}
bool totalSuccess = true;
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
element = node.toElement();
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tagEq(tag, "ModelElement.templateParameter") ||
tagEq(tag, "Classifier.feature") ||
tagEq(tag, "Namespace.ownedElement") ||
diff --git a/umbrello/umbrello/classifier.h b/umbrello/umbrello/classifier.h
index c599fe16..9bec4917 100644
--- a/umbrello/umbrello/classifier.h
+++ b/umbrello/umbrello/classifier.h
@@ -51,7 +51,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLClassifier(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLClassifier(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -83,10 +83,10 @@ public:
* @param init An optional initial value, used by when creating through UMLListView
* @return The UMLAttribute created
*/
- virtual UMLAttribute* createAttribute(const QString &name = QString::null,
+ virtual UMLAttribute* createAttribute(const TQString &name = TQString::null,
UMLObject *type = 0,
Uml::Visibility vis = Uml::Visibility::Private,
- const QString &init = QString::null);
+ const TQString &init = TQString::null);
/**
* Adds an attribute to the class.
@@ -100,9 +100,9 @@ public:
* will internally assign a new ID.
* @return Pointer to the UMLAttribute created or found.
*/
- UMLAttribute* addAttribute(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLAttribute* addAttribute(const TQString &name, Uml::IDType id = Uml::id_None);
- UMLAttribute* addAttribute(const QString &name, UMLObject *type, Uml::Visibility scope);
+ UMLAttribute* addAttribute(const TQString &name, UMLObject *type, Uml::Visibility scope);
/**
* Adds an already created attribute.
@@ -165,7 +165,7 @@ public:
* created because for example, the user canceled the dialog
* or no appropriate name can be found.
*/
- UMLOperation* createOperation( const QString &name = QString::null,
+ UMLOperation* createOperation( const TQString &name = TQString::null,
bool *isExistingOp = NULL,
Model_Utils::NameAndType_List *params = NULL);
@@ -204,7 +204,7 @@ public:
* @return NULL if the signature is valid (ok), else return a pointer
* to the existing UMLOperation that causes the conflict.
*/
- UMLOperation * checkOperationSignature( const QString& name,
+ UMLOperation * checkOperationSignature( const TQString& name,
UMLAttributeList opParams,
UMLOperation *exemptOp = NULL);
@@ -239,7 +239,7 @@ public:
*
* @return The UMLTemplate created
*/
- UMLObject* createTemplate(const QString& name = QString::null);
+ UMLObject* createTemplate(const TQString& name = TQString::null);
/**
* Adds a template to the class if it is not there yet.
@@ -248,7 +248,7 @@ public:
* @param id The id of the template.
* @return Pointer to the UMLTemplate object created.
*/
- UMLTemplate* addTemplate(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLTemplate* addTemplate(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Adds an already created template.
@@ -285,7 +285,7 @@ public:
/**
* Seeks the template parameter of the given name.
*/
- UMLTemplate *findTemplate(const QString& name);
+ UMLTemplate *findTemplate(const TQString& name);
/**
* Returns the number of templates for the class.
@@ -338,7 +338,7 @@ public:
* @param n The name of the operation to find.
* @return The list of objects found; will be empty if none found.
*/
- UMLOperationList findOperations(const QString &n);
+ UMLOperationList findOperations(const TQString &n);
/**
* Find an attribute, operation, association or template.
@@ -357,7 +357,7 @@ public:
*
* @return The operation found. Will return 0 if none found.
*/
- UMLOperation* findOperation(const QString& name,
+ UMLOperation* findOperation(const TQString& name,
Model_Utils::NameAndType_List params);
/**
@@ -440,7 +440,7 @@ public:
* <UML:Attribute>, <UML:Operation>, or <UML:TemplateParameter>.
* Used by the clipboard for paste operation.
*/
- UMLClassifierListItem* makeChildObject(const QString& xmiTag);
+ UMLClassifierListItem* makeChildObject(const TQString& xmiTag);
/**
* Return the list of unidirectional association that should show up in the code
@@ -478,9 +478,9 @@ protected:
/**
* Auxiliary to saveToXMI of inheriting classes:
- * Saves template parameters to the given QDomElement.
+ * Saves template parameters to the given TQDomElement.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Auxiliary to loadFromXMI:
@@ -489,7 +489,7 @@ protected:
* Child classes can override the loadSpecialized method
* to load its additional tags.
*/
- virtual bool load(QDomElement& element);
+ virtual bool load(TQDomElement& element);
};
diff --git a/umbrello/umbrello/classifiercodedocument.cpp b/umbrello/umbrello/classifiercodedocument.cpp
index a2d2f9fc..29e4bd88 100644
--- a/umbrello/umbrello/classifiercodedocument.cpp
+++ b/umbrello/umbrello/classifiercodedocument.cpp
@@ -19,7 +19,7 @@
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "association.h"
@@ -129,10 +129,10 @@ bool ClassifierCodeDocument::hasObjectVectorClassFields() {
if(cf->getClassFieldType() != CodeClassField::Attribute)
{
UMLRole * role = dynamic_cast<UMLRole*>(cf->getParentObject());
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
if (
- multi.contains(QRegExp("[23456789\\*]")) ||
- multi.contains(QRegExp("1\\d"))
+ multi.contains(TQRegExp("[23456789\\*]")) ||
+ multi.contains(TQRegExp("1\\d"))
)
return true;
}
@@ -248,11 +248,11 @@ UMLClassifier * ClassifierCodeDocument::getParentClassifier ( ) {
}
/**
- * @return QPtrList<CodeOperation>
+ * @return TQPtrList<CodeOperation>
*/
-QPtrList<CodeOperation> ClassifierCodeDocument::getCodeOperations ( ) {
+TQPtrList<CodeOperation> ClassifierCodeDocument::getCodeOperations ( ) {
- QPtrList<CodeOperation> list;
+ TQPtrList<CodeOperation> list;
list.setAutoDelete(false);
TextBlockList * tlist = getTextBlockList();
@@ -274,7 +274,7 @@ void ClassifierCodeDocument::addOperation (UMLClassifierListItem * o) {
kError() << "ClassifierCodeDocument::addOperation: arg is not a UMLOperation"
<< endl;
}
- QString tag = CodeOperation::findTag(op);
+ TQString tag = CodeOperation::findTag(op);
CodeOperation * codeOp = dynamic_cast<CodeOperation*>(findTextBlockByTag(tag, true));
bool createdNew = false;
@@ -299,7 +299,7 @@ void ClassifierCodeDocument::addOperation (UMLClassifierListItem * o) {
*/
void ClassifierCodeDocument::removeOperation (UMLClassifierListItem * op ) {
- QString tag = CodeOperation::findTag((UMLOperation*)op);
+ TQString tag = CodeOperation::findTag((UMLOperation*)op);
TextBlock *tb = findTextBlockByTag(tag, true);
if(tb)
{
@@ -327,7 +327,7 @@ void ClassifierCodeDocument::addCodeClassFieldMethods(CodeClassFieldList &list )
for (CodeAccessorMethodListIt it(list); (method = it.current()) != NULL; ++it)
{
/*
- QString tag = method->getTag();
+ TQString tag = method->getTag();
if(tag.isEmpty())
{
tag = getUniqueTag();
@@ -397,15 +397,15 @@ void ClassifierCodeDocument::init (UMLClassifier * c )
// slots
if (parentIsClass()) {
- connect(c,SIGNAL(attributeAdded(UMLClassifierListItem*)),this,SLOT(addAttributeClassField(UMLClassifierListItem*)));
- connect(c,SIGNAL(attributeRemoved(UMLClassifierListItem*)),this,SLOT(removeAttributeClassField(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(attributeAdded(UMLClassifierListItem*)),this,TQT_SLOT(addAttributeClassField(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),this,TQT_SLOT(removeAttributeClassField(UMLClassifierListItem*)));
}
- connect(c,SIGNAL(sigAssociationEndAdded(UMLAssociation*)),this,SLOT(addAssociationClassField(UMLAssociation*)));
- connect(c,SIGNAL(sigAssociationEndRemoved(UMLAssociation*)),this,SLOT(removeAssociationClassField(UMLAssociation*)));
- connect(c,SIGNAL(operationAdded(UMLClassifierListItem*)),this,SLOT(addOperation(UMLClassifierListItem*)));
- connect(c,SIGNAL(operationRemoved(UMLClassifierListItem*)),this,SLOT(removeOperation(UMLClassifierListItem*)));
- connect(c,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(c,TQT_SIGNAL(sigAssociationEndAdded(UMLAssociation*)),this,TQT_SLOT(addAssociationClassField(UMLAssociation*)));
+ connect(c,TQT_SIGNAL(sigAssociationEndRemoved(UMLAssociation*)),this,TQT_SLOT(removeAssociationClassField(UMLAssociation*)));
+ connect(c,TQT_SIGNAL(operationAdded(UMLClassifierListItem*)),this,TQT_SLOT(addOperation(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(operationRemoved(UMLClassifierListItem*)),this,TQT_SLOT(removeOperation(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
@@ -425,7 +425,7 @@ void ClassifierCodeDocument::init (UMLClassifier * c )
// but that object is not yet constructed.
//
void ClassifierCodeDocument::syncNamesToParent( ) {
- QString fileName = CodeGenerator::cleanName(getParentClassifier()->getName());
+ TQString fileName = CodeGenerator::cleanName(getParentClassifier()->getName());
if (!UMLApp::app()->activeLanguageIsCaseSensitive()) {
// @todo let the user decide about mixed case file names (codegen setup menu)
fileName = fileName.lower();
@@ -458,7 +458,7 @@ void ClassifierCodeDocument::updateOperations( ) {
UMLOperationList opList(getParentClassifier()->getOpList());
for (UMLOperation *op = opList.first(); op; op = opList.next())
{
- QString tag = CodeOperation::findTag(op);
+ TQString tag = CodeOperation::findTag(op);
CodeOperation * codeOp = dynamic_cast<CodeOperation*>(findTextBlockByTag(tag, true));
bool createdNew = false;
@@ -570,7 +570,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool
/** set the class attributes of this object from
* the passed element node.
*/
-void ClassifierCodeDocument::setAttributesFromNode ( QDomElement & elem )
+void ClassifierCodeDocument::setAttributesFromNode ( TQDomElement & elem )
{
// NOTE: we DON'T set the parent here as we ONLY get to this point
@@ -579,10 +579,10 @@ void ClassifierCodeDocument::setAttributesFromNode ( QDomElement & elem )
// We FIRST set code class field stuff..check re-linnking with
// accessor methods by looking for our particular child element
- QDomNode node = elem.firstChild();
- QDomElement childElem = node.toElement();
+ TQDomNode node = elem.firstChild();
+ TQDomElement childElem = node.toElement();
while( !childElem.isNull() ) {
- QString tag = childElem.tagName();
+ TQString tag = childElem.tagName();
if( tag == "classfields" ) {
// load classfields
loadClassFieldsFromXMI(childElem);
@@ -627,15 +627,15 @@ ClassifierCodeDocument::findCodeClassFieldFromParentID (Uml::IDType id,
return (CodeClassField*) NULL; // not found
}
-void ClassifierCodeDocument::loadClassFieldsFromXMI( QDomElement & elem) {
+void ClassifierCodeDocument::loadClassFieldsFromXMI( TQDomElement & elem) {
- QDomNode node = elem.firstChild();
- QDomElement childElem = node.toElement();
+ TQDomNode node = elem.firstChild();
+ TQDomElement childElem = node.toElement();
while( !childElem.isNull() ) {
- QString nodeName = childElem.tagName();
+ TQString nodeName = childElem.tagName();
if( nodeName == "codeclassfield")
{
- QString id = childElem.attribute("parent_id","-1");
+ TQString id = childElem.attribute("parent_id","-1");
int role_id = childElem.attribute("role_id","-1").toInt();
CodeClassField * cf = findCodeClassFieldFromParentID(STR2ID(id), role_id);
if(cf)
@@ -661,10 +661,10 @@ void ClassifierCodeDocument::loadClassFieldsFromXMI( QDomElement & elem) {
/**
* Save the XMI representation of this object
*/
-void ClassifierCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
+void ClassifierCodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
#if 0
// avoid the creation of primitive data type
- QString strType;
+ TQString strType;
if (getParentClassifier()->getBaseType() == Uml::ot_Datatype) {
strType = getParentClassifier()->getName();
// lets get the default code generator to check if it is a primitive data type
@@ -673,7 +673,7 @@ void ClassifierCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root
return;
}
#endif
- QDomElement docElement = doc.createElement( "classifiercodedocument" );
+ TQDomElement docElement = doc.createElement( "classifiercodedocument" );
setAttributesOnNode(doc, docElement);
@@ -683,7 +683,7 @@ void ClassifierCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root
/**
* load params from the appropriate XMI element node.
*/
-void ClassifierCodeDocument::loadFromXMI ( QDomElement & root ) {
+void ClassifierCodeDocument::loadFromXMI ( TQDomElement & root ) {
// set attributes/fields
setAttributesFromNode(root);
@@ -695,7 +695,7 @@ void ClassifierCodeDocument::loadFromXMI ( QDomElement & root ) {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void ClassifierCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void ClassifierCodeDocument::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// do super-class first
@@ -706,7 +706,7 @@ void ClassifierCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomEleme
// (code) class fields
// which we will store in its own separate child node block
- QDomElement fieldsElement = doc.createElement( "classfields" );
+ TQDomElement fieldsElement = doc.createElement( "classfields" );
for (CodeClassFieldListIt ccflit(m_classfieldVector); ccflit.current(); ++ccflit)
{
CodeClassField * field = ccflit.current();
@@ -716,7 +716,7 @@ void ClassifierCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomEleme
}
-TextBlock * ClassifierCodeDocument::findCodeClassFieldTextBlockByTag (const QString &tag)
+TextBlock * ClassifierCodeDocument::findCodeClassFieldTextBlockByTag (const TQString &tag)
{
for (CodeClassFieldListIt ccflit(m_classfieldVector); ccflit.current(); ++ccflit)
diff --git a/umbrello/umbrello/classifiercodedocument.h b/umbrello/umbrello/classifiercodedocument.h
index 2e103034..2c847c35 100644
--- a/umbrello/umbrello/classifiercodedocument.h
+++ b/umbrello/umbrello/classifiercodedocument.h
@@ -19,9 +19,9 @@
#ifndef CLASSIFIERCODEDOCUMENT_H
#define CLASSIFIERCODEDOCUMENT_H
-#include <qmap.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "classifier.h"
#include "codeaccessormethod.h"
@@ -108,9 +108,9 @@ public:
/**
* Get a list of codeoperation objects held by this classifiercodedocument.
- * @return QPtrList<CodeOperation>
+ * @return TQPtrList<CodeOperation>
*/
- QPtrList<CodeOperation> getCodeOperations ( );
+ TQPtrList<CodeOperation> getCodeOperations ( );
/** Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
* @return CodeClassFieldList
@@ -168,33 +168,33 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
/**
* Load CodeClassFields from XMI element node.
*/
- void loadClassFieldsFromXMI( QDomElement & childElem);
+ void loadClassFieldsFromXMI( TQDomElement & childElem);
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
// find a specific textblock held by any code class field in this document
// by its tag
- TextBlock * findCodeClassFieldTextBlockByTag (const QString &tag);
+ TextBlock * findCodeClassFieldTextBlockByTag (const TQString &tag);
// add the declaration text blocks for various classfields
void declareClassFields (CodeClassFieldList & list , CodeGenObjectWithTextBlocks * parent);
@@ -225,7 +225,7 @@ private:
* Maps CodeClassFields to UMLObjects. Used to prevent re-adding a class
* field.
*/
- QMap<UMLObject *,CodeClassField *> m_classFieldMap;
+ TQMap<UMLObject *,CodeClassField *> m_classFieldMap;
/**
* Init from a UMLClassifier object.
diff --git a/umbrello/umbrello/classifierlistitem.cpp b/umbrello/umbrello/classifierlistitem.cpp
index 888f3da7..60e5b7bf 100644
--- a/umbrello/umbrello/classifierlistitem.cpp
+++ b/umbrello/umbrello/classifierlistitem.cpp
@@ -24,7 +24,7 @@
#include "object_factory.h"
UMLClassifierListItem::UMLClassifierListItem(const UMLObject *parent,
- const QString& name, Uml::IDType id)
+ const TQString& name, Uml::IDType id)
: UMLObject(parent, name, id) {
UMLObject *parentObj = const_cast<UMLObject*>(parent);
UMLClassifier *pc = dynamic_cast<UMLClassifier*>(parentObj);
@@ -49,7 +49,7 @@ void UMLClassifierListItem::copyInto(UMLClassifierListItem *rhs) const
UMLObject::copyInto(rhs);
}
-QString UMLClassifierListItem::toString(Uml::Signature_Type /*sig*/) {
+TQString UMLClassifierListItem::toString(Uml::Signature_Type /*sig*/) {
return getName();
}
@@ -57,7 +57,7 @@ UMLClassifier * UMLClassifierListItem::getType() const{
return static_cast<UMLClassifier*>(m_pSecondary);
}
-QString UMLClassifierListItem::getTypeName() const{
+TQString UMLClassifierListItem::getTypeName() const{
if (m_pSecondary == NULL)
return m_SecondaryId;
const UMLPackage *typePkg = m_pSecondary->getUMLPackage();
@@ -73,10 +73,10 @@ void UMLClassifierListItem::setType(UMLObject *type) {
}
}
-void UMLClassifierListItem::setTypeName(const QString &type) {
+void UMLClassifierListItem::setTypeName(const TQString &type) {
if (type.isEmpty() || type == "void") {
m_pSecondary = NULL;
- m_SecondaryId = QString();
+ m_SecondaryId = TQString();
return;
}
UMLDoc *pDoc = UMLApp::app()->getDocument();
diff --git a/umbrello/umbrello/classifierlistitem.h b/umbrello/umbrello/classifierlistitem.h
index fd68fdf3..ceac48cc 100644
--- a/umbrello/umbrello/classifierlistitem.h
+++ b/umbrello/umbrello/classifierlistitem.h
@@ -44,7 +44,7 @@ public:
* @param id The id of the operation.
*/
UMLClassifierListItem(const UMLObject *parent,
- const QString& name,
+ const TQString& name,
Uml::IDType id = Uml::id_None);
/**
@@ -76,7 +76,7 @@ public:
*
* @return The type name of the UMLClassifierListItem.
*/
- virtual QString getTypeName() const;
+ virtual TQString getTypeName() const;
/**
* Sets the type name of the UMLClassifierListItem.
@@ -84,7 +84,7 @@ public:
*
* @param type The type name of the UMLClassifierListItem.
*/
- void setTypeName( const QString &type );
+ void setTypeName( const TQString &type );
/**
* Sets the type of the UMLAttribute.
@@ -99,7 +99,7 @@ public:
* @param sig What type of operation string to show.
* @return The string representation of the operation.
*/
- virtual QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ virtual TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Display the properties configuration dialog for the list item.
@@ -107,7 +107,7 @@ public:
* @param parent The parent widget.
* @return True for success of this operation.
*/
- virtual bool showPropertiesDialog(QWidget* parent) = 0;
+ virtual bool showPropertiesDialog(TQWidget* parent) = 0;
/**
* Copy the internal presentation of this object into the new
diff --git a/umbrello/umbrello/classifierwidget.cpp b/umbrello/umbrello/classifierwidget.cpp
index 4d4c1eb8..8105818f 100644
--- a/umbrello/umbrello/classifierwidget.cpp
+++ b/umbrello/umbrello/classifierwidget.cpp
@@ -12,7 +12,7 @@
// own header
#include "classifierwidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
#include "classifier.h"
@@ -296,7 +296,7 @@ int ClassifierWidget::displayedOperations() {
return displayedMembers(Uml::ot_Operation);
}
-QSize ClassifierWidget::calculateSize() {
+TQSize ClassifierWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
@@ -304,7 +304,7 @@ QSize ClassifierWidget::calculateSize() {
return calculateAsCircleSize();
}
- const QFontMetrics &fm = getFontMetrics(UMLWidget::FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(UMLWidget::FT_NORMAL);
const int fontHeight = fm.lineSpacing();
// width is the width of the longest 'word'
int width = 0, height = 0;
@@ -313,7 +313,7 @@ QSize ClassifierWidget::calculateSize() {
if (m_bShowStereotype && !m_pObject->getStereotype().isEmpty()) {
height += fontHeight;
// ... width
- const QFontMetrics &bfm = UMLWidget::getFontMetrics(UMLWidget::FT_BOLD);
+ const TQFontMetrics &bfm = UMLWidget::getFontMetrics(UMLWidget::FT_BOLD);
const int stereoWidth = bfm.size(0,m_pObject->getStereotype(true)).width();
if (stereoWidth > width)
width = stereoWidth;
@@ -322,7 +322,7 @@ QSize ClassifierWidget::calculateSize() {
// consider name
height += fontHeight;
// ... width
- QString displayedName;
+ TQString displayedName;
if (m_bShowPackage)
displayedName = m_pObject->getFullyQualifiedName();
else
@@ -361,7 +361,7 @@ QSize ClassifierWidget::calculateSize() {
for (UMLOperation* op = list.first(); op; op = list.next()) {
if (m_bShowPublicOnly && op->getVisibility() != Uml::Visibility::Public)
continue;
- const QString displayedOp = op->toString(m_ShowOpSigs);
+ const TQString displayedOp = op->toString(m_ShowOpSigs);
UMLWidget::FontType oft;
oft = (op->getAbstract() ? UMLWidget::FT_ITALIC : UMLWidget::FT_NORMAL);
const int w = UMLWidget::getFontMetrics(oft).size(0,displayedOp).width();
@@ -371,7 +371,7 @@ QSize ClassifierWidget::calculateSize() {
}
// consider template box _as last_ !
- QSize templatesBoxSize = calculateTemplatesBoxSize();
+ TQSize templatesBoxSize = calculateTemplatesBoxSize();
if (templatesBoxSize.width() != 0) {
// add width to largest 'word'
width += templatesBoxSize.width() / 2;
@@ -389,7 +389,7 @@ QSize ClassifierWidget::calculateSize() {
// allow for width margin
width += MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
void ClassifierWidget::slotMenuSelection(int sel) {
@@ -468,21 +468,21 @@ void ClassifierWidget::slotMenuSelection(int sel) {
}
}
-QSize ClassifierWidget::calculateTemplatesBoxSize() {
+TQSize ClassifierWidget::calculateTemplatesBoxSize() {
UMLTemplateList list = getClassifier()->getTemplateList();
int count = list.count();
if (count == 0) {
- return QSize(0, 0);
+ return TQSize(0, 0);
}
int width, height;
height = width = 0;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setItalic(false);
font.setUnderline(false);
font.setBold(false);
- const QFontMetrics fm(font);
+ const TQFontMetrics fm(font);
height = count * fm.lineSpacing() + (MARGIN*2);
@@ -493,7 +493,7 @@ QSize ClassifierWidget::calculateTemplatesBoxSize() {
}
width += (MARGIN*2);
- return QSize(width, height);
+ return TQSize(width, height);
}
int ClassifierWidget::displayedAttributes() {
@@ -518,7 +518,7 @@ UMLClassifier *ClassifierWidget::getClassifier() {
return static_cast<UMLClassifier*>(m_pObject);
}
-void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ClassifierWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
@@ -531,7 +531,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
// Draw the bounding rectangle
- QSize templatesBoxSize = calculateTemplatesBoxSize();
+ TQSize templatesBoxSize = calculateTemplatesBoxSize();
m_bodyOffsetY = offsetY;
if (templatesBoxSize.height() > 0)
m_bodyOffsetY += templatesBoxSize.height() - MARGIN;
@@ -543,28 +543,28 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
h -= templatesBoxSize.height() - MARGIN;
p.drawRect(offsetX, m_bodyOffsetY, w, h);
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setUnderline(false);
font.setItalic(false);
- const QFontMetrics fm = UMLWidget::getFontMetrics(UMLWidget::FT_NORMAL);
+ const TQFontMetrics fm = UMLWidget::getFontMetrics(UMLWidget::FT_NORMAL);
const int fontHeight = fm.lineSpacing();
//If there are any templates then draw them
UMLTemplateList tlist = getClassifier()->getTemplateList();
if ( tlist.count() > 0 ) {
UMLWidget::setPen(p);
- QPen pen = p.pen();
+ TQPen pen = p.pen();
pen.setStyle(Qt::DotLine);
p.setPen(pen);
p.drawRect( offsetX + width() - templatesBoxSize.width(), offsetY,
templatesBoxSize.width(), templatesBoxSize.height() );
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
font.setBold(false);
p.setFont(font);
const int x = offsetX + width() - templatesBoxSize.width() + MARGIN;
int y = offsetY + MARGIN;
for ( UMLTemplate *t = tlist.first(); t; t = tlist.next() ) {
- QString text = t->toString();
+ TQString text = t->toString();
p.drawText(x, y, fm.size(0,text).width(), fontHeight, Qt::AlignVCenter, text);
y += fontHeight;
}
@@ -573,11 +573,11 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int textX = offsetX + MARGIN;
const int textWidth = w - MARGIN * 2;
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
// draw stereotype
font.setBold(true);
- QString stereo = m_pObject->getStereotype();
+ TQString stereo = m_pObject->getStereotype();
/* if no stereotype is given we don't want to show the empty << >> */
const bool showStereotype = (m_bShowStereotype && !stereo.isEmpty());
const bool showNameOnly = (!m_bShowOperations && !m_bShowAttributes && !showStereotype);
@@ -592,7 +592,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
// draw name
- QString name;
+ TQString name;
if (m_bShowPackage) {
name = m_pObject->getFullyQualifiedName();
} else {
@@ -605,7 +605,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
m_bodyOffsetY += fontHeight;
UMLWidget::setPen(p);
p.drawLine(offsetX, m_bodyOffsetY, offsetX + w - 1, m_bodyOffsetY);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
}
font.setBold(false);
font.setItalic(false);
@@ -626,7 +626,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
m_bodyOffsetY += fontHeight * numAtts;
UMLWidget::setPen(p);
p.drawLine(offsetX, m_bodyOffsetY, offsetX + w - 1, m_bodyOffsetY);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
}
// draw operations
@@ -639,12 +639,12 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::drawSelected(&p, offsetX, offsetY);
}
-void ClassifierWidget::drawAsCircle(QPainter& p, int offsetX, int offsetY) {
+void ClassifierWidget::drawAsCircle(TQPainter& p, int offsetX, int offsetY) {
int w = width();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- QString name;
+ TQString name;
if ( m_bShowPackage ) {
name = m_pObject->getFullyQualifiedName();
} else {
@@ -652,9 +652,9 @@ void ClassifierWidget::drawAsCircle(QPainter& p, int offsetX, int offsetY) {
}
p.drawEllipse(offsetX + w/2 - CIRCLE_SIZE/2, offsetY, CIRCLE_SIZE, CIRCLE_SIZE);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
p.setFont(font);
p.drawText(offsetX, offsetY + CIRCLE_SIZE, w, fontHeight, Qt::AlignCenter, name);
@@ -663,14 +663,14 @@ void ClassifierWidget::drawAsCircle(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize ClassifierWidget::calculateAsCircleSize() {
- const QFontMetrics &fm = UMLWidget::getFontMetrics(UMLWidget::FT_ITALIC_UNDERLINE);
+TQSize ClassifierWidget::calculateAsCircleSize() {
+ const TQFontMetrics &fm = UMLWidget::getFontMetrics(UMLWidget::FT_ITALIC_UNDERLINE);
const int fontHeight = fm.lineSpacing();
int height = CIRCLE_SIZE + fontHeight;
int width = CIRCLE_SIZE;
- QString displayedName;
+ TQString displayedName;
if (m_bShowPackage) {
displayedName = m_pObject->getFullyQualifiedName();
} else {
@@ -681,22 +681,22 @@ QSize ClassifierWidget::calculateAsCircleSize() {
width = nameWidth;
width += MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void ClassifierWidget::drawMembers(QPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
+void ClassifierWidget::drawMembers(TQPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
int x, int y, int fontHeight) {
- QFont f = UMLWidget::getFont();
+ TQFont f = UMLWidget::getFont();
f.setBold(false);
UMLClassifierListItemList list = getClassifier()->getFilteredList(ot);
for (UMLClassifierListItem *obj = list.first(); obj; obj = list.next()) {
if (m_bShowPublicOnly && obj->getVisibility() != Uml::Visibility::Public)
continue;
- QString text = obj->toString(sigType);
+ TQString text = obj->toString(sigType);
f.setItalic( obj->getAbstract() );
f.setUnderline( obj->getStatic() );
p.setFont( f );
- QFontMetrics fontMetrics(f);
+ TQFontMetrics fontMetrics(f);
p.drawText(x, y, fontMetrics.size(0,text).width(), fontHeight, Qt::AlignVCenter, text);
f.setItalic(false);
f.setUnderline(false);
@@ -755,8 +755,8 @@ void ClassifierWidget::adjustAssocs(int x, int y) {
m_pAssocWidget->computeAssocClassLine();
}
-void ClassifierWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
- QDomElement conceptElement;
+void ClassifierWidget::saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQDomElement conceptElement;
UMLClassifier *umlc = getClassifier();
if (umlc->isInterface())
conceptElement = qDoc.createElement("interfacewidget");
@@ -777,17 +777,17 @@ void ClassifierWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
qElement.appendChild( conceptElement );
}
-bool ClassifierWidget::loadFromXMI(QDomElement & qElement) {
+bool ClassifierWidget::loadFromXMI(TQDomElement & qElement) {
if (!UMLWidget::loadFromXMI(qElement))
return false;
- QString showatts = qElement.attribute( "showattributes", "0" );
- QString showops = qElement.attribute( "showoperations", "1" );
- QString showpubliconly = qElement.attribute( "showpubliconly", "0" );
- QString showattsigs = qElement.attribute( "showattsigs", "600" );
- QString showopsigs = qElement.attribute( "showopsigs", "600" );
- QString showpackage = qElement.attribute( "showpackage", "0" );
- QString showscope = qElement.attribute( "showscope", "0" );
- QString drawascircle = qElement.attribute("drawascircle", "0");
+ TQString showatts = qElement.attribute( "showattributes", "0" );
+ TQString showops = qElement.attribute( "showoperations", "1" );
+ TQString showpubliconly = qElement.attribute( "showpubliconly", "0" );
+ TQString showattsigs = qElement.attribute( "showattsigs", "600" );
+ TQString showopsigs = qElement.attribute( "showopsigs", "600" );
+ TQString showpackage = qElement.attribute( "showpackage", "0" );
+ TQString showscope = qElement.attribute( "showscope", "0" );
+ TQString drawascircle = qElement.attribute("drawascircle", "0");
m_bShowAttributes = (bool)showatts.toInt();
m_bShowOperations = (bool)showops.toInt();
diff --git a/umbrello/umbrello/classifierwidget.h b/umbrello/umbrello/classifierwidget.h
index 17172460..072b9c4e 100644
--- a/umbrello/umbrello/classifierwidget.h
+++ b/umbrello/umbrello/classifierwidget.h
@@ -267,7 +267,7 @@ public:
* Overrides standard method.
* Auxiliary to reimplementations in the derived classes.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Extends base method to adjust also the association of a class
@@ -284,12 +284,12 @@ public:
/**
* Creates the "classwidget" or "interfacewidget" XML element.
*/
- void saveToXMI(QDomDocument & qDoc, QDomElement & qElement);
+ void saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement);
/**
* Loads the "classwidget" or "interfacewidget" XML element.
*/
- bool loadFromXMI(QDomElement & qElement);
+ bool loadFromXMI(TQDomElement & qElement);
public slots:
/**
@@ -309,28 +309,28 @@ protected:
/**
* Calculcates the size of the templates box in the top left
- * if it exists, returns QSize(0,0) if it doesn't.
+ * if it exists, returns TQSize(0,0) if it doesn't.
*
- * @return QSize of the templates flap.
+ * @return TQSize of the templates flap.
*/
- QSize calculateTemplatesBoxSize();
+ TQSize calculateTemplatesBoxSize();
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Draws the interface as a circle with name underneath.
* Only applies when m_pObject->getBaseType() is ot_Interface.
*/
- void drawAsCircle(QPainter& p, int offsetX, int offsetY);
+ void drawAsCircle(TQPainter& p, int offsetX, int offsetY);
/**
* Calculates the size of the object when drawn as a circle.
* Only applies when m_pObject->getBaseType() is ot_Interface.
*/
- QSize calculateAsCircleSize();
+ TQSize calculateAsCircleSize();
/**
* Updates m_ShowOpSigs to match m_bShowVisibility.
@@ -347,14 +347,14 @@ protected:
* Auxiliary method for draw() of child classes:
* Draw the attributes or operations.
*
- * @param p QPainter to paint to.
+ * @param p TQPainter to paint to.
* @param ot Object type to draw, either ot_Attribute or ot_Operation.
* @param sigType Governs details of the member display.
* @param x X coordinate at which to draw the texts.
* @param y Y coordinate at which text drawing commences.
* @param fontHeight The font height.
*/
- void drawMembers(QPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
+ void drawMembers(TQPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
int x, int y, int fontHeight);
bool m_bShowOperations; ///< Loaded/saved item.
diff --git a/umbrello/umbrello/clipboard/idchangelog.h b/umbrello/umbrello/clipboard/idchangelog.h
index 1d92cd0d..bcb337bd 100644
--- a/umbrello/umbrello/clipboard/idchangelog.h
+++ b/umbrello/umbrello/clipboard/idchangelog.h
@@ -22,8 +22,8 @@
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include "../umlnamespace.h"
@@ -105,15 +105,15 @@ private:
private:
Uml::IDType m_x, m_y;
};
-class PointArray : QValueVector<Point> {
+class PointArray : TQValueVector<Point> {
public:
void setPoint(uint i, const Uml::IDType &x, const Uml::IDType &y) {
Point point(x, y);
- QValueVector<Point>::at(i) = point;
+ TQValueVector<Point>::at(i) = point;
}
- const Point& point( uint i ) const { return QValueVector<Point>::at(i); }
- uint size() const { return QValueVector<Point>::size(); }
- bool resize( uint size ) { QValueVector<Point>::resize(size); return true; }
+ const Point& point( uint i ) const { return TQValueVector<Point>::at(i); }
+ uint size() const { return TQValueVector<Point>::size(); }
+ bool resize( uint size ) { TQValueVector<Point>::resize(size); return true; }
};
PointArray m_LogArray;
diff --git a/umbrello/umbrello/clipboard/umlclipboard.cpp b/umbrello/umbrello/clipboard/umlclipboard.cpp
index c65c576e..069ba84b 100644
--- a/umbrello/umbrello/clipboard/umlclipboard.cpp
+++ b/umbrello/umbrello/clipboard/umlclipboard.cpp
@@ -41,7 +41,7 @@ UMLClipboard::UMLClipboard() {
UMLClipboard::~UMLClipboard() {
}
-QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
+TQMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
//Clear previous copied data
m_AssociationList.clear();
m_ItemList.clear();
@@ -49,7 +49,7 @@ QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
m_ViewList.clear();
UMLDrag *data = 0;
- QPixmap* png = 0;
+ TQPixmap* png = 0;
UMLListView * listView = UMLApp::app()->getListView();
UMLListViewItemList selectedItems;
@@ -131,10 +131,10 @@ QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
break;
}
- return (QMimeSource*)data;
+ return (TQMimeSource*)data;
}
-bool UMLClipboard::paste(QMimeSource* data) {
+bool UMLClipboard::paste(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
bool result = false;
doc->beginPaste();
@@ -337,7 +337,7 @@ void UMLClipboard::CleanAssociations(AssociationWidgetList& associations) {
/** If clipboard has mime type application/x-uml-clip1,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip1(QMimeSource* data) {
+bool UMLClipboard::pasteClip1(TQMimeSource* data) {
UMLObjectList objects;
if (! UMLDrag::decodeClip1(data, objects)) {
return false;
@@ -364,7 +364,7 @@ bool UMLClipboard::pasteClip1(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip2,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip2(QMimeSource* data) {
+bool UMLClipboard::pasteClip2(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListViewItemList itemdatalist;
UMLObjectList objects;
@@ -421,7 +421,7 @@ bool UMLClipboard::pasteClip2(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip3,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip3(QMimeSource* data) {
+bool UMLClipboard::pasteClip3(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListViewItemList itemdatalist;
UMLListViewItem* item = 0;
@@ -453,7 +453,7 @@ bool UMLClipboard::pasteClip3(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip4,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip4(QMimeSource* data) {
+bool UMLClipboard::pasteClip4(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLObjectList objects;
@@ -563,7 +563,7 @@ bool UMLClipboard::pasteClip4(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip5,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip5(QMimeSource* data) {
+bool UMLClipboard::pasteClip5(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem* lvitem = dynamic_cast<UMLListViewItem *>( listView->currentItem() );
@@ -601,7 +601,7 @@ bool UMLClipboard::pasteClip5(QMimeSource* data) {
{
UMLObject *exist = parent->findChildObject(obj->getName(), Uml::ot_Attribute);
if (exist) {
- QString newName = parent->uniqChildName(Uml::ot_Attribute, obj->getName());
+ TQString newName = parent->uniqChildName(Uml::ot_Attribute, obj->getName());
obj->setName(newName);
}
UMLAttribute *att = static_cast<UMLAttribute*>(obj);
@@ -618,7 +618,7 @@ bool UMLClipboard::pasteClip5(QMimeSource* data) {
UMLOperation *op = static_cast<UMLOperation*>(obj);
UMLOperation *exist = parent->checkOperationSignature(op->getName(), op->getParmList());
if (exist) {
- QString newName = parent->uniqChildName(Uml::ot_Operation, obj->getName());
+ TQString newName = parent->uniqChildName(Uml::ot_Operation, obj->getName());
op->setName(newName);
}
if (parent->addOperation(op, idchanges)) {
diff --git a/umbrello/umbrello/clipboard/umlclipboard.h b/umbrello/umbrello/clipboard/umlclipboard.h
index 9be92111..a4da299b 100644
--- a/umbrello/umbrello/clipboard/umlclipboard.h
+++ b/umbrello/umbrello/clipboard/umlclipboard.h
@@ -31,7 +31,7 @@ class QMimeSource;
* @author Gustavo Madrigal
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLClipboard : public QObject {
+class UMLClipboard : public TQObject {
Q_OBJECT
public:
/**
@@ -50,15 +50,15 @@ public:
* @param Data Pointer to the MIME format clipboard data.
* @return True for successful operation.
*/
- bool paste(QMimeSource* Data);
+ bool paste(TQMimeSource* Data);
/**
* Copies the selected stuff from the list view or current diagram
- * to a QMimeSource ready to be put in the clipboard.
+ * to a TQMimeSource ready to be put in the clipboard.
*
* @return Pointer to the created clipboard data.
*/
- QMimeSource* copy(bool fromView = false);
+ TQMimeSource* copy(bool fromView = false);
/// Enumeration that codes the different types of UML clips.
enum UMLCopyType
@@ -86,7 +86,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip1(QMimeSource* data);
+ bool pasteClip1(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip2,
@@ -95,7 +95,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip2(QMimeSource* data);
+ bool pasteClip2(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip3,
@@ -104,7 +104,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip3(QMimeSource* data);
+ bool pasteClip3(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip4,
@@ -113,7 +113,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip4(QMimeSource* data);
+ bool pasteClip4(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip5,
@@ -122,7 +122,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip5(QMimeSource* data);
+ bool pasteClip5(TQMimeSource* data);
/**
* When pasting widgets see if they can be pasted on
diff --git a/umbrello/umbrello/clipboard/umldrag.cpp b/umbrello/umbrello/clipboard/umldrag.cpp
index f9fa6629..27f8dde2 100644
--- a/umbrello/umbrello/clipboard/umldrag.cpp
+++ b/umbrello/umbrello/clipboard/umldrag.cpp
@@ -13,7 +13,7 @@
#include "umldrag.h"
// qt/kde includes
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
// local includes
@@ -34,21 +34,21 @@
#define nfmt 4
class UMLDragPrivate {
public:
- QCString fmt[nfmt];
- QCString subtype;
- QByteArray enc[nfmt];
+ TQCString fmt[nfmt];
+ TQCString subtype;
+ TQByteArray enc[nfmt];
UMLDragPrivate() {
setSubType("clip1", 0);
}
- void setType(const QCString& st, int index) {
+ void setType(const TQCString& st, int index) {
if (index < nfmt) {
fmt[index] = st.lower();
}
}
- void setSubType(const QCString& st, int index) {
+ void setSubType(const TQCString& st, int index) {
if (index < nfmt) {
subtype = st.lower();
fmt[index] = "application/x-uml-";
@@ -64,39 +64,39 @@ public:
}
};
-UMLDrag::UMLDrag(UMLObjectList& objects, QWidget* dragSource /*= 0*/, const char* name /*= 0*/)
- : QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(UMLObjectList& objects, TQWidget* dragSource /*= 0*/, const char* name /*= 0*/)
+ : TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip1(objects);
}
UMLDrag::UMLDrag(UMLObjectList& objects, UMLListViewItemList& umlListViewItems, UMLViewList& diagrams,
- QWidget* dragSource /*= 0*/, const char* name /*= 0*/ ): QDragObject(dragSource, name) {
+ TQWidget* dragSource /*= 0*/, const char* name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip2(objects, umlListViewItems, diagrams);
}
-UMLDrag::UMLDrag(UMLListViewItemList& umlListViewItems, QWidget* dragSource /*= 0*/,
- const char* name /*= 0*/ ): QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(UMLListViewItemList& umlListViewItems, TQWidget* dragSource /*= 0*/,
+ const char* name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip3(umlListViewItems);
}
UMLDrag::UMLDrag(UMLObjectList& objects,
UMLWidgetList& widgets, AssociationWidgetList& associationDatas,
- QPixmap& pngImage, Uml::Diagram_Type dType, QWidget * dragSource /*= 0*/,
- const char * name /*= 0*/ ): QDragObject(dragSource, name) {
+ TQPixmap& pngImage, Uml::Diagram_Type dType, TQWidget * dragSource /*= 0*/,
+ const char * name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip4(objects, widgets, associationDatas, pngImage, dType);
}
UMLDrag::UMLDrag(UMLObjectList& objects, int,
- QWidget* /*dragSource = 0*/, const char* /*name = 0*/ ) {
+ TQWidget* /*dragSource = 0*/, const char* /*name = 0*/ ) {
data = new UMLDragPrivate;
setUMLDataClip5(objects);
}
-UMLDrag::UMLDrag(QWidget* dragSource /*= 0*/, const char * name /*= 0*/ ): QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(TQWidget* dragSource /*= 0*/, const char * name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
}
@@ -104,22 +104,22 @@ UMLDrag::~UMLDrag() {
delete data;
}
-void UMLDrag::setSubType(const QCString& string, int index) {
+void UMLDrag::setSubType(const TQCString& string, int index) {
data->setSubType(string, index);
}
-void UMLDrag::setEncodedData(const QByteArray& encodedData, int index) {
+void UMLDrag::setEncodedData(const TQByteArray& encodedData, int index) {
data->enc[index] = encodedData.copy();
}
-QByteArray UMLDrag::encodedData(const char* dataName) const {
- QString str(dataName);
+TQByteArray UMLDrag::encodedData(const char* dataName) const {
+ TQString str(dataName);
for (int i = 0; i < 4; i++) {
if ( !qstricmp(dataName,data->fmt[i]) ) {
return data->enc[i];
}
}
- return QByteArray();
+ return TQByteArray();
}
const char* UMLDrag::format(int index) const {
@@ -130,10 +130,10 @@ const char* UMLDrag::format(int index) const {
void UMLDrag::setUMLDataClip1(UMLObjectList& objects) {
setSubType("clip1", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -143,7 +143,7 @@ void UMLDrag::setUMLDataClip1(UMLObjectList& objects) {
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
@@ -153,10 +153,10 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
UMLViewList& diagrams) {
setSubType("clip2", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -166,7 +166,7 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement viewsTag = domDoc.createElement("umlviews");
+ TQDomElement viewsTag = domDoc.createElement("umlviews");
xmiclip.appendChild(viewsTag);
UMLViewListIt diagram_it(diagrams);
@@ -176,7 +176,7 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
view->saveToXMI(domDoc, viewsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
UMLListViewItemListIt item_it2(umlListViewItems);
@@ -191,11 +191,11 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
void UMLDrag::setUMLDataClip3(UMLListViewItemList& umlListViewItems) {
setSubType("clip3", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
UMLListViewItemListIt item_it2(umlListViewItems);
@@ -208,14 +208,14 @@ void UMLDrag::setUMLDataClip3(UMLListViewItemList& umlListViewItems) {
}
void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, AssociationWidgetList& associations,
- QPixmap& pngImage, Uml::Diagram_Type dType ) {
+ TQPixmap& pngImage, Uml::Diagram_Type dType ) {
setSubType("clip4", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
xmiclip.setAttribute("diagramtype", dType);
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -225,7 +225,7 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement widgetsTag = domDoc.createElement("widgets");
+ TQDomElement widgetsTag = domDoc.createElement("widgets");
xmiclip.appendChild(widgetsTag);
UMLWidgetListIt widget_it(widgets);
@@ -235,7 +235,7 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
widget->saveToXMI(domDoc, widgetsTag);
}
- QDomElement associationWidgetsTag = domDoc.createElement("associations");
+ TQDomElement associationWidgetsTag = domDoc.createElement("associations");
xmiclip.appendChild(associationWidgetsTag);
AssociationWidgetListIt associations_it(associations);
@@ -245,16 +245,16 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
association->saveToXMI(domDoc, associationWidgetsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
data->setType("image/PNG", 1);
long l_size = (pngImage.convertToImage()).numBytes();
- QByteArray clipdata;
+ TQByteArray clipdata;
clipdata.resize(l_size);
- QDataStream clipstream(clipdata, IO_WriteOnly);
+ TQDataStream clipstream(clipdata, IO_WriteOnly);
clipstream << pngImage;
setEncodedData(clipdata, 1);
}
@@ -262,10 +262,10 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
void UMLDrag::setUMLDataClip5(UMLObjectList& objects) {
setSubType("clip5", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -275,32 +275,32 @@ void UMLDrag::setUMLDataClip5(UMLObjectList& objects) {
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
}
-bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects) {
+bool UMLDrag::decodeClip1(const TQMimeSource* mimeSource, UMLObjectList& objects) {
UMLDoc* doc = UMLApp::app()->getDocument();
if ( !mimeSource->provides("application/x-uml-clip1") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip1");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip1");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -312,16 +312,16 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
UMLListView *listView = UMLApp::app()->getListView();
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
UMLObject* pObject = 0;
while ( !element.isNull() ) {
pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
if (type == "UML:Association") {
objectElement = objectElement.nextSibling();
element = objectElement.toElement();
@@ -354,7 +354,7 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
return false;
}
Uml::Object_Type type = pObject->getBaseType();
- QString newName = Model_Utils::uniqObjectName(type, pObject->getUMLPackage(),
+ TQString newName = Model_Utils::uniqObjectName(type, pObject->getUMLPackage(),
pObject->getName());
pObject->setName(newName);
/****************************************************************/
@@ -370,27 +370,27 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
return true;
}
-bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip2(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLListViewItemList& umlListViewItems, UMLViewList& diagrams) {
if ( !mimeSource->provides("application/x-uml-clip2") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip2");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip2");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -400,16 +400,16 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
UMLObject* pObject = 0;
while ( !element.isNull() ) {
pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
if (type != "UML:Association") {
pObject = Object_Factory::makeObjectFromXMI(type);
@@ -428,16 +428,16 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLViews (diagrams)
- QDomNode umlviewsNode = objectsNode.nextSibling();
- QDomNode diagramNode = umlviewsNode.firstChild();
- QDomElement diagramElement = diagramNode.toElement();
+ TQDomNode umlviewsNode = objectsNode.nextSibling();
+ TQDomNode diagramNode = umlviewsNode.firstChild();
+ TQDomElement diagramElement = diagramNode.toElement();
if ( diagramElement.isNull() ) {
kWarning() << "no diagrams in XMI clip" << endl;
return false;
}
UMLListView *listView = UMLApp::app()->getListView();
while ( !diagramElement.isNull() ) {
- QString type = diagramElement.attribute("type", "0");
+ TQString type = diagramElement.attribute("type", "0");
Uml::Diagram_Type dt = (Uml::Diagram_Type)type.toInt();
UMLListViewItem *parent = listView->findFolderForDiagram(dt);
if (parent == NULL)
@@ -456,9 +456,9 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//listviewitems
- QDomNode listItemNode = umlviewsNode.nextSibling();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = umlviewsNode.nextSibling();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "no listitems in XMI clip" << endl;
return false;
@@ -480,28 +480,28 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
+bool UMLDrag::getClip3TypeAndID(const TQMimeSource* mimeSource,
LvTypeAndID_List& typeAndIdList)
{
if ( !mimeSource->provides("application/x-uml-clip3") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
if ( !payload.size() ) {
return false;
}
- QTextStream clipdata(payload, IO_ReadOnly);
- QString xmiClip = QString::fromUtf8(payload);
+ TQTextStream clipdata(payload, IO_ReadOnly);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "getClip3Type: Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -510,20 +510,20 @@ bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
return false;
}
- QDomNode listItemNode = xmiClipNode.firstChild();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = xmiClipNode.firstChild();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "getClip3Type: no listitems in XMI clip" << endl;
return false;
}
while ( !listItemElement.isNull() ) {
- QString typeStr = listItemElement.attribute( "type", "-1" );
+ TQString typeStr = listItemElement.attribute( "type", "-1" );
if (typeStr == "-1") {
kDebug() << "getClip3Type: bad type" << endl;
return false;
}
- QString idStr = listItemElement.attribute( "id", "-1" );
+ TQString idStr = listItemElement.attribute( "id", "-1" );
if (idStr == "-1") {
kDebug() << "getClip3Type: bad id" << endl;
return false;
@@ -538,27 +538,27 @@ bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
return true;
}
-bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& umlListViewItems,
+bool UMLDrag::decodeClip3(const TQMimeSource* mimeSource, UMLListViewItemList& umlListViewItems,
const UMLListView* parentListView){
if ( !mimeSource->provides("application/x-uml-clip3") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
if ( !payload.size() ) {
return false;
}
- QTextStream clipdata(payload, IO_ReadOnly);
- QString xmiClip = QString::fromUtf8(payload);
+ TQTextStream clipdata(payload, IO_ReadOnly);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -568,9 +568,9 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
}
//listviewitems
- QDomNode listItemNode = xmiClipNode.firstChild();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = xmiClipNode.firstChild();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "no listitems in XMI clip" << endl;
return false;
@@ -578,7 +578,7 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
while ( !listItemElement.isNull() ) {
// Get the ListView_Type beforehand so that we can construct an
// UMLListViewItem instance.
- QString type = listItemElement.attribute( "type", "-1" );
+ TQString type = listItemElement.attribute( "type", "-1" );
if (type == "-1") {
kDebug() << "Pech gehabt" << endl;
continue;
@@ -596,28 +596,28 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
return true;
}
-bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip4(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLWidgetList& widgets,
AssociationWidgetList& associations, Uml::Diagram_Type & dType) {
if ( !mimeSource->provides("application/x-uml-clip4") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip4");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip4");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -629,12 +629,12 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
dType = (Uml::Diagram_Type)(root.attribute("diagramtype", "0").toInt());
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
while ( !element.isNull() ) {
UMLObject* pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
//FIXME associations don't load
if (type == "UML:Association")
continue;
@@ -656,9 +656,9 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//widgets
- QDomNode widgetsNode = objectsNode.nextSibling();
- QDomNode widgetNode = widgetsNode.firstChild();
- QDomElement widgetElement = widgetNode.toElement();
+ TQDomNode widgetsNode = objectsNode.nextSibling();
+ TQDomNode widgetNode = widgetsNode.firstChild();
+ TQDomElement widgetElement = widgetNode.toElement();
if ( widgetElement.isNull() ) {
kWarning() << "no widgets in XMI clip" << endl;
return false;
@@ -676,9 +676,9 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//AssociationWidgets
- QDomNode associationWidgetsNode = widgetsNode.nextSibling();
- QDomNode associationWidgetNode = associationWidgetsNode.firstChild();
- QDomElement associationWidgetElement = associationWidgetNode.toElement();
+ TQDomNode associationWidgetsNode = widgetsNode.nextSibling();
+ TQDomNode associationWidgetNode = associationWidgetsNode.firstChild();
+ TQDomElement associationWidgetElement = associationWidgetNode.toElement();
while ( !associationWidgetElement.isNull() ) {
AssociationWidget* associationWidget = new AssociationWidget(view);
if (associationWidget->loadFromXMI(associationWidgetElement, widgets))
@@ -694,26 +694,26 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip5(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLClassifier* newParent) {
if ( !mimeSource->provides("application/x-uml-clip5") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip5");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip5");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -723,14 +723,14 @@ bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
while ( !element.isNull() ) {
- QString type = element.tagName();
+ TQString type = element.tagName();
UMLClassifierListItem *pObject = newParent->makeChildObject(type);
if( !pObject ) {
kWarning() << "Given wrong type of umlobject to create:" << type << endl;
@@ -749,7 +749,7 @@ bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-int UMLDrag::getCodingType(const QMimeSource* mimeSource) {
+int UMLDrag::getCodingType(const TQMimeSource* mimeSource) {
int result = 0;
if (mimeSource->provides("application/x-uml-clip1") ) {
result = 1;
diff --git a/umbrello/umbrello/clipboard/umldrag.h b/umbrello/umbrello/clipboard/umldrag.h
index a56a138e..97cbffb5 100644
--- a/umbrello/umbrello/clipboard/umldrag.h
+++ b/umbrello/umbrello/clipboard/umldrag.h
@@ -12,9 +12,9 @@
#ifndef UMLDRAG_H
#define UMLDRAG_H
-#include <qdragobject.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqdragobject.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "../umllistviewitemlist.h"
#include "../associationwidgetlist.h"
@@ -35,7 +35,7 @@ class UMLListView;
class UMLDragPrivate;
class UMLClassifier;
-class Q_EXPORT UMLDrag : public QDragObject {
+class Q_EXPORT UMLDrag : public TQDragObject {
Q_OBJECT
UMLDragPrivate* data;
public:
@@ -45,7 +45,7 @@ public:
* the ListView but no diagrams to be copied, Mime type =
* "application/x-uml-clip1
*/
- explicit UMLDrag(UMLObjectList& Objects,QWidget* dragSource = 0, const char* name = 0 );
+ explicit UMLDrag(UMLObjectList& Objects,TQWidget* dragSource = 0, const char* name = 0 );
/**
* For use when the user selects UML Object and Diagrams
@@ -53,14 +53,14 @@ public:
* "application/x-uml-clip2
*/
UMLDrag(UMLObjectList &Objects, UMLListViewItemList& UMLListViewItems,
- UMLViewList& Diagrams, QWidget * dragSource = 0, const char * name = 0 );
+ UMLViewList& Diagrams, TQWidget * dragSource = 0, const char * name = 0 );
/**
* For use when the user selects only empty folders from
* the ListView to be copied, Mime type =
* "application/x-uml-clip3
*/
- explicit UMLDrag(UMLListViewItemList& UMLListViewItems, QWidget* dragSource = 0,
+ explicit UMLDrag(UMLListViewItemList& UMLListViewItems, TQWidget* dragSource = 0,
const char* name = 0 );
/*
@@ -71,7 +71,7 @@ public:
* "application/x-uml-clip4
*/
UMLDrag(UMLObjectList& Objects, UMLWidgetList& Widgets, AssociationWidgetList& Associations,
- QPixmap& PngImage, Uml::Diagram_Type dType, QWidget* dragSource = 0,
+ TQPixmap& PngImage, Uml::Diagram_Type dType, TQWidget* dragSource = 0,
const char* name = 0 );
/**
@@ -79,12 +79,12 @@ public:
* Attributes from the ListView, Mime type =
* "application/x-uml-clip5
*/
- UMLDrag(UMLObjectList& Objects, int, QWidget* dragSource = 0, const char* name = 0);
+ UMLDrag(UMLObjectList& Objects, int, TQWidget* dragSource = 0, const char* name = 0);
/**
* Constructor
*/
- explicit UMLDrag(QWidget* dragSource = 0, const char* name = 0);
+ explicit UMLDrag(TQWidget* dragSource = 0, const char* name = 0);
/**
* Deconstructor
@@ -118,7 +118,7 @@ public:
*/
void setUMLDataClip4(UMLObjectList& Objects,
UMLWidgetList& WidgetDatas,
- AssociationWidgetList& Associations, QPixmap& PngImage,
+ AssociationWidgetList& Associations, TQPixmap& PngImage,
Uml::Diagram_Type dType);
/**
@@ -131,12 +131,12 @@ public:
* Sets the type of the clip to "application/x-uml-" + sub
* sub should be clip[1-5]
*/
- virtual void setSubType(const QCString& sub, int index);
+ virtual void setSubType(const TQCString& sub, int index);
/**
* Sets the data in the clip
*/
- virtual void setEncodedData(const QByteArray&, int index);
+ virtual void setEncodedData(const TQByteArray&, int index);
/**
* Returns the type set by setSubType
@@ -148,7 +148,7 @@ public:
*
* @param dataName the name of the data type to return
*/
- virtual QByteArray encodedData(const char* dataName) const;
+ virtual TQByteArray encodedData(const char* dataName) const;
/**
* For use when the user selects only UML Objects
@@ -156,14 +156,14 @@ public:
* copied, decodes Mime type =
* "application/x-uml-clip1
*/
- static bool decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects);
+ static bool decodeClip1(const TQMimeSource* mimeSource, UMLObjectList& objects);
/**
* For use when the user selects UML Object and Diagrams
* from the ListView to be copied, decodes Mime type =
* "application/x-uml-clip2
*/
- static bool decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip2(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLListViewItemList& umlListViewItems,
UMLViewList& diagrams);
@@ -172,7 +172,7 @@ public:
* the ListView to be copied, decodes Mime * type =
* "application/x-uml-clip3
*/
- static bool decodeClip3(const QMimeSource* mimeSource,
+ static bool decodeClip3(const TQMimeSource* mimeSource,
UMLListViewItemList& umlListViewItems,
const UMLListView* parentListView=0);
@@ -180,8 +180,8 @@ public:
Uml::ListView_Type type;
Uml::IDType id;
};
- typedef QPtrList<LvTypeAndID> LvTypeAndID_List;
- typedef QPtrListIterator<LvTypeAndID> LvTypeAndID_It;
+ typedef TQPtrList<LvTypeAndID> LvTypeAndID_List;
+ typedef TQPtrListIterator<LvTypeAndID> LvTypeAndID_It;
/**
* Return just the LvTypeAndID of a Clip3.
@@ -190,7 +190,7 @@ public:
* @param typeAndIdList The LvTypeAndID_List decoded from the source.
* @return True if decoding was successful.
*/
- static bool getClip3TypeAndID(const QMimeSource* mimeSource,
+ static bool getClip3TypeAndID(const TQMimeSource* mimeSource,
LvTypeAndID_List& typeAndIdList);
/**
@@ -200,7 +200,7 @@ public:
* also its respective ListView Items, * decodes Mime
* type = "application/x-uml-clip4
*/
- static bool decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip4(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLWidgetList& widgets,
AssociationWidgetList& associations,
Uml::Diagram_Type & dType);
@@ -210,13 +210,13 @@ public:
* Operations from the ListView * copied, decodes Mime
* type = "application/x-uml-clip5
*/
- static bool decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip5(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLClassifier *newParent);
/**
* Converts application/x-uml-clip[1-5] clip type to an integer
*/
- static int getCodingType(const QMimeSource* mimeSource);
+ static int getCodingType(const TQMimeSource* mimeSource);
};
diff --git a/umbrello/umbrello/cmdlineexportallviewsevent.cpp b/umbrello/umbrello/cmdlineexportallviewsevent.cpp
index 7c4b3caa..a4295a20 100644
--- a/umbrello/umbrello/cmdlineexportallviewsevent.cpp
+++ b/umbrello/umbrello/cmdlineexportallviewsevent.cpp
@@ -13,7 +13,7 @@
#include "cmdlineexportallviewsevent.h"
// qt includes
-#include <qstringlist.h>
+#include <tqstringlist.h>
// kde includes
#include <kapplication.h>
@@ -25,24 +25,24 @@
int CmdLineExportAllViewsEvent::getType() {
- return QEvent::User + 1;
+ return TQEvent::User + 1;
}
-CmdLineExportAllViewsEvent::CmdLineExportAllViewsEvent(const QString &imageType, const KURL &directory, const bool useFolders)
- : QCustomEvent(CmdLineExportAllViewsEvent::getType()) {
+CmdLineExportAllViewsEvent::CmdLineExportAllViewsEvent(const TQString &imageType, const KURL &directory, const bool useFolders)
+ : TQCustomEvent(CmdLineExportAllViewsEvent::getType()) {
m_imageType = imageType;
m_directory = directory;
m_useFolders = useFolders;
}
void CmdLineExportAllViewsEvent::exportAllViews() {
- QStringList errors = UMLViewImageExporterModel().exportAllViews(m_imageType, m_directory, m_useFolders);
+ TQStringList errors = UMLViewImageExporterModel().exportAllViews(m_imageType, m_directory, m_useFolders);
if (!errors.isEmpty()) {
kError() << "Errors while exporting:" << endl;
- for (QStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
+ for (TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
kError() << *it << endl;
}
}
- kapp->sendEvent(UMLApp::app(), new QCloseEvent());
+ kapp->sendEvent(UMLApp::app(), new TQCloseEvent());
}
diff --git a/umbrello/umbrello/cmdlineexportallviewsevent.h b/umbrello/umbrello/cmdlineexportallviewsevent.h
index 8c613bee..8954955a 100644
--- a/umbrello/umbrello/cmdlineexportallviewsevent.h
+++ b/umbrello/umbrello/cmdlineexportallviewsevent.h
@@ -12,7 +12,7 @@
#ifndef CMDLINEEXPORTALLVIEWSEVENT_H
#define CMDLINEEXPORTALLVIEWSEVENT_H
-#include <qevent.h>
+#include <tqevent.h>
#include <kurl.h>
/**
@@ -25,7 +25,7 @@
*
* @see UMLViewImageExporterModel
*/
-class CmdLineExportAllViewsEvent : public QCustomEvent {
+class CmdLineExportAllViewsEvent : public TQCustomEvent {
public:
/**
@@ -41,7 +41,7 @@ public:
* @param useFolders If the tree structure of the views in the document must be created
* in the target directory.
*/
- CmdLineExportAllViewsEvent(const QString &imageType, const KURL &directory, const bool useFolders);
+ CmdLineExportAllViewsEvent(const TQString &imageType, const KURL &directory, const bool useFolders);
/**
* Destructor for CmdLineExportAllViewsEvent
@@ -61,7 +61,7 @@ private:
/**
* The type of the images the views will be exported to.
*/
- QString m_imageType;
+ TQString m_imageType;
/**
* The url of the directory where the images will be saved.
diff --git a/umbrello/umbrello/codeaccessormethod.cpp b/umbrello/umbrello/codeaccessormethod.cpp
index 329bef51..e7890865 100644
--- a/umbrello/umbrello/codeaccessormethod.cpp
+++ b/umbrello/umbrello/codeaccessormethod.cpp
@@ -102,15 +102,15 @@ void CodeAccessorMethod::forceRelease () {
/**
* load params from the appropriate XMI element node.
*/
-void CodeAccessorMethod::loadFromXMI ( QDomElement & root ) {
+void CodeAccessorMethod::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/**
* Save the XMI representation of this object
*/
-void CodeAccessorMethod::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codeaccessormethod" );
+void CodeAccessorMethod::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codeaccessormethod" );
setAttributesOnNode(doc, docElement);
@@ -120,7 +120,7 @@ void CodeAccessorMethod::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem)
+void CodeAccessorMethod::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & elem)
{
// set super-class attributes
@@ -135,7 +135,7 @@ void CodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement &
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeAccessorMethod::setAttributesFromNode ( QDomElement & root) {
+void CodeAccessorMethod::setAttributesFromNode ( TQDomElement & root) {
// set attributes from the XMI
CodeMethodBlock::setAttributesFromNode(root); // superclass load
@@ -148,7 +148,7 @@ void CodeAccessorMethod::setAttributesFromNode ( QDomElement & root) {
// clipping and pasting of these methods between classes/ classfields
// then we may have problems (ugh.. I cant imagine allowing this, but
// perhaps someone will see a need to allow it. -b.t.)
- QString id = root.attribute("classfield_id","-1");
+ TQString id = root.attribute("classfield_id","-1");
CodeClassField * newCF = 0;
ClassifierCodeDocument * cdoc = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());
if(cdoc)
@@ -189,7 +189,7 @@ void CodeAccessorMethod::initFields(CodeClassField * parentClassField ) {
m_accessorType = GET;
m_canDelete = false; // we cant delete these with the codeeditor, delete the UML operation instead.
- connect(m_parentclassfield,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(m_parentclassfield,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
#include "codeaccessormethod.moc"
diff --git a/umbrello/umbrello/codeaccessormethod.h b/umbrello/umbrello/codeaccessormethod.h
index 03e8ff67..b03d1524 100644
--- a/umbrello/umbrello/codeaccessormethod.h
+++ b/umbrello/umbrello/codeaccessormethod.h
@@ -18,7 +18,7 @@
#ifndef CODEACCESSORMETHOD_H
#define CODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codemethodblock.h"
class CodeClassField;
@@ -74,12 +74,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -92,12 +92,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration() = 0;
diff --git a/umbrello/umbrello/codeaccessormethodlist.h b/umbrello/umbrello/codeaccessormethodlist.h
index 96693f2f..b722cd43 100644
--- a/umbrello/umbrello/codeaccessormethodlist.h
+++ b/umbrello/umbrello/codeaccessormethodlist.h
@@ -12,12 +12,12 @@
#ifndef _CODEACCESSORMETHODLIST_H
#define _CODEACCESSORMETHODLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class CodeAccessorMethod;
-typedef QPtrList<CodeAccessorMethod> CodeAccessorMethodList;
-typedef QPtrListIterator<CodeAccessorMethod> CodeAccessorMethodListIt;
+typedef TQPtrList<CodeAccessorMethod> CodeAccessorMethodList;
+typedef TQPtrListIterator<CodeAccessorMethod> CodeAccessorMethodListIt;
#endif
diff --git a/umbrello/umbrello/codeblock.cpp b/umbrello/umbrello/codeblock.cpp
index d1705348..e95a728c 100644
--- a/umbrello/umbrello/codeblock.cpp
+++ b/umbrello/umbrello/codeblock.cpp
@@ -21,13 +21,13 @@
// Constructors/Destructors
//
-CodeBlock::CodeBlock ( HierarchicalCodeBlock * hblock , const QString & body )
+CodeBlock::CodeBlock ( HierarchicalCodeBlock * hblock , const TQString & body )
: TextBlock ( hblock->getParentDocument(), body )
{
initFields ( );
}
-CodeBlock::CodeBlock ( CodeDocument * doc, const QString & body )
+CodeBlock::CodeBlock ( CodeDocument * doc, const TQString & body )
: TextBlock ( doc, body )
{
initFields( );
@@ -84,8 +84,8 @@ CodeBlockDialog * CodeBlock::getDialog ( ) {
/**
* Save the XMI representation of this object
*/
-void CodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "codeblock" );
+void CodeBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "codeblock" );
// set attributes
setAttributesOnNode(doc, blockElement);
@@ -93,7 +93,7 @@ void CodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
root.appendChild( blockElement );
}
-void CodeBlock::setAttributesOnNode( QDomDocument & doc, QDomElement & blockElement)
+void CodeBlock::setAttributesOnNode( TQDomDocument & doc, TQDomElement & blockElement)
{
// call super-class
@@ -108,13 +108,13 @@ void CodeBlock::setAttributesOnNode( QDomDocument & doc, QDomElement & blockElem
/**
* load params from the appropriate XMI element node.
*/
-void CodeBlock::loadFromXMI ( QDomElement & root ) {
+void CodeBlock::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
-void CodeBlock::setAttributesFromNode (QDomElement & elem) {
+void CodeBlock::setAttributesFromNode (TQDomElement & elem) {
// set attributes from the XMI in super-class
TextBlock::setAttributesFromNode(elem);
diff --git a/umbrello/umbrello/codeblock.h b/umbrello/umbrello/codeblock.h
index c01b6c9f..6575d932 100644
--- a/umbrello/umbrello/codeblock.h
+++ b/umbrello/umbrello/codeblock.h
@@ -40,11 +40,11 @@ public:
// Constructors/Destructors
//
- /** constructor with QString so we can create & populate it in
+ /** constructor with TQString so we can create & populate it in
* one step.
*/
- explicit CodeBlock ( CodeDocument * parent, const QString & body = "");
- explicit CodeBlock ( HierarchicalCodeBlock * parent, const QString & body = "" );
+ explicit CodeBlock ( CodeDocument * parent, const TQString & body = "");
+ explicit CodeBlock ( HierarchicalCodeBlock * parent, const TQString & body = "" );
/**
* Empty Destructor
@@ -83,12 +83,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -99,12 +99,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
private:
diff --git a/umbrello/umbrello/codeblockwithcomments.cpp b/umbrello/umbrello/codeblockwithcomments.cpp
index 0e94001f..3538f2c2 100644
--- a/umbrello/umbrello/codeblockwithcomments.cpp
+++ b/umbrello/umbrello/codeblockwithcomments.cpp
@@ -28,13 +28,13 @@
// Constructors/Destructors
//
-CodeBlockWithComments::CodeBlockWithComments ( HierarchicalCodeBlock * hb, const QString & body, const QString & comment)
+CodeBlockWithComments::CodeBlockWithComments ( HierarchicalCodeBlock * hb, const TQString & body, const TQString & comment)
: CodeBlock (hb, body)
{
initFields(hb->getParentDocument(), comment);
}
-CodeBlockWithComments::CodeBlockWithComments ( CodeDocument * parent , const QString & body, const QString & comment)
+CodeBlockWithComments::CodeBlockWithComments ( CodeDocument * parent , const TQString & body, const TQString & comment)
: CodeBlock (parent, body)
{
initFields(parent, comment);
@@ -71,8 +71,8 @@ CodeComment * CodeBlockWithComments::getComment ( ) {
/**
* Save the XMI representation of this object
*/
-void CodeBlockWithComments::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "codeblockwithcomments" );
+void CodeBlockWithComments::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "codeblockwithcomments" );
// set attributes
setAttributesOnNode(doc, blockElement);
@@ -80,7 +80,7 @@ void CodeBlockWithComments::saveToXMI ( QDomDocument & doc, QDomElement & root )
root.appendChild( blockElement );
}
-void CodeBlockWithComments::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void CodeBlockWithComments::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
// set super-class attributes
@@ -88,7 +88,7 @@ void CodeBlockWithComments::setAttributesOnNode ( QDomDocument & doc, QDomElemen
// set local attributes now..e.g. a comment
// which we will store in its own separate child node block
- QDomElement commElement = doc.createElement( "header" );
+ TQDomElement commElement = doc.createElement( "header" );
getComment()->saveToXMI(doc, commElement); // comment
blockElement.appendChild( commElement);
@@ -108,12 +108,12 @@ void CodeBlockWithComments::setAttributesFromObject(TextBlock * obj)
/**
* load params from the appropriate XMI element node.
*/
-void CodeBlockWithComments::loadFromXMI ( QDomElement & root )
+void CodeBlockWithComments::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
-void CodeBlockWithComments::setAttributesFromNode( QDomElement & root)
+void CodeBlockWithComments::setAttributesFromNode( TQDomElement & root)
{
// set attributes from superclass method the XMI
@@ -121,14 +121,14 @@ void CodeBlockWithComments::setAttributesFromNode( QDomElement & root)
// load comment now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
bool gotComment = false;
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "header" ) {
- QDomNode cnode = element.firstChild();
- QDomElement celem = cnode.toElement();
+ TQDomNode cnode = element.firstChild();
+ TQDomElement celem = cnode.toElement();
getComment()->loadFromXMI(celem);
gotComment = true;
break;
@@ -145,15 +145,15 @@ void CodeBlockWithComments::setAttributesFromNode( QDomElement & root)
/**
* @return QString
*/
-QString CodeBlockWithComments::toString ( ) {
+TQString CodeBlockWithComments::toString ( ) {
- QString string = QString();
+ TQString string = TQString();
if(getWriteOutText()) {
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = formatMultiLineText (getText(), indent, endLine);
- QString comment = getComment()->toString();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = formatMultiLineText (getText(), indent, endLine);
+ TQString comment = getComment()->toString();
if(!comment.isEmpty() && getComment()->getWriteOutText())
string.append(comment);
@@ -171,7 +171,7 @@ void CodeBlockWithComments::setOverallIndentationLevel ( int level )
m_comment->setIndentationLevel(level);
}
-void CodeBlockWithComments::initFields(CodeDocument *parent, const QString& comment)
+void CodeBlockWithComments::initFields(CodeDocument *parent, const TQString& comment)
{
CodeComment * codecomment = CodeGenFactory::newCodeComment(parent);
codecomment->setText(comment);
diff --git a/umbrello/umbrello/codeblockwithcomments.h b/umbrello/umbrello/codeblockwithcomments.h
index 85226077..2ebb4676 100644
--- a/umbrello/umbrello/codeblockwithcomments.h
+++ b/umbrello/umbrello/codeblockwithcomments.h
@@ -41,8 +41,8 @@ public:
/**
* Basic Constructor
*/
- explicit CodeBlockWithComments ( CodeDocument * doc , const QString & body = "", const QString & comment = "");
- explicit CodeBlockWithComments ( HierarchicalCodeBlock * hblock, const QString & body = "", const QString & comment = "" );
+ explicit CodeBlockWithComments ( CodeDocument * doc , const TQString & body = "", const TQString & comment = "");
+ explicit CodeBlockWithComments ( HierarchicalCodeBlock * hblock, const TQString & body = "", const TQString & comment = "" );
/**
* Empty Destructor
@@ -63,7 +63,7 @@ public:
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/** A utility method that causes the comment and body of the code block
* to have the same indentation level.
@@ -73,12 +73,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -89,18 +89,18 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode (TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
private:
CodeComment * m_comment;
- void initFields(CodeDocument *parent, const QString& comment);
+ void initFields(CodeDocument *parent, const TQString& comment);
};
diff --git a/umbrello/umbrello/codeclassfield.cpp b/umbrello/umbrello/codeclassfield.cpp
index a19e664d..85686a3b 100644
--- a/umbrello/umbrello/codeclassfield.cpp
+++ b/umbrello/umbrello/codeclassfield.cpp
@@ -17,7 +17,7 @@
// own header
#include "codeclassfield.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "association.h"
@@ -101,7 +101,7 @@ void CodeClassField::setParentUMLObject (UMLObject * obj) {
// Public attribute accessor methods
//
-QString CodeClassField::getTypeName ( ) {
+TQString CodeClassField::getTypeName ( ) {
if (parentIsAttribute())
{
@@ -119,8 +119,8 @@ QString CodeClassField::getTypeName ( ) {
// get the type of object that will be added/removed from lists
// of objects (as per specification of associations)
-QString CodeClassField::getListObjectType() {
- QString type = QString ("");
+TQString CodeClassField::getListObjectType() {
+ TQString type = TQString ("");
if (!parentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
@@ -156,9 +156,9 @@ CodeClassFieldDialog * CodeClassField::getDialog ( ) {
*/
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString CodeClassField::getUMLObjectName(UMLObject *obj)
+TQString CodeClassField::getUMLObjectName(UMLObject *obj)
{
- return (obj!=0)?obj->getName():QString("NULL");
+ return (obj!=0)?obj->getName():TQString("NULL");
}
/**
@@ -171,7 +171,7 @@ bool CodeClassField::addMethod ( CodeAccessorMethod * add_object ) {
if(findMethodByType(type))
return false;
/*
- // this wont work as the key for QMap needs to inherit from QObject
+ // this wont work as the key for TQMap needs to inherit from QObject
if(m_methodMap->contains(type))
return false; // return false, we already have some object with this tag in the list
else
@@ -194,7 +194,7 @@ bool CodeClassField::removeMethod ( CodeAccessorMethod * remove_object ) {
/**
* Get the list of Method objects held by m_methodVector
- * @return QPtrList<CodeMethodBlock *> list of Method objects held by
+ * @return TQPtrList<CodeMethodBlock *> list of Method objects held by
* m_methodVector
*/
CodeAccessorMethodList CodeClassField::getMethodList() {
@@ -231,14 +231,14 @@ CodeClassFieldDeclarationBlock * CodeClassField::getDeclarationCodeBlock( )
/**
* load params from the appropriate XMI element node.
*/
-void CodeClassField::loadFromXMI ( QDomElement & root ) {
+void CodeClassField::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeClassField::setAttributesOnNode ( QDomDocument & doc, QDomElement & cfElem)
+void CodeClassField::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & cfElem)
{
// super class
@@ -265,7 +265,7 @@ void CodeClassField::setAttributesOnNode ( QDomDocument & doc, QDomElement & cfE
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeClassField::setAttributesFromNode ( QDomElement & root) {
+void CodeClassField::setAttributesFromNode ( TQDomElement & root) {
// always disconnect
getParentObject()->disconnect(this);
@@ -283,10 +283,10 @@ void CodeClassField::setAttributesFromNode ( QDomElement & root) {
// load accessor methods now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "ccfdeclarationcodeblock" ) {
m_declCodeBlock->loadFromXMI(element);
} else
@@ -314,8 +314,8 @@ void CodeClassField::setAttributesFromNode ( QDomElement & root) {
/**
* Save the XMI representation of this object
*/
-void CodeClassField::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codeclassfield" );
+void CodeClassField::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codeclassfield" );
setAttributesOnNode(doc, docElement);
@@ -326,12 +326,12 @@ int CodeClassField::minimumListOccurances( ) {
if (!parentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
// ush. IF we had a multiplicty object, this would be much easier.
if(!multi.isEmpty())
{
- QString lowerBoundString = multi.remove(QRegExp("\\.\\.\\d+$"));
- if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(QRegExp("^\\d+$")))
+ TQString lowerBoundString = multi.remove(TQRegExp("\\.\\.\\d+$"));
+ if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(TQRegExp("^\\d+$")))
return lowerBoundString.toInt();
}
@@ -343,12 +343,12 @@ int CodeClassField::maximumListOccurances( ) {
if (!parentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
// ush. IF we had a multiplicty object, this would be much easier.
if(!multi.isEmpty())
{
- QString upperBoundString = multi.section(QRegExp("(\\.\\.)"),1);
- if(!upperBoundString.isEmpty() && upperBoundString.contains(QRegExp("^\\d+$")))
+ TQString upperBoundString = multi.section(TQRegExp("(\\.\\.)"),1);
+ if(!upperBoundString.isEmpty() && upperBoundString.contains(TQRegExp("^\\d+$")))
return upperBoundString.toInt();
else
return -1; // unbounded
@@ -359,13 +359,13 @@ int CodeClassField::maximumListOccurances( ) {
return 1;
}
-QString CodeClassField::cleanName ( const QString &name ) {
+TQString CodeClassField::cleanName ( const TQString &name ) {
return getParentDocument()->cleanName(name);
}
-QString CodeClassField::fixInitialStringDeclValue(const QString& val, const QString &type)
+TQString CodeClassField::fixInitialStringDeclValue(const TQString& val, const TQString &type)
{
- QString value = val;
+ TQString value = val;
// check for strings only<F2>String value = val;
if (!value.isEmpty() && type == "String") {
if (!value.startsWith("\""))
@@ -391,7 +391,7 @@ CodeAccessorMethod * CodeClassField::findMethodByType ( CodeAccessorMethod::Acce
{
//if we already know to which file this class was written/should be written, just return it.
/*
- // argh. this wont work because "accessorType' doesn't inherit from QObject.
+ // argh. this wont work because "accessorType' doesn't inherit from TQObject.
if(m_methodMap->contains(type))
return ((*m_methodMap)[type]);
CodeAccessorMethod * obj = NULL;
@@ -583,10 +583,10 @@ bool CodeClassField::fieldIsSingleValue ( )
if(!role)
return true; // its really an attribute
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
- if(multi.isEmpty() || multi.contains(QRegExp("^(0|1)$"))
- || multi.contains(QRegExp("^0\\.\\.1$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^(0|1)$"))
+ || multi.contains(TQRegExp("^0\\.\\.1$")))
return true;
return false;
@@ -595,11 +595,11 @@ bool CodeClassField::fieldIsSingleValue ( )
void CodeClassField::initFields(bool inConstructor) {
m_writeOutMethods = false;
- m_listClassName = QString ("");
+ m_listClassName = TQString ("");
m_declCodeBlock = NULL;
m_methodVector.setAutoDelete(false);
- // m_methodMap = new QMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>;
+ // m_methodMap = new TQMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>;
if (!inConstructor)
finishInitialization();
@@ -610,7 +610,7 @@ void CodeClassField::finishInitialization() {
initAccessorMethods();
updateContent();
- connect(getParentObject(),SIGNAL(modified()),this,SIGNAL(modified())); // child objects will trigger off this signal
+ connect(getParentObject(),TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); // child objects will trigger off this signal
}
diff --git a/umbrello/umbrello/codeclassfield.h b/umbrello/umbrello/codeclassfield.h
index bd651b6e..d5542bd3 100644
--- a/umbrello/umbrello/codeclassfield.h
+++ b/umbrello/umbrello/codeclassfield.h
@@ -83,7 +83,7 @@ public:
// CodeClassFieldDialog getDialog ( );
// Determine if this cf is attribute or some type of association
- QString getTypeName ( );
+ TQString getTypeName ( );
/**
* @return CodeClassFieldDeclarationBlock representing the declaration statement of this class field
@@ -118,7 +118,7 @@ public:
// get the type of object that will be added/removed from lists
// of objects (as per specification of associations)
- QString getListObjectType();
+ TQString getListObjectType();
/** determine if we will *allow* methods to be viewable.
* this flag is often used to toggle autogeneration of accessor
@@ -149,12 +149,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** Force the syncronization of the content (methods and declarations)
* of this class field.
@@ -171,23 +171,23 @@ protected:
/** a little utility method to make life easier for code document programmers
*/
- QString cleanName(const QString &name);
+ TQString cleanName(const TQString &name);
/** another utility method to make life easier for code document programmers
* this one fixes the initial declared value of string attributes so that if
* its empty or lacking quotations, it comes out as ""
*/
- QString fixInitialStringDeclValue(const QString& val, const QString &type);
+ TQString fixInitialStringDeclValue(const TQString& val, const TQString &type);
// set the list class name
- void setListClassName ( const QString &className );
+ void setListClassName ( const TQString &className );
/**
* Add a Method object to the m_methodVector List
*/
bool addMethod ( CodeAccessorMethod * add );
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Remove a Method object from m_methodVector List
@@ -200,7 +200,7 @@ protected:
private:
- QString m_listClassName;
+ TQString m_listClassName;
ClassFieldType m_classFieldType;
CodeClassFieldDeclarationBlock * m_declCodeBlock;
CodeAccessorMethodList m_methodVector; // the list of methods related to this codeclassfield
@@ -215,12 +215,12 @@ private:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** init class fields */
void initFields(bool inConstructor = false);
diff --git a/umbrello/umbrello/codeclassfielddeclarationblock.cpp b/umbrello/umbrello/codeclassfielddeclarationblock.cpp
index d02a83fa..ba7c6878 100644
--- a/umbrello/umbrello/codeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codeclassfielddeclarationblock.cpp
@@ -86,21 +86,21 @@ void CodeClassFieldDeclarationBlock::forceRelease () {
/**
* Save the XMI representation of this object
*/
-void CodeClassFieldDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & elem)
+void CodeClassFieldDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & elem)
{
- QDomElement docElement = doc.createElement( "ccfdeclarationcodeblock" );
+ TQDomElement docElement = doc.createElement( "ccfdeclarationcodeblock" );
setAttributesOnNode(doc, docElement);
elem.appendChild( docElement );
}
-void CodeClassFieldDeclarationBlock::loadFromXMI ( QDomElement & root )
+void CodeClassFieldDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
-void CodeClassFieldDeclarationBlock::setAttributesOnNode (QDomDocument & doc, QDomElement & elem ) {
+void CodeClassFieldDeclarationBlock::setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem ) {
// set super-class attributes
CodeBlockWithComments::setAttributesOnNode(doc, elem);
@@ -111,7 +111,7 @@ void CodeClassFieldDeclarationBlock::setAttributesOnNode (QDomDocument & doc, QD
/**
* load params from the appropriate XMI element node.
*/
-void CodeClassFieldDeclarationBlock::setAttributesFromNode( QDomElement & root ) {
+void CodeClassFieldDeclarationBlock::setAttributesFromNode( TQDomElement & root ) {
// set attributes from the XMI
CodeBlockWithComments::setAttributesFromNode(root); // superclass load
@@ -168,7 +168,7 @@ void CodeClassFieldDeclarationBlock::init (CodeClassField * parentCF)
{
m_parentclassfield = parentCF;
m_canDelete = false;
- connect(m_parentclassfield,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(m_parentclassfield,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
#include "codeclassfielddeclarationblock.moc"
diff --git a/umbrello/umbrello/codeclassfielddeclarationblock.h b/umbrello/umbrello/codeclassfielddeclarationblock.h
index f52868e2..62bfb031 100644
--- a/umbrello/umbrello/codeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codeclassfielddeclarationblock.h
@@ -66,12 +66,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -84,12 +84,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** this is called by syncToParent
*/
diff --git a/umbrello/umbrello/codeclassfieldlist.h b/umbrello/umbrello/codeclassfieldlist.h
index c9ab4892..14660c2e 100644
--- a/umbrello/umbrello/codeclassfieldlist.h
+++ b/umbrello/umbrello/codeclassfieldlist.h
@@ -12,12 +12,12 @@
#ifndef _CODECLASSFIELDLIST_H
#define _CODECLASSFIELDLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class CodeClassField;
-typedef QPtrList<CodeClassField> CodeClassFieldList;
-typedef QPtrListIterator<CodeClassField> CodeClassFieldListIt;
+typedef TQPtrList<CodeClassField> CodeClassFieldList;
+typedef TQPtrListIterator<CodeClassField> CodeClassFieldListIt;
#endif
diff --git a/umbrello/umbrello/codecomment.cpp b/umbrello/umbrello/codecomment.cpp
index b59e52b4..78873e3d 100644
--- a/umbrello/umbrello/codecomment.cpp
+++ b/umbrello/umbrello/codecomment.cpp
@@ -20,7 +20,7 @@
// Constructors/Destructors
//
-CodeComment::CodeComment (CodeDocument * doc, const QString & comment )
+CodeComment::CodeComment (CodeDocument * doc, const TQString & comment )
: TextBlock ( doc, comment )
{
@@ -43,9 +43,9 @@ CodeComment::~CodeComment ( ) { }
/**
* Save the XMI representation of this object
*/
-void CodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
+void CodeComment::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
kDebug() << "CodeComment::saveToXMI is called!" << endl;
- QDomElement blockElement = doc.createElement( "codecomment" );
+ TQDomElement blockElement = doc.createElement( "codecomment" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -54,7 +54,7 @@ void CodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* load params from the appropriate XMI element node.
*/
-void CodeComment::loadFromXMI ( QDomElement & root ) {
+void CodeComment::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
diff --git a/umbrello/umbrello/codecomment.h b/umbrello/umbrello/codecomment.h
index 18c2cba0..6f8c7ceb 100644
--- a/umbrello/umbrello/codecomment.h
+++ b/umbrello/umbrello/codecomment.h
@@ -18,7 +18,7 @@
#ifndef CODECOMMENT_H
#define CODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "textblock.h"
@@ -40,7 +40,7 @@ public:
/**
* Empty Constructor
*/
- explicit CodeComment ( CodeDocument * doc, const QString & comment = "");
+ explicit CodeComment ( CodeDocument * doc, const TQString & comment = "");
/**
* Empty Destructor
@@ -50,12 +50,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
diff --git a/umbrello/umbrello/codedocument.cpp b/umbrello/umbrello/codedocument.cpp
index e0bf0e73..f6092f09 100644
--- a/umbrello/umbrello/codedocument.cpp
+++ b/umbrello/umbrello/codedocument.cpp
@@ -18,8 +18,8 @@
#include "codedocument.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qdatetime.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
#include <kdebug.h>
// local includes
@@ -63,7 +63,7 @@ CodeDocument::~CodeDocument ( ) {
* Set the value of m_filename
* @param new_var the new value of m_filename
*/
-void CodeDocument::setFileName ( const QString &new_var ) {
+void CodeDocument::setFileName ( const TQString &new_var ) {
m_filename = new_var;
}
@@ -71,7 +71,7 @@ void CodeDocument::setFileName ( const QString &new_var ) {
* Get the value of m_filename
* @return the value of m_filename
*/
-QString CodeDocument::getFileName ( ) const {
+TQString CodeDocument::getFileName ( ) const {
return m_filename;
}
@@ -79,7 +79,7 @@ QString CodeDocument::getFileName ( ) const {
* Set the value of m_filename
* @param new_var the new value of m_filename
*/
-void CodeDocument::setFileExtension ( const QString &new_var ) {
+void CodeDocument::setFileExtension ( const TQString &new_var ) {
m_fileExtension = new_var;
updateHeader(); // because we are using new heading file
}
@@ -88,7 +88,7 @@ void CodeDocument::setFileExtension ( const QString &new_var ) {
* Get the value of m_filename
* @return the value of m_filename
*/
-QString CodeDocument::getFileExtension( ) const {
+TQString CodeDocument::getFileExtension( ) const {
return m_fileExtension;
}
@@ -104,19 +104,19 @@ void CodeDocument::setPackage ( UMLPackage *new_var ) {
* Get the value of path for this code document.
* @return the value of the path
*/
-QString CodeDocument::getPath ( ) {
+TQString CodeDocument::getPath ( ) {
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path = path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
// this allows multiple directory paths (ala Java, some other languages)
// in from the package specification
- path.replace(QRegExp("\\."),"/"); // Simple hack!.. but this is more or less language
+ path.replace(TQRegExp("\\."),"/"); // Simple hack!.. but this is more or less language
// dependant and should probably be commented out.
// Still, as a general default it may be useful -b.t.
return path;
@@ -126,17 +126,17 @@ QString CodeDocument::getPath ( ) {
* Get the value of package name.
* @return the value of m_package->getName()
*/
-QString CodeDocument::getPackage ( ) const {
+TQString CodeDocument::getPackage ( ) const {
if (m_package)
return m_package->getName();
- return QString();
+ return TQString();
}
/**
* Set the value of m_ID
* @param new_var the new value of m_ID
*/
-void CodeDocument::setID ( const QString &new_var ) {
+void CodeDocument::setID ( const TQString &new_var ) {
m_ID = new_var;
}
@@ -144,7 +144,7 @@ void CodeDocument::setID ( const QString &new_var ) {
* Get the value of m_ID
* @return the value of m_ID
*/
-QString CodeDocument::getID ( ) const {
+TQString CodeDocument::getID ( ) const {
return m_ID;
}
@@ -186,16 +186,16 @@ CodeComment * CodeDocument::getHeader ( ) {
// Other methods
//
-QString CodeDocument::getUniqueTag ( const QString& prefix )
+TQString CodeDocument::getUniqueTag ( const TQString& prefix )
{
- QString tag = prefix ;
+ TQString tag = prefix ;
if(tag.isEmpty())
tag += "tblock";
tag = tag + "_0";
int number = lastTagIndex;
for ( ; findTextBlockByTag(tag, true); number++) {
- tag = prefix + '_' + QString::number(number);
+ tag = prefix + '_' + TQString::number(number);
}
lastTagIndex = number;
return tag;
@@ -211,7 +211,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo
if(!newBlock || !existingBlock)
return false;
- QString tag = existingBlock->getTag();
+ TQString tag = existingBlock->getTag();
if(!findTextBlockByTag(tag, true))
return false;
@@ -233,7 +233,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo
// if we get here.. it was in this object so insert
// check for tag FIRST
- QString new_tag = newBlock->getTag();
+ TQString new_tag = newBlock->getTag();
// assign a tag if one doesn't already exist
if(new_tag.isEmpty())
@@ -268,7 +268,7 @@ CodeDocumentDialog * CodeDocument::getDialog ( ) {
// Other methods
//
-QString CodeDocument::cleanName ( const QString &name ) {
+TQString CodeDocument::cleanName ( const TQString &name ) {
return CodeGenerator::cleanName(name);
}
@@ -276,12 +276,12 @@ QString CodeDocument::cleanName ( const QString &name ) {
void CodeDocument::updateHeader () {
//try to find a heading file (license, coments, etc) then extract its text
- QString headingText = UMLApp::app()->getCommonPolicy()->getHeadingFile(getFileExtension());
+ TQString headingText = UMLApp::app()->getCommonPolicy()->getHeadingFile(getFileExtension());
- headingText.replace(QRegExp("%filename%"),getFileName()+getFileExtension());
- headingText.replace(QRegExp("%filepath%"),getPath());
- headingText.replace( QRegExp("%time%"), QTime::currentTime().toString());
- headingText.replace( QRegExp("%date%"), QDate::currentDate().toString());
+ headingText.replace(TQRegExp("%filename%"),getFileName()+getFileExtension());
+ headingText.replace(TQRegExp("%filepath%"),getPath());
+ headingText.replace( TQRegExp("%time%"), TQTime::currentTime().toString());
+ headingText.replace( TQRegExp("%date%"), TQDate::currentDate().toString());
getHeader()->setText(headingText);
@@ -297,14 +297,14 @@ void CodeDocument::updateHeader () {
* create the string representation of this object.
* @return QString
*/
-QString CodeDocument::toString ( ) {
+TQString CodeDocument::toString ( ) {
// IF the whole document is turned "Off" then don't bother
// checking individual code blocks, just send back empty string
if(!getWriteOutCode())
- return QString("");
+ return TQString("");
- QString content = getHeader()->toString();
+ TQString content = getHeader()->toString();
// update the time/date
@@ -313,7 +313,7 @@ QString CodeDocument::toString ( ) {
for (TextBlock *c = items->first(); c; c = items->next())
{
if(c->getWriteOutText()) {
- QString str = c->toString();
+ TQString str = c->toString();
if(!str.isEmpty())
content.append(str);
}
@@ -334,14 +334,14 @@ void CodeDocument::resetTextBlocks() {
/**
* load params from the appropriate XMI element node.
*/
-void CodeDocument::loadFromXMI ( QDomElement & root ) {
+void CodeDocument::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void CodeDocument::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// superclass call
@@ -359,7 +359,7 @@ void CodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docEl
// set the a header
// which we will store in its own separate child node block
- QDomElement commElement = doc.createElement( "header" );
+ TQDomElement commElement = doc.createElement( "header" );
getHeader()->saveToXMI(doc, commElement); // comment
docElement.appendChild( commElement);
@@ -372,15 +372,15 @@ void CodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docEl
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeDocument::setAttributesFromNode ( QDomElement & root) {
+void CodeDocument::setAttributesFromNode ( TQDomElement & root) {
// now set local attributes
setFileName(root.attribute("fileName",""));
setFileExtension(root.attribute("fileExt",""));
- QString pkgStr = root.attribute("package","");
+ TQString pkgStr = root.attribute("package","");
if (!pkgStr.isEmpty() && pkgStr != "-1") {
UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (pkgStr.contains( QRegExp("\\D") )) {
+ if (pkgStr.contains( TQRegExp("\\D") )) {
// suspecting pre-1.5.3 file format where the package name was
// saved instead of the package ID.
UMLObject *o = umldoc->findUMLObject(pkgStr);
@@ -396,13 +396,13 @@ void CodeDocument::setAttributesFromNode ( QDomElement & root) {
// load comment now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "header" ) {
- QDomNode cnode = element.firstChild();
- QDomElement celem = cnode.toElement();
+ TQDomNode cnode = element.firstChild();
+ TQDomElement celem = cnode.toElement();
getHeader()->loadFromXMI(celem);
break;
}
@@ -417,8 +417,8 @@ void CodeDocument::setAttributesFromNode ( QDomElement & root) {
/**
* Save the XMI representation of this object
*/
-void CodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codedocument" );
+void CodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codedocument" );
setAttributesOnNode(doc, docElement);
@@ -454,17 +454,17 @@ HierarchicalCodeBlock * CodeDocument::newHierarchicalCodeBlock ( ) {
return hb;
}
-void CodeDocument::removeChildTagFromMap ( const QString &tag )
+void CodeDocument::removeChildTagFromMap ( const TQString &tag )
{
m_childTextBlockTagMap.erase(tag);
}
-void CodeDocument::addChildTagToMap ( const QString &tag, TextBlock * tb)
+void CodeDocument::addChildTagToMap ( const TQString &tag, TextBlock * tb)
{
m_childTextBlockTagMap.insert(tag, tb);
}
-TextBlock * CodeDocument::findTextBlockByTag( const QString &tag , bool descendIntoChildren)
+TextBlock * CodeDocument::findTextBlockByTag( const TQString &tag , bool descendIntoChildren)
{
//if we already know to which file this class was written/should be written, just return it.
if(m_textBlockTagMap.contains(tag))
@@ -481,8 +481,8 @@ void CodeDocument::initDoc () {
m_writeOutCode = true;
m_package = NULL;
- m_fileExtension = QString("");
- m_ID = QString(""); // leave with NO ID as a default
+ m_fileExtension = TQString("");
+ m_ID = TQString(""); // leave with NO ID as a default
//m_textblockVector.setAutoDelete(false);
@@ -494,7 +494,7 @@ void CodeDocument::initDoc () {
}
-TextBlock * CodeDocument::findCodeClassFieldTextBlockByTag ( const QString &tag ) {
+TextBlock * CodeDocument::findCodeClassFieldTextBlockByTag ( const TQString &tag ) {
kWarning()<<"Called findCodeClassFieldMethodByTag("<<tag<<") for a regular CodeDocument"<<endl;
return (TextBlock *) NULL;
}
diff --git a/umbrello/umbrello/codedocument.h b/umbrello/umbrello/codedocument.h
index 609b70c6..96e75ada 100644
--- a/umbrello/umbrello/codedocument.h
+++ b/umbrello/umbrello/codedocument.h
@@ -17,9 +17,9 @@
#ifndef CODEDOCUMENT_H
#define CODEDOCUMENT_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "codegenerationpolicy.h"
#include "codegenobjectwithtextblocks.h"
@@ -42,7 +42,7 @@ class UMLPackage;
// "friend" status is needed for HBlock so it may call addChildTagToMap which
// is protected.
-class CodeDocument : public QObject, public CodeGenObjectWithTextBlocks
+class CodeDocument : public TQObject, public CodeGenObjectWithTextBlocks
{
friend class HierarchicalCodeBlock;
Q_OBJECT
@@ -75,26 +75,26 @@ public:
* Set the value of m_fileExtension
* @param new_var the new value of m_fileExtension
*/
- void setFileExtension ( const QString &new_var );
+ void setFileExtension ( const TQString &new_var );
/**
* Get the value of m_fileExtension
* @return the value of m_fileExtension
*/
- QString getFileExtension ( ) const;
+ TQString getFileExtension ( ) const;
/**
* Set the complete value (name plus any extension) of m_filename
* @param new_var the new value of m_filename
*/
- void setFileName ( const QString &new_var );
+ void setFileName ( const TQString &new_var );
/**
* Get the value of m_filename. This name is the "complete" filename,
* meaning that it contains both the file name plus any extension (e.g. "file.cpp")
* @return the value of m_filename
*/
- QString getFileName ( ) const;
+ TQString getFileName ( ) const;
/**
* Set the value of m_package
@@ -106,25 +106,25 @@ public:
* Get the value of the package of this codedocument.
* @return the value of m_pathName
*/
- QString getPackage ( ) const;
+ TQString getPackage ( ) const;
/**
* Get the value of the path to this codedocument.
* @return the value of m_pathName
*/
- virtual QString getPath ( );
+ virtual TQString getPath ( );
/**
* Set the value of m_ID
* @param new_id the new value of m_ID
*/
- void setID ( const QString &new_id);
+ void setID ( const TQString &new_id);
/**
* Get the value of m_ID
* @return the value of m_ID
*/
- QString getID ( ) const;
+ TQString getID ( ) const;
/**
* Set the value of m_writeOutCode
@@ -163,23 +163,23 @@ public:
* find the TextBlock with such a tag. If descendIntoChildren is true, then
* any child hierarchical textblocks will also be searched for a match.
*/
- TextBlock * findTextBlockByTag( const QString &tag , bool descendIntoChildren = false);
+ TextBlock * findTextBlockByTag( const TQString &tag , bool descendIntoChildren = false);
/**
* create the string representation of this object.
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/**
* create a new CodeBlock object belonging to this CodeDocument.
@@ -200,11 +200,11 @@ public:
virtual CodeBlockWithComments * newCodeBlockWithComments ( );
// return a unique, and currently unallocated, text block tag for this document
- virtual QString getUniqueTag( const QString& prefix = QString("") );
+ virtual TQString getUniqueTag( const TQString& prefix = TQString("") );
/** a little utility method to make life easier for the code document programmer
*/
- QString cleanName ( const QString &name );
+ TQString cleanName ( const TQString &name );
// Cause this code document to synchronize to current generator policy
virtual void synchronize();
@@ -215,20 +215,20 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
// these next 2 are needed by child hierarchical code blocks so
// that when they call getUniqueTag, we really get a unique tag
// Also, it allows 'findTextBlockByTag' To find any tagged text block
// anywhere in the document, whether directly owned by the document OR
// by some child hierarchical textblock
- void addChildTagToMap ( const QString &tag, TextBlock * tb);
- void removeChildTagFromMap ( const QString &tag );
+ void addChildTagToMap ( const TQString &tag, TextBlock * tb);
+ void removeChildTagFromMap ( const TQString &tag );
// update the header text of this codedocument
void updateHeader ();
@@ -243,15 +243,15 @@ protected:
// have to implement this for CodeObjectWithTextBlocks
// doenst actually do anythying fo ra vannilla code document
- virtual TextBlock * findCodeClassFieldTextBlockByTag( const QString &tag );
+ virtual TextBlock * findCodeClassFieldTextBlockByTag( const TQString &tag );
private:
int lastTagIndex;
- QString m_filename;
- QString m_fileExtension;
- QString m_ID;
- QString m_pathName;
+ TQString m_filename;
+ TQString m_fileExtension;
+ TQString m_ID;
+ TQString m_pathName;
UMLPackage *m_package;
bool m_writeOutCode; // Whether or not to write out this code document
@@ -263,10 +263,10 @@ private:
void initDoc ( ) ;
// TextBlockList m_textblockVector;
- // QMap<QString, TextBlock *> m_textBlockTagMap;
+ // TQMap<TQString, TextBlock *> m_textBlockTagMap;
// for recording all of the textblocks held by child hierarchical codeblocks
- QMap<QString, TextBlock *> m_childTextBlockTagMap;
+ TQMap<TQString, TextBlock *> m_childTextBlockTagMap;
};
diff --git a/umbrello/umbrello/codedocumentlist.h b/umbrello/umbrello/codedocumentlist.h
index 7cb28a72..9264a996 100644
--- a/umbrello/umbrello/codedocumentlist.h
+++ b/umbrello/umbrello/codedocumentlist.h
@@ -12,12 +12,12 @@
#ifndef _CODEDOCUMENTLIST_H
#define _CODEDOCUMENTLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class CodeDocument;
-typedef QPtrList<CodeDocument> CodeDocumentList;
-typedef QPtrListIterator<CodeDocument> CodeDocumentListIt;
+typedef TQPtrList<CodeDocument> CodeDocumentList;
+typedef TQPtrListIterator<CodeDocument> CodeDocumentListIt;
#endif
diff --git a/umbrello/umbrello/codegenerationpolicy.cpp b/umbrello/umbrello/codegenerationpolicy.cpp
index df84e837..5f7b9824 100644
--- a/umbrello/umbrello/codegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerationpolicy.cpp
@@ -21,10 +21,10 @@
#include <cstdlib> //to get the user name
// qt includes
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
// kde includes
#include <kconfig.h>
@@ -206,7 +206,7 @@ bool CodeGenerationPolicy::getCodeVerboseDocumentComments ( ) const {
* location of the header file template.
* @param new_var the new value of m_headingFileDir
*/
-void CodeGenerationPolicy::setHeadingFileDir ( const QString & path) {
+void CodeGenerationPolicy::setHeadingFileDir ( const TQString & path) {
m_headingFiles.setPath(path);
}
@@ -215,7 +215,7 @@ void CodeGenerationPolicy::setHeadingFileDir ( const QString & path) {
* location of the header file template.
* @return the value of m_headingFileDir
*/
-QString CodeGenerationPolicy::getHeadingFileDir ( ) const {
+TQString CodeGenerationPolicy::getHeadingFileDir ( ) const {
return m_headingFiles.absPath();
}
@@ -241,7 +241,7 @@ bool CodeGenerationPolicy::getIncludeHeadings ( ) const {
* location of where output files will go.
* @param new_var the new value of m_outputDirectory
*/
-void CodeGenerationPolicy::setOutputDirectory ( QDir new_var ) {
+void CodeGenerationPolicy::setOutputDirectory ( TQDir new_var ) {
m_outputDirectory = new_var;
}
@@ -250,7 +250,7 @@ void CodeGenerationPolicy::setOutputDirectory ( QDir new_var ) {
* location of where output files will go.
* @return the value of m_outputDirectory
*/
-QDir CodeGenerationPolicy::getOutputDirectory ( ) {
+TQDir CodeGenerationPolicy::getOutputDirectory ( ) {
return m_outputDirectory;
}
@@ -263,14 +263,14 @@ void CodeGenerationPolicy::setLineEndingType ( NewLineType type) {
m_lineEndingType = type;
switch (m_lineEndingType) {
case MAC:
- m_lineEndingChars = QString("\r\n");
+ m_lineEndingChars = TQString("\r\n");
break;
case DOS:
- m_lineEndingChars = QString("\r");
+ m_lineEndingChars = TQString("\r");
break;
case UNIX:
default:
- m_lineEndingChars = QString("\n");
+ m_lineEndingChars = TQString("\n");
break;
}
emit modifiedCodeContent();
@@ -287,7 +287,7 @@ CodeGenerationPolicy::NewLineType CodeGenerationPolicy::getLineEndingType ( ) {
/** Utility function to get the actual characters.
*/
-QString CodeGenerationPolicy::getNewLineEndingChars ( ) const {
+TQString CodeGenerationPolicy::getNewLineEndingChars ( ) const {
return m_lineEndingChars;
}
@@ -323,22 +323,22 @@ int CodeGenerationPolicy::getIndentationAmount ( ) {
* Utility method to get the amount (and type of whitespace) to indent with.
* @return the value of the indentation
*/
-QString CodeGenerationPolicy::getIndentation ( ) const {
+TQString CodeGenerationPolicy::getIndentation ( ) const {
return m_indentation;
}
void CodeGenerationPolicy::calculateIndentation ( ) {
- QString indent = "";
+ TQString indent = "";
m_indentation = "";
switch (m_indentationType) {
case NONE:
break;
case TAB:
- indent = QString("\t");
+ indent = TQString("\t");
break;
default:
case SPACE:
- indent = QString(" ");
+ indent = TQString(" ");
break;
}
@@ -401,7 +401,7 @@ CodeGenerationPolicy::ScopePolicy CodeGenerationPolicy::getAssociationFieldScope
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * CodeGenerationPolicy::createPage ( QWidget *pWidget, const char *name ) {
+CodeGenerationPolicyPage * CodeGenerationPolicy::createPage ( TQWidget *pWidget, const char *name ) {
return new CodeGenerationPolicyPage ( pWidget, name, 0 );
}
@@ -462,10 +462,10 @@ void CodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSignal)
setIndentationType( (IndentationType) config->readNumEntry("indentationType",defaultIndentType()) );
setIndentationAmount( config->readNumEntry("indentationAmount",defaultIndentAmount()));
- QString path = config -> readPathEntry("outputDirectory");
+ TQString path = config -> readPathEntry("outputDirectory");
if(path.isEmpty())
- path = QDir::homeDirPath() + "/uml-generated-code/";
- setOutputDirectory ( QDir (path) );
+ path = TQDir::homeDirPath() + "/uml-generated-code/";
+ setOutputDirectory ( TQDir (path) );
path = config -> readPathEntry("headingsDirectory");
if(path.isEmpty()) {
@@ -510,20 +510,20 @@ void CodeGenerationPolicy::writeConfig (KConfig * config) {
}
// return the actual text
-QString CodeGenerationPolicy::getHeadingFile(const QString& str) {
+TQString CodeGenerationPolicy::getHeadingFile(const TQString& str) {
if(!getIncludeHeadings() || str.isEmpty())
- return QString("");
+ return TQString("");
if(str.contains(" ") ||str.contains(";")) {
kWarning() << "File folder must not have spaces or semi colons!" << endl;
- return QString("");
+ return TQString("");
}
//if we only get the extension, then we look for the default
// heading.[extension]. If there is no such file, we try to
// get any file with the same extension
- QString filename;
+ TQString filename;
if(str.startsWith(".")) {
- if(QFile::exists(m_headingFiles.absFilePath("heading"+str)))
+ if(TQFile::exists(m_headingFiles.absFilePath("heading"+str)))
filename = m_headingFiles.absFilePath("heading"+str);
else {
m_headingFiles.setNameFilter('*' + str);
@@ -535,24 +535,24 @@ QString CodeGenerationPolicy::getHeadingFile(const QString& str) {
filename = m_headingFiles.absFilePath(str);
}
- QFile f(filename);
+ TQFile f(filename);
if(!f.open(IO_ReadOnly)) {
// kWarning() << "Error opening heading file: " << f.name() << endl;
// kWarning() << "Headings directory was " << m_headingFiles.absPath() << endl;
- return QString("");
+ return TQString("");
}
- QTextStream ts(&f);
- QString retstr = QString("");
- QString endLine = getNewLineEndingChars();
+ TQTextStream ts(&f);
+ TQString retstr = TQString("");
+ TQString endLine = getNewLineEndingChars();
for(int l = 0; l < MAXLINES && !ts.atEnd(); l++)
retstr += ts.readLine()+endLine;
//do variable substitution
- retstr.replace( QRegExp("%author%"),QString(getenv("USER"))); //get the user name from some where else
- retstr.replace( QRegExp("%headingpath%"),filename );
- retstr.replace( QRegExp("%time%"), QTime::currentTime().toString());
- retstr.replace( QRegExp("%date%"), QDate::currentDate().toString());
+ retstr.replace( TQRegExp("%author%"),TQString(getenv("USER"))); //get the user name from some where else
+ retstr.replace( TQRegExp("%headingpath%"),filename );
+ retstr.replace( TQRegExp("%time%"), TQTime::currentTime().toString());
+ retstr.replace( TQRegExp("%date%"), TQDate::currentDate().toString());
// the replace filepath, time parts are also in the code document updateHeader method
// (which is not a virtual function)...
@@ -576,8 +576,8 @@ void CodeGenerationPolicy::initFields ( ) {
m_associationFieldScope = defaultAssocFieldScope();
m_commentStyle = defaultCommentStyle();
- m_outputDirectory.setPath(QDir::home().absPath() + "/uml-generated-code/");
- m_headingFiles.setPath(QDir::home().absPath() + "/headings/");
+ m_outputDirectory.setPath(TQDir::home().absPath() + "/uml-generated-code/");
+ m_headingFiles.setPath(TQDir::home().absPath() + "/headings/");
calculateIndentation();
diff --git a/umbrello/umbrello/codegenerationpolicy.h b/umbrello/umbrello/codegenerationpolicy.h
index 3293ec6c..eca23d66 100644
--- a/umbrello/umbrello/codegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerationpolicy.h
@@ -19,9 +19,9 @@
#ifndef CODEGENERATIONPOLICY_H
#define CODEGENERATIONPOLICY_H
-#include <qobject.h>
-#include <qdir.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqdir.h>
+#include <tqdom.h>
class QWidget;
class KConfig;
@@ -32,7 +32,7 @@ class CodeGenerationPolicyPage;
* This class describes the code generation policy for this project.
*/
-class CodeGenerationPolicy : public QObject {
+class CodeGenerationPolicy : public TQObject {
Q_OBJECT
public:
@@ -158,14 +158,14 @@ public:
* location of the header file template.
* @param path the new path of m_headingFileDir
*/
- void setHeadingFileDir ( const QString & path);
+ void setHeadingFileDir ( const TQString & path);
/**
* Get the value of m_headingFileDir
* location of the header file template.
* @return the value of m_headingFileDir
*/
- QString getHeadingFileDir ( ) const;
+ TQString getHeadingFileDir ( ) const;
/**
@@ -186,14 +186,14 @@ public:
* location of where output files will go.
* @param new_var the new value of m_outputDirectory
*/
- void setOutputDirectory ( QDir new_var );
+ void setOutputDirectory ( TQDir new_var );
/**
* Get the value of m_outputDirectory
* location of where output files will go.
* @return the value of m_outputDirectory
*/
- QDir getOutputDirectory ( );
+ TQDir getOutputDirectory ( );
/**
* Set the value of m_lineEndingType
@@ -211,7 +211,7 @@ public:
/** Utility function to get the actual characters.
*/
- QString getNewLineEndingChars ( ) const;
+ TQString getNewLineEndingChars ( ) const;
/**
* Set the value of m_indentationType
@@ -235,7 +235,7 @@ public:
* The amount and type of whitespace to indent with.
* @return the value of m_indentationType
*/
- QString getIndentation ( ) const;
+ TQString getIndentation ( ) const;
/**
* Set the value of m_modifyPolicy
@@ -289,7 +289,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- virtual CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ virtual CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
/**
* Gets the heading file (as a string) to be inserted at the
@@ -306,7 +306,7 @@ public:
* %time%
* %filepath%
*/
- QString getHeadingFile(const QString& str);
+ TQString getHeadingFile(const TQString& str);
/**
* set the defaults for this code generator from the passed generator.
@@ -357,9 +357,9 @@ protected:
//code would normally be created at that point in the file.
bool m_codeVerboseDocumentComments;
- QDir m_headingFiles; // location of the header file template.
+ TQDir m_headingFiles; // location of the header file template.
bool m_includeHeadings;
- QDir m_outputDirectory; // location of where output files will go.
+ TQDir m_outputDirectory; // location of where output files will go.
NewLineType m_lineEndingType; // What type of line ending characters to use.
IndentationType m_indentationType; // The amount and type of whitespace to indent with.
int m_indentationAmount; // The amount of units to indent with.
@@ -370,8 +370,8 @@ protected:
ScopePolicy m_associationFieldScope;
// these 2 private fields 'cache' the string values of other fields we may frequently call for
- QString m_lineEndingChars;
- QString m_indentation;
+ TQString m_lineEndingChars;
+ TQString m_indentation;
void calculateIndentation ( );
diff --git a/umbrello/umbrello/codegenerator.cpp b/umbrello/umbrello/codegenerator.cpp
index a8c2ae23..a5b24cee 100644
--- a/umbrello/umbrello/codegenerator.cpp
+++ b/umbrello/umbrello/codegenerator.cpp
@@ -21,10 +21,10 @@
#include <cstdlib> //to get the user name
// qt includes
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
// kde includes
#include <kdebug.h>
@@ -55,15 +55,15 @@
//
CodeGenerator::CodeGenerator ()
- : QObject (UMLApp::app()->getDocument())
+ : TQObject (UMLApp::app()->getDocument())
{
initFields();
}
// FIX
// hmm. this should be pure virtual so that implemented in sub-class
-CodeGenerator::CodeGenerator (QDomElement & element )
- : QObject (UMLApp::app()->getDocument()) {
+CodeGenerator::CodeGenerator (TQDomElement & element )
+ : TQObject (UMLApp::app()->getDocument()) {
initFields();
loadFromXMI(element); // hmm. cant call this here.. its 'pure' virtual
}
@@ -85,10 +85,10 @@ CodeGenerator::~CodeGenerator ( ) {
// Accessor methods
//
-QString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
+TQString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
{
- QString id = codeDoc->getID();
+ TQString id = codeDoc->getID();
// does this document already exist? then just return its present id
if (!id.isEmpty() && findCodeDocumentByID(id))
@@ -101,11 +101,11 @@ QString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
id = ID2STR(c->getID()); // this is supposed to be unique already..
} else {
- QString prefix = "doc";
- QString id = prefix + "_0";
+ TQString prefix = "doc";
+ TQString id = prefix + "_0";
int number = lastIDIndex;
for ( ; findCodeDocumentByID(id); number++) {
- id = prefix + '_' + QString::number(number);
+ id = prefix + '_' + TQString::number(number);
}
lastIDIndex = number;
}
@@ -113,7 +113,7 @@ QString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
return id;
}
-CodeDocument * CodeGenerator::findCodeDocumentByID( const QString &tag ) {
+CodeDocument * CodeGenerator::findCodeDocumentByID( const TQString &tag ) {
//if we already know to which file this class was written/should be written, just return it.
CodeDocument * doc = (CodeDocument*)NULL;
if((doc = m_codeDocumentDictionary.find(tag)))
@@ -124,7 +124,7 @@ CodeDocument * CodeGenerator::findCodeDocumentByID( const QString &tag ) {
bool CodeGenerator::addCodeDocument ( CodeDocument * doc )
{
- QString tag = doc->getID();
+ TQString tag = doc->getID();
// assign a tag if one doesn't already exist
if(tag.isEmpty())
@@ -146,7 +146,7 @@ bool CodeGenerator::addCodeDocument ( CodeDocument * doc )
* Remove a CodeDocument object from m_codedocumentVector List
*/
bool CodeGenerator::removeCodeDocument ( CodeDocument * remove_object ) {
- QString tag = remove_object->getID();
+ TQString tag = remove_object->getID();
if(!(tag.isEmpty()))
m_codeDocumentDictionary.remove(tag);
else
@@ -158,7 +158,7 @@ bool CodeGenerator::removeCodeDocument ( CodeDocument * remove_object ) {
/**
* Get the list of CodeDocument objects held by m_codedocumentVector
- * @return QPtrList<CodeDocument *> list of CodeDocument objects held by
+ * @return TQPtrList<CodeDocument *> list of CodeDocument objects held by
* m_codedocumentVector
*/
CodeDocumentList * CodeGenerator::getCodeDocumentList ( ) {
@@ -166,7 +166,7 @@ CodeDocumentList * CodeGenerator::getCodeDocumentList ( ) {
}
// the vanilla version
-CodeViewerDialog * CodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * CodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
return new CodeViewerDialog(parent, doc, state);
@@ -175,31 +175,31 @@ CodeViewerDialog * CodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDoc
// Other methods
//
-void CodeGenerator::loadFromXMI (QDomElement & qElement ) {
+void CodeGenerator::loadFromXMI (TQDomElement & qElement ) {
// don't do anything for simple (compatability) code generators
if(dynamic_cast<SimpleCodeGenerator*>(this))
return;
//now look for our particular child element
- QDomNode node = qElement.firstChild();
- QDomElement element = node.toElement();
- QString langType = Model_Utils::progLangToString( getLanguage() );
+ TQDomNode node = qElement.firstChild();
+ TQDomElement element = node.toElement();
+ TQString langType = Model_Utils::progLangToString( getLanguage() );
if (qElement.tagName() != "codegenerator"
|| qElement.attribute("language", "UNKNOWN") != langType)
return;
// got our code generator element, now load
// codedocuments
- QDomNode codeDocNode = qElement.firstChild();
- QDomElement codeDocElement = codeDocNode.toElement();
+ TQDomNode codeDocNode = qElement.firstChild();
+ TQDomElement codeDocElement = codeDocNode.toElement();
while( !codeDocElement.isNull() ) {
- QString docTag = codeDocElement.tagName();
+ TQString docTag = codeDocElement.tagName();
if( docTag == "codedocument" ||
docTag == "classifiercodedocument"
) {
- QString id = codeDocElement.attribute( "id", "-1" );
+ TQString id = codeDocElement.attribute( "id", "-1" );
CodeDocument * codeDoc = findCodeDocumentByID(id);
if(codeDoc)
codeDoc->loadFromXMI(codeDocElement);
@@ -214,9 +214,9 @@ void CodeGenerator::loadFromXMI (QDomElement & qElement ) {
}
}
-void CodeGenerator::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QString langType = Model_Utils::progLangToString( getLanguage() );
- QDomElement docElement = doc.createElement( "codegenerator" );
+void CodeGenerator::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQString langType = Model_Utils::progLangToString( getLanguage() );
+ TQDomElement docElement = doc.createElement( "codegenerator" );
docElement.setAttribute("language",langType);
CodeDocumentList * docList = getCodeDocumentList();
@@ -343,11 +343,11 @@ void CodeGenerator::writeListedCodeDocsToFile ( CodeDocumentList * docs ) {
// we only write the document, if so requested
if(doc->getWriteOutCode())
{
- QString filename = findFileName(doc);
+ TQString filename = findFileName(doc);
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( openFile(file,filename) ) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream<<doc->toString()<<endl;
file.close();
codeGenSuccess = true; // we wrote the code OK
@@ -377,7 +377,7 @@ CodeDocument * CodeGenerator::newCodeDocument ( ) {
* @param file
*/
-QString CodeGenerator::getHeadingFile( const QString &file ) {
+TQString CodeGenerator::getHeadingFile( const TQString &file ) {
return UMLApp::app()->getCommonPolicy()->getHeadingFile(file);
}
@@ -386,11 +386,11 @@ QString CodeGenerator::getHeadingFile( const QString &file ) {
* @param codeDoc
* @param name
*/
-QString CodeGenerator::overwritableName(const QString& name, const QString &extension ) {
+TQString CodeGenerator::overwritableName(const TQString& name, const TQString &extension ) {
CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy();
- QDir outputDirectory = pol->getOutputDirectory();
- QString filename = name + extension;
+ TQDir outputDirectory = pol->getOutputDirectory();
+ TQString filename = name + extension;
if (!outputDirectory.exists(filename)) {
return filename;
@@ -416,7 +416,7 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
case KDialogBase::No: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + extension;
+ filename = name + "__" + TQString::number(suffix) + extension;
if (!outputDirectory.exists(filename))
break;
suffix++;
@@ -433,7 +433,7 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
} else {
m_applyToAllRemaining = false;
}
- return QString();
+ return TQString();
break;
}
@@ -441,14 +441,14 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
case CodeGenerationPolicy::Never: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + extension;
+ filename = name + "__" + TQString::number(suffix) + extension;
if (!outputDirectory.exists(filename))
break;
suffix++;
}
break;
case CodeGenerationPolicy::Cancel: //don't output anything
- return QString();
+ return TQString();
break;
}
@@ -461,13 +461,13 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
* @param file
* @param name
*/
-bool CodeGenerator::openFile (QFile & file, const QString &fileName ) {
+bool CodeGenerator::openFile (TQFile & file, const TQString &fileName ) {
//open files for writing.
if(fileName.isEmpty()) {
kWarning() << "cannot find a file name" << endl;
return false;
} else {
- QDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
+ TQDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
file.setName(outputDirectory.absFilePath(fileName));
if(!file.open(IO_WriteOnly)) {
KMessageBox::sorry(0,i18n("Cannot open file %1 for writing. Please make sure the folder exists and you have permissions to write to it.").arg(file.name()),i18n("Cannot Open File"));
@@ -483,23 +483,23 @@ bool CodeGenerator::openFile (QFile & file, const QString &fileName ) {
* @return QString
* @param name
*/
-QString CodeGenerator::cleanName ( const QString &name ) {
- QString retval = name;
- retval.replace(QRegExp("\\W"), "_");
+TQString CodeGenerator::cleanName ( const TQString &name ) {
+ TQString retval = name;
+ retval.replace(TQRegExp("\\W"), "_");
return retval;
}
-QString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
+TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
//else, determine the "natural" file name
- QString name;
+ TQString name;
// Get the path name
- QString path = codeDocument->getPath();
+ TQString path = codeDocument->getPath();
// if path is given add this as a directory to the file name
if (!path.isEmpty()) {
- path.replace(QRegExp("::"), "/"); // Simple hack!
+ path.replace(TQRegExp("::"), "/"); // Simple hack!
name = path + '/' + codeDocument->getFileName();
path = '/' + path;
} else {
@@ -507,22 +507,22 @@ QString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
}
// Convert all "::" to "/" : Platform-specific path separator
- name.replace(QRegExp("::"), "/"); // Simple hack!
+ name.replace(TQRegExp("::"), "/"); // Simple hack!
// if a path name exists check the existence of the path directory
if (!path.isEmpty()) {
- QDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
- QDir pathDir(outputDirectory.absPath() + path);
+ TQDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
+ TQDir pathDir(outputDirectory.absPath() + path);
// does our complete output directory exist yet? if not, try to create it
if (!pathDir.exists())
{
// ugh. dir separator here is UNIX specific..
- QStringList dirs = QStringList::split("/",pathDir.absPath());
- QString currentDir = "";
+ TQStringList dirs = TQStringList::split("/",pathDir.absPath());
+ TQString currentDir = "";
- QStringList::iterator end(dirs.end());
- for (QStringList::iterator dir(dirs.begin()); dir != end; ++dir)
+ TQStringList::iterator end(dirs.end());
+ for (TQStringList::iterator dir(dirs.begin()); dir != end; ++dir)
{
currentDir += '/' + *dir;
if (! (pathDir.exists(currentDir)
@@ -539,7 +539,7 @@ QString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
}
name.simplifyWhiteSpace();
- name.replace(QRegExp(" "),"_");
+ name.replace(TQRegExp(" "),"_");
return overwritableName( name, codeDocument->getFileExtension() );
}
@@ -627,14 +627,14 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
* @param lineprefix
* @param linewidth
*/
-QString CodeGenerator::formatDoc(const QString &text, const QString &linePrefix, int lineWidth) {
- QString output;
-
- const QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QStringList lines = QStringList::split(endLine, text);
- for (QStringList::ConstIterator lit = lines.begin(); lit != lines.end(); ++lit) {
- QString input = *lit;
- input.remove( QRegExp("\\s+$") );
+TQString CodeGenerator::formatDoc(const TQString &text, const TQString &linePrefix, int lineWidth) {
+ TQString output;
+
+ const TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQStringList lines = TQStringList::split(endLine, text);
+ for (TQStringList::ConstIterator lit = lines.begin(); lit != lines.end(); ++lit) {
+ TQString input = *lit;
+ input.remove( TQRegExp("\\s+$") );
if (input.length() < (uint)lineWidth) {
output += linePrefix + input + endLine;
continue;
@@ -669,13 +669,13 @@ void CodeGenerator::initFields() {
void CodeGenerator::connect_newcodegen_slots() {
UMLDoc *doc = UMLApp::app()->getDocument();
- connect(doc, SIGNAL(sigObjectCreated(UMLObject*)),
- this, SLOT(checkAddUMLObject(UMLObject*)));
- connect(doc, SIGNAL(sigObjectRemoved(UMLObject*)),
- this, SLOT(checkRemoveUMLObject(UMLObject*)));
+ connect(doc, TQT_SIGNAL(sigObjectCreated(UMLObject*)),
+ this, TQT_SLOT(checkAddUMLObject(UMLObject*)));
+ connect(doc, TQT_SIGNAL(sigObjectRemoved(UMLObject*)),
+ this, TQT_SLOT(checkRemoveUMLObject(UMLObject*)));
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
- connect(commonPolicy, SIGNAL(modifiedCodeContent()),
- this, SLOT(syncCodeToDocument()));
+ connect(commonPolicy, TQT_SIGNAL(modifiedCodeContent()),
+ this, TQT_SLOT(syncCodeToDocument()));
}
// these are utility methods for accessing the default
@@ -697,20 +697,20 @@ bool CodeGenerator::forceSections() const {
return UMLApp::app()->getCommonPolicy()->getCodeVerboseSectionComments();
}
-QStringList CodeGenerator::defaultDatatypes() {
- return QStringList();
+TQStringList CodeGenerator::defaultDatatypes() {
+ return TQStringList();
//empty by default, override in your code generator
}
-bool CodeGenerator::isReservedKeyword(const QString & keyword) {
+bool CodeGenerator::isReservedKeyword(const TQString & keyword) {
- const QStringList keywords = reservedKeywords();
+ const TQStringList keywords = reservedKeywords();
return keywords.contains(keyword);
}
-const QStringList CodeGenerator::reservedKeywords() const {
- static QStringList emptyList;
+const TQStringList CodeGenerator::reservedKeywords() const {
+ static TQStringList emptyList;
return emptyList;
}
diff --git a/umbrello/umbrello/codegenerator.h b/umbrello/umbrello/codegenerator.h
index 0928dbba..d47fd73f 100644
--- a/umbrello/umbrello/codegenerator.h
+++ b/umbrello/umbrello/codegenerator.h
@@ -19,8 +19,8 @@
#ifndef CODEGENERATOR_H
#define CODEGENERATOR_H
-#include <qdict.h>
-#include <qdir.h>
+#include <tqdict.h>
+#include <tqdir.h>
#include "codegenerators/codegenpolicyext.h"
#include "codegenerationpolicy.h"
@@ -79,7 +79,7 @@ class KConfig;
*/
-class CodeGenerator : public QObject {
+class CodeGenerator : public TQObject {
Q_OBJECT
public:
@@ -102,7 +102,7 @@ public:
* @return CodeGenerator
* @param element an element from an XMI document
*/
- CodeGenerator (QDomElement & element );
+ CodeGenerator (TQDomElement & element );
/**
* Empty Destructor
@@ -142,18 +142,18 @@ public:
CodeDocumentList * getCodeDocumentList ( );
// get a unique id for this codedocument
- QString getUniqueID ( CodeDocument * codeDoc );
+ TQString getUniqueID ( CodeDocument * codeDoc );
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* Find a code document by the given id string.
* @return CodeDocument
*/
- CodeDocument * findCodeDocumentByID (const QString &id );
+ CodeDocument * findCodeDocumentByID (const TQString &id );
/**
* Write out all code documents to file as appropriate.
@@ -175,8 +175,8 @@ public:
void setIncludeHeadings(bool i);
bool includeHeadings() const;
- void setHeadingFileDir(const QString &);
- QString headingFileDir() const;
+ void setHeadingFileDir(const TQString &);
+ TQString headingFileDir() const;
void setForceDoc(bool f);
bool forceDoc() const;
@@ -203,7 +203,7 @@ public:
* @return QString
* @param file
*/
- virtual QString getHeadingFile (const QString &file );
+ virtual TQString getHeadingFile (const TQString &file );
/**
* Finds an appropriate file name for the given CodeDocument, taking into
@@ -214,14 +214,14 @@ public:
* @return the file name that should be used. (with extension) or
* NULL if none to be used
*/
- virtual QString findFileName(CodeDocument * doc);
+ virtual TQString findFileName(CodeDocument * doc);
/**
* Replaces spaces with underscores and capitalises as defined in m_modname
* @return QString
* @param name
*/
- static QString cleanName ( const QString &name );
+ static TQString cleanName ( const TQString &name );
/** Format documentation for output in source files
*
@@ -231,7 +231,7 @@ public:
*
* @return the formatted documentation text
*/
- QString formatDoc (const QString & text, const QString & linePrefix = " *", int lineWidth = 80 );
+ TQString formatDoc (const TQString & text, const TQString & linePrefix = " *", int lineWidth = 80 );
/**
* Finds all classes in the current document to which objects of class c
@@ -250,7 +250,7 @@ public:
/**
* @param element
*/
- virtual void loadFromXMI (QDomElement & element );
+ virtual void loadFromXMI (TQDomElement & element );
/**
* Create a new Code document belonging to this package.
@@ -276,11 +276,11 @@ public:
* Return the default datatypes for your language (bool, int etc)
* Default implementation returns empty list.
*/
- virtual QStringList defaultDatatypes();
+ virtual TQStringList defaultDatatypes();
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
/**
@@ -290,12 +290,12 @@ public:
* @param rPossiblyReservedKeyword is the string to check
*
*/
- virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
+ virtual bool isReservedKeyword(const TQString & rPossiblyReservedKeyword);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
/**
* Create the default stereotypes for your language (constructor, int etc)
@@ -339,9 +339,9 @@ protected:
* @param name the proposed output file name
* @param extension the extension to use
* @return the real file name that should be used (including extension) or
- * QString::null if none to be used
+ * TQString::null if none to be used
*/
- QString overwritableName (const QString& name, const QString &extension );
+ TQString overwritableName (const TQString& name, const TQString &extension );
/** Opens a file named "name" for writing in the outputDirectory.
* If something goes wrong, it informs the user
@@ -350,7 +350,7 @@ protected:
* @param file
* @param name
*/
- bool openFile (QFile& file, const QString &name);
+ bool openFile (TQFile& file, const TQString &name);
/** the actual internal routine which writes code documents
*/
@@ -359,7 +359,7 @@ protected:
static const char * hierarchicalCodeBlockNodeName;
// map of what code documents we currently have in this generator.
- QDict<CodeDocument> m_codeDocumentDictionary;
+ TQDict<CodeDocument> m_codeDocumentDictionary;
/**
* used by overwriteDialogue to know if the apply to all
@@ -379,7 +379,7 @@ private:
* each class was written to.
*/
// this seems silly and overkill now. -b.t.
- // QMap<CodeDocument*,QString> *m_fileMap;
+ // TQMap<CodeDocument*,TQString> *m_fileMap;
CodeDocumentList m_codedocumentVector;
int lastIDIndex;
diff --git a/umbrello/umbrello/codegenerators/adawriter.cpp b/umbrello/umbrello/codegenerators/adawriter.cpp
index e1c79839..ec2bf59a 100644
--- a/umbrello/umbrello/codegenerators/adawriter.cpp
+++ b/umbrello/umbrello/codegenerators/adawriter.cpp
@@ -18,9 +18,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../uml.h"
@@ -36,7 +36,7 @@
#include "../template.h"
#include "../umlnamespace.h"
-const QString AdaWriter::defaultPackageSuffix = "_Holder";
+const TQString AdaWriter::defaultPackageSuffix = "_Holder";
AdaWriter::AdaWriter() {
}
@@ -61,7 +61,7 @@ bool AdaWriter::isOOClass(UMLClassifier *c) {
kDebug() << "AdaWriter::isOOClass: unknown object type " << ot << endl;
return false;
}
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant" || stype == "CORBATypedef" ||
stype == "CORBAStruct" || stype == "CORBAUnion")
return false;
@@ -70,13 +70,13 @@ bool AdaWriter::isOOClass(UMLClassifier *c) {
return true;
}
-QString AdaWriter::className(UMLClassifier *c, bool inOwnScope) {
+TQString AdaWriter::className(UMLClassifier *c, bool inOwnScope) {
// If the class has an enclosing package then it is assumed that
// the class name is the type name; if the class does not have an
// enclosing package then the class name acts as the Ada package
// name.
- QString retval;
- QString className = cleanName(c->getName());
+ TQString retval;
+ TQString className = cleanName(c->getName());
UMLPackage *umlPkg = c->getUMLPackage();
if (umlPkg == UMLApp::app()->getDocument()->getRootFolder(Uml::mt_Logical)) {
if (! inOwnScope)
@@ -90,14 +90,14 @@ QString AdaWriter::className(UMLClassifier *c, bool inOwnScope) {
return retval;
}
-QString AdaWriter::packageName(UMLPackage *p) {
+TQString AdaWriter::packageName(UMLPackage *p) {
// If the class has an enclosing package then it is assumed that
// the class name is the type name; if the class does not have an
// enclosing package then the class name acts as the Ada package
// name.
UMLPackage *umlPkg = p->getUMLPackage();
- QString className = cleanName(p->getName());
- QString retval;
+ TQString className = cleanName(p->getName());
+ TQString retval;
if (umlPkg == UMLApp::app()->getDocument()->getRootFolder(Uml::mt_Logical))
umlPkg = NULL;
@@ -115,21 +115,21 @@ QString AdaWriter::packageName(UMLPackage *p) {
void AdaWriter::computeAssocTypeAndRole(UMLClassifier *c,
UMLAssociation *a,
- QString& typeName, QString& roleName) {
+ TQString& typeName, TQString& roleName) {
UMLClassifier* assocEnd = dynamic_cast<UMLClassifier*>(a->getObject(Uml::B));
if (assocEnd == NULL)
return;
const Uml::Association_Type assocType = a->getAssocType();
if (assocType != Uml::at_Aggregation && assocType != Uml::at_Composition)
return;
- const QString multi = a->getMulti(Uml::B);
+ const TQString multi = a->getMulti(Uml::B);
bool hasNonUnityMultiplicity = (!multi.isEmpty() && multi != "1");
- hasNonUnityMultiplicity &= !multi.contains(QRegExp("^1 *\\.\\. *1$"));
+ hasNonUnityMultiplicity &= !multi.contains(TQRegExp("^1 *\\.\\. *1$"));
roleName = cleanName(a->getRoleName(Uml::B));
if (roleName.isEmpty())
roleName = cleanName(a->getName());
if (roleName.isEmpty()) {
- QString artificialName = cleanName(assocEnd->getName());
+ TQString artificialName = cleanName(assocEnd->getName());
if (hasNonUnityMultiplicity) {
roleName = artificialName;
roleName.append("_Vector");
@@ -152,8 +152,8 @@ void AdaWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
- QString fileName = packageName(c).lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = packageName(c).lower();
fileName.replace('.', '-');
//find an appropriate name for our file
@@ -163,7 +163,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
return;
}
- QFile file;
+ TQFile file;
if (!openFile(file, fileName)) {
emit codeGenerated(c, false);
return;
@@ -171,13 +171,13 @@ void AdaWriter::writeClass(UMLClassifier *c) {
// Start generating the code.
- QTextStream ada(&file);
+ TQTextStream ada(&file);
//try to find a heading file(license, comments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".ads");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), file.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), file.name());
ada << str << endl;
}
@@ -198,8 +198,8 @@ void AdaWriter::writeClass(UMLClassifier *c) {
ada << getIndent() << "generic" << m_endl;
m_indentLevel++;
for (UMLTemplate *t = template_params.first(); t; t = template_params.next()) {
- QString formalName = t->getName();
- QString typeName = t->getTypeName();
+ TQString formalName = t->getName();
+ TQString typeName = t->getTypeName();
if (typeName == "class") {
ada << getIndent() << "type " << formalName << " is tagged private;"
<< m_endl;
@@ -225,7 +225,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
}
// Here comes the package proper.
- QString pkg = packageName(c);
+ TQString pkg = packageName(c);
ada << getIndent() << "package " << pkg << " is" << m_endl << m_endl;
m_indentLevel++;
if (c->getBaseType() == Uml::ot_Enum) {
@@ -235,7 +235,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
ada << getIndent() << "type " << classname << " is (" << m_endl;
m_indentLevel++;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
ada << getIndent() << enumLiteral;
if (++i < litList.count())
ada << "," << m_endl;
@@ -247,7 +247,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
return;
}
if (! isOOClass(c)) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant") {
ada << getIndent() << "-- " << stype << " is Not Yet Implemented" << m_endl << m_endl;
} else if(stype == "CORBAStruct") {
@@ -257,10 +257,10 @@ void AdaWriter::writeClass(UMLClassifier *c) {
ada << getIndent() << "type " << classname << " is record" << m_endl;
m_indentLevel++;
for (at = atl.first(); at; at = atl.next()) {
- QString name = cleanName(at->getName());
- QString typeName = at->getTypeName();
+ TQString name = cleanName(at->getName());
+ TQString typeName = at->getTypeName();
ada << getIndent() << name << " : " << typeName;
- QString initialVal = at->getInitialValue();
+ TQString initialVal = at->getInitialValue();
if (initialVal.latin1() && ! initialVal.isEmpty())
ada << " := " << initialVal;
ada << ";" << m_endl;
@@ -290,7 +290,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
UMLClassifierList superclasses = c->getSuperClasses();
- const QString name = className(c);
+ const TQString name = className(c);
ada << getIndent() << "type " << name << " is ";
if (c->getAbstract())
ada << "abstract ";
@@ -322,7 +322,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
if (forceSections() || atpub.count())
ada << getIndent() << "-- Accessors for public attributes:" << m_endl << m_endl;
for (at = atpub.first(); at; at = atpub.next()) {
- QString member = cleanName(at->getName());
+ TQString member = cleanName(at->getName());
ada << getIndent() << "procedure Set_" << member << " (";
if (! at->getStatic())
ada << "Self : access " << name << "; ";
@@ -374,7 +374,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
for (UMLAssociation *a = aggregations.first(); a; a = aggregations.next()) {
if (c != a->getObject(Uml::A))
continue;
- QString typeName, roleName;
+ TQString typeName, roleName;
computeAssocTypeAndRole(c, a, typeName, roleName);
ada << getIndent() << roleName << " : " << typeName << ";" << m_endl;
}
@@ -385,7 +385,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
for (UMLAssociation *a = compositions.first(); a; a = compositions.next()) {
if (c != a->getObject(Uml::A))
continue;
- QString typeName, roleName;
+ TQString typeName, roleName;
computeAssocTypeAndRole(c, a, typeName, roleName);
ada << getIndent() << roleName << " : " << typeName << ";" << m_endl;
}
@@ -468,9 +468,9 @@ void AdaWriter::writeClass(UMLClassifier *c) {
}
-void AdaWriter::writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment) {
+void AdaWriter::writeOperation(UMLOperation *op, TQTextStream &ada, bool is_comment) {
UMLAttributeList atl = op->getParmList();
- QString rettype = op->getTypeName();
+ TQString rettype = op->getTypeName();
bool use_procedure = (rettype.isEmpty() || rettype == "void");
ada << getIndent();
@@ -521,8 +521,8 @@ void AdaWriter::writeOperation(UMLOperation *op, QTextStream &ada, bool is_comme
ada << ";" << m_endl << m_endl;
}
-QStringList AdaWriter::defaultDatatypes() {
- QStringList l;
+TQStringList AdaWriter::defaultDatatypes() {
+ TQStringList l;
l.append("Boolean");
l.append("Character");
l.append("Positive");
@@ -543,11 +543,11 @@ QStringList AdaWriter::defaultDatatypes() {
*
* @param rPossiblyReservedKeyword The string to check.
*/
-bool AdaWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
+bool AdaWriter::isReservedKeyword(const TQString & rPossiblyReservedKeyword) {
- const QStringList keywords = reservedKeywords();
+ const TQStringList keywords = reservedKeywords();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = keywords.begin(); it != keywords.end(); ++it)
if ((*it).lower() == rPossiblyReservedKeyword.lower())
return true;
@@ -558,9 +558,9 @@ bool AdaWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
/**
* get list of reserved keywords
*/
-const QStringList AdaWriter::reservedKeywords() const {
+const TQStringList AdaWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if ( keywords.isEmpty() ) {
keywords.append( "abort" );
diff --git a/umbrello/umbrello/codegenerators/adawriter.h b/umbrello/umbrello/codegenerators/adawriter.h
index ca5d9f67..779fc7d5 100644
--- a/umbrello/umbrello/codegenerators/adawriter.h
+++ b/umbrello/umbrello/codegenerators/adawriter.h
@@ -55,7 +55,7 @@ public:
*/
virtual Uml::Programming_Language getLanguage();
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* Check whether the given string is a reserved word for the
@@ -64,12 +64,12 @@ public:
* @param rPossiblyReservedKeyword The string to check.
* @return true if the keyword is reserved
*/
- virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
+ virtual bool isReservedKeyword(const TQString & rPossiblyReservedKeyword);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -78,7 +78,7 @@ private:
* @param op the class for which we are generating code
* @param ada the stream associated with the output file
*/
- void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false);
+ void writeOperation (UMLOperation *op, TQTextStream &ada, bool is_comment = false);
/**
* Compute the type and role name from the given association.
@@ -90,15 +90,15 @@ private:
*/
void computeAssocTypeAndRole (UMLClassifier *c,
UMLAssociation *a,
- QString& typeName, QString& roleName);
+ TQString& typeName, TQString& roleName);
bool isOOClass (UMLClassifier *c);
- QString className(UMLClassifier *c, bool inOwnScope = true);
+ TQString className(UMLClassifier *c, bool inOwnScope = true);
- QString packageName(UMLPackage *p);
+ TQString packageName(UMLPackage *p);
- static const QString defaultPackageSuffix;
+ static const TQString defaultPackageSuffix;
};
diff --git a/umbrello/umbrello/codegenerators/aswriter.cpp b/umbrello/umbrello/codegenerators/aswriter.cpp
index ad55839d..e973a55e 100644
--- a/umbrello/umbrello/codegenerators/aswriter.cpp
+++ b/umbrello/umbrello/codegenerators/aswriter.cpp
@@ -21,8 +21,8 @@
#include "../attribute.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
ASWriter::ASWriter() {
}
@@ -38,8 +38,8 @@ void ASWriter::writeClass(UMLClassifier *c)
return;
}
- QString classname = cleanName(c->getName());
- QString fileName = c->getName().lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = c->getName().lower();
//find an appropriate name for our file
fileName = findFileName(c,".as");
@@ -49,13 +49,13 @@ void ASWriter::writeClass(UMLClassifier *c)
return;
}
- QFile fileas;
+ TQFile fileas;
if(!openFile(fileas,fileName))
{
emit codeGenerated(c, false);
return;
}
- QTextStream as(&fileas);
+ TQTextStream as(&fileas);
//////////////////////////////
//Start generating the code!!
@@ -63,12 +63,12 @@ void ASWriter::writeClass(UMLClassifier *c)
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".as");
if(!str.isEmpty())
{
- str.replace(QRegExp("%filename%"),fileName+".as");
- str.replace(QRegExp("%filepath%"),fileas.name());
+ str.replace(TQRegExp("%filename%"),fileName+".as");
+ str.replace(TQRegExp("%filepath%"),fileas.name());
as << str << m_endl;
}
@@ -78,7 +78,7 @@ void ASWriter::writeClass(UMLClassifier *c)
findObjectsRelated(c,includes);
for (UMLPackage *conc = includes.first(); conc; conc = includes.next())
{
- QString headerName = findFileName(conc, ".as");
+ TQString headerName = findFileName(conc, ".as");
if ( !headerName.isEmpty() )
{
as << "#include \"" << findFileName(conc,".as") << "\"" << m_endl;
@@ -126,7 +126,7 @@ void ASWriter::writeClass(UMLClassifier *c)
UMLAttributeList atl = c->getAttributeList();
as << "/**" << m_endl;
- QString temp = "_init sets all " + classname +
+ TQString temp = "_init sets all " + classname +
" attributes to their default values. " +
"Make sure to call this method within your class constructor";
as << formatDoc(temp, " * ");
@@ -229,14 +229,14 @@ void ASWriter::writeClass(UMLClassifier *c)
// Helper Methods
-void ASWriter::writeAssociation(QString& classname, UMLAssociationList& assocList , QTextStream &as )
+void ASWriter::writeAssociation(TQString& classname, UMLAssociationList& assocList , TQTextStream &as )
{
for(UMLAssociation *a = assocList.first(); a; a = assocList.next())
{
// association side
Uml::Role_Type role = a->getObject(Uml::A)->getName() == classname ? Uml::B:Uml::A;
- QString roleName(cleanName(a->getRoleName(role)));
+ TQString roleName(cleanName(a->getRoleName(role)));
if (!roleName.isEmpty()) {
@@ -258,7 +258,7 @@ void ASWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
int nMulti = a->getMulti(role).toInt(&okCvt,10);
bool isNotMulti = a->getMulti(role).isEmpty() || (okCvt && nMulti == 1);
- QString typeName(cleanName(a->getObject(role)->getName()));
+ TQString typeName(cleanName(a->getObject(role)->getName()));
if (isNotMulti)
as << m_indentation << "this.m_" << roleName << " = new " << typeName << "();" << m_endl;
@@ -278,7 +278,7 @@ void ASWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
}
}
-void ASWriter::writeOperations(QString classname, UMLOperationList *opList, QTextStream &as)
+void ASWriter::writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &as)
{
UMLOperation *op;
UMLAttributeList atl;
@@ -314,7 +314,7 @@ void ASWriter::writeOperations(QString classname, UMLOperationList *opList, QTex
for (at = atl.first(); at; at = atl.next(),j++)
{
as << cleanName(at->getName())
- << (!(at->getInitialValue().isEmpty()) ? (QString(" = ")+at->getInitialValue()) : QString(""))
+ << (!(at->getInitialValue().isEmpty()) ? (TQString(" = ")+at->getInitialValue()) : TQString(""))
<< ((j < i-1)?", ":"");
}
as << ")" << m_endl << "{" << m_endl <<
@@ -330,9 +330,9 @@ Uml::Programming_Language ASWriter::getLanguage() {
return Uml::pl_ActionScript;
}
-const QStringList ASWriter::reservedKeywords() const {
+const TQStringList ASWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if ( keywords.isEmpty() ) {
keywords << "abs"
diff --git a/umbrello/umbrello/codegenerators/aswriter.h b/umbrello/umbrello/codegenerators/aswriter.h
index 51a4a922..75399f13 100644
--- a/umbrello/umbrello/codegenerators/aswriter.h
+++ b/umbrello/umbrello/codegenerators/aswriter.h
@@ -47,7 +47,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -64,7 +64,7 @@ private:
* @param opList the list of operations
* @param as output stream for the AS file
*/
- void writeOperations(QString classname, UMLOperationList *opList, QTextStream &as);
+ void writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &as);
/**
* write a list of associations
@@ -73,7 +73,7 @@ private:
* @param assocList the list of associations
* @param as output stream for the AS file
*/
- void writeAssociation(QString& classname, UMLAssociationList& assoclist , QTextStream &as);
+ void writeAssociation(TQString& classname, UMLAssociationList& assoclist , TQTextStream &as);
};
diff --git a/umbrello/umbrello/codegenerators/classifierinfo.h b/umbrello/umbrello/codegenerators/classifierinfo.h
index 53b7c02b..981dc8be 100644
--- a/umbrello/umbrello/codegenerators/classifierinfo.h
+++ b/umbrello/umbrello/codegenerators/classifierinfo.h
@@ -20,7 +20,7 @@
#include "../umlassociationlist.h"
#include "../umlattributelist.h"
-#include <qstring.h>
+#include <tqstring.h>
class UMLClassifier;
@@ -90,8 +90,8 @@ public:
/**
* Class and File names
*/
- QString className;
- QString fileName;
+ TQString className;
+ TQString fileName;
/**
* utility functions to allow easy determination of what classifiers
diff --git a/umbrello/umbrello/codegenerators/codegen_utils.cpp b/umbrello/umbrello/codegenerators/codegen_utils.cpp
index cb94cdde..dad11e14 100644
--- a/umbrello/umbrello/codegenerators/codegen_utils.cpp
+++ b/umbrello/umbrello/codegenerators/codegen_utils.cpp
@@ -17,8 +17,8 @@
namespace Codegen_Utils {
-QStringList cppDatatypes() {
- QStringList l;
+TQStringList cppDatatypes() {
+ TQStringList l;
l.append("int");
l.append("char");
l.append("bool");
@@ -33,9 +33,9 @@ QStringList cppDatatypes() {
return l;
}
-const QStringList reservedCppKeywords() {
+const TQStringList reservedCppKeywords() {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords.append( "and" );
@@ -404,8 +404,8 @@ void createCppStereotypes() {
umldoc->findOrCreateStereotype("virtual");
}
-QString capitalizeFirstLetter(const QString &string) {
- QChar firstChar = string.at(0);
+TQString capitalizeFirstLetter(const TQString &string) {
+ TQChar firstChar = string.at(0);
return firstChar.upper() + string.mid(1);
}
diff --git a/umbrello/umbrello/codegenerators/codegen_utils.h b/umbrello/umbrello/codegenerators/codegen_utils.h
index aaa7d117..e84c61e1 100644
--- a/umbrello/umbrello/codegenerators/codegen_utils.h
+++ b/umbrello/umbrello/codegenerators/codegen_utils.h
@@ -12,19 +12,19 @@
#ifndef CODEGEN_UTILS_H
#define CODEGEN_UTILS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace Codegen_Utils {
/**
* Return list of C++ datatypes
*/
-QStringList cppDatatypes();
+TQStringList cppDatatypes();
/**
* Get list of C++ reserved keywords
*/
-const QStringList reservedCppKeywords();
+const TQStringList reservedCppKeywords();
/**
* Add C++ stereotypes
@@ -34,7 +34,7 @@ void createCppStereotypes();
/**
* Return the input string with the first letter capitalized.
*/
-QString capitalizeFirstLetter(const QString &string);
+TQString capitalizeFirstLetter(const TQString &string);
}
diff --git a/umbrello/umbrello/codegenerators/codegenpolicyext.h b/umbrello/umbrello/codegenerators/codegenpolicyext.h
index 97ace9f2..b9113c9d 100644
--- a/umbrello/umbrello/codegenerators/codegenpolicyext.h
+++ b/umbrello/umbrello/codegenerators/codegenpolicyext.h
@@ -12,7 +12,7 @@
#ifndef CODEGENPOLICYEXT_H
#define CODEGENPOLICYEXT_H
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
class KConfig;
@@ -27,7 +27,7 @@ class CodeGenerationPolicyPage;
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class CodeGenPolicyExt : public QObject {
+class CodeGenPolicyExt : public TQObject {
public:
CodeGenPolicyExt() {}
virtual ~CodeGenPolicyExt() {}
@@ -36,7 +36,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- virtual CodeGenerationPolicyPage * createPage(QWidget *parent = 0, const char *name = 0) = 0;
+ virtual CodeGenerationPolicyPage * createPage(TQWidget *parent = 0, const char *name = 0) = 0;
/**
* set the defaults from a config file for this code generator from the passed KConfig pointer.
diff --git a/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp b/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp
index b6b2fb72..4742cd6d 100644
--- a/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp
@@ -54,7 +54,7 @@ CPPCodeClassField::~CPPCodeClassField ( ) { }
// Other methods
//
-QString CPPCodeClassField::getFieldName() {
+TQString CPPCodeClassField::getFieldName() {
if (parentIsAttribute())
{
UMLAttribute * at = (UMLAttribute*) getParentObject();
@@ -63,7 +63,7 @@ QString CPPCodeClassField::getFieldName() {
else
{
UMLRole * role = (UMLRole*) getParentObject();
- QString roleName = role->getName();
+ TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
@@ -72,13 +72,13 @@ QString CPPCodeClassField::getFieldName() {
}
}
-QString CPPCodeClassField::getListFieldClassName () {
+TQString CPPCodeClassField::getListFieldClassName () {
CodeGenPolicyExt * p = UMLApp::app()->getPolicyExt();
CPPCodeGenerationPolicy *policy = dynamic_cast<CPPCodeGenerationPolicy*>(p);
return policy->getVectorClassName();
}
-QString CPPCodeClassField::getInitialValue() {
+TQString CPPCodeClassField::getInitialValue() {
if (parentIsAttribute())
{
diff --git a/umbrello/umbrello/codegenerators/cppcodeclassfield.h b/umbrello/umbrello/codegenerators/cppcodeclassfield.h
index d9c20255..929e5178 100644
--- a/umbrello/umbrello/codegenerators/cppcodeclassfield.h
+++ b/umbrello/umbrello/codegenerators/cppcodeclassfield.h
@@ -19,7 +19,7 @@
#ifndef CPPCODECLASSFIELD_H
#define CPPCODECLASSFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfield.h"
@@ -44,13 +44,13 @@ public:
*/
virtual ~CPPCodeClassField ( );
- QString getFieldType();
- QString getFieldName();
- QString getInitialValue();
+ TQString getFieldType();
+ TQString getFieldName();
+ TQString getInitialValue();
/** get the name of the class which holds lists, e.g. "QPtrlist" or
* "Vector" or "List" and so on.
*/
- QString getListFieldClassName();
+ TQString getListFieldClassName();
protected:
diff --git a/umbrello/umbrello/codegenerators/cppcodecomment.cpp b/umbrello/umbrello/codegenerators/cppcodecomment.cpp
index 8d480e93..d0e386c0 100644
--- a/umbrello/umbrello/codegenerators/cppcodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodecomment.cpp
@@ -19,12 +19,12 @@
#include "cppcodecomment.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
// Constructors/Destructors
//
-CPPCodeComment::CPPCodeComment ( CodeDocument * doc, const QString & text )
+CPPCodeComment::CPPCodeComment ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -50,8 +50,8 @@ CPPCodeComment::~CPPCodeComment ( ) { }
/**
* Save the XMI representation of this object
*/
-void CPPCodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "cppcodecomment" );
+void CPPCodeComment::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "cppcodecomment" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -60,38 +60,38 @@ void CPPCodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* @return QString
*/
-QString CPPCodeComment::toString ( )
+TQString CPPCodeComment::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
{
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
output.append(formatMultiLineText (getText()+endLine, indent +"// ", endLine));
}
return output;
}
-QString CPPCodeComment::getNewEditorLine ( int amount ) {
- QString line = getIndentationString(amount) + "// ";
+TQString CPPCodeComment::getNewEditorLine ( int amount ) {
+ TQString line = getIndentationString(amount) + "// ";
return line;
}
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString CPPCodeComment::unformatText ( const QString & text , const QString & indent)
+TQString CPPCodeComment::unformatText ( const TQString & text , const TQString & indent)
{
// remove leading or trailing comment stuff
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
// now leading slashes
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/cppcodecomment.h b/umbrello/umbrello/codegenerators/cppcodecomment.h
index 085e1a7f..28fb4004 100644
--- a/umbrello/umbrello/codegenerators/cppcodecomment.h
+++ b/umbrello/umbrello/codegenerators/cppcodecomment.h
@@ -18,7 +18,7 @@
#ifndef CPPCODECOMMENT_H
#define CPPCODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
/**
@@ -40,7 +40,7 @@ public:
/**
* Constructors
*/
- explicit CPPCodeComment ( CodeDocument * doc, const QString & text = "");
+ explicit CPPCodeComment ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -56,23 +56,23 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "//" sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
protected:
diff --git a/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp b/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp
index 833e648e..6328fd3b 100644
--- a/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp
@@ -17,7 +17,7 @@
// own header
#include "cppcodedocumentation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "../codedocument.h"
@@ -28,7 +28,7 @@
// Constructors/Destructors
//
-CPPCodeDocumentation::CPPCodeDocumentation ( CodeDocument * doc, const QString & text )
+CPPCodeDocumentation::CPPCodeDocumentation ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -50,8 +50,8 @@ CPPCodeDocumentation::~CPPCodeDocumentation ( ) { }
/**
* Save the XMI representation of this object
*/
-void CPPCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "cppcodedocumentation" );
+void CPPCodeDocumentation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "cppcodedocumentation" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -60,10 +60,10 @@ void CPPCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root )
/**
* @return QString
*/
-QString CPPCodeDocumentation::toString ( )
+TQString CPPCodeDocumentation::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
@@ -75,9 +75,9 @@ QString CPPCodeDocumentation::toString ( )
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
useDoubleDashOutput = false;
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
if(useDoubleDashOutput)
{
if(!body.isEmpty())
@@ -92,7 +92,7 @@ QString CPPCodeDocumentation::toString ( )
return output;
}
-QString CPPCodeDocumentation::getNewEditorLine ( int amount )
+TQString CPPCodeDocumentation::getNewEditorLine ( int amount )
{
CodeGenerationPolicy * p = UMLApp::app()->getCommonPolicy();
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
@@ -120,20 +120,20 @@ int CPPCodeDocumentation::lastEditableLine() {
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString CPPCodeDocumentation::unformatText ( const QString & text , const QString & indent)
+TQString CPPCodeDocumentation::unformatText ( const TQString & text , const TQString & indent)
{
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
CodeGenerationPolicy * p = UMLApp::app()->getCommonPolicy();
// remove leading or trailing comment stuff
- mytext.remove(QRegExp('^'+indent));
+ mytext.remove(TQRegExp('^'+indent));
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
{
- mytext.remove(QRegExp("^\\/\\*\\*\\s*\n?"));
- mytext.remove(QRegExp("\\s*\\*\\/\\s*\n?$"));
- mytext.remove(QRegExp("^\\s*\\*\\s*"));
+ mytext.remove(TQRegExp("^\\/\\*\\*\\s*\n?"));
+ mytext.remove(TQRegExp("\\s*\\*\\/\\s*\n?$"));
+ mytext.remove(TQRegExp("^\\s*\\*\\s*"));
} else
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/cppcodedocumentation.h b/umbrello/umbrello/codegenerators/cppcodedocumentation.h
index 79bc4fe0..505fc8bb 100644
--- a/umbrello/umbrello/codegenerators/cppcodedocumentation.h
+++ b/umbrello/umbrello/codegenerators/cppcodedocumentation.h
@@ -19,7 +19,7 @@
#ifndef CPPCODEDOCUMENTATION_H
#define CPPCODEDOCUMENTATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class CodeDocument;
@@ -42,7 +42,7 @@ public:
/**
* Constructors
*/
- explicit CPPCodeDocumentation ( CodeDocument * doc, const QString & text = "");
+ explicit CPPCodeDocumentation ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -58,23 +58,23 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the " * " sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp b/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp
index a4acf713..f5d8ec42 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp
@@ -18,9 +18,9 @@
#include "cppcodegenerationform.h"
// qt/kde includes
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qlistview.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqlistview.h>
#include <kfiledialog.h>
#include <kdebug.h>
#include <klocale.h>
@@ -28,38 +28,38 @@
#include <kmessagebox.h>
-CPPCodeGenerationForm::CPPCodeGenerationForm( QWidget *parent, const char *name )
+CPPCodeGenerationForm::CPPCodeGenerationForm( TQWidget *parent, const char *name )
: CPPCodeGenerationFormBase (parent,name)
{
init();
GeneralOptionsListView->addColumn(tr2i18n("General Options"));
- pOptionPackageIsANamespace = new QCheckListItem( GeneralOptionsListView,
+ pOptionPackageIsANamespace = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Package is a namespace"),
- QCheckListItem::CheckBox );
- pOptionVirtualDestructors = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionVirtualDestructors = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Virtual destructors"),
- QCheckListItem::CheckBox );
- pOptionGenerateEmptyConstructors = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionGenerateEmptyConstructors = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Generate empty constructors"),
- QCheckListItem::CheckBox );
- pOptionGenerateAccessorMethods = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionGenerateAccessorMethods = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Generate accessor methods"),
- QCheckListItem::CheckBox );
- pOptionOperationsAreInline = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionOperationsAreInline = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Operations are inline"),
- QCheckListItem::CheckBox );
- pOptionAccessorsAreInline = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionAccessorsAreInline = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Accessors are inline"),
- QCheckListItem::CheckBox );
+ TQCheckListItem::CheckBox );
- pOptionAccessorsArePublic = new QCheckListItem( GeneralOptionsListView,
+ pOptionAccessorsArePublic = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Accessors are public"),
- QCheckListItem::CheckBox );
+ TQCheckListItem::CheckBox );
connect(GeneralOptionsListView,
- SIGNAL(clicked(QListViewItem *)), this,
- SLOT(generalOptionsListViewClicked(QListViewItem *))
+ TQT_SIGNAL(clicked(TQListViewItem *)), this,
+ TQT_SLOT(generalOptionsListViewClicked(TQListViewItem *))
);
}
@@ -70,8 +70,8 @@ CPPCodeGenerationForm::~CPPCodeGenerationForm()
void CPPCodeGenerationForm::browseClicked()
{
- QString button = sender()->name();
- QString file = KFileDialog::getOpenFileName( QString::null, "*.h", this, "Get Header File");
+ TQString button = sender()->name();
+ TQString file = KFileDialog::getOpenFileName( TQString::null, "*.h", this, "Get Header File");
if(file.isEmpty())
return;
@@ -86,7 +86,7 @@ void CPPCodeGenerationForm::browseClicked()
}
}
-void CPPCodeGenerationForm::generalOptionsListViewClicked(QListViewItem *pSender) {
+void CPPCodeGenerationForm::generalOptionsListViewClicked(TQListViewItem *pSender) {
// operations are inline and accessors are operations :)
if (pOptionOperationsAreInline->isOn() && pOptionGenerateAccessorMethods->isOn())
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationform.h b/umbrello/umbrello/codegenerators/cppcodegenerationform.h
index 73441a82..68cbea1f 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationform.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationform.h
@@ -30,7 +30,7 @@ public:
/**
* std ctor
*/
- explicit CPPCodeGenerationForm (QWidget *parent=0, const char *name=0);
+ explicit CPPCodeGenerationForm (TQWidget *parent=0, const char *name=0);
/**
* std dtor
@@ -124,20 +124,20 @@ public slots:
virtual void browseClicked();
private slots:
- virtual void generalOptionsListViewClicked(QListViewItem *);
+ virtual void generalOptionsListViewClicked(TQListViewItem *);
private:
/*
* check boxes for the available options
*/
- QCheckListItem *pOptionPackageIsANamespace;
- QCheckListItem *pOptionVirtualDestructors;
- QCheckListItem *pOptionGenerateEmptyConstructors;
- QCheckListItem *pOptionGenerateAccessorMethods;
- QCheckListItem *pOptionOperationsAreInline;
- QCheckListItem *pOptionAccessorsAreInline;
- QCheckListItem *pOptionAccessorsArePublic;
+ TQCheckListItem *pOptionPackageIsANamespace;
+ TQCheckListItem *pOptionVirtualDestructors;
+ TQCheckListItem *pOptionGenerateEmptyConstructors;
+ TQCheckListItem *pOptionGenerateAccessorMethods;
+ TQCheckListItem *pOptionOperationsAreInline;
+ TQCheckListItem *pOptionAccessorsAreInline;
+ TQCheckListItem *pOptionAccessorsArePublic;
/**
* initialize all attributes
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp
index d0359603..8aec0351 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp
@@ -17,7 +17,7 @@
// own header
#include "cppcodegenerationpolicy.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kconfig.h>
// app includes
@@ -166,38 +166,38 @@ bool CPPCodeGenerationPolicy::getAutoGenerateAccessors( ){
return m_autoGenerateAccessors;
}
-QString CPPCodeGenerationPolicy::getStringClassName() {
+TQString CPPCodeGenerationPolicy::getStringClassName() {
return m_stringClassName;
}
-QString CPPCodeGenerationPolicy::getStringClassNameInclude() {
+TQString CPPCodeGenerationPolicy::getStringClassNameInclude() {
return m_stringClassNameInclude;
}
-QString CPPCodeGenerationPolicy::getVectorClassName() {
+TQString CPPCodeGenerationPolicy::getVectorClassName() {
return m_vectorClassName;
}
-QString CPPCodeGenerationPolicy::getVectorClassNameInclude() {
+TQString CPPCodeGenerationPolicy::getVectorClassNameInclude() {
return m_vectorClassNameInclude;
}
-void CPPCodeGenerationPolicy::setStringClassName(const QString &value) {
+void CPPCodeGenerationPolicy::setStringClassName(const TQString &value) {
m_stringClassName = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-void CPPCodeGenerationPolicy::setStringClassNameInclude(const QString &value) {
+void CPPCodeGenerationPolicy::setStringClassNameInclude(const TQString &value) {
m_stringClassNameInclude = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-void CPPCodeGenerationPolicy::setVectorClassName(const QString &value) {
+void CPPCodeGenerationPolicy::setVectorClassName(const TQString &value) {
m_vectorClassName = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-void CPPCodeGenerationPolicy::setVectorClassNameInclude(const QString &value) {
+void CPPCodeGenerationPolicy::setVectorClassNameInclude(const TQString &value) {
m_vectorClassNameInclude = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
@@ -221,43 +221,43 @@ void CPPCodeGenerationPolicy::setVectorIncludeIsGlobal(bool value) {
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-QString CPPCodeGenerationPolicy::getVectorMethodAppend(const QString & variableName, const QString & itemClassName) {
- QString value = m_vectorMethodAppendBase;
+TQString CPPCodeGenerationPolicy::getVectorMethodAppend(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_vectorMethodAppendBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
-QString CPPCodeGenerationPolicy::getVectorMethodRemove(const QString & variableName, const QString & itemClassName) {
- QString value = m_vectorMethodRemoveBase;
+TQString CPPCodeGenerationPolicy::getVectorMethodRemove(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_vectorMethodRemoveBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
-QString CPPCodeGenerationPolicy::getVectorMethodInit(const QString & variableName, const QString & itemClassName) {
- QString value = m_vectorMethodInitBase;
+TQString CPPCodeGenerationPolicy::getVectorMethodInit(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_vectorMethodInitBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
-QString CPPCodeGenerationPolicy::getObjectMethodInit(const QString & variableName, const QString & itemClassName) {
- QString value = m_objectMethodInitBase;
+TQString CPPCodeGenerationPolicy::getObjectMethodInit(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_objectMethodInitBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
@@ -359,7 +359,7 @@ void CPPCodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSign
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * CPPCodeGenerationPolicy::createPage ( QWidget *parent, const char *name ) {
+CodeGenerationPolicyPage * CPPCodeGenerationPolicy::createPage ( TQWidget *parent, const char *name ) {
return new CPPCodeGenerationPolicyPage ( parent, name, this );
}
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h
index cda5d1f8..69d3490f 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h
@@ -17,7 +17,7 @@
#ifndef CPPCODEGENERATIONPOLICY_H
#define CPPCODEGENERATIONPOLICY_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codegenpolicyext.h"
#include "../codegenerationpolicy.h"
@@ -142,20 +142,20 @@ public:
* of the CPP code. In the next 4 methods, we give accessors that allow getting
* the names of the classes, and their include files for string and vectors.
*/
- QString getStringClassName();
- QString getStringClassNameInclude();
- QString getVectorClassName();
- QString getVectorClassNameInclude();
+ TQString getStringClassName();
+ TQString getStringClassNameInclude();
+ TQString getVectorClassName();
+ TQString getVectorClassNameInclude();
/** determine if the string include is global one */
bool stringIncludeIsGlobal ();
bool vectorIncludeIsGlobal ();
/** also allow setting these parameters! */
- void setStringClassName(const QString &value);
- void setStringClassNameInclude(const QString &value);
- void setVectorClassName(const QString &value);
- void setVectorClassNameInclude(const QString &value);
+ void setStringClassName(const TQString &value);
+ void setStringClassNameInclude(const TQString &value);
+ void setVectorClassName(const TQString &value);
+ void setVectorClassNameInclude(const TQString &value);
/** allow setting of these params */
void setStringIncludeIsGlobal (bool value);
@@ -164,14 +164,14 @@ public:
/** More flexible generation. We want to allow the user to specify how the
* bodies of the vector methods should be auto-generated.
*/
- QString getVectorMethodAppend(const QString & variableName ="", const QString & itemClassName = "");
- QString getVectorMethodRemove(const QString & variableName ="", const QString & itemClassName = "");
- QString getVectorMethodInit(const QString & variableName ="", const QString & itemClassName = "");
+ TQString getVectorMethodAppend(const TQString & variableName ="", const TQString & itemClassName = "");
+ TQString getVectorMethodRemove(const TQString & variableName ="", const TQString & itemClassName = "");
+ TQString getVectorMethodInit(const TQString & variableName ="", const TQString & itemClassName = "");
/** Be somewhat flexible about how new object classes are initialized.
* Not sure if this should be user configureable. For now, it isnt.
*/
- QString getObjectMethodInit(const QString & variableName ="", const QString & itemClassName = "");
+ TQString getObjectMethodInit(const TQString & variableName ="", const TQString & itemClassName = "");
/**
* set the defaults for this code generator from the passed generator.
@@ -192,7 +192,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
protected:
@@ -213,14 +213,14 @@ private:
bool m_stringIncludeIsGlobal;
bool m_vectorIncludeIsGlobal;
- QString m_stringClassName;
- QString m_stringClassNameInclude;
- QString m_vectorClassName;
- QString m_vectorClassNameInclude;
- QString m_vectorMethodAppendBase;
- QString m_vectorMethodRemoveBase;
- QString m_vectorMethodInitBase;
- QString m_objectMethodInitBase;
+ TQString m_stringClassName;
+ TQString m_stringClassNameInclude;
+ TQString m_vectorClassName;
+ TQString m_vectorClassNameInclude;
+ TQString m_vectorMethodAppendBase;
+ TQString m_vectorMethodRemoveBase;
+ TQString m_vectorMethodInitBase;
+ TQString m_objectMethodInitBase;
};
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp
index f05833dc..60d37bac 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp
@@ -19,14 +19,14 @@
// qt/kde includes
#include <kdebug.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kcombobox.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
// app includes
#include "cppcodegenerationformbase.h"
#include "../uml.h"
-CPPCodeGenerationPolicyPage::CPPCodeGenerationPolicyPage( QWidget *parent, const char *name, CPPCodeGenerationPolicy * policy )
+CPPCodeGenerationPolicyPage::CPPCodeGenerationPolicyPage( TQWidget *parent, const char *name, CPPCodeGenerationPolicy * policy )
: CodeGenerationPolicyPage(parent, name, policy)
{
CodeGenerationPolicy *common = UMLApp::app()->getCommonPolicy();
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h
index a1d6633b..eb7aa9ce 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h
@@ -30,7 +30,7 @@ class CPPCodeGenerationPolicyPage : public CodeGenerationPolicyPage {
Q_OBJECT
public:
- explicit CPPCodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, CPPCodeGenerationPolicy * policy = 0);
+ explicit CPPCodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, CPPCodeGenerationPolicy * policy = 0);
virtual ~CPPCodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerator.cpp b/umbrello/umbrello/codegenerators/cppcodegenerator.cpp
index 1130107b..b5c12dd6 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerator.cpp
@@ -18,7 +18,7 @@
#include "cppcodegenerator.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -86,7 +86,7 @@ bool CPPCodeGenerator::getCreateProjectMakefile ( ) {
bool CPPCodeGenerator::addHeaderCodeDocument ( CPPHeaderCodeDocument * doc )
{
- QString tag = doc->getID();
+ TQString tag = doc->getID();
// assign a tag if one doesn't already exist
if(tag.isEmpty())
@@ -108,7 +108,7 @@ bool CPPCodeGenerator::addHeaderCodeDocument ( CPPHeaderCodeDocument * doc )
* Remove a header CodeDocument object from m_headercodedocumentVector List
*/
bool CPPCodeGenerator::removeHeaderCodeDocument ( CPPHeaderCodeDocument * remove_object ) {
- QString tag = remove_object->getID();
+ TQString tag = remove_object->getID();
if(!(tag.isEmpty()))
m_codeDocumentDictionary.remove(tag);
else
@@ -120,7 +120,7 @@ bool CPPCodeGenerator::removeHeaderCodeDocument ( CPPHeaderCodeDocument * remove
// In the C++ version, we need to make both source and header files as well
// as the makefile available.
-CodeViewerDialog * CPPCodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * CPPCodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
@@ -157,14 +157,14 @@ CodeViewerDialog * CPPCodeGenerator::getCodeViewerDialog ( QWidget* parent, Code
// Change the following dataTypes to the ones the user really
// wants in their code. Not yet complete.
-QString CPPCodeGenerator::fixTypeName(const QString &string)
+TQString CPPCodeGenerator::fixTypeName(const TQString &string)
{
return cleanName(string);
}
// special method needed so that we write out the header code documents
-void CPPCodeGenerator::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codegenerator" );
+void CPPCodeGenerator::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codegenerator" );
docElement.setAttribute("language", "C++");
CodeDocumentList * docList = getCodeDocumentList();
@@ -351,11 +351,11 @@ void CPPCodeGenerator::initAttributes ( )
//initFromParentDocument();
}
-QStringList CPPCodeGenerator::defaultDatatypes() {
+TQStringList CPPCodeGenerator::defaultDatatypes() {
return Codegen_Utils::cppDatatypes();
}
-const QStringList CPPCodeGenerator::reservedKeywords() const {
+const TQStringList CPPCodeGenerator::reservedKeywords() const {
return Codegen_Utils::reservedCppKeywords();
}
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerator.h b/umbrello/umbrello/codegenerators/cppcodegenerator.h
index 7104d403..2290c6e3 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerator.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerator.h
@@ -18,7 +18,7 @@
#ifndef CPPCODEGENERATOR_H
#define CPPCODEGENERATOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codedocumentlist.h"
#include "../codeviewerstate.h"
#include "../codegenerator.h"
@@ -65,7 +65,7 @@ public:
// Public attribute accessor methods
//
- QString fixTypeName(const QString &string);
+ TQString fixTypeName(const TQString &string);
/**
* Add a header CodeDocument object from m_headercodedocumentVector List
@@ -88,7 +88,7 @@ public:
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
/**
@@ -104,17 +104,17 @@ public:
/**
* Add C++ primitives as datatypes
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
/**
* Add the default stereotypes for c++ (constructor, int etc)
diff --git a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp
index ea5612c9..868dea41 100644
--- a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp
@@ -25,7 +25,7 @@
//
CPPHeaderClassDeclarationBlock::CPPHeaderClassDeclarationBlock
- ( CPPHeaderCodeDocument * parentDoc, const QString &startText, const QString &endText, const QString &comment)
+ ( CPPHeaderCodeDocument * parentDoc, const TQString &startText, const TQString &endText, const TQString &comment)
: OwnedHierarchicalCodeBlock(parentDoc->getParentClassifier(), parentDoc, startText, endText, comment)
{
init(parentDoc, comment);
@@ -40,7 +40,7 @@ CPPHeaderClassDeclarationBlock::~CPPHeaderClassDeclarationBlock ( ) { }
/**
* load params from the appropriate XMI element node.
*/
-void CPPHeaderClassDeclarationBlock::loadFromXMI ( QDomElement & root )
+void CPPHeaderClassDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -55,8 +55,8 @@ void CPPHeaderClassDeclarationBlock::setAttributesFromObject (TextBlock * obj)
/**
* Save the XMI representation of this object
*/
-void CPPHeaderClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "cppheaderclassdeclarationblock" );
+void CPPHeaderClassDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "cppheaderclassdeclarationblock" );
setAttributesOnNode(doc, blockElement);
@@ -77,9 +77,9 @@ void CPPHeaderClassDeclarationBlock::updateContent ( )
CPPHeaderCodeDocument *parentDoc = dynamic_cast<CPPHeaderCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
- QString CPPHeaderClassName = CodeGenerator::cleanName(c->getName());
+ TQString CPPHeaderClassName = CodeGenerator::cleanName(c->getName());
bool forceDoc = UMLApp::app()->getCommonPolicy()->getCodeVerboseDocumentComments();
// COMMENT
@@ -106,7 +106,7 @@ void CPPHeaderClassDeclarationBlock::updateContent ( )
// Now set START/ENDING Text
- QString startText = "";
+ TQString startText = "";
/*
*/
@@ -144,7 +144,7 @@ void CPPHeaderClassDeclarationBlock::updateContent ( )
}
-void CPPHeaderClassDeclarationBlock::init (CPPHeaderCodeDocument *parentDoc, const QString &comment)
+void CPPHeaderClassDeclarationBlock::init (CPPHeaderCodeDocument *parentDoc, const TQString &comment)
{
setComment(new CPPCodeDocumentation(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h
index 683f0475..0710560f 100644
--- a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h
@@ -17,7 +17,7 @@
#ifndef CPPHEADERCLASSDECLARATIONBLOCK_H
#define CPPHEADERCLASSDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "cppheadercodedocument.h"
#include "../ownedhierarchicalcodeblock.h"
@@ -33,7 +33,7 @@ public:
/**
* Empty Constructor
*/
- explicit CPPHeaderClassDeclarationBlock ( CPPHeaderCodeDocument * parentDoc, const QString &start = "", const QString &endText = "}", const QString &comment = "");
+ explicit CPPHeaderClassDeclarationBlock ( CPPHeaderCodeDocument * parentDoc, const TQString &start = "", const TQString &endText = "}", const TQString &comment = "");
/**
* Empty Destructor
@@ -43,9 +43,9 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
@@ -60,7 +60,7 @@ protected:
private:
- void init (CPPHeaderCodeDocument * parent, const QString &comment);
+ void init (CPPHeaderCodeDocument * parent, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp
index 0ab67b85..d96ad398 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp
@@ -62,9 +62,9 @@ void CPPHeaderCodeAccessorMethod::updateContent( )
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getAccessorsAreInline( );
Uml::Visibility scope = parentField->getVisibility();
- QString variableName = cppfield->getFieldName();
- QString itemClassName = cppfield->getTypeName();
- QString text;
+ TQString variableName = cppfield->getFieldName();
+ TQString itemClassName = cppfield->getTypeName();
+ TQString text;
if(isInlineMethod) {
switch(getType()) {
@@ -100,18 +100,18 @@ void CPPHeaderCodeAccessorMethod::updateMethodDeclaration()
bool isInlineMethod = policy->getAccessorsAreInline( );
- QString vectorClassName = policy->getVectorClassName();
- QString fieldName = cppfield->getFieldName();
- QString fieldType = cppfield->getTypeName();
- QString objectType = cppfield->getListObjectType();
+ TQString vectorClassName = policy->getVectorClassName();
+ TQString fieldName = cppfield->getFieldName();
+ TQString fieldType = cppfield->getTypeName();
+ TQString objectType = cppfield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString methodReturnType = "void";
- QString methodName;
- QString methodParams;
- QString headerText;
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString methodReturnType = "void";
+ TQString methodName;
+ TQString methodParams;
+ TQString headerText;
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
switch(getType()) {
case CodeAccessorMethod::ADD:
@@ -152,12 +152,12 @@ void CPPHeaderCodeAccessorMethod::updateMethodDeclaration()
setComment(header);
// set start/end method text
- QString startText = methodReturnType + ' ' + methodName + " (" + methodParams +')';
+ TQString startText = methodReturnType + ' ' + methodName + " (" + methodParams +')';
if (isInlineMethod)
startText += " {";
else
startText += ';';
- QString endText = (isInlineMethod ? "}" : "");
+ TQString endText = (isInlineMethod ? "}" : "");
setStartMethodText(startText);
setEndMethodText(endText);
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h
index 7b39fc6d..dea417fc 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h
@@ -18,7 +18,7 @@
#include "../codeaccessormethod.h"
-#include <qstring.h>
+#include <tqstring.h>
class CodeClassField;
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp
index 0fdfeb0a..3f15d05b 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp
@@ -50,7 +50,7 @@ void CPPHeaderCodeClassFieldDeclarationBlock::updateContent( )
CPPCodeClassField * hcppcf = dynamic_cast<CPPCodeClassField*>(cf);
// Set the comment
- QString notes = umlparent->getDoc();
+ TQString notes = umlparent->getDoc();
getComment()->setText(notes);
if(notes.isEmpty())
getComment()->setWriteOutText(false);
@@ -59,15 +59,15 @@ void CPPHeaderCodeClassFieldDeclarationBlock::updateContent( )
// Set the body
- QString staticValue = umlparent->getStatic() ? "static " : "";
- QString typeName = hcppcf->getTypeName();
- QString fieldName = hcppcf->getFieldName();
+ TQString staticValue = umlparent->getStatic() ? "static " : "";
+ TQString typeName = hcppcf->getTypeName();
+ TQString fieldName = hcppcf->getFieldName();
// Ugh. Sloppy exception.
if (!cf->parentIsAttribute() && !cf->fieldIsSingleValue())
typeName = hcppcf->getListFieldClassName();
- QString body = staticValue + ' ' + typeName + ' ' + fieldName + ';';
+ TQString body = staticValue + ' ' + typeName + ' ' + fieldName + ';';
setText(body);
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h
index 755507c6..6a77047c 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h
@@ -16,7 +16,7 @@
#ifndef CPPHEADERCODECLASSFIELDDECLARATIONBLOCK_H
#define CPPHEADERCODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp b/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp
index fe909c5d..2c471667 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp
@@ -30,7 +30,7 @@
#include "cppheadercodedocument.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -106,25 +106,25 @@ CPPHeaderClassDeclarationBlock * CPPHeaderCodeDocument::getClassDecl()
// is so we can create the CPPHeaderClassDeclarationBlock.
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
-void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new CPPCodeDocumentation(this);
@@ -139,7 +139,7 @@ void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -185,7 +185,7 @@ void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -315,9 +315,9 @@ bool CPPHeaderCodeDocument::addCodeOperation (CodeOperation * op )
* @return bool status of save
*/
/*
-void CPPHeaderCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root )
+void CPPHeaderCodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root )
{
- QDomElement docElement = doc.createElement( "" );
+ TQDomElement docElement = doc.createElement( "" );
setAttributesOnNode(doc, docElement);
@@ -373,7 +373,7 @@ void CPPHeaderCodeDocument::updateContent( )
bool isInterface = parentIsInterface();
bool hasclassFields = hasClassFields();
bool forcedoc = UMLApp::app()->getCommonPolicy()->getCodeVerboseDocumentComments();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
UMLClassifierList superclasses = c->findSuperClassConcepts();
@@ -382,9 +382,9 @@ void CPPHeaderCodeDocument::updateContent( )
//
// Write the hash define stuff to prevent multiple parsing/inclusion of header
- QString cppClassName = CodeGenerator::cleanName(c->getName());
- QString hashDefine = CodeGenerator::cleanName(c->getName().upper().simplifyWhiteSpace());
- QString defText = "#ifndef "+hashDefine + "_H"+ endLine + "#define "+ hashDefine + "_H";
+ TQString cppClassName = CodeGenerator::cleanName(c->getName());
+ TQString hashDefine = CodeGenerator::cleanName(c->getName().upper().simplifyWhiteSpace());
+ TQString defText = "#ifndef "+hashDefine + "_H"+ endLine + "#define "+ hashDefine + "_H";
addOrUpdateTaggedCodeBlockWithComments("hashDefBlock", defText, "", 0, false);
// INCLUDE CODEBLOCK
@@ -392,23 +392,23 @@ void CPPHeaderCodeDocument::updateContent( )
// Q: Why all utils? Isnt just List and Vector the only classes we are using?
// A: doesn't matter at all; its more readable to just include '*' and cpp compilers
// don't slow down or anything. (TZ)
- QString includeStatement = "";
+ TQString includeStatement = "";
bool stringGlobal = policy->stringIncludeIsGlobal();
- QString sStartBrak = stringGlobal ? "<" : "\"";
- QString sEndBrak = stringGlobal ? ">" : "\"";
+ TQString sStartBrak = stringGlobal ? "<" : "\"";
+ TQString sEndBrak = stringGlobal ? ">" : "\"";
includeStatement.append("#include "+sStartBrak+policy->getStringClassNameInclude()+sEndBrak+endLine);
if ( hasObjectVectorClassFields() )
{
bool vecGlobal = policy->vectorIncludeIsGlobal();
- QString vStartBrak = vecGlobal ? "<" : "\"";
- QString vEndBrak = vecGlobal ? ">" : "\"";
- QString value ="#include "+vStartBrak+policy->getVectorClassNameInclude()+vEndBrak;
+ TQString vStartBrak = vecGlobal ? "<" : "\"";
+ TQString vEndBrak = vecGlobal ? ">" : "\"";
+ TQString value ="#include "+vStartBrak+policy->getVectorClassNameInclude()+vEndBrak;
includeStatement.append(value+endLine);
}
//only include classes in a different package from this class
UMLPackageList includes;
- QMap<UMLPackage *,QString> packageMap; // so we don't repeat packages
+ TQMap<UMLPackage *,TQString> packageMap; // so we don't repeat packages
CodeGenerator::findObjectsRelated(c,includes);
for(UMLPackage *con = includes.first(); con ; con = includes.next())
@@ -419,14 +419,14 @@ void CPPHeaderCodeDocument::updateContent( )
includeStatement.append("#include \""+CodeGenerator::cleanName(con->getName().lower())+".h\""+endLine);
}
// now, add/update the includes codeblock
- CodeBlockWithComments * inclBlock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString::null, 0, false);
+ CodeBlockWithComments * inclBlock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, TQString::null, 0, false);
if(includeStatement.isEmpty() && inclBlock->getContentType() == CodeBlock::AutoGenerated)
inclBlock->setWriteOutText(false);
else
inclBlock->setWriteOutText(true);
// Using
- QString usingStatement;
+ TQString usingStatement;
for(UMLClassifier *classifier = superclasses.first(); classifier ; classifier = superclasses.next()) {
if(classifier->getPackage()!=c->getPackage() && !classifier->getPackage().isEmpty()) {
usingStatement.append("using "+CodeGenerator::cleanName(c->getPackage())+"::"+cleanName(c->getName())+';'+endLine);
@@ -452,13 +452,13 @@ void CPPHeaderCodeDocument::updateContent( )
namespaceBlock = getHierarchicalCodeBlock("namespace", "Namespace", 0);
if(hasNamespace) {
UMLPackageList pkgList = c->getPackages();
- QString pkgs;
+ TQString pkgs;
UMLPackage *pkg;
for (pkg = pkgList.first(); pkg != NULL; pkg = pkgList.next()) {
pkgs += "namespace " + CodeGenerator::cleanName(pkg->getName()) + " { ";
}
namespaceBlock->setStartText(pkgs);
- QString closingBraces;
+ TQString closingBraces;
for (pkg = pkgList.first(); pkg != NULL; pkg = pkgList.next()) {
closingBraces += "} ";
}
@@ -472,8 +472,8 @@ void CPPHeaderCodeDocument::updateContent( )
// Enum types for include
if (!isInterface) {
- QString enumStatement;
- QString indent = UMLApp::app()->getCommonPolicy()->getIndentation();
+ TQString enumStatement;
+ TQString indent = UMLApp::app()->getCommonPolicy()->getIndentation();
UMLEnum* e = dynamic_cast<UMLEnum*>(c);
if (e) {
enumStatement.append(indent + "enum " + cppClassName + " {" + endLine);
@@ -659,7 +659,7 @@ void CPPHeaderCodeDocument::updateContent( )
// meta-data to state what the scope of this method is, we will make it
// "public" as a default. This might present problems if the user wants
// to move the block into the "private" or "protected" blocks.
- QString emptyConstStatement = cppClassName + " ( ) { }";
+ TQString emptyConstStatement = cppClassName + " ( ) { }";
// search for this first in the entire document. IF not present, put
// it in the public constructor method block
@@ -804,7 +804,7 @@ void CPPHeaderCodeDocument::updateContent( )
// in the right place using the "addCodeOperation" method we defined in this class
// FINISH up with hash def block close
- QString defTextEnd = "#endif //"+hashDefine + "_H";
+ TQString defTextEnd = "#endif //"+hashDefine + "_H";
addOrUpdateTaggedCodeBlockWithComments("hashDefBlockEnd", defTextEnd, "", 0, false);
}
diff --git a/umbrello/umbrello/codegenerators/cppheadercodedocument.h b/umbrello/umbrello/codegenerators/cppheadercodedocument.h
index ca75627f..ed7723d0 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodedocument.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodedocument.h
@@ -17,7 +17,7 @@
#ifndef CPPHEADERCODEDOCUMENT_H
#define CPPHEADERCODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfieldlist.h"
#include "../classifiercodedocument.h"
@@ -57,7 +57,7 @@ public:
/**
* Save the XMI representation of this object
*/
- //virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ //virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
protected:
@@ -68,7 +68,7 @@ protected:
* need to overwrite this for cpp header since we need to pick up the
* header class declaration block.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, CPPHeaderClassDeclarationBlock * codeBlock);
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp b/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp
index ca8ad727..471c7734 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp
@@ -26,7 +26,7 @@
//
CPPHeaderCodeOperation::CPPHeaderCodeOperation
- ( CPPHeaderCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+ ( CPPHeaderCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -75,10 +75,10 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getOperationsAreInline( );
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
// first, the comment on the operation, IF its autogenerated/empty
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
if(comment.isEmpty() && getContentType() == CodeBlock::AutoGenerated)
{
UMLAttributeList parameters = o->getParmList();
@@ -90,9 +90,9 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
}
// no return type for constructors
- QString methodReturnType = o->getTypeName();
- QString methodName = o->getName();
- QString paramStr = QString("");
+ TQString methodReturnType = o->getTypeName();
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -100,9 +100,9 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
- QString initialValue = parm->getInitialValue();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
+ TQString initialValue = parm->getInitialValue();
paramStr += rType + ' ' + paramName;
if(!initialValue.isEmpty())
paramStr += '=' + initialValue;
@@ -117,13 +117,13 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
if (o->isLifeOperation()) // constructor/destructor has no type
methodReturnType = "";
else if (methodReturnType.isEmpty()) // this operation should be 'void'
- methodReturnType = QString("void");
+ methodReturnType = TQString("void");
// set start/end method text
- QString prototype = methodReturnType+' '+methodName+" ("+paramStr+')';
+ TQString prototype = methodReturnType+' '+methodName+" ("+paramStr+')';
- QString startText;
- QString endText;
+ TQString startText;
+ TQString endText;
applyStereotypes (prototype, o, isInlineMethod, isInterface, startText, endText);
@@ -140,9 +140,9 @@ int CPPHeaderCodeOperation::lastEditableLine() {
return 0;
}
-void CPPHeaderCodeOperation::applyStereotypes (QString& prototype, UMLOperation * pOp,
+void CPPHeaderCodeOperation::applyStereotypes (TQString& prototype, UMLOperation * pOp,
bool inlinePolicy, bool interface,
- QString& start, QString& end)
+ TQString& start, TQString& end)
{
// if the class is an interface, all methods will be declared as pure
// virtual functions
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeoperation.h b/umbrello/umbrello/codegenerators/cppheadercodeoperation.h
index 1d4fbca7..18b7f33f 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeoperation.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodeoperation.h
@@ -18,7 +18,7 @@
#ifndef CPPHEADERCODEOPERATION_H
#define CPPHEADERCODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class CPPHeaderCodeDocument;
@@ -35,7 +35,7 @@ public:
* Constructor
*/
CPPHeaderCodeOperation ( CPPHeaderCodeDocument * doc, UMLOperation * op,
- const QString & body = "", const QString & comment = "");
+ const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
@@ -52,7 +52,7 @@ protected:
/**
* Check to see if we have a valid stereotype to apply in the operation
*/
- virtual void applyStereotypes (QString&, UMLOperation *, bool, bool, QString&, QString&);
+ virtual void applyStereotypes (TQString&, UMLOperation *, bool, bool, TQString&, TQString&);
};
diff --git a/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp b/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp
index d13152b4..33f945ae 100644
--- a/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp
@@ -17,7 +17,7 @@
#include "cppcodegenerator.h"
-#include <qregexp.h>
+#include <tqregexp.h>
const char * CPPMakefileCodeDocument::DOCUMENT_ID_VALUE = "Makefile_DOC";
@@ -49,24 +49,24 @@ void CPPMakefileCodeDocument::updateContent( ) {
/**
* @return QString
*/
-QString CPPMakefileCodeDocument::toString ( ) {
+TQString CPPMakefileCodeDocument::toString ( ) {
return "# cpp make build document";
}
// We overwritten by CPP language implementation to get lowercase path
-QString CPPMakefileCodeDocument::getPath ( )
+TQString CPPMakefileCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"),"/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"),"/");
path.lower();
diff --git a/umbrello/umbrello/codegenerators/cppmakecodedocument.h b/umbrello/umbrello/codegenerators/cppmakecodedocument.h
index 98efe272..1b1c109b 100644
--- a/umbrello/umbrello/codegenerators/cppmakecodedocument.h
+++ b/umbrello/umbrello/codegenerators/cppmakecodedocument.h
@@ -20,7 +20,7 @@
#define CPPMAKECODEDOCUMENT_H
#include "../codedocument.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
* class CPPMakefileCodeDocument
@@ -50,9 +50,9 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
- QString getPath ( );
+ TQString getPath ( );
void updateContent();
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp
index da2a86cb..c71f6d2a 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp
@@ -62,9 +62,9 @@ void CPPSourceCodeAccessorMethod::updateContent( )
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getAccessorsAreInline( );
- QString variableName = cppfield->getFieldName();
- QString itemClassName = cppfield->getTypeName();
- QString text;
+ TQString variableName = cppfield->getFieldName();
+ TQString itemClassName = cppfield->getTypeName();
+ TQString text;
if(isInlineMethod) {
switch(getType()) {
@@ -101,19 +101,19 @@ void CPPSourceCodeAccessorMethod::updateMethodDeclaration()
bool isInlineMethod = policy->getAccessorsAreInline( );
- QString vectorClassName = policy->getVectorClassName();
- QString fieldName = cppfield->getFieldName();
- QString fieldType = cppfield->getTypeName();
- QString objectType = cppfield->getListObjectType();
+ TQString vectorClassName = policy->getVectorClassName();
+ TQString fieldName = cppfield->getFieldName();
+ TQString fieldType = cppfield->getTypeName();
+ TQString objectType = cppfield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString methodReturnType = "void";
- QString methodName;
- QString methodParams;
- QString headerText;
- QString className = CodeGenerator::cleanName(c->getName());
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString methodReturnType = "void";
+ TQString methodName;
+ TQString methodParams;
+ TQString headerText;
+ TQString className = CodeGenerator::cleanName(c->getName());
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
switch(getType()) {
case CodeAccessorMethod::ADD:
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h
index 60d9c369..7c4088e9 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h
@@ -16,7 +16,7 @@
#ifndef CPPSOURCECODEACCESSORMETHOD_H
#define CPPSOURCECODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeaccessormethod.h"
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp
index 7d60b1c3..016249e5 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp
@@ -48,18 +48,18 @@ void CPPSourceCodeClassFieldDeclarationBlock::updateContent( )
CPPClassifierCodeDocument* jdoc = dynamic_cast<CPPClassifierCodeDocument*>(doc);
// Set the comment
- QString notes = getParentObject()->getDoc();
+ TQString notes = getParentObject()->getDoc();
getComment()->setText(notes);
// Set the body
- QString staticValue = getParentObject()->getStatic() ? "static " : "";
- QString scopeStr = getParentObject()->getVisibility().toString();
+ TQString staticValue = getParentObject()->getStatic() ? "static " : "";
+ TQString scopeStr = getParentObject()->getVisibility().toString();
- QString typeName = jcf->getTypeName();
- QString fieldName = jcf->getFieldName();
- QString initialV = jcf->getInitialValue();
+ TQString typeName = jcf->getTypeName();
+ TQString fieldName = jcf->getFieldName();
+ TQString initialV = jcf->getInitialValue();
- QString body = staticValue+scopeStr+" "+typeName+" "+fieldName;
+ TQString body = staticValue+scopeStr+" "+typeName+" "+fieldName;
if (!initialV.isEmpty())
body.append(" = " + initialV);
setText(body+";");
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h
index e5b908a0..a27c0684 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h
@@ -16,7 +16,7 @@
#ifndef CPPSOURCECODECLASSFIELDDECLARATIONBLOCK_H
#define CPPSOURCECODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp b/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp
index be054937..3caefe82 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp
@@ -29,7 +29,7 @@
#include "cppsourcecodedocument.h"
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// app includes
#include "cppcodegenerator.h"
#include "cppcodegenerationpolicy.h"
@@ -58,7 +58,7 @@ CPPSourceCodeDocument::~CPPSourceCodeDocument ( ) { }
// Other methods
//
-QString CPPSourceCodeDocument::getCPPClassName (const QString &name) {
+TQString CPPSourceCodeDocument::getCPPClassName (const TQString &name) {
return CodeGenerator::cleanName(name);
}
@@ -119,7 +119,7 @@ void CPPSourceCodeDocument::updateContent( )
//UMLClassifier * c = getParentClassifier();
CodeGenPolicyExt *pe = UMLApp::app()->getPolicyExt();
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
// first, set the global flag on whether or not to show classfield info
CodeClassFieldList * cfList = getCodeClassFieldList();
@@ -140,11 +140,11 @@ void CPPSourceCodeDocument::updateContent( )
//
// INCLUDE CODEBLOCK
- QString includeStatement = "";
+ TQString includeStatement = "";
// Include own header file
- QString myOwnName( getParentClassifier()->getName() );
+ TQString myOwnName( getParentClassifier()->getName() );
includeStatement.append("#include \""+CodeGenerator::cleanName(myOwnName.lower())+".h\""+endLine);
- CodeBlockWithComments * iblock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString::null, 0, false);
+ CodeBlockWithComments * iblock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, TQString::null, 0, false);
iblock->setWriteOutText(true);
// After the includes we have just 2 big blocks basically, the "constructor" block and the
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodedocument.h b/umbrello/umbrello/codegenerators/cppsourcecodedocument.h
index 8ca59c95..09ee93e6 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodedocument.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodedocument.h
@@ -17,7 +17,7 @@
#ifndef CPPSOURCECODEDOCUMENT_H
#define CPPSOURCECODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../classifiercodedocument.h"
#include "../hierarchicalcodeblock.h"
@@ -57,7 +57,7 @@ protected:
void resetTextBlocks();
// a little utility method to save us some work
- QString getCPPClassName (const QString &name);
+ TQString getCPPClassName (const TQString &name);
void updateContent();
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp
index 0d8115b6..61b1950e 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp
@@ -25,7 +25,7 @@
// Constructors/Destructors
//
-CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -45,13 +45,13 @@ CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UM
bool isInlineMethod = policy->getOperationsAreInline( );
// first, the comment on the operation
- QString cmnt = o->getDoc();
+ TQString cmnt = o->getDoc();
getComment()->setText(cmnt);
- QString returnType = o->getTypeName();
- QString methodName = o->getName();
- QString paramStr = QString("");
- QString className = CodeGenerator::cleanName(c->getName());
+ TQString returnType = o->getTypeName();
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
+ TQString className = CodeGenerator::cleanName(c->getName());
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -59,8 +59,8 @@ CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UM
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
paramStr += rType + ' ' + paramName;
paramNum++;
@@ -74,9 +74,9 @@ CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UM
// if an operation isn't a constructor/destructor and it has no return type
// this operation should be void
else if (returnType.isEmpty())
- returnType = QString("void");
+ returnType = TQString("void");
- QString startText = returnType + ' ';
+ TQString startText = returnType + ' ';
// if a property has a friend stereotype, the operation should
// not be a class name
@@ -135,13 +135,13 @@ void CPPSourceCodeOperation::updateMethodDeclaration()
bool isInlineMethod = policy->getOperationsAreInline( );
// first, the comment on the operation
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
getComment()->setText(comment);
- QString returnType = o->getTypeName();
- QString methodName = o->getName();
- QString paramStr = QString("");
- QString className = CodeGenerator::cleanName(c->getName());
+ TQString returnType = o->getTypeName();
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
+ TQString className = CodeGenerator::cleanName(c->getName());
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -149,8 +149,8 @@ void CPPSourceCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
paramStr += rType + ' ' + paramName;
paramNum++;
@@ -164,9 +164,9 @@ void CPPSourceCodeOperation::updateMethodDeclaration()
// if an operation isn't a constructor/destructor and it has no return type
// this operation should be void
else if (returnType.isEmpty())
- returnType = QString("void");
+ returnType = TQString("void");
- QString startText = returnType + ' ';
+ TQString startText = returnType + ' ';
// if a property has a friend stereotype, the operation should
// not be a class name
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h
index e2112178..95073eea 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h
@@ -18,7 +18,7 @@
#ifndef CPPSOURCECODEOPERATION_H
#define CPPSOURCECODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class CPPSourceCodeDocument;
@@ -34,7 +34,7 @@ public:
/**
* Empty Constructor
*/
- CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation * op, const QString & body = "", const QString & comment = "");
+ CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation * op, const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
diff --git a/umbrello/umbrello/codegenerators/cppwriter.cpp b/umbrello/umbrello/codegenerators/cppwriter.cpp
index b24c12b0..ab2b8fcb 100644
--- a/umbrello/umbrello/codegenerators/cppwriter.cpp
+++ b/umbrello/umbrello/codegenerators/cppwriter.cpp
@@ -19,9 +19,9 @@
// own header
#include "cppwriter.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "classifierinfo.h"
@@ -50,7 +50,7 @@ CppWriter::CppWriter()
// and "%ITEMCLASS%", if needed, where the class of the item is declared.
VECTOR_METHOD_APPEND = "%VARNAME%.push_back(add_object);"; // for std::vector
VECTOR_METHOD_REMOVE = "int i, size = %VARNAME%.size();\nfor ( i = 0; i < size; i++) {\n\t%ITEMCLASS% item = %VARNAME%.at(i);\n\tif(item == remove_object) {\n\t\tvector<%ITEMCLASS%>::iterator it = %VARNAME%.begin() + i;\n\t\t%VARNAME%.erase(it);\n\t\treturn;\n\t}\n }"; // for std::vector
- VECTOR_METHOD_INIT = QString(); // nothing to be done
+ VECTOR_METHOD_INIT = TQString(); // nothing to be done
/*
VECTOR_METHOD_APPEND = "%VARNAME%.append(&add_object);"; // Qt lib implementation
VECTOR_METHOD_REMOVE = "%VARNAME%.removeRef(&remove_object);"; // Qt lib implementation
@@ -82,10 +82,10 @@ void CppWriter::writeClass(UMLClassifier *c)
return;
}
- QFile fileh, filecpp;
+ TQFile fileh, filecpp;
// find an appropriate name for our file
- QString fileName = findFileName(c, ".h");
+ TQString fileName = findFileName(c, ".h");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
@@ -113,7 +113,7 @@ void CppWriter::writeClass(UMLClassifier *c)
need_impl = false;
}
if (need_impl) {
- fileName.replace( QRegExp(".h$"), ".cpp");
+ fileName.replace( TQRegExp(".h$"), ".cpp");
if( !openFile(filecpp, fileName)) {
emit codeGenerated(c, false);
return;
@@ -130,24 +130,24 @@ void CppWriter::writeClass(UMLClassifier *c)
}
-void CppWriter::writeHeaderFile (UMLClassifier *c, QFile &fileh) {
+void CppWriter::writeHeaderFile (UMLClassifier *c, TQFile &fileh) {
// open stream for writing
- QTextStream h (&fileh);
+ TQTextStream h (&fileh);
// up the indent level to one
m_indentLevel = 1;
// write header blurb
- QString str = getHeadingFile(".h");
+ TQString str = getHeadingFile(".h");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),m_classifierInfo->fileName + ".h");
- str.replace(QRegExp("%filepath%"),fileh.name());
+ str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".h");
+ str.replace(TQRegExp("%filepath%"),fileh.name());
h << str<< m_endl;
}
// Write the hash define stuff to prevent multiple parsing/inclusion of header
- QString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().replace(QRegExp(" "), "_");
+ TQString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().replace(TQRegExp(" "), "_");
writeBlankLine(h);
h << "#ifndef "<< hashDefine + "_H" << m_endl;
h << "#define "<< hashDefine + "_H" << m_endl;
@@ -159,7 +159,7 @@ void CppWriter::writeHeaderFile (UMLClassifier *c, QFile &fileh) {
}
-void CppWriter::writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream)
+void CppWriter::writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream)
{
// attributes
@@ -180,7 +180,7 @@ void CppWriter::writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility
}
-void CppWriter::writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream)
+void CppWriter::writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream)
{
// attributes
writeAttributeDecls(permitScope, true, stream); // write static attributes first
@@ -194,20 +194,20 @@ void CppWriter::writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitSco
}
-void CppWriter::writeSourceFile (UMLClassifier *c, QFile &filecpp ) {
+void CppWriter::writeSourceFile (UMLClassifier *c, TQFile &filecpp ) {
// open stream for writing
- QTextStream cpp (&filecpp);
+ TQTextStream cpp (&filecpp);
// set the starting indentation at zero
m_indentLevel = 0;
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".cpp");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),m_classifierInfo->fileName + ".cpp");
- str.replace(QRegExp("%filepath%"),filecpp.name());
+ str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".cpp");
+ str.replace(TQRegExp("%filepath%"),filecpp.name());
cpp << str << m_endl;
}
@@ -233,7 +233,7 @@ void CppWriter::writeSourceFile (UMLClassifier *c, QFile &filecpp ) {
//
// write comment for section IF needed
- QString indent = getIndent();
+ TQString indent = getIndent();
if (forceDoc() || m_classifierInfo->hasAccessorMethods || m_classifierInfo->hasOperationMethods)
{
@@ -323,11 +323,11 @@ void CppWriter::writeSourceFile (UMLClassifier *c, QFile &filecpp ) {
}
-void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
+void CppWriter::writeClassDecl(UMLClassifier *c, TQTextStream &cpp)
{
UMLClassifierList superclasses = m_classifierInfo->superclasses;
for(UMLClassifier *classifier = superclasses.first(); classifier ;classifier = superclasses.next()) {
- QString headerName = findFileName(classifier, ".h");
+ TQString headerName = findFileName(classifier, ".h");
if (!headerName.isEmpty()) {
cpp << "#include \"" << headerName << "\"" << m_endl;
}
@@ -386,7 +386,7 @@ void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
uint i = 0;
cpp << "enum " << m_classifierInfo->className << " {" << m_endl;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
cpp << getIndent() << enumLiteral;
if (++i < litList.count())
cpp << ",";
@@ -403,8 +403,8 @@ void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
if (template_params.count()) {
cpp << "template<";
for (UMLTemplate *t = template_params.first(); t; ) {
- QString formalName = t->getName();
- QString typeName = t->getTypeName();
+ TQString formalName = t->getName();
+ TQString typeName = t->getTypeName();
cpp << typeName << " " << formalName;
if ((t = template_params.next()) != NULL)
cpp << ", ";
@@ -471,7 +471,7 @@ void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
}
-void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, QTextStream &stream )
+void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream )
{
if(m_classifierInfo->isInterface)
@@ -506,8 +506,8 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
//write documentation
if(forceDoc() || list->count() > 0)
{
- QString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
- QString strStatic = writeStatic ? "Static ":"";
+ TQString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
+ TQString strStatic = writeStatic ? "Static ":"";
writeComment(strStatic + strVis + " attributes",getIndent(), stream);
writeComment(" ",getIndent(), stream);
writeBlankLine(stream);
@@ -517,7 +517,7 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
// write attrib declarations now
bool isFirstAttrib = true;
- QString documentation;
+ TQString documentation;
for(UMLAttribute *at=list->first(); at; at=list->next())
{
@@ -531,10 +531,10 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
isFirstAttrib = false;
- QString varName = getAttributeVariableName(at);
+ TQString varName = getAttributeVariableName(at);
- QString staticValue = at->getStatic() ? "static " : "";
- QString typeName = fixTypeName(at->getTypeName());
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString typeName = fixTypeName(at->getTypeName());
if(!documentation.isEmpty())
writeComment(documentation, getIndent(), stream);
stream << getIndent() << staticValue << typeName << " " << varName << ";" << m_endl;
@@ -550,7 +550,7 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
}
-void CppWriter::writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, QTextStream &stream )
+void CppWriter::writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream )
{
// check the current policy about generate accessors as public
UMLAttributeList * list;
@@ -596,7 +596,7 @@ void CppWriter::writeHeaderAttributeAccessorMethods (Uml::Visibility visibility,
void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
Uml::Visibility visibility, bool isHeaderMethod,
bool isStatic,
- bool writeMethodBody, QTextStream &stream)
+ bool writeMethodBody, TQTextStream &stream)
{
if (!policyExt()->getAutoGenerateAccessors())
@@ -604,8 +604,8 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
if (forceDoc() || attribs->count() > 0)
{
- QString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
- QString strStatic = (isStatic ? " static" : "");
+ TQString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
+ TQString strStatic = (isStatic ? " static" : "");
writeBlankLine(stream);
writeComment(strVis + strStatic + " attribute accessor methods",getIndent(),stream);
writeComment(" ",getIndent(), stream);
@@ -620,8 +620,8 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
for(at=attribs->first(); at; at=attribs->next())
{
- QString varName = getAttributeVariableName(at);
- QString methodBaseName = cleanName(at->getName());
+ TQString varName = getAttributeVariableName(at);
+ TQString methodBaseName = cleanName(at->getName());
// force capitalizing the field name, this is silly,
// from what I can tell, this IS the default behavior for
@@ -636,14 +636,14 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
}
-void CppWriter::writeComment(const QString &comment, const QString &myIndent, QTextStream &cpp)
+void CppWriter::writeComment(const TQString &comment, const TQString &myIndent, TQTextStream &cpp)
{
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
- if (comment.contains(QRegExp("\n"))) {
+ if (comment.contains(TQRegExp("\n"))) {
- QStringList lines = QStringList::split( "\n", comment);
+ TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
{
cpp << myIndent << "// " << lines[i] << m_endl;
@@ -655,10 +655,10 @@ void CppWriter::writeComment(const QString &comment, const QString &myIndent, QT
}
}
-void CppWriter::writeDocumentation(QString header, QString body, QString end, QTextStream &cpp)
+void CppWriter::writeDocumentation(TQString header, TQString body, TQString end, TQTextStream &cpp)
{
writeBlankLine(cpp);
- QString indent = getIndent();
+ TQString indent = getIndent();
cpp << indent << "/**" << m_endl;
if (!header.isEmpty())
@@ -667,14 +667,14 @@ void CppWriter::writeDocumentation(QString header, QString body, QString end, QT
cpp << formatDoc(body, indent + " * ");
if (!end.isEmpty())
{
- QStringList lines = QStringList::split( "\n", end);
+ TQStringList lines = TQStringList::split( "\n", end);
for(uint i= 0; i < lines.count(); i++)
cpp << formatDoc(lines[i], indent + " * ");
}
cpp << indent << " */" << m_endl;
}
-void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permitScope, Uml::IDType id, QTextStream &h)
+void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permitScope, Uml::IDType id, TQTextStream &h)
{
if( forceSections() || !associations.isEmpty() )
@@ -699,14 +699,14 @@ void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visi
if (printRoleB && a->getVisibility(Uml::B) == permitScope)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B), a->getMulti(Uml::B), a->getRoleDoc(Uml::B), h);
}
// print RoleA decl
if (printRoleA && a->getVisibility(Uml::A) == permitScope)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A), a->getMulti(Uml::A), a->getRoleDoc(Uml::A), h);
}
@@ -717,15 +717,15 @@ void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visi
}
}
-void CppWriter::writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, QTextStream &stream)
+void CppWriter::writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, TQTextStream &stream)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
if (roleName.isEmpty())
return;
- QString indent = getIndent();
+ TQString indent = getIndent();
// always put space between this and prior decl, if any
writeBlankLine(stream);
@@ -736,14 +736,14 @@ void CppWriter::writeAssociationRoleDecl(QString fieldClassName, QString roleNam
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.lower();
+ TQString fieldVarName = "m_" + roleName.lower();
// record this for later consideration of initialization IF the
// multi value requires 1 of these objects
if(ObjectFieldVariables.findIndex(fieldVarName) == -1 &&
- multi.contains(QRegExp("^1$"))
+ multi.contains(TQRegExp("^1$"))
)
{
// ugh. UGLY. Storing variable name and its class in pairs.
@@ -755,7 +755,7 @@ void CppWriter::writeAssociationRoleDecl(QString fieldClassName, QString roleNam
}
else
{
- QString fieldVarName = "m_" + roleName.lower() + "Vector";
+ TQString fieldVarName = "m_" + roleName.lower() + "Vector";
// record unique occurrences for later when we want to check
// for initialization of this vector
@@ -773,7 +773,7 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
bool isHeaderMethod,
bool writeMethodBody,
bool writePointerVar,
- Uml::IDType myID, QTextStream &stream)
+ Uml::IDType myID, TQTextStream &stream)
{
if( forceSections() || !associations.isEmpty() )
{
@@ -786,7 +786,7 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::B)) + (writePointerVar ? " *":"");
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::B)) + (writePointerVar ? " *":"");
writeAssociationRoleMethod(fieldClassName,
isHeaderMethod,
writeMethodBody,
@@ -800,7 +800,7 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::A)) + (writePointerVar ? " *":"");
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::A)) + (writePointerVar ? " *":"");
writeAssociationRoleMethod(fieldClassName,
isHeaderMethod,
writeMethodBody,
@@ -816,39 +816,39 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
}
}
-void CppWriter::writeAssociationRoleMethod (const QString &fieldClassName,
+void CppWriter::writeAssociationRoleMethod (const TQString &fieldClassName,
bool isHeaderMethod,
bool writeMethodBody,
- const QString &roleName, const QString &multi,
- const QString &description, Uml::Changeability_Type change,
- QTextStream &stream)
+ const TQString &roleName, const TQString &multi,
+ const TQString &description, Uml::Changeability_Type change,
+ TQTextStream &stream)
{
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.lower();
+ TQString fieldVarName = "m_" + roleName.lower();
writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, change, isHeaderMethod, false, writeMethodBody, stream);
}
else
{
- QString fieldVarName = "m_" + roleName.lower() + "Vector";
+ TQString fieldVarName = "m_" + roleName.lower() + "Vector";
writeVectorAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, change, isHeaderMethod, writeMethodBody, stream);
}
}
void CppWriter::writeVectorAttributeAccessorMethods (
- const QString &fieldClassName, const QString &fieldVarName,
- const QString &fieldName, const QString &description,
+ const TQString &fieldClassName, const TQString &fieldVarName,
+ const TQString &fieldName, const TQString &description,
Uml::Changeability_Type changeType,
bool isHeaderMethod,
bool writeMethodBody,
- QTextStream &stream)
+ TQTextStream &stream)
{
- QString className = fixTypeName(fieldClassName);
- QString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
- QString indent = getIndent();
+ TQString className = fixTypeName(fieldClassName);
+ TQString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
+ TQString indent = getIndent();
// ONLY IF changeability is NOT Frozen
if (changeType != Uml::chg_Frozen)
@@ -859,10 +859,10 @@ void CppWriter::writeVectorAttributeAccessorMethods (
stream << m_classifierInfo->className << "::";
stream << "add" << fldName << " ( " << className << " add_object )";
if (writeMethodBody) {
- QString method = VECTOR_METHOD_APPEND;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
- method.replace(QRegExp("%ITEMCLASS%"),className);
+ TQString method = VECTOR_METHOD_APPEND;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
+ method.replace(TQRegExp("%ITEMCLASS%"),className);
stream << indent << " {" << m_endl;
m_indentLevel++;
printTextAsSeparateLinesWithIndent(method,getIndent(),stream);
@@ -882,10 +882,10 @@ void CppWriter::writeVectorAttributeAccessorMethods (
stream << m_classifierInfo->className << "::";
stream << "remove" << fldName << " ( " << className << " remove_object )";
if (writeMethodBody) {
- QString method = VECTOR_METHOD_REMOVE;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
- method.replace(QRegExp("%ITEMCLASS%"),className);
+ TQString method = VECTOR_METHOD_REMOVE;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
+ method.replace(TQRegExp("%ITEMCLASS%"),className);
stream << indent << " {" << m_endl;
m_indentLevel++;
printTextAsSeparateLinesWithIndent(method,getIndent(),stream);
@@ -896,7 +896,7 @@ void CppWriter::writeVectorAttributeAccessorMethods (
}
// always allow getting the list of stuff
- QString returnVarName = policyExt()->getVectorClassName() + '<' + className + '>';
+ TQString returnVarName = policyExt()->getVectorClassName() + '<' + className + '>';
writeDocumentation("Get the list of " + fldName + " objects held by " + fieldVarName,
description,
"@return " + returnVarName + " list of " + fldName + " objects held by " + fieldVarName,
@@ -918,22 +918,22 @@ void CppWriter::writeVectorAttributeAccessorMethods (
void CppWriter::writeSingleAttributeAccessorMethods(
- const QString& fieldClassName, const QString& fieldVarName,
- const QString& fieldName, const QString &description,
+ const TQString& fieldClassName, const TQString& fieldVarName,
+ const TQString& fieldName, const TQString &description,
Uml::Changeability_Type change,
bool isHeaderMethod,
bool isStatic,
bool writeMethodBody,
- QTextStream &stream)
+ TQTextStream &stream)
{
// DON'T write this IF its a source method AND writeMethodBody is "false"
if(!isHeaderMethod && !writeMethodBody)
return;
- QString className = fixTypeName(fieldClassName);
- QString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
- QString indent = getIndent();
+ TQString className = fixTypeName(fieldClassName);
+ TQString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
+ TQString indent = getIndent();
// set method
if (change == Uml::chg_Changeable && !isStatic) {
@@ -979,7 +979,7 @@ void CppWriter::writeSingleAttributeAccessorMethods(
}
// one day, this should print out non-empty constructor operations too.
-void CppWriter::writeConstructorDecls(QTextStream &stream)
+void CppWriter::writeConstructorDecls(TQTextStream &stream)
{
const bool generateEmptyConstructors =
UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors();
@@ -1000,22 +1000,22 @@ void CppWriter::writeConstructorDecls(QTextStream &stream)
writeBlankLine(stream);
}
-void CppWriter::writeInitAttibuteDecl (QTextStream &stream)
+void CppWriter::writeInitAttibuteDecl (TQTextStream &stream)
{
if (UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors() &&
m_classifierInfo->hasAttributes)
stream << getIndent() << "void initAttributes ( ) ;" << m_endl;
}
-void CppWriter::writeInitAttibuteMethod (QTextStream &stream)
+void CppWriter::writeInitAttibuteMethod (TQTextStream &stream)
{
// only need to do this under certain conditions
if (!UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors() ||
!m_classifierInfo->hasAttributes)
return;
- QString className = m_classifierInfo->className;
- QString indent = getIndent();
+ TQString className = m_classifierInfo->className;
+ TQString indent = getIndent();
stream << indent << "void " << className << "::" << "initAttributes ( ) {" << m_endl;
@@ -1024,31 +1024,31 @@ void CppWriter::writeInitAttibuteMethod (QTextStream &stream)
UMLAttributeList atl = m_classifierInfo->getAttList();
for(UMLAttribute *at = atl.first(); at ; at = atl.next()) {
if(!at->getInitialValue().isEmpty()) {
- QString varName = getAttributeVariableName(at);
+ TQString varName = getAttributeVariableName(at);
stream << getIndent() << varName << " = " << at->getInitialValue() << ";" << m_endl;
}
}
// Now initialize the association related fields (e.g. vectors)
if (!VECTOR_METHOD_INIT.isEmpty()) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = VectorFieldVariables.begin(); it != VectorFieldVariables.end(); ++it ) {
- QString fieldVarName = *it;
- QString method = VECTOR_METHOD_INIT;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
+ TQString fieldVarName = *it;
+ TQString method = VECTOR_METHOD_INIT;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
stream << getIndent() << method << m_endl;
}
}
if (!OBJECT_METHOD_INIT.isEmpty()) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = ObjectFieldVariables.begin(); it != ObjectFieldVariables.end(); ++it ) {
- QString fieldVarName = *it;
+ TQString fieldVarName = *it;
it++;
- QString fieldClassName = *it;
- QString method = OBJECT_METHOD_INIT;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%ITEMCLASS%"),fieldClassName);
+ TQString fieldClassName = *it;
+ TQString method = OBJECT_METHOD_INIT;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%ITEMCLASS%"),fieldClassName);
stream << getIndent() << method << m_endl;
}
}
@@ -1063,7 +1063,7 @@ void CppWriter::writeInitAttibuteMethod (QTextStream &stream)
}
// one day, this should print out non-empty constructor operations too.
-void CppWriter::writeConstructorMethods(QTextStream &stream)
+void CppWriter::writeConstructorMethods(TQTextStream &stream)
{
const bool generateEmptyConstructors =
UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors();
@@ -1076,9 +1076,9 @@ void CppWriter::writeConstructorMethods(QTextStream &stream)
if (!generateEmptyConstructors)
return;
- QString className = m_classifierInfo->className;
+ TQString className = m_classifierInfo->className;
// empty constructor
- QString indent = getIndent();
+ TQString indent = getIndent();
stream << indent << className << "::" << className << " ( ) {" << m_endl;
if(m_classifierInfo->hasAttributes)
stream << indent << indent << "initAttributes();" << m_endl;
@@ -1092,7 +1092,7 @@ void CppWriter::writeConstructorMethods(QTextStream &stream)
// IF the type is "string" we need to declare it as
// the Java Object "String" (there is no string primative in Java).
-QString CppWriter::fixTypeName(const QString &string)
+TQString CppWriter::fixTypeName(const TQString &string)
{
if (string.isEmpty())
return "void";
@@ -1102,7 +1102,7 @@ QString CppWriter::fixTypeName(const QString &string)
}
void CppWriter::writeOperations(UMLClassifier *c, bool isHeaderMethod,
- Uml::Visibility permitScope, QTextStream &cpp) {
+ Uml::Visibility permitScope, TQTextStream &cpp) {
UMLOperationList oplist;
@@ -1128,16 +1128,16 @@ void CppWriter::writeOperations(UMLClassifier *c, bool isHeaderMethod,
// write operation in either header or
// a source file
-void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, QTextStream &cpp) {
- QString className = m_classifierInfo->className;
+void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, TQTextStream &cpp) {
+ TQString className = m_classifierInfo->className;
const bool generateEmptyConstructors =
UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors();
// generate method decl for each operation given
for (UMLOperation *op = oplist.first(); op; op = oplist.next()) {
- QString returnStr; // buffer for documentation
- QString methodReturnType;
+ TQString returnStr; // buffer for documentation
+ TQString methodReturnType;
UMLAttributeList atl = op->getParmList(); // method parameters
if (op->isConstructorOperation()) {
@@ -1152,7 +1152,7 @@ void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, Q
returnStr += "@return " + methodReturnType + '\n';
}
- QString str;
+ TQString str;
if (op->getAbstract() || m_classifierInfo->isInterface) {
if (isHeaderMethod) {
// declare abstract method as 'virtual'
@@ -1175,10 +1175,10 @@ void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, Q
// generate parameters
uint j = 0;
for (UMLAttribute *at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
str += typeName + ' ' + atName;
- const QString initVal = at->getInitialValue();
+ const TQString initVal = at->getInitialValue();
if (! initVal.isEmpty())
str += " = " + initVal;
if (j < atl.count() - 1)
@@ -1207,7 +1207,7 @@ void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, Q
// of an association have roles we need to have forward declaration of
// the other class...but only IF its not THIS class (as could happen
// in self-association relationship).
-void CppWriter::printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType myId, QTextStream &stream)
+void CppWriter::printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType myId, TQTextStream &stream)
{
for (UMLAssociation *a = list.first(); a; a = list.next()) {
@@ -1233,9 +1233,9 @@ void CppWriter::printAssociationIncludeDecl (UMLAssociationList list, Uml::IDTyp
}
}
-QString CppWriter::fixInitialStringDeclValue(const QString &value, const QString &type)
+TQString CppWriter::fixInitialStringDeclValue(const TQString &value, const TQString &type)
{
- QString val = value;
+ TQString val = value;
// check for strings only
if (!val.isEmpty() && type == policyExt()->getStringClassName()) {
if (!val.startsWith("\""))
@@ -1247,37 +1247,37 @@ QString CppWriter::fixInitialStringDeclValue(const QString &value, const QString
}
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString CppWriter::getUMLObjectName(UMLObject *obj)
+TQString CppWriter::getUMLObjectName(UMLObject *obj)
{
- return(obj!=0)?obj->getName():QString("NULL");
+ return(obj!=0)?obj->getName():TQString("NULL");
}
-void CppWriter::writeBlankLine(QTextStream &stream)
+void CppWriter::writeBlankLine(TQTextStream &stream)
{
stream << m_endl;
}
-void CppWriter::printTextAsSeparateLinesWithIndent (const QString &text, const QString &indent, QTextStream &stream)
+void CppWriter::printTextAsSeparateLinesWithIndent (const TQString &text, const TQString &indent, TQTextStream &stream)
{
if(text.isEmpty())
return;
- QStringList lines = QStringList::split( "\n", text);
+ TQStringList lines = TQStringList::split( "\n", text);
for(uint i= 0; i < lines.count(); i++)
stream << indent << lines[i] << m_endl;
}
-QString CppWriter::getAttributeVariableName (UMLAttribute *at)
+TQString CppWriter::getAttributeVariableName (UMLAttribute *at)
{
- QString fieldName = "m_" + cleanName(at->getName());
+ TQString fieldName = "m_" + cleanName(at->getName());
return fieldName;
}
-QStringList CppWriter::defaultDatatypes() {
+TQStringList CppWriter::defaultDatatypes() {
return Codegen_Utils::cppDatatypes();
}
-const QStringList CppWriter::reservedKeywords() const {
+const TQStringList CppWriter::reservedKeywords() const {
return Codegen_Utils::reservedCppKeywords();
}
diff --git a/umbrello/umbrello/codegenerators/cppwriter.h b/umbrello/umbrello/codegenerators/cppwriter.h
index 8ae58226..06f914e4 100644
--- a/umbrello/umbrello/codegenerators/cppwriter.h
+++ b/umbrello/umbrello/codegenerators/cppwriter.h
@@ -62,12 +62,12 @@ public:
/**
* Add C++ primitives as datatypes
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -75,25 +75,25 @@ private:
* Writes class's documentation to the class header
* public abstract class Foo extents {
*/
- void writeClassDecl(UMLClassifier *c, QTextStream &cpp);
+ void writeClassDecl(UMLClassifier *c, TQTextStream &cpp);
/**
* Writes the comment and class constructor declaration or methods
*/
- void writeConstructorDecls(QTextStream &h);
- void writeConstructorMethods(QTextStream &cpp);
+ void writeConstructorDecls(TQTextStream &h);
+ void writeConstructorMethods(TQTextStream &cpp);
/**
* write all field declarations, for both attributes and associations for the
* given permitted scope.
*/
- void writeFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream);
+ void writeFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream);
/**
* write all method declarations, for attributes and associations
* for the given permitted scope.
*/
- void writeAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream);
+ void writeAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream);
/**
* write all operations for a given class
@@ -102,7 +102,7 @@ private:
* @param permitScope what type of method to write (by Scope)
* @param j the stream associated with the output file
*/
- void writeOperations(UMLClassifier *c, bool isHeaderMethod, Uml::Visibility permitScope, QTextStream &j);
+ void writeOperations(UMLClassifier *c, bool isHeaderMethod, Uml::Visibility permitScope, TQTextStream &j);
/**
* write a list of operations for a given class
@@ -110,14 +110,14 @@ private:
* @param isHeaderMethod true when writing to a header file, false for body file
* @param j the stream associated with the output file
*/
- void writeOperations(UMLOperationList &list, bool isHeaderMethod, QTextStream &j);
+ void writeOperations(UMLOperationList &list, bool isHeaderMethod, TQTextStream &j);
/**
* write all attributes for a given class
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* writes the Attribute declarations
@@ -125,143 +125,143 @@ private:
* @param writeStatic whether to write static or non-static attributes out
* @param stream text stream
*/
- void writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, QTextStream &stream );
+ void writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream );
/**
* Write out fields and operations for this class selected on a particular
* visibility.
*/
- void writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitVisibility, QTextStream &stream);
+ void writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitVisibility, TQTextStream &stream);
- void writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, QTextStream &stream );
+ void writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream );
- void writeHeaderAttributeAccessorMethodDecls(UMLClassifier *c, Uml::Visibility permitVisibility, QTextStream &stream);
- void writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream);
+ void writeHeaderAttributeAccessorMethodDecls(UMLClassifier *c, Uml::Visibility permitVisibility, TQTextStream &stream);
+ void writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream);
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
- void writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permit, Uml::IDType id, QTextStream &stream);
+ void writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permit, Uml::IDType id, TQTextStream &stream);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, QTextStream &stream);
+ void writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, TQTextStream &stream);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in attribs list.
*/
void writeAttributeMethods(UMLAttributeList *attribs, Uml::Visibility visib, bool isHeaderMethod,
bool isStatic,
- bool writeMethodBody, QTextStream &stream);
+ bool writeMethodBody, TQTextStream &stream);
/**
* calls @ref writeAssociationRoleMethod() on each of the associations in the given list
*/
void writeAssociationMethods(UMLAssociationList associations, Uml::Visibility permitVisib,
bool isHeaderMethod,
- bool writeMethodBody, bool writePointerVar, Uml::IDType id, QTextStream &stream);
+ bool writeMethodBody, bool writePointerVar, Uml::IDType id, TQTextStream &stream);
/**
* calls @ref writeSingleAttributeAccessorMethods() or @ref
* writeVectorAttributeAccessorMethods() on the association
* role
*/
- void writeAssociationRoleMethod(const QString &fieldClassName, bool isHeaderMethod, bool writeMethodBody,
- const QString &roleName, const QString &multi,
- const QString &description, Uml::Changeability_Type change,
- QTextStream &stream);
+ void writeAssociationRoleMethod(const TQString &fieldClassName, bool isHeaderMethod, bool writeMethodBody,
+ const TQString &roleName, const TQString &multi,
+ const TQString &description, Uml::Changeability_Type change,
+ TQTextStream &stream);
/**
* Writes getFoo() and setFoo() accessor methods for the attribute
*/
void writeSingleAttributeAccessorMethods(
- const QString &fieldClassName, const QString &Name,
- const QString &fieldName, const QString &description,
+ const TQString &fieldClassName, const TQString &Name,
+ const TQString &fieldName, const TQString &description,
Uml::Changeability_Type change,
bool isHeaderMethod,
- bool isStatic, bool writeMethodBody, QTextStream &cpp);
+ bool isStatic, bool writeMethodBody, TQTextStream &cpp);
/**
* Writes addFoo() and removeFoo() accessor methods for the Vector attribute
*/
void writeVectorAttributeAccessorMethods(
- const QString &fieldClassName, const QString &fieldVarName,
- const QString &fieldName, const QString &description,
+ const TQString &fieldClassName, const TQString &fieldVarName,
+ const TQString &fieldName, const TQString &description,
Uml::Changeability_Type change,
bool isHeaderMethod,
bool writeMethodBody,
- QTextStream &cpp);
+ TQTextStream &cpp);
/**
* Writes a // style comment
*/
- void writeComment(const QString &text, const QString &indent, QTextStream &cpp);
+ void writeComment(const TQString &text, const TQString &indent, TQTextStream &cpp);
/**
* Writes a documentation comment
*/
- void writeDocumentation(QString header, QString body, QString end, QTextStream &cpp);
+ void writeDocumentation(TQString header, TQString body, TQString end, TQTextStream &cpp);
/**
* write the header file for this classifier.
*/
- void writeHeaderFile (UMLClassifier *c, QFile &file);
+ void writeHeaderFile (UMLClassifier *c, TQFile &file);
/**
* write the source code body file for this classifier.
*/
- void writeSourceFile (UMLClassifier *c, QFile &file);
+ void writeSourceFile (UMLClassifier *c, TQFile &file);
/**
* utility method to break up a block of text, which has embedded newline chars,
* and print them to a stream as separate lines of text, indented as directed.
*/
- void printTextAsSeparateLinesWithIndent (const QString &text, const QString &indent,
- QTextStream &stream);
+ void printTextAsSeparateLinesWithIndent (const TQString &text, const TQString &indent,
+ TQTextStream &stream);
/**
* Intellegently print out header include/forward decl. for associated classes.
*/
- void printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType this_id, QTextStream &stream);
+ void printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType this_id, TQTextStream &stream);
/**
* If needed, write out the method to initialize attributes of our class.
*/
- void writeInitAttibuteMethod (QTextStream &stream);
+ void writeInitAttibuteMethod (TQTextStream &stream);
/**
* If needed, write out the declaration for the method to initialize attributes of our class.
*/
- void writeInitAttibuteDecl (QTextStream &stream);
+ void writeInitAttibuteDecl (TQTextStream &stream);
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Replaces `string' with STRING_TYPENAME.
*/
- QString fixTypeName(const QString &string);
+ TQString fixTypeName(const TQString &string);
/**
* check that initial values of strings have quotes around them
*/
- QString fixInitialStringDeclValue(const QString &value, const QString &type);
+ TQString fixInitialStringDeclValue(const TQString &value, const TQString &type);
/**
* Determine what the variable name of this attribute should be.
*/
- QString getAttributeVariableName (UMLAttribute *at);
+ TQString getAttributeVariableName (UMLAttribute *at);
/**
* Write a blank line
*/
- void writeBlankLine(QTextStream &stream);
+ void writeBlankLine(TQTextStream &stream);
/**
* Return the policy object
@@ -273,18 +273,18 @@ private:
*/
ClassifierInfo * m_classifierInfo;
- QString VECTOR_METHOD_APPEND;
- QString VECTOR_METHOD_REMOVE;
- QString VECTOR_METHOD_INIT;
- QString OBJECT_METHOD_INIT;
+ TQString VECTOR_METHOD_APPEND;
+ TQString VECTOR_METHOD_REMOVE;
+ TQString VECTOR_METHOD_INIT;
+ TQString OBJECT_METHOD_INIT;
/**
* Create association methods for class attributes/associations/operations as inline decl in header.
*/
bool INLINE_ASSOCIATION_METHODS;
- QStringList ObjectFieldVariables;
- QStringList VectorFieldVariables;
+ TQStringList ObjectFieldVariables;
+ TQStringList VectorFieldVariables;
};
diff --git a/umbrello/umbrello/codegenerators/csharpwriter.cpp b/umbrello/umbrello/codegenerators/csharpwriter.cpp
index 73975b48..42b055e5 100644
--- a/umbrello/umbrello/codegenerators/csharpwriter.cpp
+++ b/umbrello/umbrello/codegenerators/csharpwriter.cpp
@@ -15,8 +15,8 @@
#include "csharpwriter.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../uml.h"
#include "../umldoc.h"
@@ -116,8 +116,8 @@ CSharpWriter::~CSharpWriter()
{
}
-QStringList CSharpWriter::defaultDatatypes() {
- QStringList l;
+TQStringList CSharpWriter::defaultDatatypes() {
+ TQStringList l;
l.append("bool");
l.append("byte");
l.append("char");
@@ -145,20 +145,20 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".cs");
+ TQString fileName = findFileName(c, ".cs");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile filecs;
+ TQFile filecs;
if (!openFile(filecs, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream cs(&filecs);
+ TQTextStream cs(&filecs);
//////////////////////////////
//Start generating the code!!
@@ -166,11 +166,11 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".cs");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filecs.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filecs.name());
cs<<str<<m_endl;
}
@@ -314,7 +314,7 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void CSharpWriter::writeOperations(UMLClassifier *c, QTextStream &cs) {
+void CSharpWriter::writeOperations(UMLClassifier *c, TQTextStream &cs) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -382,7 +382,7 @@ void CSharpWriter::writeOperations(UMLClassifier *c, QTextStream &cs) {
}
-void CSharpWriter::writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs) {
+void CSharpWriter::writeOverridesRecursive(UMLClassifierList *superclasses, TQTextStream &cs) {
// oplist for implemented abstract operations
UMLOperationList opabstract;
opabstract.setAutoDelete(false);
@@ -413,7 +413,7 @@ void CSharpWriter::writeOverridesRecursive(UMLClassifierList *superclasses, QTex
}
}
}
-void CSharpWriter::writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs) {
+void CSharpWriter::writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, TQTextStream &cs) {
UMLAssociation *a;
for (a = realizations->first(); a; a = realizations->next()) {
@@ -442,7 +442,7 @@ void CSharpWriter::writeRealizationsRecursive(UMLClassifier *currentClass, UMLAs
}
void CSharpWriter::writeOperations(UMLOperationList opList,
- QTextStream &cs, bool isInterface /* = false */,
+ TQTextStream &cs, bool isInterface /* = false */,
bool isOverride /* = false */,
bool generateErrorStub /* = false */) {
@@ -470,7 +470,7 @@ void CSharpWriter::writeOperations(UMLOperationList opList,
if (forceDoc() || !at->getDoc().isEmpty()) {
cs << m_container_indent << m_indentation << "/// <param name=\"" << cleanName(at->getName()) << "\">";
//removing newlines from parameter doc
- cs << formatDoc(at->getDoc(), "").replace("\n", " ").remove('\r').replace(QRegExp(" $"), "");
+ cs << formatDoc(at->getDoc(), "").replace("\n", " ").remove('\r').replace(TQRegExp(" $"), "");
cs << "</param>" << m_endl;
}
}
@@ -521,8 +521,8 @@ void CSharpWriter::writeOperations(UMLOperationList opList,
// no initial values in C#
//<< (!(at->getInitialValue().isEmpty()) ?
- // (QString(" = ")+at->getInitialValue()) :
- // QString(""))
+ // (TQString(" = ")+at->getInitialValue()) :
+ // TQString(""))
cs << ((j < i-1)?", ":"");
}
cs << ")";
@@ -543,7 +543,7 @@ void CSharpWriter::writeOperations(UMLOperationList opList,
}
}
-void CSharpWriter::writeAttributes(UMLClassifier *c, QTextStream &cs) {
+void CSharpWriter::writeAttributes(UMLClassifier *c, TQTextStream &cs) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
@@ -597,7 +597,7 @@ void CSharpWriter::writeAttributes(UMLClassifier *c, QTextStream &cs) {
}
-void CSharpWriter::writeAttributes(UMLAttributeList &atList, QTextStream &cs) {
+void CSharpWriter::writeAttributes(UMLAttributeList &atList, TQTextStream &cs) {
for (UMLAttribute *at = atList.first(); at ; at = atList.next()) {
@@ -613,7 +613,7 @@ void CSharpWriter::writeAttributes(UMLAttributeList &atList, QTextStream &cs) {
return;
}
-void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs) {
+void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, TQTextStream &cs) {
UMLAssociation *a;
for (a = associated.first(); a ; a = associated.next()) {
@@ -626,12 +626,12 @@ void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UML
continue;
}
// Take name and documentaton from Role, take type name from the referenced object
- QString roleName = cleanName(a->getRoleName(Uml::B));
- QString typeName = cleanName(o->getName());
+ TQString roleName = cleanName(a->getRoleName(Uml::B));
+ TQString typeName = cleanName(o->getName());
if (roleName.isEmpty()) {
- roleName = QString("UnnamedRoleB_%1").arg(m_unnamedRoles++);
+ roleName = TQString("UnnamedRoleB_%1").arg(m_unnamedRoles++);
}
- QString roleDoc = a->getRoleDoc(Uml::B);
+ TQString roleDoc = a->getRoleDoc(Uml::B);
//FIXME:is this simple condition enough?
if (a->getMulti(Uml::B).isEmpty() || a->getMulti(Uml::B) == "1") {
@@ -645,7 +645,7 @@ void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UML
}
}
-void CSharpWriter::writeAttribute(QString doc, Uml::Visibility visibility, bool isStatic, QString typeName, QString name, QString initialValue, bool asProperty, QTextStream &cs) {
+void CSharpWriter::writeAttribute(TQString doc, Uml::Visibility visibility, bool isStatic, TQString typeName, TQString name, TQString initialValue, bool asProperty, TQTextStream &cs) {
if (forceDoc() || !doc.isEmpty()) {
@@ -691,7 +691,7 @@ void CSharpWriter::writeAttribute(QString doc, Uml::Visibility visibility, bool
cs << ";" << m_endl << m_endl;
}
-QString CSharpWriter::makeLocalTypeName(UMLClassifierListItem *cl) {
+TQString CSharpWriter::makeLocalTypeName(UMLClassifierListItem *cl) {
UMLPackage *p = cl->getType()->getUMLPackage();
if (m_seenIncludes.findRef(p) != -1) {
return cl->getType()->getName();
@@ -709,9 +709,9 @@ Uml::Programming_Language CSharpWriter::getLanguage() {
return Uml::pl_CSharp;
}
-const QStringList CSharpWriter::reservedKeywords() const {
+const TQStringList CSharpWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
for (int i = 0; reserved_words[i]; i++)
diff --git a/umbrello/umbrello/codegenerators/csharpwriter.h b/umbrello/umbrello/codegenerators/csharpwriter.h
index a6d20f2d..ef09bac5 100644
--- a/umbrello/umbrello/codegenerators/csharpwriter.h
+++ b/umbrello/umbrello/codegenerators/csharpwriter.h
@@ -49,12 +49,12 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
/**
* get list of predefined data types
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
@@ -66,7 +66,7 @@ private:
/**
* Adds extra indenting if the class is in a container (namespace)
*/
- QString m_container_indent;
+ TQString m_container_indent;
/**
* Collection of included namespaces, to skip them from variable types.
@@ -87,7 +87,7 @@ private:
*/
void writeRealizationsRecursive(UMLClassifier *currentClass,
UMLAssociationList *realizations,
- QTextStream &cs);
+ TQTextStream &cs);
/**
* write all operations for a given class
@@ -95,7 +95,7 @@ private:
* @param c the concept we are generating code for
* @param cs output stream
*/
- void writeOperations(UMLClassifier *c, QTextStream &cs);
+ void writeOperations(UMLClassifier *c, TQTextStream &cs);
/**
* write a list of class operations
@@ -106,7 +106,7 @@ private:
* @param isOverride implementation of an inherited abstract function
*/
void writeOperations(UMLOperationList opList,
- QTextStream &cs,
+ TQTextStream &cs,
bool interface = false,
bool isOverride = false,
bool generateErrorStub = false);
@@ -117,19 +117,19 @@ private:
* @param superclasses List of superclasses to start recursing on
* @param cs output stream
*/
- void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs);
+ void writeOverridesRecursive(UMLClassifierList *superclasses, TQTextStream &cs);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param cs output stream
*/
- void writeAttributes(UMLClassifier *c, QTextStream &cs);
+ void writeAttributes(UMLClassifier *c, TQTextStream &cs);
/** write a list of class attributes
* @param atList the list of attributes
* @param cs output stream
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &cs);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &cs);
/**
* write attributes from associated objects (compositions, aggregations)
@@ -137,7 +137,7 @@ private:
* @param c currently written class, to see association direction
* @param cs output stream
*/
- void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs);
+ void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, TQTextStream &cs);
/**
* write a single attribute to the output stream
@@ -150,13 +150,13 @@ private:
* @param asProperty true writes as property (get/set), false writes single line variable
* @param cs output stream
*/
- void writeAttribute(QString doc, Uml::Visibility visibility, bool isStatic, QString typeName, QString name, QString initialValue, bool asProperty, QTextStream &cs);
+ void writeAttribute(TQString doc, Uml::Visibility visibility, bool isStatic, TQString typeName, TQString name, TQString initialValue, bool asProperty, TQTextStream &cs);
/** find the type in used namespaces, if namespace found return short name, complete otherwise.
*
* @param at Operation or Attribute to check type
*/
- QString makeLocalTypeName(UMLClassifierListItem *cl);
+ TQString makeLocalTypeName(UMLClassifierListItem *cl);
};
diff --git a/umbrello/umbrello/codegenerators/dwriter.cpp b/umbrello/umbrello/codegenerators/dwriter.cpp
index 3e16b136..088ab9c1 100644
--- a/umbrello/umbrello/codegenerators/dwriter.cpp
+++ b/umbrello/umbrello/codegenerators/dwriter.cpp
@@ -19,9 +19,9 @@
// own header
#include "dwriter.h"
// qt includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
// kde includes
#include <kdebug.h>
// app includes
@@ -45,14 +45,14 @@ Uml::Programming_Language DWriter::getLanguage() {
}
// FIXME: doesn't work yet
-void DWriter::writeModuleDecl(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeModuleDecl(UMLClassifier *c, TQTextStream &d) {
if(!c->getPackage().isEmpty())
d << "module " << c->getPackage() << ";" << m_endl;
writeBlankLine(d);
}
-void DWriter::writeModuleImports(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeModuleImports(UMLClassifier *c, TQTextStream &d) {
// another preparation, determine what we have
UMLAssociationList associations = c->getSpecificAssocs(Uml::at_Association); // BAD! only way to get "general" associations.
UMLAssociationList uniAssociations = c->getUniAssociationToBeImplemented();
@@ -74,7 +74,7 @@ void DWriter::writeModuleImports(UMLClassifier *c, QTextStream &d) {
for (UMLPackage *con = imports.first(); con; con = imports.next()) {
if (con->getBaseType() == Uml::ot_Datatype)
continue;
- QString pkg = con->getPackage();
+ TQString pkg = con->getPackage();
if (!pkg.isEmpty() && pkg != c->getPackage())
d << "import " << pkg << "." << cleanName(con->getName()) << ";"
<< m_endl;
@@ -91,7 +91,7 @@ void DWriter::writeClass(UMLClassifier *c) {
isInterface = c->isInterface();
- QString fileName = cleanName(c->getName().lower());
+ TQString fileName = cleanName(c->getName().lower());
//find an appropriate name for our file
fileName = findFileName(c, ".d");
@@ -101,21 +101,21 @@ void DWriter::writeClass(UMLClassifier *c) {
}
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
}
// open text stream to file
- QTextStream d(&file);
+ TQTextStream d(&file);
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".d");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),file.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),file.name());
d<<str<<m_endl;
}
@@ -278,7 +278,7 @@ void DWriter::writeClass(UMLClassifier *c) {
emit codeGenerated(c, true);
}
-void DWriter::writeClassDecl(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeClassDecl(UMLClassifier *c, TQTextStream &d) {
// class documentation
if (!c->getDoc().isEmpty()) {
@@ -311,7 +311,7 @@ void DWriter::writeClassDecl(UMLClassifier *c, QTextStream &d) {
}
// (c) class name
- QString classname = cleanName(c->getName()); // our class name
+ TQString classname = cleanName(c->getName()); // our class name
d << classname;
// (d) template parameters
@@ -367,11 +367,11 @@ void DWriter::writeClassDecl(UMLClassifier *c, QTextStream &d) {
}
}
-void DWriter::writeProtectionMod(Uml::Visibility visibility, QTextStream &d) {
+void DWriter::writeProtectionMod(Uml::Visibility visibility, TQTextStream &d) {
d << m_indentation << scopeToDDecl(visibility) << ":" << m_endl << m_endl;
}
-void DWriter::writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, QTextStream &d) {
+void DWriter::writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, TQTextStream &d) {
if (atlist.count()==0) return;
writeProtectionMod(visibility, d);
@@ -400,14 +400,14 @@ void DWriter::writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &a
d << cleanName(at->getName());
// initial value
- QString initVal = fixInitialStringDeclValue(at->getInitialValue(), at->getTypeName());
+ TQString initVal = fixInitialStringDeclValue(at->getInitialValue(), at->getTypeName());
if (!initVal.isEmpty()) d << " = " << initVal;
d << ";" << m_endl << m_endl;
}
}
void DWriter::writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &d ) {
+ UMLAttributeList &atpriv, TQTextStream &d ) {
writeAttributeDecl(Uml::Visibility::Public, atpub, d);
writeAttributeDecl(Uml::Visibility::Protected, atprot, d);
@@ -415,31 +415,31 @@ void DWriter::writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atp
//TODO: export and package
}
-void DWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &d) {
+void DWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &d) {
if (atpub.count()==0) return;
writeProtectionMod(visibility, d);
for(UMLAttribute *at=atpub.first(); at; at=atpub.next()) {
- QString fieldName = cleanName(at->getName());
+ TQString fieldName = cleanName(at->getName());
writeSingleAttributeAccessorMethods(
at->getTypeName(), "m_" + fieldName, fieldName, at->getDoc(),
visibility, Uml::chg_Changeable, at->getStatic(), d);
}
}
-void DWriter::writeComment(const QString &comment, const QString &myIndent,
- QTextStream &d, bool dDocStyle) {
+void DWriter::writeComment(const TQString &comment, const TQString &myIndent,
+ TQTextStream &d, bool dDocStyle) {
if(dDocStyle) {
d << myIndent << "/**" << m_endl;
}
- QStringList lines = QStringList::split("\n", comment);
+ TQStringList lines = TQStringList::split("\n", comment);
if (lines.count() == 0) lines << comment;
for (uint i = 0; i < lines.count(); ++i) {
- QString tmp = lines[i];
+ TQString tmp = lines[i];
while (tmp.length() > 77) {
uint l = tmp.left(77).findRev(' ');
@@ -460,7 +460,7 @@ void DWriter::writeComment(const QString &comment, const QString &myIndent,
}
}
-void DWriter::writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &d) {
+void DWriter::writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &d) {
d << indent << "/**" << m_endl;
if (!header.isEmpty())
d << formatDoc(header, indent+" * ");
@@ -468,14 +468,14 @@ void DWriter::writeDocumentation(QString header, QString body, QString end, QStr
d << formatDoc(body, indent+" * ");
if (!end.isEmpty())
{
- QStringList lines = QStringList::split( "\n", end);
+ TQStringList lines = TQStringList::split( "\n", end);
for (uint i= 0; i < lines.count(); i++)
d << formatDoc(lines[i], indent + " * ");
}
d<<indent<< " */" << m_endl;
}
-void DWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &d) {
+void DWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &d) {
if( forceSections() || !associations.isEmpty() )
{
@@ -497,23 +497,23 @@ void DWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType
// print RoleB decl
if (printRoleB)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B), a->getMulti(Uml::B), a->getRoleDoc(Uml::B), a->getVisibility(Uml::B), d);
}
// print RoleA decl
if (printRoleA)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A), a->getMulti(Uml::A), a->getRoleDoc(Uml::A), a->getVisibility(Uml::A), d);
}
}
}
}
-void DWriter::writeAssociationRoleDecl(QString fieldClassName,
- QString roleName, QString multi,
- QString doc, Uml::Visibility /*visib*/, QTextStream &d) {
+void DWriter::writeAssociationRoleDecl(TQString fieldClassName,
+ TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility /*visib*/, TQTextStream &d) {
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
if (roleName.isEmpty()) return;
@@ -527,7 +527,7 @@ void DWriter::writeAssociationRoleDecl(QString fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
d << m_indentation << fieldClassName << " ";
if (hasAccessors) d << "m_";
@@ -548,7 +548,7 @@ void DWriter::writeAssociationRoleDecl(QString fieldClassName,
writeBlankLine(d);
}
-void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, QTextStream &d) {
+void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, TQTextStream &d) {
if( forceSections() || !associations.isEmpty() ) {
for(UMLAssociation *a = associations.first(); a; a = associations.next()) {
// insert the methods to access the role of the other
@@ -556,7 +556,7 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass
if (a->getObjectId(Uml::A) == thisClass->getID()) {
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
writeAssociationRoleMethod(fieldClassName,
a->getRoleName(Uml::B),
a->getMulti(Uml::B), a->getRoleDoc(Uml::B),
@@ -568,7 +568,7 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass
if (a->getObjectId(Uml::B) == thisClass->getID()) {
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
writeAssociationRoleMethod(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A),
a->getRoleDoc(Uml::A),
@@ -581,30 +581,30 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass
}
}
-void DWriter::writeAssociationRoleMethod (QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &d) {
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = "m_" + deCapitaliseFirstLetter(roleName);
+void DWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &d) {
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
+ TQString fieldVarName = "m_" + deCapitaliseFirstLetter(roleName);
writeSingleAttributeAccessorMethods(
fieldClassName, fieldVarName, roleName, description, visib, change, false, d);
} else {
- QString fieldVarName = "m_" + pluralize(deCapitaliseFirstLetter(roleName));
+ TQString fieldVarName = "m_" + pluralize(deCapitaliseFirstLetter(roleName));
writeVectorAttributeAccessorMethods(
fieldClassName, fieldVarName, pluralize(roleName), description, visib, change, d);
}
}
-void DWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+void DWriter::writeVectorAttributeAccessorMethods (TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility /*visibility*/, Uml::Changeability_Type changeType,
- QTextStream &d) {
+ TQTextStream &d) {
fieldClassName = fixTypeName(fieldClassName);
- QString fieldNameUP = unPluralize(fieldName);
- QString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldNameUP);
+ TQString fieldNameUP = unPluralize(fieldName);
+ TQString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldNameUP);
// ONLY IF changeability is NOT Frozen
if (changeType != Uml::chg_Frozen) {
@@ -646,12 +646,12 @@ void DWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QStri
}
-void DWriter::writeSingleAttributeAccessorMethods(QString fieldClassName,
- QString fieldVarName, QString fieldName, QString description, Uml::Visibility /*visibility*/,
- Uml::Changeability_Type change, bool isFinal, QTextStream &d) {
+void DWriter::writeSingleAttributeAccessorMethods(TQString fieldClassName,
+ TQString fieldVarName, TQString fieldName, TQString description, Uml::Visibility /*visibility*/,
+ Uml::Changeability_Type change, bool isFinal, TQTextStream &d) {
fieldClassName = fixTypeName(fieldClassName);
- QString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldName);
+ TQString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldName);
if (fieldName.left(2) == "m_") fieldName = fieldName.right(fieldName.length()-2);
// set method
@@ -676,7 +676,7 @@ void DWriter::writeSingleAttributeAccessorMethods(QString fieldClassName,
d << startline << "}" << m_endl << m_endl;
}
-void DWriter::writeConstructor(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeConstructor(UMLClassifier *c, TQTextStream &d) {
if (forceDoc())
{
@@ -688,7 +688,7 @@ void DWriter::writeConstructor(UMLClassifier *c, QTextStream &d) {
}
// write the first constructor
- QString className = cleanName(c->getName());
+ TQString className = cleanName(c->getName());
d << m_indentation << "public this("<<") { }";
}
@@ -696,7 +696,7 @@ void DWriter::writeConstructor(UMLClassifier *c, QTextStream &d) {
// IF the type is "string" we need to declare it as
// the D Object "String" (there is no string primative in D).
// Same thing again for "bool" to "boolean"
-QString DWriter::fixTypeName(const QString& string) {
+TQString DWriter::fixTypeName(const TQString& string) {
if (string.isEmpty())
return "void";
if (string == "string")
@@ -710,8 +710,8 @@ QString DWriter::fixTypeName(const QString& string) {
return string;
}
-QStringList DWriter::defaultDatatypes() {
- QStringList l;
+TQStringList DWriter::defaultDatatypes() {
+ TQStringList l;
l << "void"
<< "bool"
<< "byte"
@@ -805,7 +805,7 @@ void DWriter::getInterfacesOperationsToBeImplemented(UMLClassifier *c, UMLOperat
}
}
-void DWriter::writeOperations(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeOperations(UMLClassifier *c, TQTextStream &d) {
UMLOperationList opl;
UMLOperationList oppub,opprot,oppriv;
oppub.setAutoDelete(false);
@@ -862,16 +862,16 @@ void DWriter::writeOperations(UMLClassifier *c, QTextStream &d) {
}
-void DWriter::writeOperations(UMLOperationList &oplist, QTextStream &d) {
+void DWriter::writeOperations(UMLOperationList &oplist, TQTextStream &d) {
UMLAttributeList atl;
- QString str;
+ TQString str;
// generate method decl for each operation given
for(UMLOperation *op=oplist.first(); op; op=oplist.next()) {
- QString returnStr = "";
+ TQString returnStr = "";
// write documentation
- QString methodReturnType = fixTypeName(op->getTypeName());
+ TQString methodReturnType = fixTypeName(op->getTypeName());
//TODO: return type comment
if(methodReturnType != "void") {
@@ -888,12 +888,12 @@ void DWriter::writeOperations(UMLOperationList &oplist, QTextStream &d) {
int i = atl.count();
int j = 0;
for (UMLAttribute *at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
str += typeName + ' ' + atName +
(!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
+ ((j < i-1)?", ":"");
returnStr += "@param " + atName+' '+at->getDoc() + m_endl;
}
@@ -912,7 +912,7 @@ void DWriter::writeOperations(UMLOperationList &oplist, QTextStream &d) {
}
}
-QString DWriter::fixInitialStringDeclValue(QString value, QString type) {
+TQString DWriter::fixInitialStringDeclValue(TQString value, TQString type) {
// check for strings only
if (!value.isEmpty() && type == "String") {
if (!value.startsWith("\""))
@@ -923,8 +923,8 @@ QString DWriter::fixInitialStringDeclValue(QString value, QString type) {
return value;
}
-QString DWriter::scopeToDDecl(Uml::Visibility scope) {
- QString scopeString;
+TQString DWriter::scopeToDDecl(Uml::Visibility scope) {
+ TQString scopeString;
switch(scope) {
case Uml::Visibility::Public: scopeString = "public"; break;
@@ -937,20 +937,20 @@ QString DWriter::scopeToDDecl(Uml::Visibility scope) {
}
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString DWriter::getUMLObjectName(UMLObject *obj) {
- return(obj!=0)?obj->getName():QString("NULL");
+TQString DWriter::getUMLObjectName(UMLObject *obj) {
+ return(obj!=0)?obj->getName():TQString("NULL");
}
-QString DWriter::deCapitaliseFirstLetter(QString string) {
+TQString DWriter::deCapitaliseFirstLetter(TQString string) {
string.replace( 0, 1, string[0].lower());
return string;
}
-QString DWriter::pluralize(QString string) {
+TQString DWriter::pluralize(TQString string) {
return string + (string.right(1) == "s" ? "es" : "s");
}
-QString DWriter::unPluralize(QString string) {
+TQString DWriter::unPluralize(TQString string) {
// does not handle special cases liek datum -> data, etc.
if (string.length() > 2 && string.right(3) == "ses") {
@@ -964,7 +964,7 @@ QString DWriter::unPluralize(QString string) {
return string;
}
-void DWriter::writeBlankLine(QTextStream &d) {
+void DWriter::writeBlankLine(TQTextStream &d) {
d << m_endl;
}
diff --git a/umbrello/umbrello/codegenerators/dwriter.h b/umbrello/umbrello/codegenerators/dwriter.h
index 38828359..2a738d01 100644
--- a/umbrello/umbrello/codegenerators/dwriter.h
+++ b/umbrello/umbrello/codegenerators/dwriter.h
@@ -59,30 +59,30 @@ public:
/**
* Overrides method from class CodeGenerator
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
/**
* Writes the module declaration.
*/
- void writeModuleDecl(UMLClassifier *c, QTextStream &d);
+ void writeModuleDecl(UMLClassifier *c, TQTextStream &d);
/**
* Writes the module imports.
*/
- void writeModuleImports(UMLClassifier *c, QTextStream &d);
+ void writeModuleImports(UMLClassifier *c, TQTextStream &d);
/**
* Writes class's documentation then the class header
* public abstract class Foo extents {
*/
- void writeClassDecl(UMLClassifier *c, QTextStream &d);
+ void writeClassDecl(UMLClassifier *c, TQTextStream &d);
/**
* Writes the comment and class constructor
*/
- void writeConstructor(UMLClassifier *c, QTextStream &d);
+ void writeConstructor(UMLClassifier *c, TQTextStream &d);
/**
* return true if the two operations have the same name and the same parameters
@@ -120,28 +120,28 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeOperations(UMLClassifier *c, QTextStream &j);
+ void writeOperations(UMLClassifier *c, TQTextStream &j);
/**
* write a list of operations for a given class
* @param list the list of operations you want to write
* @param j the stream associated with the output file
*/
- void writeOperations(UMLOperationList &list, QTextStream &j);
+ void writeOperations(UMLOperationList &list, TQTextStream &j);
/**
* write all attributes for a given class
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* Writes the protection modifier line.
* @param visibility protection modifier
* @param d text stream
*/
- void writeProtectionMod(Uml::Visibility visibility, QTextStream &d);
+ void writeProtectionMod(Uml::Visibility visibility, TQTextStream &d);
/**
* Writes attribute declarations with a specific
@@ -150,7 +150,7 @@ private:
* @param atlist attribute list
* @param d text stream
*/
- void writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, QTextStream &d);
+ void writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, TQTextStream &d);
/**
* writes the Attribute declarations
@@ -160,109 +160,109 @@ private:
* @param d text stream
*/
void writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &d );
+ UMLAttributeList &atpriv, TQTextStream &d );
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
- void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &d);
+ void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &d);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, Uml::Visibility visib, QTextStream &d);
+ void writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility visib, TQTextStream &d);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in atpub
*/
- void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &d);
+ void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &d);
/**
* calls @ref writeAssociationRoleMethod() on each of the associations in the given list
*/
void writeAssociationMethods(UMLAssociationList associations, UMLClassifier *thisClass,
- QTextStream &d);
+ TQTextStream &d);
/**
* calls @ref writeSingleAttributeAccessorMethods() or @ref
* writeVectorAttributeAccessorMethods() on the assocaition
* role
*/
- void writeAssociationRoleMethod(QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &d);
+ void writeAssociationRoleMethod(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &d);
/**
* Writes getFoo() and setFoo() accessor methods for the attribute
*/
- void writeSingleAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeSingleAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- bool isFinal, QTextStream &d);
+ bool isFinal, TQTextStream &d);
/**
* Writes addFoo() and removeFoo() accessor methods for the Vector attribute
*/
- void writeVectorAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeVectorAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- QTextStream &d);
+ TQTextStream &d);
/**
* Writes a // style comment
*/
- void writeComment(const QString &text, const QString &indent, QTextStream &d, bool dDocStyle=false);
+ void writeComment(const TQString &text, const TQString &indent, TQTextStream &d, bool dDocStyle=false);
/**
* Writes a documentation comment
*/
- void writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &d);
+ void writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &d);
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Lowers the case of the first letter in the given string
*/
- QString deCapitaliseFirstLetter(QString string);
+ TQString deCapitaliseFirstLetter(TQString string);
/**
* Returns the plural form of a subject.
*/
- QString pluralize(QString string);
+ TQString pluralize(TQString string);
/**
* Returns the non-plural form of a subject.
*/
- QString unPluralize(QString string);
+ TQString unPluralize(TQString string);
/**
* Replaces `string' with `String' and `bool' with `boolean'
*/
- QString fixTypeName(const QString& string);
+ TQString fixTypeName(const TQString& string);
/**
* check that initial values of strings have quotes around them
*/
- QString fixInitialStringDeclValue(QString value, QString type);
+ TQString fixInitialStringDeclValue(TQString value, TQString type);
/**
* Write a blank line
*/
- void writeBlankLine(QTextStream& d);
+ void writeBlankLine(TQTextStream& d);
/**
* a little method for converting scope to string value
*/
- QString scopeToDDecl(Uml::Visibility scope);
+ TQString scopeToDDecl(Uml::Visibility scope);
/**
* A \n, used at the end of each line
*/
- QString startline;
+ TQString startline;
/**
* Whether or not this concept is an interface.
diff --git a/umbrello/umbrello/codegenerators/idlwriter.cpp b/umbrello/umbrello/codegenerators/idlwriter.cpp
index a893acc3..dc367f50 100644
--- a/umbrello/umbrello/codegenerators/idlwriter.cpp
+++ b/umbrello/umbrello/codegenerators/idlwriter.cpp
@@ -13,9 +13,9 @@
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -34,7 +34,7 @@ IDLWriter::IDLWriter() : SimpleCodeGenerator(false) {
IDLWriter::~IDLWriter() {}
bool IDLWriter::isOOClass(UMLClassifier *c) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant" || stype == "CORBAEnum" ||
stype == "CORBAStruct" || stype == "CORBAUnion" ||
stype == "CORBASequence" || stype == "CORBAArray" ||
@@ -59,7 +59,7 @@ Uml::Programming_Language IDLWriter::getLanguage() {
}
void IDLWriter::computeAssocTypeAndRole
-(UMLAssociation *a, UMLClassifier *c, QString& typeName, QString& roleName)
+(UMLAssociation *a, UMLClassifier *c, TQString& typeName, TQString& roleName)
{
// Determine which is the "remote" end of the association:
bool IAmRoleA = true;
@@ -70,9 +70,9 @@ void IDLWriter::computeAssocTypeAndRole
at == Uml::at_UniAssociation) {
// Assuming unidirectional association, and we are
// at the "wrong" side.
- // Returning roleName = QString::null tells caller to
+ // Returning roleName = TQString::null tells caller to
// skip this association at this side.
- roleName = QString();
+ roleName = TQString();
return;
}
IAmRoleA = false;
@@ -80,7 +80,7 @@ void IDLWriter::computeAssocTypeAndRole
}
// Construct the type name:
typeName = cleanName(other->getName());
- QString multiplicity;
+ TQString multiplicity;
if (IAmRoleA)
multiplicity = a->getMulti(Uml::B);
else
@@ -107,16 +107,16 @@ void IDLWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".idl");
+ TQString fileName = findFileName(c, ".idl");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile file;
+ TQFile file;
if (!openFile(file, fileName)) {
emit codeGenerated(c, false);
return;
@@ -124,13 +124,13 @@ void IDLWriter::writeClass(UMLClassifier *c) {
// Start generating the code.
- QTextStream idl(&file);
+ TQTextStream idl(&file);
//try to find a heading file(license, comments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".idl");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), file.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), file.name());
idl << str << m_endl;
}
@@ -141,7 +141,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
for (UMLPackage *conc = includes.first(); conc; conc = includes.next()) {
if (conc->getBaseType() == Uml::ot_Datatype)
continue;
- QString incName = findFileName(conc, ".idl");
+ TQString incName = findFileName(conc, ".idl");
if (!incName.isEmpty())
idl << "#include \"" << incName << "\"" << m_endl;
}
@@ -171,7 +171,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
idl << getIndent() << "enum " << classname << " {" << m_endl;
m_indentLevel++;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
idl << getIndent() << enumLiteral;
if (++i < litList.count())
idl << ",";
@@ -187,7 +187,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
return;
}
if (! isOOClass(c)) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant") {
kError() << "The stereotype " << stype << " cannot be applied to "
<< c->getName() << ", but only to attributes." << endl;
@@ -206,7 +206,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
m_indentLevel++;
uint i = 0;
for (at = atl.first(); at; at = atl.next()) {
- QString enumLiteral = cleanName(at->getName());
+ TQString enumLiteral = cleanName(at->getName());
idl << getIndent() << enumLiteral;
if (++i < atl.count())
idl << ",";
@@ -220,7 +220,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
idl << getIndent() << "struct " << classname << " {" << m_endl;
m_indentLevel++;
for (at = atl.first(); at; at = atl.next()) {
- QString name = cleanName(at->getName());
+ TQString name = cleanName(at->getName());
idl << getIndent() << at->getTypeName() << " " << name << ";" << m_endl;
// Initial value not possible in IDL.
}
@@ -228,7 +228,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
if (!compositions.isEmpty()) {
idl << getIndent() << "// Compositions." << m_endl;
for (UMLAssociation *a = compositions.first(); a; a = compositions.next()) {
- QString memberType, memberName;
+ TQString memberType, memberName;
computeAssocTypeAndRole(a, c, memberType, memberName);
idl << getIndent() << memberType << " " << memberName << ";" << m_endl;
}
@@ -237,7 +237,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
if (!aggregations.isEmpty()) {
idl << getIndent() << "// Aggregations." << m_endl;
for (UMLAssociation *a = aggregations.first(); a; a = aggregations.next()) {
- QString memberType, memberName;
+ TQString memberType, memberName;
computeAssocTypeAndRole(a, c, memberType, memberName);
idl << getIndent() << memberType << " " << memberName << ";" << m_endl;
}
@@ -294,7 +294,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
for (a = assocs.first(); a; a = assocs.next()) {
if (! assocTypeIsMappableToAttribute(a->getAssocType()))
continue;
- QString multiplicity = a->getMulti(Uml::A);
+ TQString multiplicity = a->getMulti(Uml::A);
if (multiplicity.isEmpty() || multiplicity == "1")
continue;
if (!didComment) {
@@ -302,7 +302,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
didComment = true;
}
UMLClassifier* other = (UMLClassifier*)a->getObject(Uml::A);
- QString bareName = cleanName(other->getName());
+ TQString bareName = cleanName(other->getName());
idl << getIndent() << "typedef sequence<" << other->getFullyQualifiedName("::")
<< "> " << bareName << "Vector;" << m_endl << m_endl;
}
@@ -313,7 +313,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
if (forceSections() || atl.count()) {
idl << getIndent() << "// Attributes:" << m_endl << m_endl;
for (UMLAttribute *at = atl.first(); at; at = atl.next()) {
- QString attName = cleanName(at->getName());
+ TQString attName = cleanName(at->getName());
Uml::Visibility scope = at->getVisibility();
idl << getIndent();
if (isValuetype) {
@@ -358,7 +358,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
Uml::Association_Type at = a->getAssocType();
if (! assocTypeIsMappableToAttribute(at))
continue;
- QString typeName, roleName;
+ TQString typeName, roleName;
computeAssocTypeAndRole(a, c, typeName, roleName);
if (roleName.isEmpty()) // presumably because we are at the "wrong" end
continue;
@@ -386,9 +386,9 @@ void IDLWriter::writeClass(UMLClassifier *c) {
}
-void IDLWriter::writeOperation(UMLOperation *op, QTextStream &idl, bool is_comment) {
+void IDLWriter::writeOperation(UMLOperation *op, TQTextStream &idl, bool is_comment) {
UMLAttributeList atl = op->getParmList();
- QString rettype = op->getTypeName();
+ TQString rettype = op->getTypeName();
if (rettype.isEmpty())
rettype = "void";
@@ -420,8 +420,8 @@ void IDLWriter::writeOperation(UMLOperation *op, QTextStream &idl, bool is_comme
idl << ");" << m_endl << m_endl;
}
-QStringList IDLWriter::defaultDatatypes() {
- QStringList l;
+TQStringList IDLWriter::defaultDatatypes() {
+ TQStringList l;
l.append("boolean");
l.append("char");
l.append("octet");
@@ -436,9 +436,9 @@ QStringList IDLWriter::defaultDatatypes() {
return l;
}
-const QStringList IDLWriter::reservedKeywords() const {
+const TQStringList IDLWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "any"
diff --git a/umbrello/umbrello/codegenerators/idlwriter.h b/umbrello/umbrello/codegenerators/idlwriter.h
index c44cabd6..25e427dd 100644
--- a/umbrello/umbrello/codegenerators/idlwriter.h
+++ b/umbrello/umbrello/codegenerators/idlwriter.h
@@ -46,12 +46,12 @@ public:
*/
virtual Uml::Programming_Language getLanguage();
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -60,10 +60,10 @@ private:
* @param op the class for which we are generating code
* @param idl the stream associated with the output file
*/
- void writeOperation(UMLOperation* op, QTextStream& idl, bool is_comment = false);
+ void writeOperation(UMLOperation* op, TQTextStream& idl, bool is_comment = false);
void computeAssocTypeAndRole(UMLAssociation* a, UMLClassifier *c,
- QString& typeName, QString& roleName);
+ TQString& typeName, TQString& roleName);
static bool isOOClass(UMLClassifier* c);
diff --git a/umbrello/umbrello/codegenerators/javaantcodedocument.cpp b/umbrello/umbrello/codegenerators/javaantcodedocument.cpp
index a3a174a3..cc9e394b 100644
--- a/umbrello/umbrello/codegenerators/javaantcodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/javaantcodedocument.cpp
@@ -18,7 +18,7 @@
#include "javaantcodedocument.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -67,25 +67,25 @@ HierarchicalCodeBlock * JavaANTCodeDocument::newHierarchicalCodeBlock ( ) {
// is so we can create the XMLNodes, if needed.
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
-void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void JavaANTCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new XMLCodeComment(this);
@@ -100,7 +100,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -146,7 +146,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -165,7 +165,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
kError()<<"Unable to find operation create codeoperation for:"<<this<<endl;
} else
if( name == "xmlelementblock" ) {
- QString xmltag = element.attribute("nodeName","UNKNOWN");
+ TQString xmltag = element.attribute("nodeName","UNKNOWN");
XMLElementCodeBlock * block = new XMLElementCodeBlock(this,xmltag);
block->loadFromXMI(element);
if(!addTextBlock(block))
@@ -211,7 +211,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
/** set the class attributes of this object from
* the passed element node.
*/
-void JavaANTCodeDocument::setAttributesFromNode ( QDomElement & root)
+void JavaANTCodeDocument::setAttributesFromNode ( TQDomElement & root)
{
// superclass save
@@ -225,14 +225,14 @@ void JavaANTCodeDocument::setAttributesFromNode ( QDomElement & root)
/**
* load params from the appropriate XMI element node.
*/
-void JavaANTCodeDocument::loadFromXMI ( QDomElement & root ) {
+void JavaANTCodeDocument::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void JavaANTCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void JavaANTCodeDocument::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// superclass call
@@ -245,8 +245,8 @@ void JavaANTCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement
/**
* Save the XMI representation of this object
*/
-void JavaANTCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codedocument" );
+void JavaANTCodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codedocument" );
setAttributesOnNode(doc, docElement);
@@ -288,19 +288,19 @@ void JavaANTCodeDocument::updateContent( ) {
}
// We overwritten by Java language implementation to get lowercase path
-QString JavaANTCodeDocument::getPath ( )
+TQString JavaANTCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"), "/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"), "/");
path.lower();
diff --git a/umbrello/umbrello/codegenerators/javaantcodedocument.h b/umbrello/umbrello/codegenerators/javaantcodedocument.h
index 9d7372f3..97d19c50 100644
--- a/umbrello/umbrello/codegenerators/javaantcodedocument.h
+++ b/umbrello/umbrello/codegenerators/javaantcodedocument.h
@@ -19,8 +19,8 @@
#ifndef JAVAANTCODEDOCUMENT_H
#define JAVAANTCODEDOCUMENT_H
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include "../codedocument.h"
@@ -47,19 +47,19 @@ public:
*/
virtual ~JavaANTCodeDocument ( );
- QString getPath ( );
+ TQString getPath ( );
void updateContent();
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/**
* create a new HierarchicalCodeBlock object belonging to this CodeDocument.
@@ -78,18 +78,18 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/**
* need to overwrite this for java since we need to pick up the
* xml declaration blocks.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
private:
diff --git a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp
index 0e4ccdbf..e1966001 100644
--- a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp
@@ -23,7 +23,7 @@
//
JavaClassDeclarationBlock::JavaClassDeclarationBlock
- ( JavaClassifierCodeDocument * parentDoc, const QString &startText, const QString &endText, const QString &comment)
+ ( JavaClassifierCodeDocument * parentDoc, const TQString &startText, const TQString &endText, const TQString &comment)
: OwnedHierarchicalCodeBlock(parentDoc->getParentClassifier(), parentDoc, startText, endText, comment)
{
init(parentDoc, comment);
@@ -38,8 +38,8 @@ JavaClassDeclarationBlock::~JavaClassDeclarationBlock ( ) { }
/**
* Save the XMI representation of this object
*/
-void JavaClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "javaclassdeclarationblock" );
+void JavaClassDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "javaclassdeclarationblock" );
setAttributesOnNode(doc, blockElement);
@@ -49,7 +49,7 @@ void JavaClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & ro
/**
* load params from the appropriate XMI element node.
*/
-void JavaClassDeclarationBlock::loadFromXMI ( QDomElement & root )
+void JavaClassDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -69,9 +69,9 @@ void JavaClassDeclarationBlock::updateContent ( )
JavaClassifierCodeDocument *parentDoc = dynamic_cast<JavaClassifierCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
- QString endLine = commonPolicy->getNewLineEndingChars();
+ TQString endLine = commonPolicy->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
- QString JavaClassName = parentDoc->getJavaClassName(c->getName());
+ TQString JavaClassName = parentDoc->getJavaClassName(c->getName());
// COMMENT
if(isInterface)
@@ -87,7 +87,7 @@ void JavaClassDeclarationBlock::updateContent ( )
// Now set START/ENDING Text
- QString startText = "";
+ TQString startText = "";
// In Java, we need declare abstract only on classes
if (c->getAbstract() && !isInterface)
startText.append("abstract ");
@@ -153,7 +153,7 @@ void JavaClassDeclarationBlock::updateContent ( )
}
-void JavaClassDeclarationBlock::init (JavaClassifierCodeDocument *parentDoc, const QString &comment)
+void JavaClassDeclarationBlock::init (JavaClassifierCodeDocument *parentDoc, const TQString &comment)
{
setComment(new JavaCodeDocumentation(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h
index 136df809..08e639c7 100644
--- a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h
@@ -17,7 +17,7 @@
#ifndef JAVACLASSDECLARATIONBLOCK_H
#define JAVACLASSDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "javaclassifiercodedocument.h"
#include "../ownedhierarchicalcodeblock.h"
@@ -33,7 +33,7 @@ public:
/**
* Empty Constructor
*/
- explicit JavaClassDeclarationBlock ( JavaClassifierCodeDocument * parentDoc, const QString &start = "", const QString &endText = "}", const QString &comment = "");
+ explicit JavaClassDeclarationBlock ( JavaClassifierCodeDocument * parentDoc, const TQString &start = "", const TQString &endText = "}", const TQString &comment = "");
/**
* Empty Destructor
@@ -43,12 +43,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
@@ -59,7 +59,7 @@ protected:
private:
- void init (JavaClassifierCodeDocument * parent, const QString &comment);
+ void init (JavaClassifierCodeDocument * parent, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp
index 44e6f242..426c6d9a 100644
--- a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp
@@ -29,7 +29,7 @@
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "javacodegenerator.h"
@@ -80,19 +80,19 @@ bool JavaClassifierCodeDocument::forceDoc () {
}
// We overwritten by Java language implementation to get lowercase path
-QString JavaClassifierCodeDocument::getPath ( )
+TQString JavaClassifierCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"), "/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"), "/");
path.lower();
@@ -104,7 +104,7 @@ QString JavaClassifierCodeDocument::getPath ( )
// Other methods
//
-QString JavaClassifierCodeDocument::getJavaClassName (const QString &name) {
+TQString JavaClassifierCodeDocument::getJavaClassName (const TQString &name) {
return Codegen_Utils::capitalizeFirstLetter(CodeGenerator::cleanName(name));
}
@@ -143,25 +143,25 @@ bool JavaClassifierCodeDocument::addCodeOperation (CodeOperation * op ) {
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
// for "javaclassdeclarationblock"
-void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new JavaCodeComment(this);
@@ -176,7 +176,7 @@ void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -222,7 +222,7 @@ void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -283,9 +283,9 @@ void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
}
-QString JavaClassifierCodeDocument::scopeToJavaDecl(Uml::Visibility scope)
+TQString JavaClassifierCodeDocument::scopeToJavaDecl(Uml::Visibility scope)
{
- QString scopeString;
+ TQString scopeString;
switch(scope)
{
case Uml::Visibility::Public:
@@ -361,7 +361,7 @@ void JavaClassifierCodeDocument::updateContent( )
bool isInterface = parentIsInterface();
bool hasOperationMethods = c->getOpList().last() ? true : false;
- QString endLine = commonPolicy->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
+ TQString endLine = commonPolicy->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
//
// START GENERATING CODE/TEXT BLOCKS and COMMENTS FOR THE DOCUMENT
@@ -370,9 +370,9 @@ void JavaClassifierCodeDocument::updateContent( )
//
// PACKAGE CODE BLOCK
//
- QString pkgs = getPackage();
- pkgs.replace(QRegExp("::"), ".");
- QString packageText = getPackage().isEmpty() ? "" : "package "+pkgs+';'+endLine;
+ TQString pkgs = getPackage();
+ pkgs.replace(TQRegExp("::"), ".");
+ TQString packageText = getPackage().isEmpty() ? "" : "package "+pkgs+';'+endLine;
CodeBlockWithComments * pblock = addOrUpdateTaggedCodeBlockWithComments("packages", packageText, "", 0, false);
if(packageText.isEmpty() && pblock->getContentType() == CodeBlock::AutoGenerated)
pblock->setWriteOutText(false);
@@ -384,13 +384,13 @@ void JavaClassifierCodeDocument::updateContent( )
// Q: Why all utils? Isnt just List and Vector the only classes we are using?
// A: doesn't matter at all; its more readable to just include '*' and java compilers
// don't slow down or anything. (TZ)
- QString importStatement = "";
+ TQString importStatement = "";
if ( hasObjectVectorClassFields() )
importStatement.append("import java.util.*;");
//only import classes in a different package from this class
UMLPackageList imports;
- QMap<UMLPackage*, QString> packageMap; // so we don't repeat packages
+ TQMap<UMLPackage*, TQString> packageMap; // so we don't repeat packages
CodeGenerator::findObjectsRelated(c,imports);
for(UMLPackage *con = imports.first(); con ; con = imports.next())
@@ -526,8 +526,8 @@ void JavaClassifierCodeDocument::updateContent( )
constComment->setWriteOutText(true);
// add/get the empty constructor
- QString JavaClassName = getJavaClassName(c->getName());
- QString emptyConstStatement = "public "+JavaClassName+" ( ) { }";
+ TQString JavaClassName = getJavaClassName(c->getName());
+ TQString emptyConstStatement = "public "+JavaClassName+" ( ) { }";
CodeBlockWithComments * emptyConstBlock =
constBlock->addOrUpdateTaggedCodeBlockWithComments("emptyconstructor", emptyConstStatement, "Empty Constructor", 1, false);
// Now, as an additional condition we only show the empty constructor block
diff --git a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h
index ddad6e1a..831e0555 100644
--- a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h
+++ b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h
@@ -19,7 +19,7 @@
#ifndef JAVACLASSIFIERCODEDOCUMENT_H
#define JAVACLASSIFIERCODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfieldlist.h"
#include "../classifiercodedocument.h"
@@ -62,14 +62,14 @@ public:
*/
//CodeDocumentDialog getDialog ( );
- QString scopeToJavaDecl(Uml::Visibility scope);
+ TQString scopeToJavaDecl(Uml::Visibility scope);
// Make it easier on ourselves
JavaCodeGenerationPolicy * getJavaPolicy();
- QString getJavaClassName (const QString &name);
+ TQString getJavaClassName (const TQString &name);
- QString getPath();
+ TQString getPath();
/** add a code operation to this java classifier code document.
* @return bool which is true IF the code operation was added successfully
@@ -85,7 +85,7 @@ protected:
* need to overwrite this for java since we need to pick up the
* java class declaration block.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, JavaClassDeclarationBlock * codeBlock);
diff --git a/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp
index 524e6a48..6c883952 100644
--- a/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp
@@ -52,7 +52,7 @@ JavaCodeAccessorMethod::~JavaCodeAccessorMethod ( ) { }
// Other methods
//
-void JavaCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void JavaCodeAccessorMethod::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
// set super-class attributes
@@ -61,7 +61,7 @@ void JavaCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomEleme
// set local attributes now
}
-void JavaCodeAccessorMethod::setAttributesFromNode( QDomElement & root)
+void JavaCodeAccessorMethod::setAttributesFromNode( TQDomElement & root)
{
// set attributes from superclass method the XMI
@@ -76,18 +76,18 @@ void JavaCodeAccessorMethod::updateContent( )
CodeClassField * parentField = getParentClassField();
JavaCodeClassField * javafield = dynamic_cast<JavaCodeClassField*>(parentField);
- QString fieldName = javafield->getFieldName();
+ TQString fieldName = javafield->getFieldName();
- QString text = "";
+ TQString text = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
{
int maxOccurs = javafield->maximumListOccurances();
- QString fieldType = javafield->getTypeName();
- QString indent = getIndentation();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString fieldType = javafield->getTypeName();
+ TQString indent = getIndentation();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
if(maxOccurs > 0)
- text += "if ("+fieldName+".size() < "+ QString::number(maxOccurs)+") {"+endLine+indent;
+ text += "if ("+fieldName+".size() < "+ TQString::number(maxOccurs)+") {"+endLine+indent;
text += fieldName+".add(value);";
if(maxOccurs > 0)
{
@@ -105,12 +105,12 @@ void JavaCodeAccessorMethod::updateContent( )
case CodeAccessorMethod::REMOVE:
{
int minOccurs = javafield->minimumListOccurances();
- QString fieldType = javafield->getTypeName();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString indent = getIndentation();
+ TQString fieldType = javafield->getTypeName();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString indent = getIndentation();
if(minOccurs > 0)
- text += "if ("+fieldName+".size() >= "+ QString::number(minOccurs)+") {"+endLine+indent;
+ text += "if ("+fieldName+".size() >= "+ TQString::number(minOccurs)+") {"+endLine+indent;
text += fieldName+".remove(value);";
if(minOccurs > 0)
{
@@ -140,13 +140,13 @@ void JavaCodeAccessorMethod::updateMethodDeclaration()
// gather defs
CodeGenerationPolicy::ScopePolicy scopePolicy = commonpolicy->getAttributeAccessorScope();
- QString strVis = javadoc->scopeToJavaDecl(javafield->getVisibility());
- QString fieldName = javafield->getFieldName();
- QString fieldType = javafield->getTypeName();
- QString objectType = javafield->getListObjectType();
+ TQString strVis = javadoc->scopeToJavaDecl(javafield->getVisibility());
+ TQString fieldName = javafield->getFieldName();
+ TQString fieldType = javafield->getTypeName();
+ TQString objectType = javafield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
// set scope of this accessor appropriately..if its an attribute,
// we need to be more sophisticated
@@ -164,10 +164,10 @@ void JavaCodeAccessorMethod::updateMethodDeclaration()
}
// some variables we will need to populate
- QString headerText = "";
- QString methodReturnType = "";
- QString methodName = "";
- QString methodParams = "";
+ TQString headerText = "";
+ TQString methodReturnType = "";
+ TQString methodName = "";
+ TQString methodParams = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
diff --git a/umbrello/umbrello/codegenerators/javacodeaccessormethod.h b/umbrello/umbrello/codegenerators/javacodeaccessormethod.h
index 5a109b59..e26ef033 100644
--- a/umbrello/umbrello/codegenerators/javacodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/javacodeaccessormethod.h
@@ -16,7 +16,7 @@
#ifndef JAVACODEACCESSORMETHOD_H
#define JAVACODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeaccessormethod.h"
@@ -50,12 +50,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration();
virtual void updateContent();
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfield.cpp b/umbrello/umbrello/codegenerators/javacodeclassfield.cpp
index 627b9b3e..0777cf1d 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfield.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeclassfield.cpp
@@ -18,7 +18,7 @@
#include "javacodeclassfield.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -57,7 +57,7 @@ JavaCodeClassField::~JavaCodeClassField ( ) { }
// Other methods
//
-QString JavaCodeClassField::getFieldName() {
+TQString JavaCodeClassField::getFieldName() {
if (parentIsAttribute())
{
UMLAttribute * at = (UMLAttribute*) getParentObject();
@@ -66,7 +66,7 @@ QString JavaCodeClassField::getFieldName() {
else
{
UMLRole * role = (UMLRole*) getParentObject();
- QString roleName = role->getName();
+ TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
@@ -76,7 +76,7 @@ QString JavaCodeClassField::getFieldName() {
}
-QString JavaCodeClassField::getInitialValue() {
+TQString JavaCodeClassField::getInitialValue() {
if (parentIsAttribute())
{
@@ -95,7 +95,7 @@ QString JavaCodeClassField::getInitialValue() {
if(fieldIsSingleValue()) {
// FIX : IF the multiplicity is "1" then we should init a new object here, if its 0 or 1,
// then we can just return 'empty' string (minor problem).
- return QString("");
+ return TQString("");
} else {
return " new "+JavaCodeGenerator::getListFieldClassName()+"( )";
}
@@ -103,7 +103,7 @@ QString JavaCodeClassField::getInitialValue() {
}
-QString JavaCodeClassField::getTypeName ( )
+TQString JavaCodeClassField::getTypeName ( )
{
return JavaCodeGenerator::fixTypeName(CodeClassField::getTypeName());
}
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfield.h b/umbrello/umbrello/codegenerators/javacodeclassfield.h
index 5ed1cea4..b381796c 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfield.h
+++ b/umbrello/umbrello/codegenerators/javacodeclassfield.h
@@ -18,7 +18,7 @@
#ifndef JAVACODECLASSFIELD_H
#define JAVACODECLASSFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfield.h"
@@ -43,11 +43,11 @@ public:
*/
virtual ~JavaCodeClassField ( );
- QString getFieldType();
- QString getFieldName();
- QString getInitialValue();
+ TQString getFieldType();
+ TQString getFieldName();
+ TQString getInitialValue();
- QString getTypeName ( );
+ TQString getTypeName ( );
protected:
private:
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp
index 87ebf78a..5507c314 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp
@@ -59,12 +59,12 @@ void JavaCodeClassFieldDeclarationBlock::updateContent( )
CodeGenerationPolicy::ScopePolicy scopePolicy = commonpolicy->getAssociationFieldScope();
// Set the comment
- QString notes = getParentObject()->getDoc();
+ TQString notes = getParentObject()->getDoc();
getComment()->setText(notes);
// Set the body
- QString staticValue = getParentObject()->getStatic() ? "static " : "";
- QString scopeStr = jdoc->scopeToJavaDecl(getParentObject()->getVisibility());
+ TQString staticValue = getParentObject()->getStatic() ? "static " : "";
+ TQString scopeStr = jdoc->scopeToJavaDecl(getParentObject()->getVisibility());
// IF this is from an association, then scope taken as appropriate to policy
if(!jcf->parentIsAttribute())
@@ -82,14 +82,14 @@ void JavaCodeClassFieldDeclarationBlock::updateContent( )
}
}
- QString typeName = jcf->getTypeName();
- QString fieldName = jcf->getFieldName();
- QString initialV = jcf->getInitialValue();
+ TQString typeName = jcf->getTypeName();
+ TQString fieldName = jcf->getFieldName();
+ TQString initialV = jcf->getInitialValue();
if (!cf->parentIsAttribute() && !cf->fieldIsSingleValue())
typeName = "List";
- QString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
+ TQString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
if (!initialV.isEmpty())
body.append(" = " + initialV);
else if (!cf->parentIsAttribute())
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h
index 8166fced..1ed37a43 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h
@@ -16,7 +16,7 @@
#ifndef JAVACODECLASSFIELDDECLARATIONBLOCK_H
#define JAVACODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/javacodecomment.cpp b/umbrello/umbrello/codegenerators/javacodecomment.cpp
index bec0e87b..588a0acc 100644
--- a/umbrello/umbrello/codegenerators/javacodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/javacodecomment.cpp
@@ -14,12 +14,12 @@
*/
#include "javacodecomment.h"
-#include <qregexp.h>
+#include <tqregexp.h>
// Constructors/Destructors
//
-JavaCodeComment::JavaCodeComment ( CodeDocument * doc, const QString & text )
+JavaCodeComment::JavaCodeComment ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -42,38 +42,38 @@ JavaCodeComment::~JavaCodeComment ( ) { }
// Other methods
//
-QString JavaCodeComment::getNewEditorLine ( int amount ) {
- QString line = getIndentationString(amount) + "// ";
+TQString JavaCodeComment::getNewEditorLine ( int amount ) {
+ TQString line = getIndentationString(amount) + "// ";
return line;
}
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString JavaCodeComment::unformatText ( const QString & text , const QString & indent)
+TQString JavaCodeComment::unformatText ( const TQString & text , const TQString & indent)
{
// remove leading or trailing comment stuff
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
// now leading slashes
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
/**
* @return QString
*/
-QString JavaCodeComment::toString ( )
+TQString JavaCodeComment::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
{
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
output.append(formatMultiLineText (getText(), indent +"// ", endLine));
}
diff --git a/umbrello/umbrello/codegenerators/javacodecomment.h b/umbrello/umbrello/codegenerators/javacodecomment.h
index 1f9b1d8d..468b2a7c 100644
--- a/umbrello/umbrello/codegenerators/javacodecomment.h
+++ b/umbrello/umbrello/codegenerators/javacodecomment.h
@@ -18,7 +18,7 @@
#ifndef JAVACODECOMMENT_H
#define JAVACODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
/**
@@ -40,7 +40,7 @@ public:
/**
* Constructors
*/
- explicit JavaCodeComment ( CodeDocument * doc, const QString & text = "");
+ explicit JavaCodeComment ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -56,17 +56,17 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "//" sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
protected:
diff --git a/umbrello/umbrello/codegenerators/javacodedocumentation.cpp b/umbrello/umbrello/codegenerators/javacodedocumentation.cpp
index e831d885..662b88c9 100644
--- a/umbrello/umbrello/codegenerators/javacodedocumentation.cpp
+++ b/umbrello/umbrello/codegenerators/javacodedocumentation.cpp
@@ -18,7 +18,7 @@
#include "javacodedocumentation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -29,7 +29,7 @@
// Constructors/Destructors
//
-JavaCodeDocumentation::JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const QString & text )
+JavaCodeDocumentation::JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const TQString & text )
: CodeComment(doc, text)
{
@@ -51,8 +51,8 @@ JavaCodeDocumentation::~JavaCodeDocumentation ( ) { }
/**
* Save the XMI representation of this object
*/
-void JavaCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "javacodedocumentation" );
+void JavaCodeDocumentation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "javacodedocumentation" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -61,10 +61,10 @@ void JavaCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root )
/**
* @return QString
*/
-QString JavaCodeDocumentation::toString ( )
+TQString JavaCodeDocumentation::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
@@ -76,9 +76,9 @@ QString JavaCodeDocumentation::toString ( )
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
useDoubleDashOutput = false;
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
if(useDoubleDashOutput)
{
if(!body.isEmpty())
@@ -93,7 +93,7 @@ QString JavaCodeDocumentation::toString ( )
return output;
}
-QString JavaCodeDocumentation::getNewEditorLine ( int amount )
+TQString JavaCodeDocumentation::getNewEditorLine ( int amount )
{
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
@@ -121,20 +121,20 @@ int JavaCodeDocumentation::lastEditableLine() {
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString JavaCodeDocumentation::unformatText ( const QString & text , const QString & indent)
+TQString JavaCodeDocumentation::unformatText ( const TQString & text , const TQString & indent)
{
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
// remove leading or trailing comment stuff
- mytext.remove(QRegExp('^'+indent));
+ mytext.remove(TQRegExp('^'+indent));
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
{
- mytext.remove(QRegExp("^\\/\\*\\*\\s*\n?"));
- mytext.remove(QRegExp("\\s*\\*\\/\\s*\n?$"));
- mytext.remove(QRegExp("^\\s*\\*\\s*"));
+ mytext.remove(TQRegExp("^\\/\\*\\*\\s*\n?"));
+ mytext.remove(TQRegExp("\\s*\\*\\/\\s*\n?$"));
+ mytext.remove(TQRegExp("^\\s*\\*\\s*"));
} else
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/javacodedocumentation.h b/umbrello/umbrello/codegenerators/javacodedocumentation.h
index 246b87a6..acc386c1 100644
--- a/umbrello/umbrello/codegenerators/javacodedocumentation.h
+++ b/umbrello/umbrello/codegenerators/javacodedocumentation.h
@@ -18,7 +18,7 @@
#ifndef JAVACODEDOCUMENTATION_H
#define JAVACODEDOCUMENTATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class JavaClassifierCodeDocument;
@@ -42,7 +42,7 @@ public:
/**
* Constructors
*/
- explicit JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const QString & text = "");
+ explicit JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -58,22 +58,22 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the " * " sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp
index 2dcc834e..6225485f 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp
@@ -174,7 +174,7 @@ void JavaCodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSig
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * JavaCodeGenerationPolicy::createPage ( QWidget *parent, const char *name ) {
+CodeGenerationPolicyPage * JavaCodeGenerationPolicy::createPage ( TQWidget *parent, const char *name ) {
return new JavaCodeGenerationPolicyPage ( parent, name, this );
}
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h
index 2a40cb57..e72c5161 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h
@@ -17,7 +17,7 @@
#ifndef JAVACODEGENERATIONPOLICY_H
#define JAVACODEGENERATIONPOLICY_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codegenpolicyext.h"
#include "../codegenerationpolicy.h"
@@ -96,7 +96,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
protected:
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp
index fd6d2ae3..c7bfbf0b 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp
@@ -17,16 +17,16 @@
// own header
#include "javacodegenerationpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klocale.h>
// app includes
#include "javacodegenerationformbase.h"
#include "../uml.h"
-JavaCodeGenerationPolicyPage::JavaCodeGenerationPolicyPage( QWidget *parent, const char *name, JavaCodeGenerationPolicy * policy )
+JavaCodeGenerationPolicyPage::JavaCodeGenerationPolicyPage( TQWidget *parent, const char *name, JavaCodeGenerationPolicy * policy )
: CodeGenerationPolicyPage(parent, name, policy)
{
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h
index 3b6f85e0..01b739b9 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h
@@ -30,7 +30,7 @@ class JavaCodeGenerationPolicyPage : public CodeGenerationPolicyPage {
Q_OBJECT
public:
- explicit JavaCodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, JavaCodeGenerationPolicy * policy = 0);
+ explicit JavaCodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, JavaCodeGenerationPolicy * policy = 0);
virtual ~JavaCodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/codegenerators/javacodegenerator.cpp b/umbrello/umbrello/codegenerators/javacodegenerator.cpp
index 167804af..0f78a0fb 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/javacodegenerator.cpp
@@ -18,7 +18,7 @@
#include "javacodegenerator.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,7 +34,7 @@ const bool JavaCodeGenerator::DEFAULT_BUILD_ANT_DOC = false;
// Constructors/Destructors
//
-JavaCodeGenerator::JavaCodeGenerator (QDomElement & elem)
+JavaCodeGenerator::JavaCodeGenerator (TQDomElement & elem)
: CodeGenerator(elem)
{
init();
@@ -79,7 +79,7 @@ bool JavaCodeGenerator::getCreateANTBuildFile ( ) {
}
// In the Java version, we make the ANT build file also available.
-CodeViewerDialog * JavaCodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * JavaCodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
CodeViewerDialog *dialog = new CodeViewerDialog(parent, doc, state);
@@ -103,8 +103,8 @@ bool JavaCodeGenerator::getAutoGenerateAssocAccessors ( )
return getJavaPolicy()->getAutoGenerateAssocAccessors ();
}
-QString JavaCodeGenerator::getListFieldClassName () {
- return QString("Vector");
+TQString JavaCodeGenerator::getListFieldClassName () {
+ return TQString("Vector");
}
// Other methods
@@ -113,9 +113,9 @@ QString JavaCodeGenerator::getListFieldClassName () {
// IF the type is "string" we need to declare it as
// the Java Object "String" (there is no string primative in Java).
// Same thing again for "bool" to "boolean"
-QString JavaCodeGenerator::fixTypeName(const QString &string)
+TQString JavaCodeGenerator::fixTypeName(const TQString &string)
{
- if (string.isEmpty() || string.contains(QRegExp("^\\s+$")))
+ if (string.isEmpty() || string.contains(TQRegExp("^\\s+$")))
return "void";
if (string == "string")
return "String";
@@ -154,8 +154,8 @@ void JavaCodeGenerator::init() {
setCreateANTBuildFile(DEFAULT_BUILD_ANT_DOC);
}
-QStringList JavaCodeGenerator::defaultDatatypes() {
- QStringList l;
+TQStringList JavaCodeGenerator::defaultDatatypes() {
+ TQStringList l;
l.append("int");
l.append("char");
l.append("boolean");
@@ -168,9 +168,9 @@ QStringList JavaCodeGenerator::defaultDatatypes() {
return l;
}
-const QStringList JavaCodeGenerator::reservedKeywords() const {
+const TQStringList JavaCodeGenerator::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "abstract"
diff --git a/umbrello/umbrello/codegenerators/javacodegenerator.h b/umbrello/umbrello/codegenerators/javacodegenerator.h
index 29edb16f..3d94ad5f 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerator.h
+++ b/umbrello/umbrello/codegenerators/javacodegenerator.h
@@ -19,7 +19,7 @@
#ifndef JAVACODEGENERATOR_H
#define JAVACODEGENERATOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeviewerstate.h"
#include "../codegenerator.h"
#include "../codeblockwithcomments.h"
@@ -47,7 +47,7 @@ public:
* Empty Constructor
*/
JavaCodeGenerator ();
- JavaCodeGenerator (QDomElement & element);
+ JavaCodeGenerator (TQDomElement & element);
/**
* Empty Destructor
@@ -87,11 +87,11 @@ public:
/**
* Get the list variable class name to use. For Java, we have set this to "Vector".
*/
- static QString getListFieldClassName();
+ static TQString getListFieldClassName();
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
// Other methods
@@ -114,19 +114,19 @@ public:
/**
* Adds Java's primitives as datatypes
*/
- virtual QStringList defaultDatatypes();
+ virtual TQStringList defaultDatatypes();
/**
* IF the type is "string" we need to declare it as
* the Java Object "String" (there is no string primative in Java).
* Same thing again for "bool" to "boolean".
*/
- static QString fixTypeName(const QString &string);
+ static TQString fixTypeName(const TQString &string);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
protected:
diff --git a/umbrello/umbrello/codegenerators/javacodeoperation.cpp b/umbrello/umbrello/codegenerators/javacodeoperation.cpp
index 84ce0331..c7e7d162 100644
--- a/umbrello/umbrello/codegenerators/javacodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeoperation.cpp
@@ -25,7 +25,7 @@
//
JavaCodeOperation::JavaCodeOperation
- ( JavaClassifierCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+ ( JavaClassifierCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -52,15 +52,15 @@ void JavaCodeOperation::updateMethodDeclaration()
JavaClassifierCodeDocument * javadoc = dynamic_cast<JavaClassifierCodeDocument*>(doc);
UMLOperation * o = getParentOperation();
bool isInterface = javadoc->getParentClassifier()->isInterface();
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
// now, the starting text.
- QString strVis = javadoc->scopeToJavaDecl(o->getVisibility());
+ TQString strVis = javadoc->scopeToJavaDecl(o->getVisibility());
// no return type for constructors
- QString fixedReturn = JavaCodeGenerator::fixTypeName(o->getTypeName());
- QString returnType = o->isConstructorOperation() ? QString("") : (fixedReturn + QString(" "));
- QString methodName = o->getName();
- QString paramStr = QString("");
+ TQString fixedReturn = JavaCodeGenerator::fixTypeName(o->getTypeName());
+ TQString returnType = o->isConstructorOperation() ? TQString("") : (fixedReturn + TQString(" "));
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -68,18 +68,18 @@ void JavaCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
paramStr += rType + ' ' + paramName;
paramNum++;
if (paramNum != nrofParam )
paramStr += ", ";
}
- QString maybeStatic;
+ TQString maybeStatic;
if (o->getStatic())
maybeStatic = "static ";
- QString startText = strVis + ' ' + maybeStatic + returnType + methodName + " (" + paramStr + ')';
+ TQString startText = strVis + ' ' + maybeStatic + returnType + methodName + " (" + paramStr + ')';
// IF the parent is an interface, our operations look different
// e.g. they have no body
@@ -95,7 +95,7 @@ void JavaCodeOperation::updateMethodDeclaration()
// Lastly, for text content generation, we fix the comment on the
// operation, IF the codeop is autogenerated & currently empty
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
if(comment.isEmpty() && getContentType() == CodeBlock::AutoGenerated)
{
UMLAttributeList parameters = o->getParmList();
diff --git a/umbrello/umbrello/codegenerators/javacodeoperation.h b/umbrello/umbrello/codegenerators/javacodeoperation.h
index 08a555d8..50087fd7 100644
--- a/umbrello/umbrello/codegenerators/javacodeoperation.h
+++ b/umbrello/umbrello/codegenerators/javacodeoperation.h
@@ -18,7 +18,7 @@
#ifndef JAVACODEOPERATION_H
#define JAVACODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class JavaClassifierCodeDocument;
@@ -34,7 +34,7 @@ public:
/**
* Empty Constructor
*/
- JavaCodeOperation ( JavaClassifierCodeDocument * doc, UMLOperation * op, const QString & body = "", const QString & comment = "");
+ JavaCodeOperation ( JavaClassifierCodeDocument * doc, UMLOperation * op, const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
diff --git a/umbrello/umbrello/codegenerators/javawriter.cpp b/umbrello/umbrello/codegenerators/javawriter.cpp
index 3e945c60..db6d6515 100644
--- a/umbrello/umbrello/codegenerators/javawriter.cpp
+++ b/umbrello/umbrello/codegenerators/javawriter.cpp
@@ -20,9 +20,9 @@
// own header
#include "javawriter.h"
// qt includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
// kde includes
#include <kdebug.h>
// app includes
@@ -55,7 +55,7 @@ void JavaWriter::writeClass(UMLClassifier *c)
isInterface = c->isInterface();
- QString fileName = cleanName(c->getName().lower());
+ TQString fileName = cleanName(c->getName().lower());
//find an appropriate name for our file
fileName = findFileName(c,".java");
@@ -65,7 +65,7 @@ void JavaWriter::writeClass(UMLClassifier *c)
}
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
@@ -131,14 +131,14 @@ void JavaWriter::writeClass(UMLClassifier *c)
bool hasVectorFields = hasAssociations ? true : false;
// open text stream to file
- QTextStream java(&file);
+ TQTextStream java(&file);
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".java");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),file.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),file.name());
java<<str<<m_endl;
}
@@ -161,7 +161,7 @@ void JavaWriter::writeClass(UMLClassifier *c)
for (UMLPackage *con = imports.first(); con; con = imports.next()) {
if (con->getBaseType() == Uml::ot_Datatype)
continue;
- QString pkg = con->getPackage();
+ TQString pkg = con->getPackage();
if (!pkg.isEmpty() && pkg != c->getPackage())
java << "import " << pkg << "." << cleanName(con->getName()) << ";"
<< m_endl;
@@ -260,10 +260,10 @@ void JavaWriter::writeClass(UMLClassifier *c)
emit codeGenerated(c, true);
}
-void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
+void JavaWriter::writeClassDecl(UMLClassifier *c, TQTextStream &java)
{
- QString classname = cleanName(c->getName()); // our class name
+ TQString classname = cleanName(c->getName()); // our class name
// write documentation for class, if any, first
if(forceDoc() || !c->getDoc().isEmpty())
@@ -277,7 +277,7 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
}
// Now write the actual class declaration
- QString scope = ""; // = scopeToJavaDecl(c->getVisibility());
+ TQString scope = ""; // = scopeToJavaDecl(c->getVisibility());
if (c->getVisibility() != Uml::Visibility::Public) {
// We should emit a warning in here .. java doesn't like to allow
// private/protected classes. The best we can do (I believe)
@@ -287,7 +287,7 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
} else
scope = "public ";
- java<<((c->getAbstract() && !isInterface) ? QString("abstract ") : QString(""))<<scope;
+ java<<((c->getAbstract() && !isInterface) ? TQString("abstract ") : TQString(""))<<scope;
if(isInterface)
java<<"interface ";
else
@@ -300,9 +300,9 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
if (template_params.count()) {
java << "<";
for (UMLTemplate *t = template_params.first(); t; ) {
- QString formalName = t->getName();
+ TQString formalName = t->getName();
java << formalName;
- QString typeName = t->getTypeName();
+ TQString typeName = t->getTypeName();
if (typeName != "class") {
java << " extends " << typeName;
}
@@ -355,55 +355,55 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
}
void JavaWriter::writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &java )
+ UMLAttributeList &atpriv, TQTextStream &java )
{
UMLAttribute *at;
for(at=atpub.first(); at; at=atpub.next())
{
- QString documentation = at->getDoc();
- QString staticValue = at->getStatic() ? "static " : "";
- QString typeName = fixTypeName(at->getTypeName());
- QString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
+ TQString documentation = at->getDoc();
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, m_indentation, java, true);
java<<startline<<staticValue<<"public "<<typeName<<" "<<cleanName(at->getName())
- <<(initialValue.isEmpty()?QString(""):QString(" = ") + initialValue)<<";";
+ <<(initialValue.isEmpty()?TQString(""):TQString(" = ") + initialValue)<<";";
}
for(at=atprot.first();at;at=atprot.next())
{
- QString documentation = at->getDoc();
- QString typeName = fixTypeName(at->getTypeName());
- QString staticValue = at->getStatic() ? "static " : "";
- QString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
+ TQString documentation = at->getDoc();
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, m_indentation, java, true);
java<<startline<<staticValue<<"protected "<<typeName<<" "<<cleanName(at->getName())
- <<(initialValue.isEmpty()?QString(""):QString(" = ") + initialValue)<<";";
+ <<(initialValue.isEmpty()?TQString(""):TQString(" = ") + initialValue)<<";";
}
for(at=atpriv.first();at;at=atpriv.next())
{
- QString documentation = at->getDoc();
- QString typeName = fixTypeName(at->getTypeName());
- QString staticValue = at->getStatic() ? "static " : "";
- QString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
+ TQString documentation = at->getDoc();
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, m_indentation, java, true);
java<<startline<<staticValue<<"private "<<typeName<<" "<<cleanName(at->getName())
- <<(initialValue.isEmpty()?QString(""):QString(" = ") + initialValue)<<";";
+ <<(initialValue.isEmpty()?TQString(""):TQString(" = ") + initialValue)<<";";
}
}
-void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &java)
+void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &java)
{
UMLAttribute *at;
for(at=atpub.first(); at; at=atpub.next())
{
- QString fieldName = cleanName(at->getName());
+ TQString fieldName = cleanName(at->getName());
// force capitalizing the field name, this is silly,
// from what I can tell, this IS the default behavior for
// cleanName. I dunno why its not working -b.t.
@@ -419,17 +419,17 @@ void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility
}
-void JavaWriter::writeComment(const QString &comment, const QString &myIndent,
- QTextStream &java, bool javaDocStyle)
+void JavaWriter::writeComment(const TQString &comment, const TQString &myIndent,
+ TQTextStream &java, bool javaDocStyle)
{
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
- if (comment.contains(QRegExp("\n"))) {
+ if (comment.contains(TQRegExp("\n"))) {
if(javaDocStyle)
java << myIndent << "/**" << m_endl;
- QStringList lines = QStringList::split( "\n", comment);
+ TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
{
writeBlankLine(java);
@@ -456,7 +456,7 @@ void JavaWriter::writeComment(const QString &comment, const QString &myIndent,
}
}
-void JavaWriter::writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &java)
+void JavaWriter::writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &java)
{
writeBlankLine(java);
java<<indent<<"/**"<<m_endl;
@@ -466,14 +466,14 @@ void JavaWriter::writeDocumentation(QString header, QString body, QString end, Q
java<<formatDoc(body, indent+" * ");
if (!end.isEmpty())
{
- QStringList lines = QStringList::split( "\n", end);
+ TQStringList lines = TQStringList::split( "\n", end);
for(uint i= 0; i < lines.count(); i++)
java<<formatDoc(lines[i], indent+" * ");
}
java<<indent<<" */";
}
-void JavaWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &java)
+void JavaWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &java)
{
if( forceSections() || !associations.isEmpty() )
@@ -496,30 +496,30 @@ void JavaWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDT
// print RoleB decl
if (printRoleB)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B), a->getMulti(Uml::B), a->getRoleDoc(Uml::B), a->getVisibility(Uml::B), java);
}
// print RoleA decl
if (printRoleA)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A), a->getMulti(Uml::A), a->getRoleDoc(Uml::A), a->getVisibility(Uml::A), java);
}
}
}
}
-void JavaWriter::writeAssociationRoleDecl(QString fieldClassName,
- QString roleName, QString multi,
- QString doc, Uml::Visibility visib, QTextStream &java)
+void JavaWriter::writeAssociationRoleDecl(TQString fieldClassName,
+ TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility visib, TQTextStream &java)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
if (roleName.isEmpty())
return;
- QString scope = scopeToJavaDecl(visib);
+ TQString scope = scopeToJavaDecl(visib);
// always put space between this and prior decl, if any
writeBlankLine(java);
@@ -530,14 +530,14 @@ void JavaWriter::writeAssociationRoleDecl(QString fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
+ TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
java<<startline<<scope<<" "<<fieldClassName<<" "<<fieldVarName<<";";
}
else
{
- QString fieldVarName = roleName.lower() + "Vector";
+ TQString fieldVarName = roleName.lower() + "Vector";
java<<startline<<scope<<" Vector "<<fieldVarName<<" = new Vector();";
// from here we could initialize default values, or put in an init() section
// of the constructors
@@ -545,7 +545,7 @@ void JavaWriter::writeAssociationRoleDecl(QString fieldClassName,
}
-void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, QTextStream &java)
+void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, TQTextStream &java)
{
if( forceSections() || !associations.isEmpty() )
{
@@ -558,7 +558,7 @@ void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLCl
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
writeAssociationRoleMethod(fieldClassName,
a->getRoleName(Uml::B),
a->getMulti(Uml::B), a->getRoleDoc(Uml::B),
@@ -571,7 +571,7 @@ void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLCl
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
writeAssociationRoleMethod(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A),
a->getRoleDoc(Uml::A),
@@ -585,33 +585,33 @@ void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLCl
}
}
-void JavaWriter::writeAssociationRoleMethod (QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &java)
+void JavaWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &java)
{
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
+ TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, visib, change, false, java);
}
else
{
- QString fieldVarName = roleName.lower() + "Vector";
+ TQString fieldVarName = roleName.lower() + "Vector";
writeVectorAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, visib, change, java);
}
}
-void JavaWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+void JavaWriter::writeVectorAttributeAccessorMethods (TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type changeType,
- QTextStream &java)
+ TQTextStream &java)
{
fieldClassName = fixTypeName(fieldClassName);
fieldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
- QString strVis = scopeToJavaDecl(visibility);
+ TQString strVis = scopeToJavaDecl(visibility);
// ONLY IF changeability is NOT Frozen
if (changeType != Uml::chg_Frozen)
@@ -641,13 +641,13 @@ void JavaWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QS
}
-void JavaWriter::writeSingleAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+void JavaWriter::writeSingleAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- bool isFinal, QTextStream &java)
+ bool isFinal, TQTextStream &java)
{
- QString strVis = scopeToJavaDecl(visibility);
+ TQString strVis = scopeToJavaDecl(visibility);
fieldClassName = fixTypeName(fieldClassName);
fieldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
@@ -667,7 +667,7 @@ void JavaWriter::writeSingleAttributeAccessorMethods(QString fieldClassName, QSt
writeBlankLine(java);
}
-void JavaWriter::writeConstructor(UMLClassifier *c, QTextStream &java)
+void JavaWriter::writeConstructor(UMLClassifier *c, TQTextStream &java)
{
if (forceDoc())
@@ -680,7 +680,7 @@ void JavaWriter::writeConstructor(UMLClassifier *c, QTextStream &java)
}
// write the first constructor
- QString className = cleanName(c->getName());
+ TQString className = cleanName(c->getName());
java<<m_indentation<<"public "<<className<<" () { };";
}
@@ -688,7 +688,7 @@ void JavaWriter::writeConstructor(UMLClassifier *c, QTextStream &java)
// IF the type is "string" we need to declare it as
// the Java Object "String" (there is no string primative in Java).
// Same thing again for "bool" to "boolean"
-QString JavaWriter::fixTypeName(const QString& string)
+TQString JavaWriter::fixTypeName(const TQString& string)
{
if (string.isEmpty())
return "void";
@@ -699,8 +699,8 @@ QString JavaWriter::fixTypeName(const QString& string)
return string;
}
-QStringList JavaWriter::defaultDatatypes() {
- QStringList l;
+TQStringList JavaWriter::defaultDatatypes() {
+ TQStringList l;
l.append("int");
l.append("char");
l.append("boolean");
@@ -783,7 +783,7 @@ void JavaWriter::getInterfacesOperationsToBeImplemented(UMLClassifier *c, UMLOpe
}
}
-void JavaWriter::writeOperations(UMLClassifier *c, QTextStream &java) {
+void JavaWriter::writeOperations(UMLClassifier *c, TQTextStream &java) {
UMLOperationList opl;
UMLOperationList oppub,opprot,oppriv;
oppub.setAutoDelete(false);
@@ -841,21 +841,21 @@ void JavaWriter::writeOperations(UMLClassifier *c, QTextStream &java) {
}
-void JavaWriter::writeOperations(UMLOperationList &oplist, QTextStream &java) {
+void JavaWriter::writeOperations(UMLOperationList &oplist, TQTextStream &java) {
UMLOperation *op;
UMLAttributeList atl;
UMLAttribute *at;
int i,j;
- QString str;
+ TQString str;
// generate method decl for each operation given
for( op=oplist.first(); op ;op=oplist.next())
{
- QString returnStr = "";
+ TQString returnStr = "";
// write documentation
- QString methodReturnType = fixTypeName(op->getTypeName());
+ TQString methodReturnType = fixTypeName(op->getTypeName());
if(methodReturnType != "void")
returnStr += "@return "+methodReturnType+"\n";
@@ -869,12 +869,12 @@ void JavaWriter::writeOperations(UMLOperationList &oplist, QTextStream &java) {
i= atl.count();
j=0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
str += typeName + ' ' + atName +
(!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
+ ((j < i-1)?", ":"");
returnStr += "@param "+atName+' '+at->getDoc()+"\n";
}
@@ -892,7 +892,7 @@ void JavaWriter::writeOperations(UMLOperationList &oplist, QTextStream &java) {
}
}
-QString JavaWriter::fixInitialStringDeclValue(QString value, QString type)
+TQString JavaWriter::fixInitialStringDeclValue(TQString value, TQString type)
{
// check for strings only
if (!value.isEmpty() && type == "String") {
@@ -904,9 +904,9 @@ QString JavaWriter::fixInitialStringDeclValue(QString value, QString type)
return value;
}
-QString JavaWriter::scopeToJavaDecl(Uml::Visibility scope)
+TQString JavaWriter::scopeToJavaDecl(Uml::Visibility scope)
{
- QString scopeString;
+ TQString scopeString;
switch(scope)
{
case Uml::Visibility::Public:
@@ -924,12 +924,12 @@ QString JavaWriter::scopeToJavaDecl(Uml::Visibility scope)
}
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString JavaWriter::getUMLObjectName(UMLObject *obj)
+TQString JavaWriter::getUMLObjectName(UMLObject *obj)
{
- return(obj!=0)?obj->getName():QString("NULL");
+ return(obj!=0)?obj->getName():TQString("NULL");
}
-void JavaWriter::writeBlankLine(QTextStream &java)
+void JavaWriter::writeBlankLine(TQTextStream &java)
{
java<<m_endl;
}
diff --git a/umbrello/umbrello/codegenerators/javawriter.h b/umbrello/umbrello/codegenerators/javawriter.h
index 2469f6d0..69dada17 100644
--- a/umbrello/umbrello/codegenerators/javawriter.h
+++ b/umbrello/umbrello/codegenerators/javawriter.h
@@ -60,7 +60,7 @@ public:
/**
* Overrides method from class CodeGenerator
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
@@ -68,12 +68,12 @@ private:
* Writes class's documentation then the class header
* public abstract class Foo extents {
*/
- void writeClassDecl(UMLClassifier *c, QTextStream &java);
+ void writeClassDecl(UMLClassifier *c, TQTextStream &java);
/**
* Writes the comment and class constructor
*/
- void writeConstructor(UMLClassifier *c, QTextStream &java);
+ void writeConstructor(UMLClassifier *c, TQTextStream &java);
/**
* return true if the two operations have the same name and the same parameters
@@ -111,21 +111,21 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeOperations(UMLClassifier *c, QTextStream &j);
+ void writeOperations(UMLClassifier *c, TQTextStream &j);
/**
* write a list of operations for a given class
* @param list the list of operations you want to write
* @param j the stream associated with the output file
*/
- void writeOperations(UMLOperationList &list, QTextStream &j);
+ void writeOperations(UMLOperationList &list, TQTextStream &j);
/**
* write all attributes for a given class
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* writes the Attribute declarations
@@ -135,94 +135,94 @@ private:
* @param java text stream
*/
void writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &java );
+ UMLAttributeList &atpriv, TQTextStream &java );
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
- void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &java);
+ void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &java);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, Uml::Visibility visib, QTextStream &java);
+ void writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility visib, TQTextStream &java);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in atpub
*/
- void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &java);
+ void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &java);
/**
* calls @ref writeAssociationRoleMethod() on each of the associations in the given list
*/
void writeAssociationMethods(UMLAssociationList associations, UMLClassifier *thisClass,
- QTextStream &java);
+ TQTextStream &java);
/**
* calls @ref writeSingleAttributeAccessorMethods() or @ref
* writeVectorAttributeAccessorMethods() on the assocaition
* role
*/
- void writeAssociationRoleMethod(QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &java);
+ void writeAssociationRoleMethod(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &java);
/**
* Writes getFoo() and setFoo() accessor methods for the attribute
*/
- void writeSingleAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeSingleAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- bool isFinal, QTextStream &java);
+ bool isFinal, TQTextStream &java);
/**
* Writes addFoo() and removeFoo() accessor methods for the Vector attribute
*/
- void writeVectorAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeVectorAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- QTextStream &java);
+ TQTextStream &java);
/**
* Writes a // style comment
*/
- void writeComment(const QString &text, const QString &indent, QTextStream &java, bool javaDocStyle=false);
+ void writeComment(const TQString &text, const TQString &indent, TQTextStream &java, bool javaDocStyle=false);
/**
* Writes a documentation comment
*/
- void writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &java);
+ void writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &java);
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Replaces `string' with `String' and `bool' with `boolean'
*/
- QString fixTypeName(const QString& string);
+ TQString fixTypeName(const TQString& string);
/**
* check that initial values of strings have quotes around them
*/
- QString fixInitialStringDeclValue(QString value, QString type);
+ TQString fixInitialStringDeclValue(TQString value, TQString type);
/**
* Write a blank line
*/
- void writeBlankLine(QTextStream& java);
+ void writeBlankLine(TQTextStream& java);
/**
* a little method for converting scope to string value
*/
- QString scopeToJavaDecl(Uml::Visibility scope);
+ TQString scopeToJavaDecl(Uml::Visibility scope);
/**
* A \n, used at the end of each line
*/
- QString startline;
+ TQString startline;
/**
* Whether or not this concept is an interface.
diff --git a/umbrello/umbrello/codegenerators/jswriter.cpp b/umbrello/umbrello/codegenerators/jswriter.cpp
index 1dbb45d6..ea4cc2e1 100644
--- a/umbrello/umbrello/codegenerators/jswriter.cpp
+++ b/umbrello/umbrello/codegenerators/jswriter.cpp
@@ -22,8 +22,8 @@
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
JSWriter::JSWriter() {
}
@@ -39,8 +39,8 @@ void JSWriter::writeClass(UMLClassifier *c)
return;
}
- QString classname = cleanName(c->getName());
- QString fileName = c->getName().lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = c->getName().lower();
//find an appropriate name for our file
fileName = findFileName(c,".js");
@@ -50,13 +50,13 @@ void JSWriter::writeClass(UMLClassifier *c)
return;
}
- QFile filejs;
+ TQFile filejs;
if(!openFile(filejs, fileName))
{
emit codeGenerated(c, false);
return;
}
- QTextStream js(&filejs);
+ TQTextStream js(&filejs);
//////////////////////////////
//Start generating the code!!
@@ -64,12 +64,12 @@ void JSWriter::writeClass(UMLClassifier *c)
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".js");
if(!str.isEmpty())
{
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filejs.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filejs.name());
js << str << m_endl;
}
@@ -79,7 +79,7 @@ void JSWriter::writeClass(UMLClassifier *c)
findObjectsRelated(c,includes);
for (UMLPackage *conc = includes.first(); conc; conc = includes.next())
{
- QString headerName = findFileName(conc, ".js");
+ TQString headerName = findFileName(conc, ".js");
if ( !headerName.isEmpty() )
{
js << "#include \"" << headerName << "\"" << m_endl;
@@ -123,7 +123,7 @@ void JSWriter::writeClass(UMLClassifier *c)
UMLAttributeList atl = c->getAttributeList();
js << "/**" << m_endl;
- QString temp = "_init sets all " + classname + " attributes to their default value."
+ TQString temp = "_init sets all " + classname + " attributes to their default value."
" Make sure to call this method within your class constructor";
js << formatDoc(temp, " * ");
js << " */" << m_endl;
@@ -183,13 +183,13 @@ void JSWriter::writeClass(UMLClassifier *c)
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void JSWriter::writeAssociation(QString& classname, UMLAssociationList& assocList , QTextStream &js)
+void JSWriter::writeAssociation(TQString& classname, UMLAssociationList& assocList , TQTextStream &js)
{
for (UMLAssociation *a = assocList.first(); a; a = assocList.next()) {
// association side
Uml::Role_Type role = (a->getObject(Uml::A)->getName() == classname ? Uml::B : Uml::A);
- QString roleName(cleanName(a->getRoleName(role)));
+ TQString roleName(cleanName(a->getRoleName(role)));
if (!roleName.isEmpty()) {
@@ -213,7 +213,7 @@ void JSWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
int nMulti = a->getMulti(role).toInt(&okCvt,10);
bool isNotMulti = a->getMulti(role).isEmpty() || (okCvt && nMulti == 1);
- QString typeName(cleanName(a->getObject(role)->getName()));
+ TQString typeName(cleanName(a->getObject(role)->getName()));
if (isNotMulti)
js << m_indentation << "this.m_" << roleName << " = new " << typeName << "();" << m_endl;
@@ -225,7 +225,7 @@ void JSWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
}
}
-void JSWriter::writeOperations(QString classname, UMLOperationList *opList, QTextStream &js)
+void JSWriter::writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &js)
{
UMLOperation *op;
UMLAttribute *at;
@@ -260,7 +260,7 @@ void JSWriter::writeOperations(QString classname, UMLOperationList *opList, QTex
for (at = atl.first(); at ;at = atl.next(),j++)
{
js << cleanName(at->getName())
- << (!(at->getInitialValue().isEmpty()) ? (QString(" = ")+at->getInitialValue()) : QString(""))
+ << (!(at->getInitialValue().isEmpty()) ? (TQString(" = ")+at->getInitialValue()) : TQString(""))
<< ((j < i-1)?", ":"");
}
js << ")" << m_endl << "{" << m_endl <<
@@ -276,9 +276,9 @@ Uml::Programming_Language JSWriter::getLanguage() {
return Uml::pl_JavaScript;
}
-const QStringList JSWriter::reservedKeywords() const {
+const TQStringList JSWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "break"
diff --git a/umbrello/umbrello/codegenerators/jswriter.h b/umbrello/umbrello/codegenerators/jswriter.h
index a9c5ebde..679222b3 100644
--- a/umbrello/umbrello/codegenerators/jswriter.h
+++ b/umbrello/umbrello/codegenerators/jswriter.h
@@ -47,7 +47,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -63,7 +63,7 @@ private:
* @param opList the list of operations
* @param js output stream for the JS file
*/
- void writeOperations(QString classname, UMLOperationList *opList, QTextStream &js);
+ void writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &js);
/**
* write a list of associations
@@ -72,7 +72,7 @@ private:
* @param assocList the list of associations
* @param as output stream for the AS file
*/
- void writeAssociation(QString& classname, UMLAssociationList& assoclist , QTextStream &js);
+ void writeAssociation(TQString& classname, UMLAssociationList& assoclist , TQTextStream &js);
};
#endif //JSWRITER
diff --git a/umbrello/umbrello/codegenerators/pascalwriter.cpp b/umbrello/umbrello/codegenerators/pascalwriter.cpp
index 92a45bd2..766ea6df 100644
--- a/umbrello/umbrello/codegenerators/pascalwriter.cpp
+++ b/umbrello/umbrello/codegenerators/pascalwriter.cpp
@@ -14,9 +14,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../uml.h"
@@ -33,7 +33,7 @@
#include "../umlnamespace.h"
#include "classifierinfo.h"
-const QString PascalWriter::defaultPackageSuffix = "_Holder";
+const TQString PascalWriter::defaultPackageSuffix = "_Holder";
PascalWriter::PascalWriter() {
}
@@ -58,7 +58,7 @@ bool PascalWriter::isOOClass(UMLClassifier *c) {
kDebug() << "PascalWriter::isOOClass: unknown object type " << ot << endl;
return false;
}
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant" || stype == "CORBATypedef" ||
stype == "CORBAStruct" || stype == "CORBAUnion")
return false;
@@ -67,10 +67,10 @@ bool PascalWriter::isOOClass(UMLClassifier *c) {
return true;
}
-QString PascalWriter::qualifiedName(UMLPackage *p, bool withType, bool byValue) {
+TQString PascalWriter::qualifiedName(UMLPackage *p, bool withType, bool byValue) {
UMLPackage *umlPkg = p->getUMLPackage();
- QString className = cleanName(p->getName());
- QString retval;
+ TQString className = cleanName(p->getName());
+ TQString retval;
if (umlPkg == UMLApp::app()->getDocument()->getRootFolder(Uml::mt_Logical))
umlPkg = NULL;
@@ -101,7 +101,7 @@ QString PascalWriter::qualifiedName(UMLPackage *p, bool withType, bool byValue)
}
void PascalWriter::computeAssocTypeAndRole
-(UMLAssociation *a, QString& typeName, QString& roleName) {
+(UMLAssociation *a, TQString& typeName, TQString& roleName) {
roleName = a->getRoleName(Uml::A);
if (roleName.isEmpty()) {
if (a->getMulti(Uml::A).isEmpty()) {
@@ -127,8 +127,8 @@ void PascalWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
- QString fileName = qualifiedName(c).lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = qualifiedName(c).lower();
fileName.replace('.', '-');
//find an appropriate name for our file
@@ -138,7 +138,7 @@ void PascalWriter::writeClass(UMLClassifier *c) {
return;
}
- QFile file;
+ TQFile file;
if (!openFile(file, fileName)) {
emit codeGenerated(c, false);
return;
@@ -146,17 +146,17 @@ void PascalWriter::writeClass(UMLClassifier *c) {
// Start generating the code.
- QTextStream pas(&file);
+ TQTextStream pas(&file);
//try to find a heading file(license, comments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".pas");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), file.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), file.name());
pas << str << endl;
}
- QString unit = qualifiedName(c);
+ TQString unit = qualifiedName(c);
pas << "unit " << unit << ";" << m_endl << m_endl;
pas << "INTERFACE" << m_endl << m_endl;
// Use referenced classes.
@@ -186,7 +186,7 @@ void PascalWriter::writeClass(UMLClassifier *c) {
pas << getIndent() << classname << " = (" << m_endl;
m_indentLevel++;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
pas << getIndent() << enumLiteral;
if (++i < litList.count())
pas << "," << m_endl;
@@ -199,7 +199,7 @@ void PascalWriter::writeClass(UMLClassifier *c) {
}
UMLAttributeList atl = c->getAttributeList();
if (! isOOClass(c)) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant") {
pas << getIndent() << "// " << stype << " is Not Yet Implemented" << m_endl << m_endl;
} else if(stype == "CORBAStruct") {
@@ -208,10 +208,10 @@ void PascalWriter::writeClass(UMLClassifier *c) {
pas << getIndent() << classname << " = record" << m_endl;
m_indentLevel++;
for (at = atl.first(); at; at = atl.next()) {
- QString name = cleanName(at->getName());
- QString typeName = at->getTypeName();
+ TQString name = cleanName(at->getName());
+ TQString typeName = at->getTypeName();
pas << getIndent() << name << " : " << typeName;
- QString initialVal = at->getInitialValue();
+ TQString initialVal = at->getInitialValue();
if (initialVal.latin1() && ! initialVal.isEmpty())
pas << " := " << initialVal;
pas << ";" << m_endl;
@@ -321,13 +321,13 @@ void PascalWriter::writeClass(UMLClassifier *c) {
}
-void PascalWriter::writeOperation(UMLOperation *op, QTextStream &pas, bool is_comment) {
+void PascalWriter::writeOperation(UMLOperation *op, TQTextStream &pas, bool is_comment) {
if (op->getStatic()) {
pas << "// TODO: generate status method " << op->getName() << m_endl;
return;
}
UMLAttributeList atl = op->getParmList();
- QString rettype = op->getTypeName();
+ TQString rettype = op->getTypeName();
bool use_procedure = (rettype.isEmpty() || rettype == "void");
pas << getIndent();
@@ -366,8 +366,8 @@ void PascalWriter::writeOperation(UMLOperation *op, QTextStream &pas, bool is_co
// for generating meaningful implementations.
}
-QStringList PascalWriter::defaultDatatypes() {
- QStringList l;
+TQStringList PascalWriter::defaultDatatypes() {
+ TQStringList l;
l.append("AnsiString");
l.append("Boolean");
l.append("Byte");
@@ -400,11 +400,11 @@ QStringList PascalWriter::defaultDatatypes() {
*
* @param rPossiblyReservedKeyword The string to check.
*/
-bool PascalWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
+bool PascalWriter::isReservedKeyword(const TQString & rPossiblyReservedKeyword) {
- const QStringList keywords = reservedKeywords();
+ const TQStringList keywords = reservedKeywords();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = keywords.begin(); it != keywords.end(); ++it)
if ((*it).lower() == rPossiblyReservedKeyword.lower())
return true;
@@ -415,9 +415,9 @@ bool PascalWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
/**
* get list of reserved keywords
*/
-const QStringList PascalWriter::reservedKeywords() const {
+const TQStringList PascalWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if ( keywords.isEmpty() ) {
keywords.append( "absolute" );
diff --git a/umbrello/umbrello/codegenerators/pascalwriter.h b/umbrello/umbrello/codegenerators/pascalwriter.h
index bc34d762..0e1f93ca 100644
--- a/umbrello/umbrello/codegenerators/pascalwriter.h
+++ b/umbrello/umbrello/codegenerators/pascalwriter.h
@@ -47,7 +47,7 @@ public:
*/
virtual Uml::Programming_Language getLanguage();
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* Check whether the given string is a reserved word for the
@@ -55,12 +55,12 @@ public:
*
* @param rPossiblyReservedKeyword The string to check.
*/
- virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
+ virtual bool isReservedKeyword(const TQString & rPossiblyReservedKeyword);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -69,16 +69,16 @@ private:
* @param op the class for which we are generating code
* @param ada the stream associated with the output file
*/
- void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false);
+ void writeOperation (UMLOperation *op, TQTextStream &ada, bool is_comment = false);
- void computeAssocTypeAndRole (UMLAssociation *a, QString& typeName, QString& roleName);
+ void computeAssocTypeAndRole (UMLAssociation *a, TQString& typeName, TQString& roleName);
bool isOOClass (UMLClassifier *c);
- QString qualifiedName
+ TQString qualifiedName
(UMLPackage *p, bool withType = false, bool byValue = false);
- static const QString defaultPackageSuffix;
+ static const TQString defaultPackageSuffix;
};
diff --git a/umbrello/umbrello/codegenerators/perlwriter.cpp b/umbrello/umbrello/codegenerators/perlwriter.cpp
index 7c8360fa..42563ec4 100644
--- a/umbrello/umbrello/codegenerators/perlwriter.cpp
+++ b/umbrello/umbrello/codegenerators/perlwriter.cpp
@@ -23,11 +23,11 @@
#include "../uml.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
PerlWriter::PerlWriter()
{
@@ -35,8 +35,8 @@ PerlWriter::PerlWriter()
PerlWriter::~PerlWriter() {}
-bool PerlWriter::GetUseStatements(UMLClassifier *c, QString &Ret,
- QString &ThisPkgName){
+bool PerlWriter::GetUseStatements(UMLClassifier *c, TQString &Ret,
+ TQString &ThisPkgName){
if(!c){
return(false);
@@ -45,17 +45,17 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, QString &Ret,
UMLPackageList includes;
findObjectsRelated(c,includes);
UMLPackage *conc;
- QString AV = "@";
- QString SV = "$";
- QString HV = "%";
+ TQString AV = "@";
+ TQString SV = "$";
+ TQString HV = "%";
for(conc = includes.first(); conc ;conc = includes.next()) {
if (conc->getBaseType() == Uml::ot_Datatype)
continue;
- QString neatName = cleanName(conc->getName());
+ TQString neatName = cleanName(conc->getName());
if (neatName != AV && neatName != SV && neatName != HV) {
- QString OtherPkgName = conc->getPackage(".");
- OtherPkgName.replace(QRegExp("\\."),"::");
- QString OtherName = OtherPkgName + "::" + cleanName(conc->getName());
+ TQString OtherPkgName = conc->getPackage(".");
+ OtherPkgName.replace(TQRegExp("\\."),"::");
+ TQString OtherName = OtherPkgName + "::" + cleanName(conc->getName());
// Only print out the use statement if the other package isn't the
// same as the one we are working on. (This happens for the
@@ -74,8 +74,8 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, QString &Ret,
Ret += "use base qw( ";
for (UMLClassifier *obj = superclasses.first();
obj; obj = superclasses.next()) {
- QString packageName = obj->getPackage(".");
- packageName.replace(QRegExp("\\."),"::");
+ TQString packageName = obj->getPackage(".");
+ packageName.replace(TQRegExp("\\."),"::");
Ret += packageName + "::" + cleanName(obj->getName()) + ' ';
}
@@ -92,22 +92,22 @@ void PerlWriter::writeClass(UMLClassifier *c) {
return;
}
*/
- QString classname = cleanName(c->getName());// this is fine: cleanName is "::-clean"
- QString packageName = c->getPackage(".");
- QString fileName;
+ TQString classname = cleanName(c->getName());// this is fine: cleanName is "::-clean"
+ TQString packageName = c->getPackage(".");
+ TQString fileName;
// Replace all white spaces with blanks
packageName.simplifyWhiteSpace();
// Replace all blanks with underscore
- packageName.replace(QRegExp(" "), "_");
+ packageName.replace(TQRegExp(" "), "_");
// Replace all dots (".") with double colon scope resolution operators
// ("::")
- packageName.replace(QRegExp("\\."),"::");
+ packageName.replace(TQRegExp("\\."),"::");
// Store complete package name
- QString ThisPkgName = packageName + "::" + classname;
+ TQString ThisPkgName = packageName + "::" + classname;
fileName = findFileName(c, ".pm");
// the above lower-cases my nice class names. That is bad.
@@ -117,14 +117,14 @@ void PerlWriter::writeClass(UMLClassifier *c) {
// actual solution: shameful ".pm" hack in codegenerator
CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy();
- QString curDir = pol->getOutputDirectory().absPath();
+ TQString curDir = pol->getOutputDirectory().absPath();
if (fileName.contains("::")) {
// create new directories for each level
- QString newDir;
+ TQString newDir;
newDir = curDir;
- QString fragment = fileName;
- QDir* existing = new QDir (curDir);
- QRegExp regEx("(.*)(::)");
+ TQString fragment = fileName;
+ TQDir* existing = new TQDir (curDir);
+ TQRegExp regEx("(.*)(::)");
regEx.setMinimal(true);
while (regEx.search(fragment) > -1) {
newDir = regEx.cap(1);
@@ -145,14 +145,14 @@ void PerlWriter::writeClass(UMLClassifier *c) {
emit codeGenerated(c, false);
return;
}
- QString oldDir = pol->getOutputDirectory().absPath();
+ TQString oldDir = pol->getOutputDirectory().absPath();
pol->setOutputDirectory(curDir);
- QFile fileperl;
+ TQFile fileperl;
if(!openFile(fileperl, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream perl(&fileperl);
+ TQTextStream perl(&fileperl);
pol->setOutputDirectory(oldDir);
//======================================================================
@@ -160,20 +160,20 @@ void PerlWriter::writeClass(UMLClassifier *c) {
//======================================================================
// try to find a heading file (license, comments, etc)
- QString str;
+ TQString str;
bool bPackageDeclared = false;
bool bUseStmsWritten = false;
str = getHeadingFile(".pm"); // what this mean?
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),fileperl.name());
- str.replace(QRegExp("%year%"),QDate::currentDate().toString("yyyy"));
- str.replace(QRegExp("%date%"),QDate::currentDate().toString());
- str.replace(QRegExp("%time%"),QTime::currentTime().toString());
- str.replace(QRegExp("%package-name%"),ThisPkgName);
- if(str.find(QRegExp("%PACKAGE-DECLARE%"))){
- str.replace(QRegExp("%PACKAGE-DECLARE%"),
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),fileperl.name());
+ str.replace(TQRegExp("%year%"),TQDate::currentDate().toString("yyyy"));
+ str.replace(TQRegExp("%date%"),TQDate::currentDate().toString());
+ str.replace(TQRegExp("%time%"),TQTime::currentTime().toString());
+ str.replace(TQRegExp("%package-name%"),ThisPkgName);
+ if(str.find(TQRegExp("%PACKAGE-DECLARE%"))){
+ str.replace(TQRegExp("%PACKAGE-DECLARE%"),
"package " + ThisPkgName + ';'
+ m_endl + m_endl
+ "#UML_MODELER_BEGIN_PERSONAL_VARS_" + classname
@@ -184,10 +184,10 @@ void PerlWriter::writeClass(UMLClassifier *c) {
bPackageDeclared = true;
}
- if(str.find(QRegExp("%USE-STATEMENTS%"))){
- QString UseStms;
+ if(str.find(TQRegExp("%USE-STATEMENTS%"))){
+ TQString UseStms;
if(GetUseStatements(c,UseStms,ThisPkgName)){
- str.replace(QRegExp("%USE-STATEMENTS%"), UseStms);
+ str.replace(TQRegExp("%USE-STATEMENTS%"), UseStms);
bUseStmsWritten = true;
}
}
@@ -208,7 +208,7 @@ void PerlWriter::writeClass(UMLClassifier *c) {
}
if(! bUseStmsWritten){
- QString UseStms;
+ TQString UseStms;
if(GetUseStatements(c,UseStms,ThisPkgName)){
perl<<UseStms<<m_endl;
}
@@ -260,7 +260,7 @@ Uml::Programming_Language PerlWriter::getLanguage() {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void PerlWriter::writeOperations(UMLClassifier *c, QTextStream &perl) {
+void PerlWriter::writeOperations(UMLClassifier *c, TQTextStream &perl) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -288,7 +288,7 @@ void PerlWriter::writeOperations(UMLClassifier *c, QTextStream &perl) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -333,7 +333,7 @@ void PerlWriter::writeOperations(UMLClassifier *c, QTextStream &perl) {
perl << m_endl << m_endl;
}
-void PerlWriter::writeOperations(const QString &/* classname */, UMLOperationList &opList, QTextStream &perl) {
+void PerlWriter::writeOperations(const TQString &/* classname */, UMLOperationList &opList, TQTextStream &perl) {
UMLOperation *op;
UMLAttribute *at;
@@ -395,7 +395,7 @@ void PerlWriter::writeOperations(const QString &/* classname */, UMLOperationLis
}
-void PerlWriter::writeAttributes(UMLClassifier *c, QTextStream &perl) {
+void PerlWriter::writeAttributes(UMLClassifier *c, TQTextStream &perl) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -439,7 +439,7 @@ void PerlWriter::writeAttributes(UMLClassifier *c, QTextStream &perl) {
}
-void PerlWriter::writeAttributes(UMLAttributeList &atList, QTextStream &perl)
+void PerlWriter::writeAttributes(UMLAttributeList &atList, TQTextStream &perl)
{
perl << m_endl << "=head1 PUBLIC ATTRIBUTES" << m_endl << m_endl;
perl << "=pod " << m_endl << m_endl ;
@@ -455,17 +455,17 @@ void PerlWriter::writeAttributes(UMLAttributeList &atList, QTextStream &perl)
return;
}
-QStringList PerlWriter::defaultDatatypes() {
- QStringList l;
+TQStringList PerlWriter::defaultDatatypes() {
+ TQStringList l;
l.append("$");
l.append("@");
l.append("%");
return l;
}
-const QStringList PerlWriter::reservedKeywords() const {
+const TQStringList PerlWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "abs"
diff --git a/umbrello/umbrello/codegenerators/perlwriter.h b/umbrello/umbrello/codegenerators/perlwriter.h
index 9dac4e56..4d5fdabd 100644
--- a/umbrello/umbrello/codegenerators/perlwriter.h
+++ b/umbrello/umbrello/codegenerators/perlwriter.h
@@ -51,9 +51,9 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
@@ -69,7 +69,7 @@ private:
* @param c the concept we are generating code for
* @param perl output stream for the Perl file
*/
- void writeOperations(UMLClassifier *c, QTextStream &perl);
+ void writeOperations(UMLClassifier *c, TQTextStream &perl);
/**
* write a list of class operations
@@ -78,23 +78,23 @@ private:
* @param opList the list of operations
* @param perl output stream for the Perl file
*/
- void writeOperations(const QString &classname, UMLOperationList &opList,
- QTextStream &perl);
+ void writeOperations(const TQString &classname, UMLOperationList &opList,
+ TQTextStream &perl);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param perl output stream for the Perl file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &perl);
+ void writeAttributes(UMLClassifier *c, TQTextStream &perl);
/** write a list of class attributes
* @param atList the list of attributes
* @param perl output stream for the Perl file
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &perl);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &perl);
- bool GetUseStatements(UMLClassifier *c, QString &Ret,
- QString &ThisPkgName);
+ bool GetUseStatements(UMLClassifier *c, TQString &Ret,
+ TQString &ThisPkgName);
};
diff --git a/umbrello/umbrello/codegenerators/php5writer.cpp b/umbrello/umbrello/codegenerators/php5writer.cpp
index 044d3afe..64a01b47 100644
--- a/umbrello/umbrello/codegenerators/php5writer.cpp
+++ b/umbrello/umbrello/codegenerators/php5writer.cpp
@@ -18,8 +18,8 @@
#include "php5writer.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -3000,20 +3000,20 @@ void Php5Writer::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".php");
+ TQString fileName = findFileName(c, ".php");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile filephp;
+ TQFile filephp;
if(!openFile(filephp, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream php(&filephp);
+ TQTextStream php(&filephp);
//////////////////////////////
//Start generating the code!!
@@ -3021,11 +3021,11 @@ void Php5Writer::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".php");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filephp.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filephp.name());
php<<str<<m_endl;
}
@@ -3035,7 +3035,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
findObjectsRelated(c,includes);
UMLPackage *conc;
for(conc = includes.first(); conc ;conc = includes.next()) {
- QString headerName = findFileName(conc, ".php");
+ TQString headerName = findFileName(conc, ".php");
if (!headerName.isEmpty()) {
php << "require_once '" << headerName << "';" << m_endl;
}
@@ -3078,7 +3078,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
int ri = rc;
for (a = realizations.first(); a; a = realizations.next()) {
UMLObject *o = a->getObject(Uml::B);
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if(ri == rc)
php << m_endl << m_indentation << m_indentation << m_indentation << "implements ";
php << typeName << (--rc == 0 ? "" : ", ");
@@ -3099,7 +3099,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
kError() << "aggregation role A object is NULL" << endl;
continue;
}
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ';' << m_endl;
} else {
@@ -3117,7 +3117,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
kError() << "composition role A object is NULL" << endl;
continue;
}
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ';' << m_endl;
} else {
@@ -3147,7 +3147,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) {
+void Php5Writer::writeOperations(UMLClassifier *c, TQTextStream &php) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -3177,7 +3177,7 @@ void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -3222,8 +3222,8 @@ void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) {
}
-void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationList &opList,
- QTextStream &php, bool isInterface /* = false */,
+void Php5Writer::writeOperations(const TQString &/* classname */, UMLOperationList &opList,
+ TQTextStream &php, bool isInterface /* = false */,
bool generateErrorStub /* = false */) {
for (UMLOperation *op=opList.first(); op ; op=opList.next()) {
UMLAttributeList atl = op->getParmList();
@@ -3287,8 +3287,8 @@ void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationLis
for (at = atl.first(); at; at = atl.next(), j++) {
php << " $" << cleanName(at->getName())
<< (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
<< ((j < i-1)?", ":"");
}
php <<" )";
@@ -3306,7 +3306,7 @@ void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationLis
}//end for
}
-void Php5Writer::writeAttributes(UMLClassifier *c, QTextStream &php) {
+void Php5Writer::writeAttributes(UMLClassifier *c, TQTextStream &php) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -3351,7 +3351,7 @@ void Php5Writer::writeAttributes(UMLClassifier *c, QTextStream &php) {
}
-void Php5Writer::writeAttributes(UMLAttributeList &atList, QTextStream &php) {
+void Php5Writer::writeAttributes(UMLAttributeList &atList, TQTextStream &php) {
for (UMLAttribute *at = atList.first(); at ; at = atList.next()) {
bool isStatic = at->getStatic();
if (forceDoc() || !at->getDoc().isEmpty()) {
@@ -3402,9 +3402,9 @@ Uml::Programming_Language Php5Writer::getLanguage() {
return Uml::pl_PHP5;
}
-const QStringList Php5Writer::reservedKeywords() const {
+const TQStringList Php5Writer::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
for (int i = 0; php5words[i]; i++)
diff --git a/umbrello/umbrello/codegenerators/php5writer.h b/umbrello/umbrello/codegenerators/php5writer.h
index 3adc983c..ea2a7862 100644
--- a/umbrello/umbrello/codegenerators/php5writer.h
+++ b/umbrello/umbrello/codegenerators/php5writer.h
@@ -49,7 +49,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -64,7 +64,7 @@ private:
* @param c the concept we are generating code for
* @param php output stream for the PHP file
*/
- void writeOperations(UMLClassifier *c, QTextStream &php);
+ void writeOperations(UMLClassifier *c, TQTextStream &php);
/**
* write a list of class operations
@@ -74,21 +74,21 @@ private:
* @param php output stream for the PHP file
* @param interface indicates if the operation is an interface member
*/
- void writeOperations(const QString &classname, UMLOperationList &opList,
- QTextStream &php,
+ void writeOperations(const TQString &classname, UMLOperationList &opList,
+ TQTextStream &php,
bool interface = false, bool generateErrorStub = false);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &php);
+ void writeAttributes(UMLClassifier *c, TQTextStream &php);
/** write a list of class attributes
* @param atList the list of attributes
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &php);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &php);
};
#endif //PHP5WRITER
diff --git a/umbrello/umbrello/codegenerators/phpwriter.cpp b/umbrello/umbrello/codegenerators/phpwriter.cpp
index 6d71c102..e9dba103 100644
--- a/umbrello/umbrello/codegenerators/phpwriter.cpp
+++ b/umbrello/umbrello/codegenerators/phpwriter.cpp
@@ -17,8 +17,8 @@
#include "phpwriter.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -2996,20 +2996,20 @@ void PhpWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".php");
+ TQString fileName = findFileName(c, ".php");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile filephp;
+ TQFile filephp;
if(!openFile(filephp, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream php(&filephp);
+ TQTextStream php(&filephp);
//////////////////////////////
//Start generating the code!!
@@ -3017,11 +3017,11 @@ void PhpWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".php");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filephp.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filephp.name());
php<<str<<m_endl;
}
@@ -3031,7 +3031,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
findObjectsRelated(c,includes);
UMLPackage *conc;
for(conc = includes.first(); conc ;conc = includes.next()) {
- QString headerName = findFileName(conc, ".php");
+ TQString headerName = findFileName(conc, ".php");
if (headerName.isEmpty()) {
php << "include '" << headerName << "';" << m_endl;
}
@@ -3075,7 +3075,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
//maybe we should parse the string here and take multiplicity into account to decide
//which container to use.
UMLObject *o = a->getObject(Uml::A);
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ";" << m_endl;
} else {
@@ -3089,7 +3089,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
for (a = compositions.first(); a ; a = compositions.next()) {
// see comment on Aggregation about multiplicity...
UMLObject *o = a->getObject(Uml::A);
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ";" << m_endl;
} else {
@@ -3112,7 +3112,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
php << m_endl;
php << m_indentation << "/**" << m_endl;
- QString temp = "initAttributes sets all " + classname + " attributes to its default value."
+ TQString temp = "initAttributes sets all " + classname + " attributes to its default value."
" Make sure to call this method within your class constructor";
php << formatDoc(temp,m_indentation + " * ");
php << m_indentation << " */" << m_endl;
@@ -3141,7 +3141,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) {
+void PhpWriter::writeOperations(UMLClassifier *c, TQTextStream &php) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -3168,7 +3168,7 @@ void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -3187,7 +3187,7 @@ void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) {
}
}
-void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opList, QTextStream &php) {
+void PhpWriter::writeOperations(TQString /* classname */, UMLOperationList &opList, TQTextStream &php) {
UMLOperation *op;
UMLAttribute *at;
@@ -3236,8 +3236,8 @@ void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opLis
for (at = atl.first(); at; at = atl.next(), j++) {
php << " $" << cleanName(at->getName())
<< (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
<< ((j < i-1)?", ":"");
}
php <<" )" << m_endl << m_indentation << "{" << m_endl << m_indentation << m_indentation << m_endl << m_indentation << "} // end of member function " + cleanName(op->getName()) + m_endl;
@@ -3245,7 +3245,7 @@ void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opLis
}//end for
}
-void PhpWriter::writeAttributes(UMLClassifier *c, QTextStream &php) {
+void PhpWriter::writeAttributes(UMLClassifier *c, TQTextStream &php) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -3290,7 +3290,7 @@ void PhpWriter::writeAttributes(UMLClassifier *c, QTextStream &php) {
}
-void PhpWriter::writeAttributes(UMLAttributeList &atList, QTextStream &php) {
+void PhpWriter::writeAttributes(UMLAttributeList &atList, TQTextStream &php) {
for (UMLAttribute *at = atList.first(); at ; at = atList.next()) {
if (forceDoc() || !at->getDoc().isEmpty()) {
php << m_indentation << "/**" << m_endl << formatDoc(at->getDoc(), m_indentation + " * ");
@@ -3323,9 +3323,9 @@ Uml::Programming_Language PhpWriter::getLanguage() {
return Uml::pl_PHP;
}
-const QStringList PhpWriter::reservedKeywords() const {
+const TQStringList PhpWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
for (int i = 0; words[i]; i++)
diff --git a/umbrello/umbrello/codegenerators/phpwriter.h b/umbrello/umbrello/codegenerators/phpwriter.h
index a3acb68b..e03699f1 100644
--- a/umbrello/umbrello/codegenerators/phpwriter.h
+++ b/umbrello/umbrello/codegenerators/phpwriter.h
@@ -47,7 +47,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -62,7 +62,7 @@ private:
* @param c the concept we are generating code for
* @param php output stream for the PHP file
*/
- void writeOperations(UMLClassifier *c, QTextStream &php);
+ void writeOperations(UMLClassifier *c, TQTextStream &php);
/**
* write a list of class operations
@@ -71,20 +71,20 @@ private:
* @param opList the list of operations
* @param php output stream for the PHP file
*/
- void writeOperations(QString classname, UMLOperationList &opList,
- QTextStream &php);
+ void writeOperations(TQString classname, UMLOperationList &opList,
+ TQTextStream &php);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &php);
+ void writeAttributes(UMLClassifier *c, TQTextStream &php);
/** write a list of class attributes
* @param atList the list of attributes
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &php);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &php);
};
#endif //PHPWRITER
diff --git a/umbrello/umbrello/codegenerators/pythonwriter.cpp b/umbrello/umbrello/codegenerators/pythonwriter.cpp
index a5ac2b28..f243ab2c 100644
--- a/umbrello/umbrello/codegenerators/pythonwriter.cpp
+++ b/umbrello/umbrello/codegenerators/pythonwriter.cpp
@@ -21,9 +21,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../umldoc.h"
#include "../umlattributelist.h"
@@ -45,7 +45,7 @@ void PythonWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
UMLClassifierList superclasses = c->getSuperClasses();
UMLAssociationList aggregations = c->getAggregations();
@@ -54,24 +54,24 @@ void PythonWriter::writeClass(UMLClassifier *c) {
m_bNeedPass = true;
//find an appropriate name for our file
- QString fileName = findFileName(c, ".py");
+ TQString fileName = findFileName(c, ".py");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QChar first = fileName.at(0);
+ TQChar first = fileName.at(0);
//Replace the first letter of the filename because
//python class begin with an upper caracter (convention)
first = first.upper();
fileName = fileName.replace(0, 1, first);
- QFile fileh;
+ TQFile fileh;
if( !openFile(fileh, fileName) ) {
emit codeGenerated(c, false);
return;
}
- QTextStream h(&fileh);
+ TQTextStream h(&fileh);
//////////////////////////////
//Start generating the code!!
@@ -79,21 +79,21 @@ void PythonWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".py");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), fileh.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), fileh.name());
h<<str<<m_endl;
}
// generate import statement for superclasses and take packages into account
str = cleanName(c->getName());
- QString pkg = cleanName(c->getPackage());
+ TQString pkg = cleanName(c->getPackage());
if (!pkg.isEmpty())
str.prepend(pkg + '.');
- QStringList includesList = QStringList(str); //save imported classes
+ TQStringList includesList = TQStringList(str); //save imported classes
int i = superclasses.count();
for (UMLClassifier *classifier = superclasses.first();
classifier && i; classifier = superclasses.next(), i--) {
@@ -110,13 +110,13 @@ void PythonWriter::writeClass(UMLClassifier *c) {
findObjectsRelated(c,includes);
UMLPackage* conc;
for(conc = includes.first(); conc ;conc = includes.next()) {
- QString headerName = findFileName(conc, ".py");
+ TQString headerName = findFileName(conc, ".py");
if ( !headerName.isEmpty() ) {
- headerName.remove(QRegExp(".py$"));
+ headerName.remove(TQRegExp(".py$"));
first = headerName.at(0);
first = first.upper();
headerName = headerName.replace(0, 1, first);
- str = headerName.replace(QChar('/'),QChar('.'));
+ str = headerName.replace(TQChar('/'),TQChar('.'));
if (includesList.findIndex(str) < 0) // not yet imported
h << "from " << str << " import *" << m_endl;
}
@@ -165,7 +165,7 @@ void PythonWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void PythonWriter::writeAttributes(UMLAttributeList atList, QTextStream &py) {
+void PythonWriter::writeAttributes(UMLAttributeList atList, TQTextStream &py) {
if (!forceDoc() || atList.count() == 0)
return;
py << m_indentation << "\"\"\" ATTRIBUTES" << m_endl << m_endl;
@@ -178,7 +178,7 @@ void PythonWriter::writeAttributes(UMLAttributeList atList, QTextStream &py) {
py << m_indentation << "\"\"\"" << m_endl << m_endl;
}
-void PythonWriter::writeOperations(UMLClassifier *c, QTextStream &h) {
+void PythonWriter::writeOperations(UMLClassifier *c, TQTextStream &h) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -205,7 +205,7 @@ void PythonWriter::writeOperations(UMLClassifier *c, QTextStream &h) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -222,23 +222,23 @@ void PythonWriter::writeOperations(UMLClassifier *c, QTextStream &h) {
}
-void PythonWriter::writeOperations(const QString& /*classname*/, UMLOperationList &opList,
- QTextStream &h, Access access) {
+void PythonWriter::writeOperations(const TQString& /*classname*/, UMLOperationList &opList,
+ TQTextStream &h, Access access) {
UMLOperation *op;
UMLAttribute *at;
- QString sAccess;
+ TQString sAccess;
switch (access) {
case PUBLIC:
- sAccess = QString("");
+ sAccess = TQString("");
break;
case PRIVATE:
- sAccess = QString("__");
+ sAccess = TQString("__");
break;
case PROTECTED:
- sAccess = QString("_");
+ sAccess = TQString("_");
break;
}
@@ -256,8 +256,8 @@ void PythonWriter::writeOperations(const QString& /*classname*/, UMLOperationLis
for (at = atl.first(); at; at = atl.next(), j++) {
h << ", " << cleanName(at->getName())
<< (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""));
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""));
}
h<<"):"<<m_endl;
@@ -291,9 +291,9 @@ Uml::Programming_Language PythonWriter::getLanguage() {
return Uml::pl_Python;
}
-const QStringList PythonWriter::reservedKeywords() const {
+const TQStringList PythonWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "abs"
diff --git a/umbrello/umbrello/codegenerators/pythonwriter.h b/umbrello/umbrello/codegenerators/pythonwriter.h
index f9e5b31a..c9dddc23 100644
--- a/umbrello/umbrello/codegenerators/pythonwriter.h
+++ b/umbrello/umbrello/codegenerators/pythonwriter.h
@@ -50,7 +50,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -60,7 +60,7 @@ private:
* @param c the concept we are generating code for
* @param py output stream for the header file
*/
- void writeAttributes(UMLAttributeList atList, QTextStream &py);
+ void writeAttributes(UMLAttributeList atList, TQTextStream &py);
/**
* write all operations for a given class
@@ -68,7 +68,7 @@ private:
* @param c the concept we are generating code for
* @param h output stream for the header file
*/
- void writeOperations(UMLClassifier *c, QTextStream &h);
+ void writeOperations(UMLClassifier *c, TQTextStream &h);
/**
* write a list of class operations
@@ -77,8 +77,8 @@ private:
* @param opList the list of operations
* @param h output stream for the header file
*/
- void writeOperations(const QString& classname, UMLOperationList &opList,
- QTextStream &h, Access access);
+ void writeOperations(const TQString& classname, UMLOperationList &opList,
+ TQTextStream &h, Access access);
bool m_bNeedPass; ///< True as long as no "pass" has been written
};
diff --git a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp
index cae5d322..f75ff165 100644
--- a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp
@@ -26,7 +26,7 @@
//
RubyClassDeclarationBlock::RubyClassDeclarationBlock
- ( RubyClassifierCodeDocument * parentDoc, const QString &startText, const QString &endText, const QString &comment)
+ ( RubyClassifierCodeDocument * parentDoc, const TQString &startText, const TQString &endText, const TQString &comment)
: OwnedHierarchicalCodeBlock(parentDoc->getParentClassifier(), parentDoc, startText, endText, comment)
{
init(parentDoc, comment);
@@ -41,8 +41,8 @@ RubyClassDeclarationBlock::~RubyClassDeclarationBlock ( ) { }
/**
* Save the XMI representation of this object
*/
-void RubyClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "rubyclassdeclarationblock" );
+void RubyClassDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "rubyclassdeclarationblock" );
setAttributesOnNode(doc, blockElement);
@@ -52,7 +52,7 @@ void RubyClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & ro
/**
* load params from the appropriate XMI element node.
*/
-void RubyClassDeclarationBlock::loadFromXMI ( QDomElement & root )
+void RubyClassDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -72,13 +72,13 @@ void RubyClassDeclarationBlock::updateContent ( )
RubyClassifierCodeDocument *parentDoc = dynamic_cast<RubyClassifierCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
CodeGenerationPolicy * p = UMLApp::app()->getCommonPolicy();
- QString endLine = p->getNewLineEndingChars();
+ TQString endLine = p->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
- QString RubyClassName = parentDoc->getRubyClassName(c->getName());
+ TQString RubyClassName = parentDoc->getRubyClassName(c->getName());
bool forceDoc = p->getCodeVerboseDocumentComments();
// COMMENT
- QString comment = c->getDoc();
+ TQString comment = c->getDoc();
comment.replace("@ref ", "");
comment.replace("@see", "_See_");
comment.replace("@short", "_Summary_");
@@ -96,7 +96,7 @@ void RubyClassDeclarationBlock::updateContent ( )
// Now set START/ENDING Text
- QString startText = "";
+ TQString startText = "";
if (parentDoc->parentIsInterface()) {
startText.append("module ");
@@ -113,7 +113,7 @@ void RubyClassDeclarationBlock::updateContent ( )
int i = 0;
for (UMLClassifier * concept= superclasses.first(); concept; concept = superclasses.next()) {
if (i == 0) {
- startText.append(QString(" < ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
+ startText.append(TQString(" < ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
} else {
// After the first superclass name in the list, assume the classes
// are ruby modules that can be mixed in,
@@ -124,14 +124,14 @@ void RubyClassDeclarationBlock::updateContent ( )
// Write out the interfaces we 'implement'. Are these modules to be mixed in, in Ruby?
for (UMLClassifier * concept= superinterfaces.first(); concept; concept = superinterfaces.next()) {
- startText.append(QString("include ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
+ startText.append(TQString("include ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
}
// Set the header and end text for the hier.codeblock
setStartText(startText);
}
-void RubyClassDeclarationBlock::init (RubyClassifierCodeDocument *parentDoc, const QString &comment)
+void RubyClassDeclarationBlock::init (RubyClassifierCodeDocument *parentDoc, const TQString &comment)
{
setComment(new RubyCodeDocumentation(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h
index a7732662..63e43702 100644
--- a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h
@@ -17,7 +17,7 @@
#ifndef RUBYCLASSDECLARATIONBLOCK_H
#define RUBYCLASSDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
/***************************************************************************
rubyclassdeclarationblock.h
@@ -41,7 +41,7 @@ public:
/**
* Empty Constructor
*/
- explicit RubyClassDeclarationBlock ( RubyClassifierCodeDocument * parentDoc, const QString &start = "", const QString &endText = "end", const QString &comment = "");
+ explicit RubyClassDeclarationBlock ( RubyClassifierCodeDocument * parentDoc, const TQString &start = "", const TQString &endText = "end", const TQString &comment = "");
/**
* Empty Destructor
@@ -51,12 +51,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
@@ -67,7 +67,7 @@ protected:
private:
- void init (RubyClassifierCodeDocument * parent, const QString &comment);
+ void init (RubyClassifierCodeDocument * parent, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp
index 1c136df8..ada4b0bb 100644
--- a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp
@@ -29,7 +29,7 @@
#include "rubyclassifiercodedocument.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -77,19 +77,19 @@ CodeDocumentDialog RubyClassifierCodeDocument::getDialog ( ) {
*/
// We overwritten by Ruby language implementation to get lowercase path
-QString RubyClassifierCodeDocument::getPath ( )
+TQString RubyClassifierCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"), "/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"), "/");
path.lower();
@@ -101,7 +101,7 @@ QString RubyClassifierCodeDocument::getPath ( )
// Other methods
//
-QString RubyClassifierCodeDocument::getRubyClassName (const QString &name) {
+TQString RubyClassifierCodeDocument::getRubyClassName (const TQString &name) {
CodeGenerator *g = UMLApp::app()->getGenerator();
return Codegen_Utils::capitalizeFirstLetter(g->cleanName(name));
}
@@ -173,25 +173,25 @@ bool RubyClassifierCodeDocument::addCodeOperation (CodeOperation * op )
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
// for "rubyclassdeclarationblock"
-void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new RubyCodeComment(this);
@@ -206,7 +206,7 @@ void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -252,7 +252,7 @@ void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -313,9 +313,9 @@ void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
}
-QString RubyClassifierCodeDocument::scopeToRubyDecl(Uml::Visibility scope)
+TQString RubyClassifierCodeDocument::scopeToRubyDecl(Uml::Visibility scope)
{
- QString scopeString;
+ TQString scopeString;
switch(scope)
{
case Uml::Visibility::Public:
@@ -402,7 +402,7 @@ void RubyClassifierCodeDocument::updateContent( )
bool isInterface = parentIsInterface();
bool hasOperationMethods = c->getOpList().last() ? true : false;
CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy();
- QString endLine = pol->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
+ TQString endLine = pol->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
//
// START GENERATING CODE/TEXT BLOCKS and COMMENTS FOR THE DOCUMENT
diff --git a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h
index c5f89d07..cfaa66fe 100644
--- a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h
+++ b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h
@@ -21,7 +21,7 @@
#ifndef RUBYCLASSIFIERCODEDOCUMENT_H
#define RUBYCLASSIFIERCODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfieldlist.h"
#include "../classifiercodedocument.h"
@@ -64,14 +64,14 @@ public:
*/
//CodeDocumentDialog getDialog ( );
- QString scopeToRubyDecl(Uml::Visibility scope);
+ TQString scopeToRubyDecl(Uml::Visibility scope);
// Make it easier on ourselves
RubyCodeGenerationPolicy * getRubyPolicy();
- QString getRubyClassName (const QString &name);
+ TQString getRubyClassName (const TQString &name);
- QString getPath();
+ TQString getPath();
/** add a code operation to this ruby classifier code document.
* @return bool which is true IF the code operation was added successfully
@@ -87,7 +87,7 @@ protected:
* need to overwrite this for ruby since we need to pick up the
* ruby class declaration block.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, RubyClassDeclarationBlock * codeBlock);
diff --git a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp
index a3f55c44..43986061 100644
--- a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp
@@ -21,7 +21,7 @@
#include "rubycodeaccessormethod.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -56,7 +56,7 @@ RubyCodeAccessorMethod::~RubyCodeAccessorMethod ( ) { }
// Other methods
//
-void RubyCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void RubyCodeAccessorMethod::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
// set super-class attributes
@@ -65,7 +65,7 @@ void RubyCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomEleme
// set local attributes now
}
-void RubyCodeAccessorMethod::setAttributesFromNode( QDomElement & root)
+void RubyCodeAccessorMethod::setAttributesFromNode( TQDomElement & root)
{
// set attributes from superclass method the XMI
@@ -80,18 +80,18 @@ void RubyCodeAccessorMethod::updateContent( )
CodeClassField * parentField = getParentClassField();
RubyCodeClassField * rubyfield = dynamic_cast<RubyCodeClassField*>(parentField);
- QString fieldName = rubyfield->getFieldName();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString fieldName = rubyfield->getFieldName();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString text = "";
+ TQString text = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
{
int maxOccurs = rubyfield->maximumListOccurances();
- QString fieldType = rubyfield->getTypeName();
- QString indent = getIndentation();
+ TQString fieldType = rubyfield->getTypeName();
+ TQString indent = getIndentation();
if(maxOccurs > 0)
- text += "if "+fieldName+".size() < "+ QString::number(maxOccurs)+' '+endLine+indent;
+ text += "if "+fieldName+".size() < "+ TQString::number(maxOccurs)+' '+endLine+indent;
text += fieldName+".push(value)";
if(maxOccurs > 0)
{
@@ -110,11 +110,11 @@ void RubyCodeAccessorMethod::updateContent( )
{
int minOccurs = rubyfield->minimumListOccurances();
RubyClassifierCodeDocument * rubydoc = dynamic_cast<RubyClassifierCodeDocument*>(rubyfield->getParentDocument());
- QString fieldType = rubyfield->getTypeName();
- QString indent = getIndentation();
+ TQString fieldType = rubyfield->getTypeName();
+ TQString indent = getIndentation();
if(minOccurs > 0)
- text += "if "+fieldName+".size() >= "+ QString::number(minOccurs)+endLine+indent;
+ text += "if "+fieldName+".size() >= "+ TQString::number(minOccurs)+endLine+indent;
text += fieldName+".delete(value)";
if(minOccurs > 0)
{
@@ -144,18 +144,18 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
// gather defs
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
CodeGenerationPolicy::ScopePolicy scopePolicy = p->getAttributeAccessorScope();
- QString strVis = rubydoc->scopeToRubyDecl(rubyfield->getVisibility());
- QString fieldName = RubyCodeGenerator::cppToRubyName(rubyfield->getFieldName());
- QString fieldType = RubyCodeGenerator::cppToRubyType(rubyfield->getTypeName());
- QString objectType = rubyfield->getListObjectType();
+ TQString strVis = rubydoc->scopeToRubyDecl(rubyfield->getVisibility());
+ TQString fieldName = RubyCodeGenerator::cppToRubyName(rubyfield->getFieldName());
+ TQString fieldType = RubyCodeGenerator::cppToRubyType(rubyfield->getTypeName());
+ TQString objectType = rubyfield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString endLine = p->getNewLineEndingChars();
+ TQString endLine = p->getNewLineEndingChars();
- QString description = getParentObject()->getDoc();
- description.replace(QRegExp("m_[npb](?=[A-Z])"), "");
+ TQString description = getParentObject()->getDoc();
+ description.replace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.replace("m_", "");
- description.replace(QRegExp("[\\n\\r]+[\\t ]*"), endLine);
+ description.replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine);
// set scope of this accessor appropriately..if its an attribute,
// we need to be more sophisticated
@@ -173,10 +173,10 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
}
// some variables we will need to populate
- QString headerText = "";
- QString methodReturnType = "";
- QString methodName = "";
- QString methodParams = "";
+ TQString headerText = "";
+ TQString methodReturnType = "";
+ TQString methodName = "";
+ TQString methodParams = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
@@ -189,7 +189,7 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
break;
case CodeAccessorMethod::GET:
headerText = "Get the value of " + fieldName + endLine + description;
- setStartMethodText(QString("attr_reader :") + fieldName);
+ setStartMethodText(TQString("attr_reader :") + fieldName);
setEndMethodText("");
break;
case CodeAccessorMethod::LIST:
@@ -209,7 +209,7 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
break;
case CodeAccessorMethod::SET:
headerText = "Set the value of " + fieldName + endLine + description;
- setStartMethodText(QString("attr_writer :") + fieldName);
+ setStartMethodText(TQString("attr_writer :") + fieldName);
setEndMethodText("");
break;
default:
diff --git a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h
index 7eb9c892..0e61a978 100644
--- a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h
@@ -23,7 +23,7 @@
#ifndef RUBYCODEACCESSORMETHOD_H
#define RUBYCODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeaccessormethod.h"
#include "rubycodeclassfield.h"
@@ -56,12 +56,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration();
virtual void updateContent();
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp b/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp
index 35438abd..b3b723b9 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp
@@ -21,7 +21,7 @@
#include "rubycodeclassfield.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -59,7 +59,7 @@ RubyCodeClassField::~RubyCodeClassField ( ) { }
// Other methods
//
-QString RubyCodeClassField::getFieldName() {
+TQString RubyCodeClassField::getFieldName() {
if (parentIsAttribute())
{
UMLAttribute * at = (UMLAttribute*) getParentObject();
@@ -68,7 +68,7 @@ QString RubyCodeClassField::getFieldName() {
else
{
UMLRole * role = (UMLRole*) getParentObject();
- QString roleName = role->getName();
+ TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
@@ -78,7 +78,7 @@ QString RubyCodeClassField::getFieldName() {
}
-QString RubyCodeClassField::getInitialValue() {
+TQString RubyCodeClassField::getInitialValue() {
if (parentIsAttribute())
{
@@ -97,7 +97,7 @@ QString RubyCodeClassField::getInitialValue() {
if(fieldIsSingleValue()) {
// FIX : IF the multiplicity is "1" then we should init a new object here, if its 0 or 1,
// then we can just return 'empty' string (minor problem).
- return QString("");
+ return TQString("");
} else {
return RubyCodeGenerator::getListFieldClassName()+".new()";
}
@@ -105,7 +105,7 @@ QString RubyCodeClassField::getInitialValue() {
}
-QString RubyCodeClassField::getTypeName ( )
+TQString RubyCodeClassField::getTypeName ( )
{
return RubyCodeGenerator::cppToRubyType(CodeClassField::getTypeName());
}
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfield.h b/umbrello/umbrello/codegenerators/rubycodeclassfield.h
index 384f0b5d..50269729 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfield.h
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfield.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODECLASSFIELD_H
#define RUBYCODECLASSFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfield.h"
@@ -45,11 +45,11 @@ public:
*/
virtual ~RubyCodeClassField ( );
- QString getFieldType();
- QString getFieldName();
- QString getInitialValue();
+ TQString getFieldType();
+ TQString getFieldName();
+ TQString getInitialValue();
- QString getTypeName ( );
+ TQString getTypeName ( );
protected:
private:
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp
index 380c05e0..e99ca774 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp
@@ -53,12 +53,12 @@ void RubyCodeClassFieldDeclarationBlock::updateContent( )
CodeGenerationPolicy::ScopePolicy scopePolicy = p->getAssociationFieldScope();
// Set the comment
- QString notes = getParentObject()->getDoc();
+ TQString notes = getParentObject()->getDoc();
getComment()->setText(notes);
// Set the body
- QString staticValue = getParentObject()->getStatic() ? "static " : "";
- QString scopeStr = rdoc->scopeToRubyDecl(getParentObject()->getVisibility());
+ TQString staticValue = getParentObject()->getStatic() ? "static " : "";
+ TQString scopeStr = rdoc->scopeToRubyDecl(getParentObject()->getVisibility());
// IF this is from an association, then scope taken as appropriate to policy
if(!rcf->parentIsAttribute())
@@ -76,14 +76,14 @@ void RubyCodeClassFieldDeclarationBlock::updateContent( )
}
}
- QString typeName = rcf->getTypeName();
- QString fieldName = rcf->getFieldName();
- QString initialV = rcf->getInitialValue();
+ TQString typeName = rcf->getTypeName();
+ TQString fieldName = rcf->getFieldName();
+ TQString initialV = rcf->getInitialValue();
if (!cf->parentIsAttribute() && !cf->fieldIsSingleValue())
typeName = "Array";
- QString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
+ TQString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
if (!initialV.isEmpty())
body.append(" = " + initialV);
else if (!cf->parentIsAttribute())
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h
index c3e18a68..beba96c2 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODECLASSFIELDDECLARATIONBLOCK_H
#define RUBYCODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/rubycodecomment.cpp b/umbrello/umbrello/codegenerators/rubycodecomment.cpp
index 46374128..89508b63 100644
--- a/umbrello/umbrello/codegenerators/rubycodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodecomment.cpp
@@ -18,12 +18,12 @@
***************************************************************************/
#include "rubycodecomment.h"
-#include <qregexp.h>
+#include <tqregexp.h>
// Constructors/Destructors
//
-RubyCodeComment::RubyCodeComment(CodeDocument * doc, const QString & text)
+RubyCodeComment::RubyCodeComment(CodeDocument * doc, const TQString & text)
: CodeComment(doc, text)
{
@@ -46,35 +46,35 @@ RubyCodeComment::~RubyCodeComment( ) { }
// Other methods
//
-QString RubyCodeComment::getNewEditorLine( int amount ) {
- QString line = getIndentationString(amount) + "# ";
+TQString RubyCodeComment::getNewEditorLine( int amount ) {
+ TQString line = getIndentationString(amount) + "# ";
return line;
}
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString RubyCodeComment::unformatText(const QString & text, const QString & indent)
+TQString RubyCodeComment::unformatText(const TQString & text, const TQString & indent)
{
// remove leading or trailing comment stuff
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
// now leading hash
- mytext.remove(QRegExp("^#\\s*"));
+ mytext.remove(TQRegExp("^#\\s*"));
return mytext;
}
/**
* @return QString
*/
-QString RubyCodeComment::toString( )
+TQString RubyCodeComment::toString( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if (getWriteOutText()) {
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
output.append(formatMultiLineText(getText(), indent + "# ", endLine + endLine));
}
diff --git a/umbrello/umbrello/codegenerators/rubycodecomment.h b/umbrello/umbrello/codegenerators/rubycodecomment.h
index 35fb87a8..0646cd33 100644
--- a/umbrello/umbrello/codegenerators/rubycodecomment.h
+++ b/umbrello/umbrello/codegenerators/rubycodecomment.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODECOMMENT_H
#define RUBYCODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
/**
@@ -38,7 +38,7 @@ public:
/**
* Constructors
*/
- explicit RubyCodeComment ( CodeDocument * doc, const QString & text = "");
+ explicit RubyCodeComment ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -48,17 +48,17 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "#" as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
protected:
diff --git a/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp b/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp
index 6c69530a..e19f4daa 100644
--- a/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp
@@ -21,7 +21,7 @@
#include "rubycodedocumentation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -32,7 +32,7 @@
// Constructors/Destructors
//
-RubyCodeDocumentation::RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const QString & text )
+RubyCodeDocumentation::RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const TQString & text )
: CodeComment ((CodeDocument*) doc, text)
{
@@ -54,8 +54,8 @@ RubyCodeDocumentation::~RubyCodeDocumentation ( ) { }
/**
* Save the XMI representation of this object
*/
-void RubyCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "rubycodedocumentation" );
+void RubyCodeDocumentation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "rubycodedocumentation" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -64,10 +64,10 @@ void RubyCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root )
/**
* @return QString
*/
-QString RubyCodeDocumentation::toString ( )
+TQString RubyCodeDocumentation::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
@@ -79,9 +79,9 @@ QString RubyCodeDocumentation::toString ( )
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
useHashOutput = false;
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
if( useHashOutput)
{
if(!body.isEmpty())
@@ -96,7 +96,7 @@ QString RubyCodeDocumentation::toString ( )
return output;
}
-QString RubyCodeDocumentation::getNewEditorLine ( int amount )
+TQString RubyCodeDocumentation::getNewEditorLine ( int amount )
{
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
@@ -124,19 +124,19 @@ int RubyCodeDocumentation::lastEditableLine() {
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString RubyCodeDocumentation::unformatText ( const QString & text , const QString & indent)
+TQString RubyCodeDocumentation::unformatText ( const TQString & text , const TQString & indent)
{
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
// remove leading or trailing comment stuff
- mytext.remove(QRegExp('^'+indent));
+ mytext.remove(TQRegExp('^'+indent));
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
{
- mytext.remove(QRegExp("^=begin\\s*(rdoc)?\\s*\n?"));
- mytext.remove(QRegExp("^=end\\s*\n?$"));
+ mytext.remove(TQRegExp("^=begin\\s*(rdoc)?\\s*\n?"));
+ mytext.remove(TQRegExp("^=end\\s*\n?$"));
} else
- mytext.remove(QRegExp("^#\\s*"));
+ mytext.remove(TQRegExp("^#\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/rubycodedocumentation.h b/umbrello/umbrello/codegenerators/rubycodedocumentation.h
index 72908f78..0d210419 100644
--- a/umbrello/umbrello/codegenerators/rubycodedocumentation.h
+++ b/umbrello/umbrello/codegenerators/rubycodedocumentation.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEDOCUMENTATION_H
#define RUBYCODEDOCUMENTATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class RubyClassifierCodeDocument;
@@ -44,7 +44,7 @@ public:
/**
* Constructors
*/
- explicit RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const QString & text = "");
+ explicit RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -60,22 +60,22 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "# " sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp
index 1a01421a..8e58fdf0 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp
@@ -156,7 +156,7 @@ void RubyCodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSig
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * RubyCodeGenerationPolicy::createPage ( QWidget *parent, const char *name ) {
+CodeGenerationPolicyPage * RubyCodeGenerationPolicy::createPage ( TQWidget *parent, const char *name ) {
return new RubyCodeGenerationPolicyPage ( parent, name, this );
}
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h
index aa1a7146..56c051e2 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEGENERATIONPOLICY_H
#define RUBYCODEGENERATIONPOLICY_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codegenpolicyext.h"
#include "../codegenerationpolicy.h"
@@ -98,7 +98,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
protected:
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp
index 1e9080c9..5c890b4f 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp
@@ -20,9 +20,9 @@
// own header
#include "rubycodegenerationpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klocale.h>
// app includes
@@ -30,7 +30,7 @@
#include "../codegenerationpolicy.h"
#include "../uml.h"
-RubyCodeGenerationPolicyPage::RubyCodeGenerationPolicyPage( QWidget *parent, const char *name, RubyCodeGenerationPolicy * policy )
+RubyCodeGenerationPolicyPage::RubyCodeGenerationPolicyPage( TQWidget *parent, const char *name, RubyCodeGenerationPolicy * policy )
: CodeGenerationPolicyPage(parent, name, policy)
{
CodeGenerationPolicy *common = UMLApp::app()->getCommonPolicy();
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h
index 6fc06aed..1637843b 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h
@@ -33,7 +33,7 @@ class RubyCodeGenerationPolicyPage : public CodeGenerationPolicyPage {
Q_OBJECT
public:
- explicit RubyCodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, RubyCodeGenerationPolicy * policy = 0);
+ explicit RubyCodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, RubyCodeGenerationPolicy * policy = 0);
virtual ~RubyCodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerator.cpp b/umbrello/umbrello/codegenerators/rubycodegenerator.cpp
index 3e20ce50..4acfd65a 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodegenerator.cpp
@@ -21,7 +21,7 @@
#include "rubycodegenerator.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
// Constructors/Destructors
//
-RubyCodeGenerator::RubyCodeGenerator (QDomElement & elem )
+RubyCodeGenerator::RubyCodeGenerator (TQDomElement & elem )
: CodeGenerator(elem)
{
}
@@ -59,7 +59,7 @@ Uml::Programming_Language RubyCodeGenerator::getLanguage() {
}
// In the Java version, we make the ANT build file also available.
-CodeViewerDialog * RubyCodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * RubyCodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
CodeViewerDialog *dialog = new CodeViewerDialog(parent, doc, state);
@@ -81,34 +81,34 @@ bool RubyCodeGenerator::getAutoGenerateAssocAccessors ( )
return getRubyPolicy()->getAutoGenerateAssocAccessors ();
}
-QString RubyCodeGenerator::getListFieldClassName () {
- return QString("Array");
+TQString RubyCodeGenerator::getListFieldClassName () {
+ return TQString("Array");
}
// Other methods
//
-QString RubyCodeGenerator::cppToRubyType(const QString &typeStr) {
- QString type = cleanName(typeStr);
+TQString RubyCodeGenerator::cppToRubyType(const TQString &typeStr) {
+ TQString type = cleanName(typeStr);
type.replace("const ", "");
- type.replace(QRegExp("[*&\\s]"), "");
- type.replace(QRegExp("[<>]"), "_");
- type.replace("QStringList", "Array");
- type.replace(QRegExp("^string$"),"String");
- type.replace("QString", "String");
+ type.replace(TQRegExp("[*&\\s]"), "");
+ type.replace(TQRegExp("[<>]"), "_");
+ type.replace("TQStringList", "Array");
+ type.replace(TQRegExp("^string$"),"String");
+ type.replace("TQString", "String");
type.replace("bool", "true|false");
- type.replace(QRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
- type.replace(QRegExp("^(float|double)$"), "Float");
- type.replace(QRegExp("^Q(?=[A-Z])"), "Qt::");
- type.replace(QRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
+ type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
+ type.replace(TQRegExp("^(float|double)$"), "Float");
+ type.replace(TQRegExp("^Q(?=[A-Z])"), "Qt::");
+ type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
return type;
}
-QString RubyCodeGenerator::cppToRubyName(const QString &nameStr) {
- QString name = cleanName(nameStr);
- name.replace(QRegExp("^m_"), "");
- name.replace(QRegExp("^[pbn](?=[A-Z])"), "");
+TQString RubyCodeGenerator::cppToRubyName(const TQString &nameStr) {
+ TQString name = cleanName(nameStr);
+ name.replace(TQRegExp("^m_"), "");
+ name.replace(TQRegExp("^[pbn](?=[A-Z])"), "");
name = name.mid(0, 1).lower() + name.mid(1);
return name;
}
@@ -132,9 +132,9 @@ void RubyCodeGenerator::initFields() {
}
*/
-const QStringList RubyCodeGenerator::reservedKeywords() const {
+const TQStringList RubyCodeGenerator::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "__FILE__"
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerator.h b/umbrello/umbrello/codegenerators/rubycodegenerator.h
index 9cc878f0..611338ca 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerator.h
+++ b/umbrello/umbrello/codegenerators/rubycodegenerator.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEGENERATOR_H
#define RUBYCODEGENERATOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeviewerstate.h"
#include "../codegenerator.h"
#include "../codeblockwithcomments.h"
@@ -45,7 +45,7 @@ public:
* Empty Constructor
*/
RubyCodeGenerator ();
- RubyCodeGenerator (QDomElement & element);
+ RubyCodeGenerator (TQDomElement & element);
/**
* Empty Destructor
@@ -72,11 +72,11 @@ public:
/**
* Get the list variable class name to use. For Ruby, we have set this to "Array".
*/
- static QString getListFieldClassName();
+ static TQString getListFieldClassName();
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
// Other methods
@@ -102,7 +102,7 @@ public:
*
* @param cppType the C++ type to be converted
*/
- static QString cppToRubyType(const QString &cppType);
+ static TQString cppToRubyType(const TQString &cppType);
/**
* Convert C++ names such as 'm_foobar' or pFoobar to
@@ -110,12 +110,12 @@ public:
*
* @param cppName the C++ name to be converted
*/
- static QString cppToRubyName(const QString &cppName);
+ static TQString cppToRubyName(const TQString &cppName);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
protected:
diff --git a/umbrello/umbrello/codegenerators/rubycodeoperation.cpp b/umbrello/umbrello/codegenerators/rubycodeoperation.cpp
index 6f16fb96..7354281b 100644
--- a/umbrello/umbrello/codegenerators/rubycodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeoperation.cpp
@@ -21,7 +21,7 @@
#include "rubycodeoperation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "rubyclassifiercodedocument.h"
@@ -32,7 +32,7 @@
// Constructors/Destructors
//
-RubyCodeOperation::RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+RubyCodeOperation::RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -61,21 +61,21 @@ void RubyCodeOperation::updateMethodDeclaration()
UMLClassifier *c = rubydoc->getParentClassifier();
UMLOperation * o = getParentOperation();
bool isInterface = rubydoc->getParentClassifier()->isInterface();
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
// now, the starting text.
- QString strVis = rubydoc->scopeToRubyDecl(o->getVisibility());
+ TQString strVis = rubydoc->scopeToRubyDecl(o->getVisibility());
// no return type for constructors
- QString fixedReturn = RubyCodeGenerator::cppToRubyType(o->getTypeName());
- QString returnType = o->isConstructorOperation() ? QString("") : (fixedReturn + QString(" "));
- QString methodName = o->getName();
+ TQString fixedReturn = RubyCodeGenerator::cppToRubyType(o->getTypeName());
+ TQString returnType = o->isConstructorOperation() ? TQString("") : (fixedReturn + TQString(" "));
+ TQString methodName = o->getName();
- QString RubyClassName = rubydoc->getRubyClassName(c->getName());
+ TQString RubyClassName = rubydoc->getRubyClassName(c->getName());
// Skip destructors, and operator methods which
// can't be defined in ruby
if ( methodName.startsWith("~")
- || QRegExp("operator\\s*(=|--|\\+\\+|!=)$").exactMatch(methodName) )
+ || TQRegExp("operator\\s*(=|--|\\+\\+|!=)$").exactMatch(methodName) )
{
getComment()->setText("");
return;
@@ -85,11 +85,11 @@ void RubyCodeOperation::updateMethodDeclaration()
methodName = "initialize";
}
- methodName.replace(QRegExp("operator\\s*"), "");
+ methodName.replace(TQRegExp("operator\\s*"), "");
methodName = methodName.mid(0, 1).lower() + methodName.mid(1);
- QString paramStr = QString("");
- QStringList commentedParams;
+ TQString paramStr = TQString("");
+ TQStringList commentedParams;
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -97,10 +97,10 @@ void RubyCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm = list.next())
{
- QString paramName = RubyCodeGenerator::cppToRubyName(parm->getName());
+ TQString paramName = RubyCodeGenerator::cppToRubyName(parm->getName());
paramStr += paramName;
if (! parm->getInitialValue().isEmpty()) {
- paramStr += QString(" = ") + RubyCodeGenerator::cppToRubyType(parm->getInitialValue());
+ paramStr += TQString(" = ") + RubyCodeGenerator::cppToRubyType(parm->getInitialValue());
}
paramNum++;
@@ -108,7 +108,7 @@ void RubyCodeOperation::updateMethodDeclaration()
paramStr += ", ";
}
- QString startText;
+ TQString startText;
if (isInterface) {
// Assume 'isInterface' means a module in Ruby, so
// generate module methods
@@ -124,32 +124,32 @@ void RubyCodeOperation::updateMethodDeclaration()
// Lastly, for text content generation, we fix the comment on the
// operation, IF the codeop is autogenerated & currently empty
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
if (comment.isEmpty()) {
if (getContentType() == CodeBlock::AutoGenerated) {
UMLAttributeList parameters = o->getParmList();
for(UMLAttributeListIt iterator(parameters); iterator.current(); ++iterator) {
comment += endLine + "* _" + iterator.current()->getName() + "_ ";
- comment += (' ' + iterator.current()->getDoc().replace( QRegExp("[\\n\\r]+[\\t ]*"),
+ comment += (' ' + iterator.current()->getDoc().replace( TQRegExp("[\\n\\r]+[\\t ]*"),
endLine + " " ) );
}
// add a returns statement too
- if(!returnType.isEmpty() && !QRegExp("^void\\s*$").exactMatch(returnType))
+ if(!returnType.isEmpty() && !TQRegExp("^void\\s*$").exactMatch(returnType))
comment += endLine + "* _returns_ " + returnType + ' ';
getComment()->setText(comment);
}
} else {
- comment.replace(QRegExp("[\\n\\r]+ *"), endLine);
- comment.replace(QRegExp("[\\n\\r]+\\t*"), endLine);
+ comment.replace(TQRegExp("[\\n\\r]+ *"), endLine);
+ comment.replace(TQRegExp("[\\n\\r]+\\t*"), endLine);
comment.replace(" m_", " ");
- comment.replace(QRegExp("\\s[npb](?=[A-Z])"), " ");
- QRegExp re_params("@param (\\w)(\\w*)");
+ comment.replace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
+ TQRegExp re_params("@param (\\w)(\\w*)");
int pos = re_params.search(comment);
while (pos != -1) {
comment.replace( re_params.cap(0),
- QString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
+ TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
commentedParams.append(re_params.cap(1).lower() + re_params.cap(2));
pos += re_params.matchedLength() + 3;
@@ -165,7 +165,7 @@ void RubyCodeOperation::updateMethodDeclaration()
if (iterator.current()->getDoc().isEmpty()) {
comment += (' ' + RubyCodeGenerator::cppToRubyType(iterator.current()->getTypeName()));
} else {
- comment += (' ' + iterator.current()->getDoc().replace(QRegExp("[\\n\\r]+[\\t ]*"), endLine + " "));
+ comment += (' ' + iterator.current()->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine + " "));
}
}
}
@@ -194,9 +194,9 @@ void RubyCodeOperation::updateMethodDeclaration()
pos = comment.find(endLine, pos);
}
- QString typeStr = RubyCodeGenerator::cppToRubyType(o->getTypeName());
+ TQString typeStr = RubyCodeGenerator::cppToRubyType(o->getTypeName());
if ( !typeStr.isEmpty()
- && !QRegExp("^void\\s*$").exactMatch(typeStr)
+ && !TQRegExp("^void\\s*$").exactMatch(typeStr)
&& comment.contains("_returns_") == 0 )
{
comment += endLine + "* _returns_ " + typeStr;
diff --git a/umbrello/umbrello/codegenerators/rubycodeoperation.h b/umbrello/umbrello/codegenerators/rubycodeoperation.h
index c8e8cea4..fab1d239 100644
--- a/umbrello/umbrello/codegenerators/rubycodeoperation.h
+++ b/umbrello/umbrello/codegenerators/rubycodeoperation.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEOPERATION_H
#define RUBYCODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class RubyClassifierCodeDocument;
@@ -36,7 +36,7 @@ public:
/**
* Empty Constructor
*/
- RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation * op, const QString & body = "", const QString & comment = "");
+ RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation * op, const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
diff --git a/umbrello/umbrello/codegenerators/rubywriter.cpp b/umbrello/umbrello/codegenerators/rubywriter.cpp
index aa9a5271..571634a5 100644
--- a/umbrello/umbrello/codegenerators/rubywriter.cpp
+++ b/umbrello/umbrello/codegenerators/rubywriter.cpp
@@ -21,9 +21,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "classifierinfo.h"
#include "../umldoc.h"
@@ -45,25 +45,25 @@ void RubyWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
UMLClassifierList superclasses = c->getSuperClasses();
UMLAssociationList aggregations = c->getAggregations();
UMLAssociationList compositions = c->getCompositions();
//find an appropriate name for our file
- QString fileName = findFileName(c, ".rb");
+ TQString fileName = findFileName(c, ".rb");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile fileh;
+ TQFile fileh;
if( !openFile(fileh, fileName) ) {
emit codeGenerated(c, false);
return;
}
- QTextStream h(&fileh);
+ TQTextStream h(&fileh);
// preparations
classifierInfo = new ClassifierInfo(c);
@@ -76,18 +76,18 @@ void RubyWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".rb");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), fileh.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), fileh.name());
h<<str<<m_endl;
}
if(forceDoc() || !c->getDoc().isEmpty()) {
- QString docStr = c->getDoc();
- docStr.replace(QRegExp("\\n"), "\n# ");
+ TQString docStr = c->getDoc();
+ docStr.replace(TQRegExp("\\n"), "\n# ");
docStr.replace("@ref ", "");
docStr.replace("@see", "_See_");
docStr.replace("@short", "_Summary_");
@@ -144,31 +144,31 @@ void RubyWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-QString RubyWriter::cppToRubyType(const QString &typeStr) {
- QString type = cleanName(typeStr);
+TQString RubyWriter::cppToRubyType(const TQString &typeStr) {
+ TQString type = cleanName(typeStr);
type.replace("const ", "");
- type.replace(QRegExp("[*&\\s]"), "");
- type.replace(QRegExp("[<>]"), "_");
- type.replace("QStringList", "Array");
- type.replace("QString", "String");
+ type.replace(TQRegExp("[*&\\s]"), "");
+ type.replace(TQRegExp("[<>]"), "_");
+ type.replace("TQStringList", "Array");
+ type.replace("TQString", "String");
type.replace("bool", "true|false");
- type.replace(QRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
- type.replace(QRegExp("^(float|double)$"), "Float");
- type.replace(QRegExp("^Q(?=[A-Z])"), "Qt::");
- type.replace(QRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
+ type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
+ type.replace(TQRegExp("^(float|double)$"), "Float");
+ type.replace(TQRegExp("^Q(?=[A-Z])"), "Qt::");
+ type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
return type;
}
-QString RubyWriter::cppToRubyName(const QString &nameStr) {
- QString name = cleanName(nameStr);
- name.replace(QRegExp("^m_"), "");
- name.replace(QRegExp("^[pbn](?=[A-Z])"), "");
+TQString RubyWriter::cppToRubyName(const TQString &nameStr) {
+ TQString name = cleanName(nameStr);
+ name.replace(TQRegExp("^m_"), "");
+ name.replace(TQRegExp("^[pbn](?=[A-Z])"), "");
name = name.mid(0, 1).lower() + name.mid(1);
return name;
}
-void RubyWriter::writeOperations(UMLClassifier *c,QTextStream &h) {
+void RubyWriter::writeOperations(UMLClassifier *c,TQTextStream &h) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -195,7 +195,7 @@ void RubyWriter::writeOperations(UMLClassifier *c,QTextStream &h) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -212,8 +212,8 @@ void RubyWriter::writeOperations(UMLClassifier *c,QTextStream &h) {
}
-void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opList,
- Uml::Visibility permitScope, QTextStream &h)
+void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &opList,
+ Uml::Visibility permitScope, TQTextStream &h)
{
UMLOperation *op;
UMLAttribute *at;
@@ -233,8 +233,8 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
}
for (op=opList.first(); op ; op=opList.next()) {
- QString methodName = cleanName(op->getName());
- QStringList commentedParams;
+ TQString methodName = cleanName(op->getName());
+ TQStringList commentedParams;
// Skip destructors, and operator methods which
// can't be defined in ruby
@@ -265,25 +265,25 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
if (writeDoc) {
h << m_indentation << "#" << m_endl;
- QString docStr = op->getDoc();
+ TQString docStr = op->getDoc();
- docStr.replace(QRegExp("[\\n\\r]+ *"), m_endl);
- docStr.replace(QRegExp("[\\n\\r]+\\t*"), m_endl);
+ docStr.replace(TQRegExp("[\\n\\r]+ *"), m_endl);
+ docStr.replace(TQRegExp("[\\n\\r]+\\t*"), m_endl);
docStr.replace(" m_", " ");
- docStr.replace(QRegExp("\\s[npb](?=[A-Z])"), " ");
- QRegExp re_params("@param (\\w)(\\w*)");
+ docStr.replace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
+ TQRegExp re_params("@param (\\w)(\\w*)");
int pos = re_params.search(docStr);
while (pos != -1) {
docStr.replace( re_params.cap(0),
- QString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
+ TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
commentedParams.append(re_params.cap(1).lower() + re_params.cap(2));
pos += re_params.matchedLength() + 3;
pos = re_params.search(docStr, pos);
}
- docStr.replace("\n", QString("\n") + m_indentation + "# ");
+ docStr.replace("\n", TQString("\n") + m_indentation + "# ");
// Write parameter documentation
for (at = atl.first(); at ; at = atl.next()) {
@@ -294,7 +294,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
if (at->getDoc().isEmpty()) {
docStr += (' ' + cppToRubyType(at->getTypeName()));
} else {
- docStr += (' ' + at->getDoc().replace(QRegExp("[\\n\\r]+[\\t ]*"), m_endl + " "));
+ docStr += (' ' + at->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), m_endl + " "));
}
}
}
@@ -308,7 +308,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
// item starting with '# *', then indent the text with
// three spaces, '# ', to line up with the list item.
pos = docStr.find("# *");
- QRegExp re_linestart("# (?!\\*)");
+ TQRegExp re_linestart("# (?!\\*)");
pos = re_linestart.search(docStr, pos);
while (pos > 0) {
docStr.insert(pos + 1, " ");
@@ -319,7 +319,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
h << m_indentation << "# "<< docStr << m_endl;
- QString typeStr = cppToRubyType(op->getTypeName());
+ TQString typeStr = cppToRubyType(op->getTypeName());
if (!typeStr.isEmpty() && typeStr != "void" && docStr.contains("_returns_") == 0) {
h << m_indentation << "# * _returns_ " << typeStr << m_endl;
}
@@ -329,15 +329,15 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
int j=0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString nameStr = cppToRubyName(at->getName());
+ TQString nameStr = cppToRubyName(at->getName());
if (j > 0) {
h << ", " << nameStr;
} else {
h << nameStr;
}
h << (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ") + cppToRubyType(at->getInitialValue())) :
- QString(""));
+ (TQString(" = ") + cppToRubyType(at->getInitialValue())) :
+ TQString(""));
}
h <<")" << m_endl;
@@ -353,7 +353,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
// this is for writing file attribute methods
//
void RubyWriter::writeAttributeMethods(UMLAttributeList *attribs,
- Uml::Visibility visibility, QTextStream &stream)
+ Uml::Visibility visibility, TQTextStream &stream)
{
// return now if NO attributes to work on
if (attribs->count() == 0 || visibility == Uml::Visibility::Private)
@@ -362,7 +362,7 @@ void RubyWriter::writeAttributeMethods(UMLAttributeList *attribs,
UMLAttribute *at;
for(at=attribs->first(); at; at=attribs->next())
{
- QString varName = cppToRubyName(cleanName(at->getName()));
+ TQString varName = cppToRubyName(cleanName(at->getName()));
writeSingleAttributeAccessorMethods(varName, at->getDoc(), stream);
}
@@ -370,14 +370,14 @@ void RubyWriter::writeAttributeMethods(UMLAttributeList *attribs,
}
void RubyWriter::writeSingleAttributeAccessorMethods(
- const QString &fieldName,
- const QString &descr,
- QTextStream &h)
+ const TQString &fieldName,
+ const TQString &descr,
+ TQTextStream &h)
{
- QString description = descr;
- description.replace(QRegExp("m_[npb](?=[A-Z])"), "");
+ TQString description = descr;
+ description.replace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.replace("m_", "");
- description.replace("\n", QString("\n") + m_indentation + "# ");
+ description.replace("\n", TQString("\n") + m_indentation + "# ");
if (!description.isEmpty()) {
h << m_indentation << "# " << description << m_endl;
@@ -395,9 +395,9 @@ Uml::Programming_Language RubyWriter::getLanguage() {
return Uml::pl_Ruby;
}
-const QStringList RubyWriter::reservedKeywords() const {
+const TQStringList RubyWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "__FILE__"
diff --git a/umbrello/umbrello/codegenerators/rubywriter.h b/umbrello/umbrello/codegenerators/rubywriter.h
index 8f1547ad..c1a69775 100644
--- a/umbrello/umbrello/codegenerators/rubywriter.h
+++ b/umbrello/umbrello/codegenerators/rubywriter.h
@@ -23,7 +23,7 @@
#include "../umloperationlist.h"
#include "../umlattributelist.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class ClassifierInfo;
@@ -52,7 +52,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
/**
@@ -61,7 +61,7 @@ private:
*
* @param cppType the C++ type to be converted
*/
- QString cppToRubyType(const QString &cppType);
+ TQString cppToRubyType(const TQString &cppType);
/**
* Convert C++ names such as 'm_foobar' or pFoobar to
@@ -69,22 +69,22 @@ private:
*
* @param cppName the C++ name to be converted
*/
- QString cppToRubyName(const QString &cppName);
+ TQString cppToRubyName(const TQString &cppName);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in attribs list.
*/
void writeAttributeMethods(UMLAttributeList *attribs,
- Uml::Visibility visibility, QTextStream &stream);
+ Uml::Visibility visibility, TQTextStream &stream);
/**
* write all method declarations, for attributes and associations
* for the given permitted scope.
*/
- void writeSingleAttributeAccessorMethods(const QString &fieldName,
- const QString &description,
- QTextStream &h);
+ void writeSingleAttributeAccessorMethods(const TQString &fieldName,
+ const TQString &description,
+ TQTextStream &h);
/**
* write all operations for a given class
@@ -92,7 +92,7 @@ private:
* @param c the concept we are generating code for
* @param h output stream for the header file
*/
- void writeOperations(UMLClassifier *c, QTextStream &h);
+ void writeOperations(UMLClassifier *c, TQTextStream &h);
/**
* write a list of class operations
@@ -101,8 +101,8 @@ private:
* @param opList the list of operations
* @param h output stream for the header file
*/
- void writeOperations(const QString &classname, UMLOperationList &opList,
- Uml::Visibility permitScope, QTextStream &h);
+ void writeOperations(const TQString &classname, UMLOperationList &opList,
+ Uml::Visibility permitScope, TQTextStream &h);
/**
* Summary information about current classifier.
diff --git a/umbrello/umbrello/codegenerators/simplecodegenerator.cpp b/umbrello/umbrello/codegenerators/simplecodegenerator.cpp
index 98477f15..6b7ac992 100644
--- a/umbrello/umbrello/codegenerators/simplecodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/simplecodegenerator.cpp
@@ -19,9 +19,9 @@
// system includes
#include <cstdlib> //to get the user name
// qt includes
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdir.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdir.h>
// kde includes
#include <klocale.h>
#include <kdebug.h>
@@ -66,39 +66,39 @@ SimpleCodeGenerator::~SimpleCodeGenerator ( ) { }
// Other methods
//
-QString SimpleCodeGenerator::getIndent ()
+TQString SimpleCodeGenerator::getIndent ()
{
- QString myIndent;
+ TQString myIndent;
for (int i = 0 ; i < m_indentLevel ; i++)
myIndent.append(m_indentation);
return myIndent;
}
-QString SimpleCodeGenerator::findFileName(UMLPackage* concept, const QString &ext) {
+TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString &ext) {
//if we already know to which file this class was written/should be written, just return it.
if (m_fileMap.contains(concept))
return m_fileMap[concept];
//else, determine the "natural" file name
- QString name;
+ TQString name;
// Get the package name
- QString package = concept->getPackage(".");
+ TQString package = concept->getPackage(".");
// Replace all white spaces with blanks
package.simplifyWhiteSpace();
// Replace all blanks with underscore
- package.replace(QRegExp(" "), "_");
+ package.replace(TQRegExp(" "), "_");
// Convert all "::" to "/" : Platform-specific path separator
- // package.replace(QRegExp("::"), "/");
+ // package.replace(TQRegExp("::"), "/");
// if package is given add this as a directory to the file name
if (!package.isEmpty() && m_createDirHierarchyForPackages) {
name = package + '.' + concept->getName();
- name.replace(QRegExp("\\."),"/");
- package.replace(QRegExp("\\."), "/");
+ name.replace(TQRegExp("\\."),"/");
+ package.replace(TQRegExp("\\."), "/");
package = '/' + package;
} else {
name = concept->getFullyQualifiedName("-");
@@ -111,15 +111,15 @@ QString SimpleCodeGenerator::findFileName(UMLPackage* concept, const QString &ex
// if a package name exists check the existence of the package directory
if (!package.isEmpty() && m_createDirHierarchyForPackages) {
- QDir pathDir(UMLApp::app()->getCommonPolicy()->getOutputDirectory().absPath() + package);
+ TQDir pathDir(UMLApp::app()->getCommonPolicy()->getOutputDirectory().absPath() + package);
// does our complete output directory exist yet? if not, try to create it
if (!pathDir.exists())
{
- QStringList dirs = QStringList::split("/",pathDir.absPath());
- QString currentDir = "";
+ TQStringList dirs = TQStringList::split("/",pathDir.absPath());
+ TQString currentDir = "";
- QStringList::iterator end(dirs.end());
- for (QStringList::iterator dir(dirs.begin()); dir != end; ++dir)
+ TQStringList::iterator end(dirs.end());
+ for (TQStringList::iterator dir(dirs.begin()); dir != end; ++dir)
{
currentDir += '/' + *dir;
if (! (pathDir.exists(currentDir)
@@ -136,19 +136,19 @@ QString SimpleCodeGenerator::findFileName(UMLPackage* concept, const QString &ex
name.simplifyWhiteSpace();
- name.replace(QRegExp(" "),"_");
+ name.replace(TQRegExp(" "),"_");
- QString extension = ext.simplifyWhiteSpace();
+ TQString extension = ext.simplifyWhiteSpace();
extension.replace(' ', '_');
return overwritableName(concept, name, extension);
}
-QString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const QString &name, const QString &ext) {
+TQString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const TQString &name, const TQString &ext) {
//check if a file named "name" with extension "ext" already exists
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
- QDir outputDir = commonPolicy->getOutputDirectory();
- QString filename = name + ext;
+ TQDir outputDir = commonPolicy->getOutputDirectory();
+ TQString filename = name + ext;
if(!outputDir.exists(filename)) {
m_fileMap.insert(concept,filename);
return filename; //if not, "name" is OK and we have not much to to
@@ -172,7 +172,7 @@ QString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const QString
case KDialogBase::No: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + ext;
+ filename = name + "__" + TQString::number(suffix) + ext;
if (!outputDir.exists(filename))
break;
suffix++;
@@ -197,7 +197,7 @@ QString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const QString
case CodeGenerationPolicy::Never: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + ext;
+ filename = name + "__" + TQString::number(suffix) + ext;
if (!outputDir.exists(filename))
break;
suffix++;
diff --git a/umbrello/umbrello/codegenerators/simplecodegenerator.h b/umbrello/umbrello/codegenerators/simplecodegenerator.h
index d75a0660..c9d4a32d 100644
--- a/umbrello/umbrello/codegenerators/simplecodegenerator.h
+++ b/umbrello/umbrello/codegenerators/simplecodegenerator.h
@@ -19,9 +19,9 @@
#ifndef SIMPLECODEGENERATOR_H
#define SIMPLECODEGENERATOR_H
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include "../codegenerator.h"
#include "../umlnamespace.h"
@@ -72,21 +72,21 @@ public:
protected:
// compatability methods..
- QString findFileName(UMLPackage* concept, const QString &ext);
- QString overwritableName(UMLPackage* concept, const QString &name, const QString &ext);
+ TQString findFileName(UMLPackage* concept, const TQString &ext);
+ TQString overwritableName(UMLPackage* concept, const TQString &name, const TQString &ext);
bool hasDefaultValueAttr(UMLClassifier *c);
bool hasAbstractOps(UMLClassifier *c);
/**
* Returns the current indent string based on m_indentLevel and m_indentation.
*/
- QString getIndent ();
+ TQString getIndent ();
/**
* Maps UMLObjects to filenames. Used for finding out which file
* each class was written to.
*/
- QMap<UMLPackage*,QString> m_fileMap;
+ TQMap<UMLPackage*,TQString> m_fileMap;
// the parent document
UMLDoc *m_doc;
@@ -100,9 +100,9 @@ protected:
bool m_createDirHierarchyForPackages;
/* Old Attributes writers will look for */
- QString m_indentation;
+ TQString m_indentation;
int m_indentLevel;
- QString m_endl;
+ TQString m_endl;
// override parent method..we need special handling
void initFromParentDocument( );
diff --git a/umbrello/umbrello/codegenerators/sqlwriter.cpp b/umbrello/umbrello/codegenerators/sqlwriter.cpp
index f01e8bbe..8582ec93 100644
--- a/umbrello/umbrello/codegenerators/sqlwriter.cpp
+++ b/umbrello/umbrello/codegenerators/sqlwriter.cpp
@@ -20,9 +20,9 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../classifier.h"
#include "../operation.h"
@@ -43,16 +43,16 @@ void SQLWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".sql");
+ TQString fileName = findFileName(c, ".sql");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile file;
+ TQFile file;
if( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
@@ -60,13 +60,13 @@ void SQLWriter::writeClass(UMLClassifier *c) {
//Start generating the code!!
- QTextStream sql(&file);
+ TQTextStream sql(&file);
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".sql");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),file.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),file.name());
sql<<str<<m_endl;
}
@@ -85,7 +85,7 @@ void SQLWriter::writeClass(UMLClassifier *c) {
sql << m_endl << ");" << m_endl;
- QMap<UMLAssociation*,UMLAssociation*> constraintMap; // so we don't repeat constraint
+ TQMap<UMLAssociation*,UMLAssociation*> constraintMap; // so we don't repeat constraint
UMLAssociationList aggregations = c->getAggregations();
if( forceSections() || !aggregations.isEmpty() ) {
for(UMLAssociation* a = aggregations.first(); a; a = aggregations.next()) {
@@ -97,7 +97,7 @@ void SQLWriter::writeClass(UMLClassifier *c) {
}
}
- QMap<UMLAssociation*,UMLAssociation*>::Iterator itor = constraintMap.begin();
+ TQMap<UMLAssociation*,UMLAssociation*>::Iterator itor = constraintMap.begin();
for (;itor != constraintMap.end();itor++) {
UMLAssociation* a = itor.data();
sql << "ALTER TABLE "<< classname
@@ -113,7 +113,7 @@ void SQLWriter::writeClass(UMLClassifier *c) {
}
-void SQLWriter::writeAttributes(UMLClassifier *c, QTextStream &sql) {
+void SQLWriter::writeAttributes(UMLClassifier *c, TQTextStream &sql) {
UMLAttributeList atpub, atprot, atpriv, atimp;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -171,8 +171,8 @@ void SQLWriter::writeAttributes(UMLClassifier *c, QTextStream &sql) {
return;
}
-void SQLWriter::printAttributes(QTextStream& sql, UMLAttributeList attributeList, bool first) {
- QString attrDoc = "";
+void SQLWriter::printAttributes(TQTextStream& sql, UMLAttributeList attributeList, bool first) {
+ TQString attrDoc = "";
UMLAttribute* at;
for (at=attributeList.first();at;at=attributeList.next())
@@ -194,7 +194,7 @@ void SQLWriter::printAttributes(QTextStream& sql, UMLAttributeList attributeList
// write the attribute
sql << m_indentation << cleanName(at->getName()) << " " << at->getTypeName() << " "
- << (at->getInitialValue().isEmpty()?QString(""):QString(" DEFAULT ")+at->getInitialValue());
+ << (at->getInitialValue().isEmpty()?TQString(""):TQString(" DEFAULT ")+at->getInitialValue());
// now get documentation/comment of current attribute
attrDoc = at->getDoc();
@@ -215,8 +215,8 @@ Uml::Programming_Language SQLWriter::getLanguage() {
return Uml::pl_SQL;
}
-QStringList SQLWriter::defaultDatatypes() {
- QStringList l;
+TQStringList SQLWriter::defaultDatatypes() {
+ TQStringList l;
l.append("varchar");
l.append("tinyint");
l.append("smallint");
@@ -244,9 +244,9 @@ QStringList SQLWriter::defaultDatatypes() {
return l;
}
-const QStringList SQLWriter::reservedKeywords() const {
+const TQStringList SQLWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "access"
diff --git a/umbrello/umbrello/codegenerators/sqlwriter.h b/umbrello/umbrello/codegenerators/sqlwriter.h
index c500e2e7..42271af0 100644
--- a/umbrello/umbrello/codegenerators/sqlwriter.h
+++ b/umbrello/umbrello/codegenerators/sqlwriter.h
@@ -48,12 +48,12 @@ public:
/**
* Reimplement method from CodeGenerator.
*/
- virtual QStringList defaultDatatypes();
+ virtual TQStringList defaultDatatypes();
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -62,7 +62,7 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* Prints out attributes as columns in the table
@@ -71,7 +71,7 @@ private:
* @param attributeList the attributes to be printed
* @param first if the attributes are the first one
*/
- void printAttributes(QTextStream& sql, UMLAttributeList attributeList, bool first);
+ void printAttributes(TQTextStream& sql, UMLAttributeList attributeList, bool first);
};
#endif // SQLWRITER_H
diff --git a/umbrello/umbrello/codegenerators/tclwriter.cpp b/umbrello/umbrello/codegenerators/tclwriter.cpp
index d8607aa7..f443e8f1 100644
--- a/umbrello/umbrello/codegenerators/tclwriter.cpp
+++ b/umbrello/umbrello/codegenerators/tclwriter.cpp
@@ -17,9 +17,9 @@
// own header
#include "tclwriter.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "classifierinfo.h"
@@ -99,10 +99,10 @@ TclWriter::writeClass(UMLClassifier * c)
kDebug() << "Cannot write class of NULL concept!\n";
return;
}
- QFile fileh, filetcl;
+ TQFile fileh, filetcl;
// find an appropriate name for our file
- QString fileName = findFileName(c, ".tcl");
+ TQString fileName = findFileName(c, ".tcl");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
@@ -153,20 +153,20 @@ TclWriter::writeClass(UMLClassifier * c)
}
void
-TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
+TclWriter::writeHeaderFile(UMLClassifier * c, TQFile & fileh)
{
// open stream for writing
- QTextStream stream(&fileh);
+ TQTextStream stream(&fileh);
mStream = &stream;
// reset the indent level
m_indentLevel = 0;
// write header blurb
- QString str = getHeadingFile(".tcl");
+ TQString str = getHeadingFile(".tcl");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), classifierInfo->fileName);
- str.replace(QRegExp("%filepath%"), fileh.name());
+ str.replace(TQRegExp("%filename%"), classifierInfo->fileName);
+ str.replace(TQRegExp("%filepath%"), fileh.name());
writeCode(str);
}
// set current namespace
@@ -216,7 +216,7 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
m_indentLevel++;
for (UMLClassifierListItem * lit = litList.first(); lit;
lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
writeCode(enumLiteral + "\\");
}
m_indentLevel--;
@@ -232,8 +232,8 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
writeCode("#TODO template<");
for (UMLTemplate * t = template_params.first(); t;
t = template_params.next()) {
- QString formalName = t->getName();
- QString typeName = t->getTypeName();
+ TQString formalName = t->getName();
+ TQString typeName = t->getTypeName();
writeCode(typeName + "# " + formalName);
}
}
@@ -241,7 +241,7 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
writeCode("class " + mClass + " {");
m_indentLevel++;
if (classifierInfo->superclasses.count() > 0) {
- QString code = "inherit";
+ TQString code = "inherit";
for (UMLClassifier * superClass = classifierInfo->superclasses.first();
superClass; superClass = classifierInfo->superclasses.next()) {
/*
@@ -324,21 +324,21 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
}
void
-TclWriter::writeSourceFile(UMLClassifier * c, QFile & filetcl)
+TclWriter::writeSourceFile(UMLClassifier * c, TQFile & filetcl)
{
// open stream for writing
- QTextStream stream(&filetcl);
+ TQTextStream stream(&filetcl);
mStream = &stream;
// set the starting indentation at zero
m_indentLevel = 0;
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".tclbody");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), classifierInfo->fileName + "body");
- str.replace(QRegExp("%filepath%"), filetcl.name());
+ str.replace(TQRegExp("%filename%"), classifierInfo->fileName + "body");
+ str.replace(TQRegExp("%filepath%"), filetcl.name());
writeCode(str);
}
// Start body of class
@@ -363,24 +363,24 @@ TclWriter::writeSourceFile(UMLClassifier * c, QFile & filetcl)
}
void
-TclWriter::writeCode(const QString &text)
+TclWriter::writeCode(const TQString &text)
{
*mStream << getIndent() << text << m_endl;
}
void
-TclWriter::writeComm(const QString &text)
+TclWriter::writeComm(const TQString &text)
{
- QStringList lines = QStringList::split("\n", text, true);
+ TQStringList lines = TQStringList::split("\n", text, true);
for (uint i = 0; i < lines.count(); i++) {
*mStream << getIndent() << "# " << lines[i] << m_endl;
}
}
void
-TclWriter::writeDocu(const QString &text)
+TclWriter::writeDocu(const TQString &text)
{
- QStringList lines = QStringList::split("\n", text, true);
+ TQStringList lines = TQStringList::split("\n", text, true);
for (uint i = 0; i < lines.count(); i++) {
*mStream << getIndent() << "## " << lines[i] << m_endl;
}
@@ -392,7 +392,7 @@ TclWriter::writeDocu(const QString &text)
// in self-association relationship).
void
TclWriter::writeAssociationIncl(UMLAssociationList list, Uml::IDType myId,
- const QString &type)
+ const TQString &type)
{
for (UMLAssociation * a = list.first(); a; a = list.next()) {
UMLClassifier *classifier = NULL;
@@ -422,7 +422,7 @@ TclWriter::writeAssociationIncl(UMLAssociationList list, Uml::IDType myId,
void
TclWriter::writeUse(UMLClassifier * c)
{
- QString myNs;
+ TQString myNs;
if (!c->getPackage().isEmpty()) {
myNs = cleanName(c->getPackage());
@@ -492,8 +492,8 @@ TclWriter::writeAttributeDecl(Uml::Visibility visibility, bool writeStatic)
if (classifierInfo->isInterface)
return;
- QString scope = visibility.toString();
- QString type;
+ TQString scope = visibility.toString();
+ TQString type;
if (writeStatic) {
type = "common";
} else {
@@ -531,11 +531,11 @@ TclWriter::writeAttributeDecl(Uml::Visibility visibility, bool writeStatic)
if (list && list->count() > 0) {
writeComm(m_endl + scope + ' ' + type + " attributes" + m_endl);
// write attrib declarations now
- QString documentation;
+ TQString documentation;
for (UMLAttribute * at = list->first(); at; at = list->next()) {
documentation = at->getDoc();
- QString varName = cleanName(at->getName());
- QString typeName = fixTypeName(at->getTypeName());
+ TQString varName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
writeDocu(m_endl + "@var " + scope + ' ' + type + ' ' + typeName + ' ' +
varName + m_endl + documentation);
writeCode(scope + ' ' + type + ' ' + varName + m_endl);
@@ -546,7 +546,7 @@ TclWriter::writeAttributeDecl(Uml::Visibility visibility, bool writeStatic)
void
TclWriter::writeAssociationDecl(UMLAssociationList associations,
Uml::Visibility permitScope, Uml::IDType id,
- const QString &/*type*/)
+ const TQString &/*type*/)
{
if (forceSections() || !associations.isEmpty()) {
bool printRoleA = false, printRoleB = false;
@@ -565,7 +565,7 @@ TclWriter::writeAssociationDecl(UMLAssociationList associations,
// print RoleB decl
if (printRoleB && a->getVisibility(Uml::B) == permitScope) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B),
a->getMulti(Uml::B), a->getRoleDoc(Uml::B),
@@ -573,7 +573,7 @@ TclWriter::writeAssociationDecl(UMLAssociationList associations,
}
// print RoleA decl
if (printRoleA && a->getVisibility(Uml::A) == permitScope) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A), a->getRoleDoc(Uml::A),
@@ -587,8 +587,8 @@ TclWriter::writeAssociationDecl(UMLAssociationList associations,
}
void
-TclWriter::writeAssociationRoleDecl(const QString &fieldClassName, const QString &roleName,
- const QString &multi, const QString &doc, const QString &scope)
+TclWriter::writeAssociationRoleDecl(const TQString &fieldClassName, const TQString &roleName,
+ const TQString &multi, const TQString &doc, const TQString &scope)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
@@ -599,13 +599,13 @@ TclWriter::writeAssociationRoleDecl(const QString &fieldClassName, const QString
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if (multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = roleName.lower();
+ if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
+ TQString fieldVarName = roleName.lower();
// record this for later consideration of initialization IF the
// multi value requires 1 of these objects
if (ObjectFieldVariables.findIndex(fieldVarName) == -1 &&
- multi.contains(QRegExp("^1$"))
+ multi.contains(TQRegExp("^1$"))
) {
// ugh. UGLY. Storing variable name and its class in pairs.
ObjectFieldVariables.append(fieldVarName);
@@ -615,7 +615,7 @@ TclWriter::writeAssociationRoleDecl(const QString &fieldClassName, const QString
"> " + fieldVarName + m_endl + doc);
writeCode(scope + " variable " + fieldVarName + m_endl);
} else {
- QString fieldVarName = roleName.lower();
+ TQString fieldVarName = roleName.lower();
// record unique occurrences for later when we want to check
// for initialization of this vector
@@ -642,7 +642,7 @@ TclWriter::writeInitAttributeSource()
{
// only need to do this under certain conditions
if (classifierInfo->hasAttributes) {
- QString varName;
+ TQString varName;
writeComm(mClassGlobal + "::initAttributes");
writeCode("body " + mClassGlobal + "::initAttributes {} {");
@@ -657,7 +657,7 @@ TclWriter::writeInitAttributeSource()
}
}
// Now initialize the association related fields (e.g. vectors)
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = VectorFieldVariables.begin();
it != VectorFieldVariables.end(); ++it) {
varName = *it;
@@ -668,7 +668,7 @@ TclWriter::writeInitAttributeSource()
it != ObjectFieldVariables.end(); ++it) {
varName = *it;
it++;
- QString fieldClassName = *it;
+ TQString fieldClassName = *it;
writeCode("set " + varName + " [list]");
}
// clean up
@@ -715,11 +715,11 @@ TclWriter::writeOperationHeader(UMLClassifier * c, Uml::Visibility permitScope)
writeComm("Operations");
}
for (op = oplist.first(); op; op = oplist.next()) {
- QString doc = "";
- QString code = "";
- QString methodReturnType = fixTypeName(op->getTypeName());
- QString name = cleanName(op->getName());
- QString scope = permitScope.toString();
+ TQString doc = "";
+ TQString code = "";
+ TQString methodReturnType = fixTypeName(op->getTypeName());
+ TQString name = cleanName(op->getName());
+ TQString scope = permitScope.toString();
if (op->getAbstract() || classifierInfo->isInterface) {
//TODO declare abstract method as 'virtual'
// str += "virtual ";
@@ -736,8 +736,8 @@ TclWriter::writeOperationHeader(UMLClassifier * c, Uml::Visibility permitScope)
UMLAttributeList atl = op->getParmList();
j = 0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
if (at->getInitialValue().isEmpty()) {
doc +=
"@param " + typeName + ' ' + atName + m_endl + at->getDoc() +
@@ -790,9 +790,9 @@ TclWriter::writeOperationSource(UMLClassifier * c, Uml::Visibility permitScope)
// generate source for each operation given
for (op = oplist.first(); op; op = oplist.next()) {
- QString code = "";
- QString methodReturnType = fixTypeName(op->getTypeName());
- QString name;
+ TQString code = "";
+ TQString methodReturnType = fixTypeName(op->getTypeName());
+ TQString name;
// no code needed
if (op->getAbstract() || classifierInfo->isInterface) {
continue;
@@ -804,7 +804,7 @@ TclWriter::writeOperationSource(UMLClassifier * c, Uml::Visibility permitScope)
UMLAttributeList atl = op->getParmList();
j = 0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString atName = cleanName(at->getName());
+ TQString atName = cleanName(at->getName());
if (at->getInitialValue().isEmpty()) {
code += ' ' + atName;
} else {
@@ -829,7 +829,7 @@ TclWriter::writeAttributeSource()
UMLAttributeList *list = &(classifierInfo->atpub);
UMLAttribute *at;
for (at = list->first(); at; at = list->next()) {
- QString name = mClassGlobal + "::" + cleanName(at->getName());
+ TQString name = mClassGlobal + "::" + cleanName(at->getName());
writeComm(name);
writeCode("configbody " + name + " {} {" + m_endl + '}' + m_endl);
@@ -858,14 +858,14 @@ TclWriter::writeAssociationSource(UMLAssociationList associations,
// print RoleB source
if (printRoleB && a->getVisibility(Uml::B) == Uml::Visibility::Public) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleSource(fieldClassName, a->getRoleName(Uml::B),
a->getMulti(Uml::B));
}
// print RoleA source
if (printRoleA && a->getVisibility(Uml::A) == Uml::Visibility::Public) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleSource(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A));
@@ -877,8 +877,8 @@ TclWriter::writeAssociationSource(UMLAssociationList associations,
}
void
-TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
- const QString &roleName, const QString &multi)
+TclWriter::writeAssociationRoleSource(const TQString &fieldClassName,
+ const TQString &roleName, const TQString &multi)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
@@ -888,8 +888,8 @@ TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if (multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = roleName.lower();
+ if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
+ TQString fieldVarName = roleName.lower();
writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {");
m_indentLevel++;
@@ -902,7 +902,7 @@ TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
m_indentLevel--;
} else {
- QString fieldVarName = roleName.lower();
+ TQString fieldVarName = roleName.lower();
writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {");
m_indentLevel++;
@@ -922,7 +922,7 @@ TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
}
QString
-TclWriter::fixTypeName(const QString &string)
+TclWriter::fixTypeName(const TQString &string)
{
if (string.isEmpty())
return "void";
@@ -933,13 +933,13 @@ TclWriter::fixTypeName(const QString &string)
QString
TclWriter::getUMLObjectName(UMLObject * obj)
{
- return (obj != 0) ? obj->getName() : QString("NULL");
+ return (obj != 0) ? obj->getName() : TQString("NULL");
}
const QStringList
TclWriter::reservedKeywords() const
{
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty())
{
diff --git a/umbrello/umbrello/codegenerators/tclwriter.h b/umbrello/umbrello/codegenerators/tclwriter.h
index 0c4d71c5..eac918bb 100644
--- a/umbrello/umbrello/codegenerators/tclwriter.h
+++ b/umbrello/umbrello/codegenerators/tclwriter.h
@@ -19,7 +19,7 @@
#ifndef TCLWRITER_H
#define TCLWRITER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "simplecodegenerator.h"
#include "../umloperationlist.h"
#include "../umlattributelist.h"
@@ -63,37 +63,37 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
/**
* Current output stream.
*/
- QTextStream * mStream;
+ TQTextStream * mStream;
/**
* write the header file for this classifier.
*/
- void writeHeaderFile(UMLClassifier * c, QFile & file);
+ void writeHeaderFile(UMLClassifier * c, TQFile & file);
/**
* write the source code body file for this classifier.
*/
- void writeSourceFile(UMLClassifier * c, QFile & file);
+ void writeSourceFile(UMLClassifier * c, TQFile & file);
/**
* write the source codei text.
*/
- void writeCode(const QString &text);
+ void writeCode(const TQString &text);
/**
* write comment text.
*/
- void writeComm(const QString &text);
+ void writeComm(const TQString &text);
/**
* write documentation text.
*/
- void writeDocu(const QString &text);
+ void writeDocu(const TQString &text);
void writeConstructorDecl();
@@ -103,9 +103,9 @@ private:
* Summary information about current classifier.
*/
ClassifierInfo *classifierInfo;
- QString mNamespace;
- QString mClass;
- QString mClassGlobal;
+ TQString mNamespace;
+ TQString mClass;
+ TQString mClassGlobal;
/**
* writes the Attribute declarations
@@ -116,19 +116,19 @@ private:
void writeAttributeDecl(Uml::Visibility visibility, bool writeStatic);
void writeAssociationIncl(UMLAssociationList list,
- Uml::IDType myId, const QString &type);
+ Uml::IDType myId, const TQString &type);
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
void writeAssociationDecl(UMLAssociationList associations,
Uml::Visibility permit, Uml::IDType id,
- const QString &type);
+ const TQString &type);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(const QString &fieldClassName,
- const QString &roleName, const QString &multi, const QString &doc, const QString &docname);
+ void writeAssociationRoleDecl(const TQString &fieldClassName,
+ const TQString &roleName, const TQString &multi, const TQString &doc, const TQString &docname);
/**
* If needed, write out the declaration for the method to initialize attributes of our class.
@@ -147,9 +147,9 @@ private:
void writeAttributeSource();
void writeAssociationSource(UMLAssociationList associations,
Uml::IDType id);
- void writeAssociationRoleSource(const QString &fieldClassName,
- const QString &roleName,
- const QString &multi);
+ void writeAssociationRoleSource(const TQString &fieldClassName,
+ const TQString &roleName,
+ const TQString &multi);
void writeUse(UMLClassifier * c);
@@ -157,15 +157,15 @@ private:
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject * obj);
+ TQString getUMLObjectName(UMLObject * obj);
/**
* Replaces `string' with STRING_TYPENAME.
*/
- QString fixTypeName(const QString &string);
+ TQString fixTypeName(const TQString &string);
- QStringList ObjectFieldVariables;
- QStringList VectorFieldVariables;
+ TQStringList ObjectFieldVariables;
+ TQStringList VectorFieldVariables;
};
diff --git a/umbrello/umbrello/codegenerators/xmlcodecomment.cpp b/umbrello/umbrello/codegenerators/xmlcodecomment.cpp
index 5f44620b..8d3a6893 100644
--- a/umbrello/umbrello/codegenerators/xmlcodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/xmlcodecomment.cpp
@@ -21,7 +21,7 @@
// Constructors/Destructors
//
-XMLCodeComment::XMLCodeComment ( CodeDocument * doc, const QString & text )
+XMLCodeComment::XMLCodeComment ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -43,17 +43,17 @@ XMLCodeComment::~XMLCodeComment ( ) { }
/**
* @return QString
*/
-QString XMLCodeComment::toString ( )
+TQString XMLCodeComment::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
{
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
output.append(indent+"<!-- ");
if(!body.isEmpty())
output.append(formatMultiLineText (body, indent, endLine));
diff --git a/umbrello/umbrello/codegenerators/xmlcodecomment.h b/umbrello/umbrello/codegenerators/xmlcodecomment.h
index a30bcbab..e3f55ccc 100644
--- a/umbrello/umbrello/codegenerators/xmlcodecomment.h
+++ b/umbrello/umbrello/codegenerators/xmlcodecomment.h
@@ -18,7 +18,7 @@
#ifndef XMLCODECOMMENT_H
#define XMLCODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class CodeDocument;
@@ -40,7 +40,7 @@ public:
/**
* Constructors
*/
- explicit XMLCodeComment ( CodeDocument * doc, const QString & text = "" );
+ explicit XMLCodeComment ( CodeDocument * doc, const TQString & text = "" );
/**
* Empty Destructor
@@ -56,7 +56,7 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
protected:
diff --git a/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp b/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp
index 7e702619..6a068113 100644
--- a/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp
+++ b/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp
@@ -29,7 +29,7 @@
// Constructors/Destructors
//
-XMLElementCodeBlock::XMLElementCodeBlock ( CodeDocument * parentDoc, const QString & nodeName, const QString & comment)
+XMLElementCodeBlock::XMLElementCodeBlock ( CodeDocument * parentDoc, const TQString & nodeName, const TQString & comment)
: HierarchicalCodeBlock(parentDoc)
{
init(parentDoc, nodeName, comment);
@@ -44,8 +44,8 @@ XMLElementCodeBlock::~XMLElementCodeBlock ( ) { }
/**
* Save the XMI representation of this object
*/
-void XMLElementCodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "xmlelementblock" );
+void XMLElementCodeBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "xmlelementblock" );
setAttributesOnNode(doc, blockElement);
@@ -55,7 +55,7 @@ void XMLElementCodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* load params from the appropriate XMI element node.
*/
-void XMLElementCodeBlock::loadFromXMI ( QDomElement & root )
+void XMLElementCodeBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -63,7 +63,7 @@ void XMLElementCodeBlock::loadFromXMI ( QDomElement & root )
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void XMLElementCodeBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void XMLElementCodeBlock::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// superclass call
@@ -77,7 +77,7 @@ void XMLElementCodeBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement
/** set the class attributes of this object from
* the passed element node.
*/
-void XMLElementCodeBlock::setAttributesFromNode ( QDomElement & root) {
+void XMLElementCodeBlock::setAttributesFromNode ( TQDomElement & root) {
// superclass call
HierarchicalCodeBlock::setAttributesFromNode(root);
@@ -90,11 +90,11 @@ void XMLElementCodeBlock::setAttributesFromNode ( QDomElement & root) {
// Accessor methods
//
-void XMLElementCodeBlock::setNodeName (const QString &name) {
+void XMLElementCodeBlock::setNodeName (const TQString &name) {
m_nodeName = name;
}
-QString XMLElementCodeBlock::getNodeName () {
+TQString XMLElementCodeBlock::getNodeName () {
return m_nodeName;
}
@@ -116,13 +116,13 @@ UMLAttributeList * XMLElementCodeBlock::getAttributeList() {
void XMLElementCodeBlock::updateContent ( )
{
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
- QString nodeName = getNodeName();
+ TQString nodeName = getNodeName();
// Now update START/ENDING Text
- QString startText = '<' + nodeName;
- QString endText = "";
+ TQString startText = '<' + nodeName;
+ TQString endText = "";
UMLAttributeList * alist = getAttributeList();
for (UMLAttribute *at = alist->first(); at; at=alist->next())
@@ -150,7 +150,7 @@ void XMLElementCodeBlock::updateContent ( )
}
-void XMLElementCodeBlock::init (CodeDocument *parentDoc, const QString &nodeName, const QString &comment)
+void XMLElementCodeBlock::init (CodeDocument *parentDoc, const TQString &nodeName, const TQString &comment)
{
setComment(new XMLCodeComment(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/xmlelementcodeblock.h b/umbrello/umbrello/codegenerators/xmlelementcodeblock.h
index b0acd277..334cac17 100644
--- a/umbrello/umbrello/codegenerators/xmlelementcodeblock.h
+++ b/umbrello/umbrello/codegenerators/xmlelementcodeblock.h
@@ -17,7 +17,7 @@
#ifndef XMLELEMENTCODEBLOCK_H
#define XMLELEMENTCODEBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../umlattributelist.h"
#include "../hierarchicalcodeblock.h"
@@ -36,7 +36,7 @@ public:
/**
* Empty Constructor
*/
- XMLElementCodeBlock ( CodeDocument * parentDoc, const QString & nodeName, const QString & comment = "");
+ XMLElementCodeBlock ( CodeDocument * parentDoc, const TQString & nodeName, const TQString & comment = "");
/**
* Empty Destructor
@@ -46,17 +46,17 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
virtual UMLAttributeList * getAttributeList();
- virtual void setNodeName (const QString &name);
- virtual QString getNodeName ();
+ virtual void setNodeName (const TQString &name);
+ virtual TQString getNodeName ();
void addAttribute (UMLAttribute * at);
@@ -65,12 +65,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/**
* Update the start/end text of this codeblock.
@@ -80,8 +80,8 @@ protected:
private:
UMLAttributeList m_attList;
- QString m_nodeName;
- void init (CodeDocument * parent, const QString &nodeName, const QString &comment);
+ TQString m_nodeName;
+ void init (CodeDocument * parent, const TQString &nodeName, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/xmlschemawriter.cpp b/umbrello/umbrello/codegenerators/xmlschemawriter.cpp
index 303d3230..8c043a3e 100644
--- a/umbrello/umbrello/codegenerators/xmlschemawriter.cpp
+++ b/umbrello/umbrello/codegenerators/xmlschemawriter.cpp
@@ -18,9 +18,9 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -58,7 +58,7 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
}
// find an appropriate name for our file
- QString fileName = findFileName(c,".xsd");
+ TQString fileName = findFileName(c,".xsd");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
@@ -66,13 +66,13 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
}
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
}
- QTextStream XMLschema(&file);
+ TQTextStream XMLschema(&file);
// set package namespace tag appropriately
if(!c->getPackage().isEmpty())
@@ -85,10 +85,10 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
XMLschema<<"<?xml version=\"1.0\"?>"<<m_endl;
// 1. create the header
- QString headerText = getHeadingFile(".xsd");
+ TQString headerText = getHeadingFile(".xsd");
if(!headerText.isEmpty()) {
- headerText.replace(QRegExp("%filename%"),fileName);
- headerText.replace(QRegExp("%filepath%"),file.name());
+ headerText.replace(TQRegExp("%filename%"),fileName);
+ headerText.replace(TQRegExp("%filepath%"),file.name());
}
if(!headerText.isEmpty())
XMLschema<<headerText<<m_endl;
@@ -141,7 +141,7 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
writtenClassifiers.clear();
}
-void XMLSchemaWriter::writeElementDecl( const QString &elementName, const QString &elementTypeName, QTextStream &XMLschema)
+void XMLSchemaWriter::writeElementDecl( const TQString &elementName, const TQString &elementTypeName, TQTextStream &XMLschema)
{
if(forceDoc())
writeComment(elementName+" is the root element, declared here.", XMLschema);
@@ -153,7 +153,7 @@ void XMLSchemaWriter::writeElementDecl( const QString &elementName, const QStrin
}
-void XMLSchemaWriter::writeClassifier (UMLClassifier *c, QTextStream &XMLschema)
+void XMLSchemaWriter::writeClassifier (UMLClassifier *c, TQTextStream &XMLschema)
{
// NO doing this 2 or more times.
@@ -209,7 +209,7 @@ UMLAttributeList XMLSchemaWriter::findAttributes (UMLClassifier *c)
// element use the interface in element aggregation)
//
-void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, QTextStream &XMLschema)
+void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, TQTextStream &XMLschema)
{
// preparations
@@ -226,9 +226,9 @@ void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, QTextStream &XM
if(subclasses.count() > 0)
{
- QString elementName = getElementName(c);
+ TQString elementName = getElementName(c);
UMLAttributeList attribs = findAttributes(c);
- QStringList attribGroups = findAttributeGroups(c);
+ TQStringList attribGroups = findAttributeGroups(c);
writeAttributeGroupDecl(elementName, attribs, XMLschema);
@@ -245,11 +245,11 @@ void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, QTextStream &XM
void XMLSchemaWriter::writeGroupClassifierDecl (UMLClassifier *c,
UMLClassifierList subclasses,
- QTextStream &XMLschema)
+ TQTextStream &XMLschema)
{
// name of class, subclassing classifiers
- QString elementTypeName = getElementGroupTypeName(c);
+ TQString elementTypeName = getElementGroupTypeName(c);
// start Writing node but only if it has subclasses? Nah..right now put in empty group
XMLschema<<getIndent()<<"<"<<makeSchemaTag("group")<<" name=\""<<elementTypeName<<"\">"<<m_endl;
@@ -277,7 +277,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
UMLAssociationList aggregations,
UMLAssociationList compositions,
UMLClassifierList superclasses,
- QTextStream &XMLschema)
+ TQTextStream &XMLschema)
{
// Preparations
@@ -285,7 +285,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
// sort attributes by Scope
UMLAttributeList attribs = findAttributes(c);
- QStringList attribGroups = findAttributeGroups(c);
+ TQStringList attribGroups = findAttributeGroups(c);
// test for relevant associations
bool hasAssociations = determineIfHasChildNodes(c);
@@ -295,7 +295,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
// START WRITING
// start body of element
- QString elementTypeName = getElementTypeName(c);
+ TQString elementTypeName = getElementTypeName(c);
XMLschema<<getIndent()<<"<"<<makeSchemaTag("complexType")<<" name=\""<<elementTypeName<<"\"";
@@ -308,7 +308,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
if(hasSuperclass)
{
- QString superClassName = getElementTypeName(superclasses.first());
+ TQString superClassName = getElementTypeName(superclasses.first());
XMLschema<<getIndent()<<"<"<<makeSchemaTag("complexContent")<<">"<<m_endl;
//PROBLEM: we only treat ONE superclass for inheritence.. bah.
@@ -368,7 +368,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
}
-void XMLSchemaWriter::writeConcreteClassifier (UMLClassifier *c, QTextStream &XMLschema)
+void XMLSchemaWriter::writeConcreteClassifier (UMLClassifier *c, TQTextStream &XMLschema)
{
// preparations.. gather information about this classifier
@@ -400,11 +400,11 @@ void XMLSchemaWriter::writeConcreteClassifier (UMLClassifier *c, QTextStream &XM
}
// these exist for abstract classes only (which become xs:group nodes)
-QStringList XMLSchemaWriter::findAttributeGroups (UMLClassifier *c)
+TQStringList XMLSchemaWriter::findAttributeGroups (UMLClassifier *c)
{
// we need to look for any class we inherit from. IF these
// have attributes, then we need to notice
- QStringList list;
+ TQStringList list;
UMLClassifierList superclasses = c->findSuperClassConcepts(); // list of what inherits from us
for(UMLClassifier *classifier = superclasses.first(); classifier; classifier = superclasses.next())
{
@@ -432,7 +432,7 @@ bool XMLSchemaWriter::determineIfHasChildNodes( UMLClassifier *c)
void XMLSchemaWriter::writeChildObjsInAssociation (UMLClassifier *c,
UMLAssociationList assoc,
- QTextStream &XMLschema)
+ TQTextStream &XMLschema)
{
UMLObjectList list = findChildObjsInAssociations (c, assoc);
@@ -455,7 +455,7 @@ void XMLSchemaWriter::markAsWritten(UMLClassifier *c) {
writtenClassifiers.append(c);
}
-void XMLSchemaWriter::writeAttributeDecls(UMLAttributeList &attribs, QTextStream &XMLschema )
+void XMLSchemaWriter::writeAttributeDecls(UMLAttributeList &attribs, TQTextStream &XMLschema )
{
UMLAttribute *at;
@@ -466,13 +466,13 @@ void XMLSchemaWriter::writeAttributeDecls(UMLAttributeList &attribs, QTextStream
}
-void XMLSchemaWriter::writeAttributeDecl(UMLAttribute *attrib, QTextStream &XMLschema )
+void XMLSchemaWriter::writeAttributeDecl(UMLAttribute *attrib, TQTextStream &XMLschema )
{
- QString documentation = attrib->getDoc();
- QString typeName = fixTypeName(attrib->getTypeName());
+ TQString documentation = attrib->getDoc();
+ TQString typeName = fixTypeName(attrib->getTypeName());
bool isStatic = attrib->getStatic();
- QString initialValue = fixInitialStringDeclValue(attrib->getInitialValue(), typeName);
+ TQString initialValue = fixInitialStringDeclValue(attrib->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, XMLschema);
@@ -497,7 +497,7 @@ void XMLSchemaWriter::writeAttributeDecl(UMLAttribute *attrib, QTextStream &XMLs
}
-void XMLSchemaWriter::writeAttributeGroupDecl (const QString &elementName, UMLAttributeList &attribs, QTextStream &XMLschema )
+void XMLSchemaWriter::writeAttributeGroupDecl (const TQString &elementName, UMLAttributeList &attribs, TQTextStream &XMLschema )
{
if (attribs.count()> 0) {
@@ -522,16 +522,16 @@ void XMLSchemaWriter::writeAttributeGroupDecl (const QString &elementName, UMLAt
}
}
-void XMLSchemaWriter::writeComment( const QString &comment, QTextStream &XMLschema )
+void XMLSchemaWriter::writeComment( const TQString &comment, TQTextStream &XMLschema )
{
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
- QString indent = getIndent();
+ TQString indent = getIndent();
XMLschema<<indent<<"<!-- ";
- if (comment.contains(QRegExp("\n"))) {
+ if (comment.contains(TQRegExp("\n"))) {
XMLschema<<m_endl;
- QStringList lines = QStringList::split( "\n", comment);
+ TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
XMLschema<<indent<<" "<<lines[i]<<m_endl;
@@ -550,7 +550,7 @@ void XMLSchemaWriter::writeComment( const QString &comment, QTextStream &XMLsche
// badly for someone using a plain association between 2 different classes. THAT should
// be done, but isnt yet (this is why I have left role b code in for now). -b.t.
bool XMLSchemaWriter::writeAssociationDecls(UMLAssociationList associations,
- bool noRoleNameOK, bool didFirstOne, Uml::IDType id, QTextStream &XMLschema)
+ bool noRoleNameOK, bool didFirstOne, Uml::IDType id, TQTextStream &XMLschema)
{
if( !associations.isEmpty() )
@@ -637,14 +637,14 @@ UMLObjectList XMLSchemaWriter::findChildObjsInAssociations (UMLClassifier *c, UM
return list;
}
-void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString &multi, QTextStream &XMLschema)
+void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const TQString &multi, TQTextStream &XMLschema)
{
bool isAbstract = c->getAbstract();
bool isInterface = c->isInterface();
- QString elementName = getElementName(c);
- QString doc = c->getDoc();
+ TQString elementName = getElementName(c);
+ TQString doc = c->getDoc();
if (!doc.isEmpty())
writeComment(doc, XMLschema);
@@ -653,8 +653,8 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
// Min/Max Occurs is based on whether it is this a single element
// or a List (maxoccurs>1). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- QString minOccurs = "0";
- QString maxOccurs = "unbounded";
+ TQString minOccurs = "0";
+ TQString maxOccurs = "unbounded";
if (multi.isEmpty())
{
// in this case, association will only specify ONE element can exist
@@ -664,7 +664,7 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
}
else
{
- QStringList values = QStringList::split( QRegExp("[^\\d{1,}|\\*]"), multi);
+ TQStringList values = TQStringList::split( TQRegExp("[^\\d{1,}|\\*]"), multi);
// could use some improvement here.. for sequences like "0..1,3..5,10" we
// don't capture the whole "richness" of the multi. Instead we translate it
@@ -673,10 +673,10 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
{
// populate both with the actual value as long as our value isnt an asterix
// In that case, use special value (from above)
- if(values[0].contains(QRegExp("\\d{1,}")))
+ if(values[0].contains(TQRegExp("\\d{1,}")))
minOccurs = values[0]; // use first number in sequence
- if(values[values.count()-1].contains(QRegExp("\\d{1,}")))
+ if(values[values.count()-1].contains(TQRegExp("\\d{1,}")))
maxOccurs = values[values.count()-1]; // use only last number in sequence
}
}
@@ -734,14 +734,14 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
// IF the type is "string" we need to declare it as
// the XMLSchema Object "String" (there is no string primative in XMLSchema).
// Same thing again for "bool" to "boolean"
-QString XMLSchemaWriter::fixTypeName(const QString& string)
+TQString XMLSchemaWriter::fixTypeName(const TQString& string)
{
- // string.replace(QRegExp("^string$"),schemaNamespaceTag+":string");
- // string.replace(QRegExp("^bool$"),schemaNamespaceTag+":boolean");
+ // string.replace(TQRegExp("^string$"),schemaNamespaceTag+":string");
+ // string.replace(TQRegExp("^bool$"),schemaNamespaceTag+":boolean");
return schemaNamespaceTag + ':' + string;
}
-QString XMLSchemaWriter::fixInitialStringDeclValue(QString value, const QString &type)
+TQString XMLSchemaWriter::fixInitialStringDeclValue(TQString value, const TQString &type)
{
// check for strings only
if (!value.isEmpty() && type == "xs:string") {
@@ -753,36 +753,36 @@ QString XMLSchemaWriter::fixInitialStringDeclValue(QString value, const QString
return value;
}
-QString XMLSchemaWriter::getElementName(UMLClassifier *c)
+TQString XMLSchemaWriter::getElementName(UMLClassifier *c)
{
return cleanName(c->getName());
}
-QString XMLSchemaWriter::getElementTypeName(UMLClassifier *c)
+TQString XMLSchemaWriter::getElementTypeName(UMLClassifier *c)
{
- QString elementName = getElementName(c);
+ TQString elementName = getElementName(c);
return elementName + "ComplexType";
}
-QString XMLSchemaWriter::getElementGroupTypeName(UMLClassifier *c)
+TQString XMLSchemaWriter::getElementGroupTypeName(UMLClassifier *c)
{
- QString elementName = getElementName(c);
+ TQString elementName = getElementName(c);
return elementName + "GroupType";
}
-QString XMLSchemaWriter::makePackageTag (QString tagName) {
+TQString XMLSchemaWriter::makePackageTag (TQString tagName) {
tagName.prepend( packageNamespaceTag + ':');
return tagName;
}
-QString XMLSchemaWriter::makeSchemaTag (QString tagName) {
+TQString XMLSchemaWriter::makeSchemaTag (TQString tagName) {
tagName.prepend( schemaNamespaceTag + ':');
return tagName;
}
-const QStringList XMLSchemaWriter::reservedKeywords() const {
+const TQStringList XMLSchemaWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "ATTLIST"
diff --git a/umbrello/umbrello/codegenerators/xmlschemawriter.h b/umbrello/umbrello/codegenerators/xmlschemawriter.h
index caf9f906..95210078 100644
--- a/umbrello/umbrello/codegenerators/xmlschemawriter.h
+++ b/umbrello/umbrello/codegenerators/xmlschemawriter.h
@@ -64,16 +64,16 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
/**
* Writes concept's documentation then guts
*/
- void writeClassifier(UMLClassifier *c, QTextStream &XMLSchema);
- void writeAbstractClassifier(UMLClassifier *c, QTextStream &XMLSchema);
- void writeConcreteClassifier(UMLClassifier *c, QTextStream &XMLSchema);
+ void writeClassifier(UMLClassifier *c, TQTextStream &XMLSchema);
+ void writeAbstractClassifier(UMLClassifier *c, TQTextStream &XMLSchema);
+ void writeConcreteClassifier(UMLClassifier *c, TQTextStream &XMLSchema);
/**
* write a <complexType> declaration for this classifier
@@ -83,7 +83,7 @@ private:
UMLAssociationList aggregations,
UMLAssociationList compositions,
UMLClassifierList superclassifiers,
- QTextStream &XMLSchema);
+ TQTextStream &XMLSchema);
/**
* write a <group> declaration for this classifier. Used for interfaces to classes with
@@ -91,7 +91,7 @@ private:
*/
void writeGroupClassifierDecl(UMLClassifier *c,
UMLClassifierList superclassifiers,
- QTextStream &XMLSchema);
+ TQTextStream &XMLSchema);
/**
* find if the classifier would have any Child elements.
@@ -103,24 +103,24 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* write an element declaration.
*/
- void writeElementDecl( const QString &elementName, const QString &elementTypeName, QTextStream &XMLschema);
+ void writeElementDecl( const TQString &elementName, const TQString &elementTypeName, TQTextStream &XMLschema);
/**
* writes the Attribute declarations
* @param attribs List of attributes
* @param XMLschema text stream
*/
- void writeAttributeDecls(UMLAttributeList &attribs, QTextStream &XMLschema );
+ void writeAttributeDecls(UMLAttributeList &attribs, TQTextStream &XMLschema );
/**
* write an element attribute.
*/
- void writeAttributeDecl(UMLAttribute *attrib, QTextStream &XMLschema );
+ void writeAttributeDecl(UMLAttribute *attrib, TQTextStream &XMLschema );
/**
* Find all attributes for this concept.
@@ -131,7 +131,7 @@ private:
* Discover the string name of all the attribute groups (which are child nodes)
* of this concept (err.. element)
*/
- QStringList findAttributeGroups (UMLClassifier *c);
+ TQStringList findAttributeGroups (UMLClassifier *c);
/**
* Searches a list of associations for appropriate ones to write out as attributes.
@@ -139,32 +139,32 @@ private:
* not work right for plain associations between 2 different classes.
*/
bool writeAssociationDecls(UMLAssociationList associations, bool noRoleOK, bool didOne,
- Uml::IDType id, QTextStream &XMLschema);
+ Uml::IDType id, TQTextStream &XMLschema);
/**
* Find all attributes that belong in group
*/
- void writeAttributeGroupDecl(const QString &elementName, UMLAttributeList &attribs, QTextStream &XMLschema );
+ void writeAttributeGroupDecl(const TQString &elementName, UMLAttributeList &attribs, TQTextStream &XMLschema );
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(UMLClassifier *c, const QString &multi, QTextStream &XMLschema);
+ void writeAssociationRoleDecl(UMLClassifier *c, const TQString &multi, TQTextStream &XMLschema);
/**
* Construct an element tag with the schema namespace
*/
- QString makeSchemaTag ( QString tagName );
+ TQString makeSchemaTag ( TQString tagName );
/**
* Construct an element tag with the package namespace
*/
- QString makePackageTag ( QString tagName );
+ TQString makePackageTag ( TQString tagName );
/**
* Writes a comment
*/
- void writeComment(const QString &text, QTextStream &XMLschema);
+ void writeComment(const TQString &text, TQTextStream &XMLschema);
/**
* Find and return a list of child UMLObjects pointed to by the associations
@@ -175,35 +175,35 @@ private:
/**
* Replaces `string' with `String' and `bool' with `boolean'
*/
- QString fixTypeName(const QString& string);
+ TQString fixTypeName(const TQString& string);
/**
* check that initial values of strings DONT have quotes around them
* (we get double quoting then!!
*/
- QString fixInitialStringDeclValue( QString value, const QString &type);
+ TQString fixInitialStringDeclValue( TQString value, const TQString &type);
/**
* Find the element node name for this concept.
*/
- QString getElementName(UMLClassifier *c);
+ TQString getElementName(UMLClassifier *c);
/**
* Find the element node "type" name. Used in the "complexType" which
* might define that element node.
*/
- QString getElementTypeName(UMLClassifier *c);
+ TQString getElementTypeName(UMLClassifier *c);
/**
* Find the group node "type" name. Used for elements which define an interface/are abstract.
*/
- QString getElementGroupTypeName(UMLClassifier *c);
+ TQString getElementGroupTypeName(UMLClassifier *c);
/**
* Find all the child objects in this association and make sure they get
* written out (if they havent already been)
*/
- void writeChildObjsInAssociation (UMLClassifier *c, UMLAssociationList assoc, QTextStream &s);
+ void writeChildObjsInAssociation (UMLClassifier *c, UMLAssociationList assoc, TQTextStream &s);
/**
* Quick check to see if we have written the declaration for this concept yet.
@@ -218,27 +218,27 @@ private:
/**
* The basic schemaNamespace tag
*/
- QString schemaNamespaceTag;
+ TQString schemaNamespaceTag;
/**
* The basic schemaNamespace tag
*/
- QString packageNamespaceTag;
+ TQString packageNamespaceTag;
/*
* The basic schemaNamespace URI
*/
- QString schemaNamespaceURI;
+ TQString schemaNamespaceURI;
/**
* The basic schemaNamespace URI
*/
- QString packageNamespaceURI;
+ TQString packageNamespaceURI;
/**
* A \n, used at the end of each line
*/
- QString startline;
+ TQString startline;
/**
* a list of UMLClassifiers we have already written
diff --git a/umbrello/umbrello/codegenobjectwithtextblocks.cpp b/umbrello/umbrello/codegenobjectwithtextblocks.cpp
index 383c188f..c3fb2fd6 100644
--- a/umbrello/umbrello/codegenobjectwithtextblocks.cpp
+++ b/umbrello/umbrello/codegenobjectwithtextblocks.cpp
@@ -59,7 +59,7 @@ CodeGenObjectWithTextBlocks::~CodeGenObjectWithTextBlocks ( ) {
/**
* Get the list of TextBlock objects held by m_textblockVector
- * @return QPtrList<TextBlock *> list of TextBlock objects held by
+ * @return TQPtrList<TextBlock *> list of TextBlock objects held by
* m_textblockVector
*/
TextBlockList * CodeGenObjectWithTextBlocks::getTextBlockList ( ) {
@@ -74,7 +74,7 @@ TextBlockList * CodeGenObjectWithTextBlocks::getTextBlockList ( ) {
*/
bool CodeGenObjectWithTextBlocks::addTextBlock(TextBlock* add_object ) {
- QString tag = add_object->getTag();
+ TQString tag = add_object->getTag();
// assign a tag if one doesn't already exist
if(tag.isEmpty())
@@ -126,14 +126,14 @@ bool CodeGenObjectWithTextBlocks::removeTextBlock ( TextBlock * remove_object )
}
// if we get here.. it was in this object so remove from our map
- QString tag = remove_object->getTag();
+ TQString tag = remove_object->getTag();
if(!tag.isEmpty())
m_textBlockTagMap.erase(tag);
return true;
}
-TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const QString &tag )
+TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const TQString &tag )
{
//if we already know to which file this class was written/should be written, just return it.
if(m_textBlockTagMap.contains(tag))
@@ -146,7 +146,7 @@ TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const QString &tag
// and down into its Hierarchical codeblocks. This means you should start any
// search from the parent document of the text block. This method NOT meant for
// casual usage.
-CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTaggedTextBlock (const QString & tag) {
+CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTaggedTextBlock (const TQString & tag) {
// what??!? no tag, then CANT be here
if(tag.isEmpty())
@@ -181,7 +181,7 @@ CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTa
* @param comment
* @param indentLevel
*/
-HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock ( const QString &tag, const QString &comment, int indentLevel ) {
+HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock ( const TQString &tag, const TQString &comment, int indentLevel ) {
// now actually declare the fields
HierarchicalCodeBlock * codeBlock = dynamic_cast<HierarchicalCodeBlock*>(findTextBlockByTag(tag));
@@ -213,7 +213,7 @@ HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock (
* @param comment
* @param indentLevel
*/
-CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments ( const QString &tag, const QString &comment, int indentLevel ) {
+CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments ( const TQString &tag, const TQString &comment, int indentLevel ) {
// now actually declare the fields
CodeBlockWithComments * codeBlock = dynamic_cast<CodeBlockWithComments*>(findTextBlockByTag(tag));
@@ -241,7 +241,7 @@ CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments (
* @param text
* @param indentationLevel
*/
-CodeComment * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeComment ( const QString &tag, const QString &text, int indentationLevel)
+CodeComment * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeComment ( const TQString &tag, const TQString &text, int indentationLevel)
{
TextBlock * tBlock = findTextBlockByTag(tag);
@@ -280,7 +280,7 @@ CodeComment * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeComment ( const
* @param indentLevel
* @param forceUserBlockUpdate
*/
-CodeBlockWithComments * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate )
+CodeBlockWithComments * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeBlockWithComments (const TQString &tag, const TQString &text, const TQString &ctext, int indentLevel, bool forceUserBlockUpdate )
{
TextBlock * tBlock = findTextBlockByTag(tag);
@@ -346,10 +346,10 @@ void CodeGenObjectWithTextBlocks::setAttributesFromObject (CodeGenObjectWithText
}
}
-void CodeGenObjectWithTextBlocks::setAttributesOnNode (QDomDocument & doc, QDomElement & root) {
+void CodeGenObjectWithTextBlocks::setAttributesOnNode (TQDomDocument & doc, TQDomElement & root) {
// set a section to hold document content
- QDomElement tblockElement = doc.createElement( "textblocks" );
+ TQDomElement tblockElement = doc.createElement( "textblocks" );
// only concrete calls to textblocks are saved
TextBlockList * tbList = getTextBlockList();
@@ -363,7 +363,7 @@ void CodeGenObjectWithTextBlocks::setAttributesOnNode (QDomDocument & doc, QDomE
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeGenObjectWithTextBlocks::setAttributesFromNode ( QDomElement & root)
+void CodeGenObjectWithTextBlocks::setAttributesFromNode ( TQDomElement & root)
{
// clear existing codeblocks
@@ -380,25 +380,25 @@ void CodeGenObjectWithTextBlocks::setAttributesFromNode ( QDomElement & root)
// this method should be overridden if this class is inherited
// by some other class that is concrete and takes children
// derived from codeblock/codecomment
-void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( QDomElement & root)
+void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = CodeGenFactory::newCodeComment(m_pCodeDoc);
@@ -413,7 +413,7 @@ void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( QDomElement & ro
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -460,7 +460,7 @@ void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( QDomElement & ro
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
diff --git a/umbrello/umbrello/codegenobjectwithtextblocks.h b/umbrello/umbrello/codegenobjectwithtextblocks.h
index 4e784b07..c21aacf2 100644
--- a/umbrello/umbrello/codegenobjectwithtextblocks.h
+++ b/umbrello/umbrello/codegenobjectwithtextblocks.h
@@ -17,7 +17,7 @@
#ifndef CODEGENOBJECTWITHTEXTBLOCKS_H
#define CODEGENOBJECTWITHTEXTBLOCKS_H
-#include <qmap.h>
+#include <tqmap.h>
#include "codeaccessormethod.h"
#include "textblocklist.h"
@@ -85,7 +85,7 @@ public:
* @param comment
* @param indentLevel
*/
- virtual HierarchicalCodeBlock * getHierarchicalCodeBlock ( const QString &tag, const QString &comment, int indentLevel );
+ virtual HierarchicalCodeBlock * getHierarchicalCodeBlock ( const TQString &tag, const TQString &comment, int indentLevel );
/**
* Will get a codeblockwithcomments from the document with given tag. IF the codeblock
@@ -96,7 +96,7 @@ public:
* @param comment
* @param indentLevel
*/
- virtual CodeBlockWithComments * getCodeBlockWithComments ( const QString &tag, const QString &comment, int indentLevel );
+ virtual CodeBlockWithComments * getCodeBlockWithComments ( const TQString &tag, const TQString &comment, int indentLevel );
/** allows the user to add a code comment to the end of the list
* of text blocks in this document OR, if a text block already exists
@@ -107,7 +107,7 @@ public:
* @param text
* @param indentationLevel
*/
- CodeComment * addOrUpdateTaggedCodeComment (const QString &tag = "", const QString &text = "", int indentationLevel = 0 );
+ CodeComment * addOrUpdateTaggedCodeComment (const TQString &tag = "", const TQString &text = "", int indentationLevel = 0 );
/** allows the user to either add a code block with comments to the end of the list
* of text blocks in this document OR, if a text block already exists
@@ -120,19 +120,19 @@ public:
* @param indentLevel
* @param forceUserBlockUpdate
*/
- CodeBlockWithComments * addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &comment, int indentLevel, bool forceUserBlockUpdate );
+ CodeBlockWithComments * addOrUpdateTaggedCodeBlockWithComments (const TQString &tag, const TQString &text, const TQString &comment, int indentLevel, bool forceUserBlockUpdate );
/**
* @return TextBlock
* @param tag
*/
- virtual TextBlock * findTextBlockByTag ( const QString &tag );
+ virtual TextBlock * findTextBlockByTag ( const TQString &tag );
/**
* @return QString
* @param prefix
*/
- virtual QString getUniqueTag (const QString& prefix = "" ) = 0;
+ virtual TQString getUniqueTag (const TQString& prefix = "" ) = 0;
/** Virtual methods that return a new code document objects.
*/
@@ -145,19 +145,19 @@ public:
* @return parent object. Could return null if the textblock is missing from the
* branch of the document tree being examined.
*/
- CodeGenObjectWithTextBlocks * findParentObjectForTaggedTextBlock (const QString & tag);
+ CodeGenObjectWithTextBlocks * findParentObjectForTaggedTextBlock (const TQString & tag);
protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & elem );
+ virtual void setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem );
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void setAttributesFromObject (CodeGenObjectWithTextBlocks * obj);
@@ -168,17 +168,17 @@ protected:
* by some other class that is concrete and takes children
* derived from codeblock/codecomment/hierarchicalcb/ownedhiercodeblock
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
// reset/clear the inventory text blocks held by this object
virtual void resetTextBlocks();
- QMap<QString, TextBlock *> m_textBlockTagMap;
+ TQMap<TQString, TextBlock *> m_textBlockTagMap;
TextBlockList m_textblockVector;
// find specific text block belonging to code classfields.
// block may not presently be alocated t othe textblock list.
- virtual TextBlock * findCodeClassFieldTextBlockByTag( const QString &tag) = 0;
+ virtual TextBlock * findCodeClassFieldTextBlockByTag( const TQString &tag) = 0;
private:
diff --git a/umbrello/umbrello/codeimport/adaimport.cpp b/umbrello/umbrello/codeimport/adaimport.cpp
index 54ac3907..0cbd8d1c 100644
--- a/umbrello/umbrello/codeimport/adaimport.cpp
+++ b/umbrello/umbrello/codeimport/adaimport.cpp
@@ -14,7 +14,7 @@
#include <stdio.h>
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -43,15 +43,15 @@ void AdaImport::initVars() {
/// Split the line so that a string is returned as a single element of the list,
/// when not in a string then split at white space.
-QStringList AdaImport::split(const QString& lin) {
- QStringList list;
- QString listElement;
+TQStringList AdaImport::split(const TQString& lin) {
+ TQStringList list;
+ TQString listElement;
bool inString = false;
bool seenSpace = false;
- QString line = lin.stripWhiteSpace();
+ TQString line = lin.stripWhiteSpace();
uint len = line.length();
for (uint i = 0; i < len; i++) {
- const QChar& c = line[i];
+ const TQChar& c = line[i];
if (inString) {
listElement += c;
if (c == '"') {
@@ -60,14 +60,14 @@ QStringList AdaImport::split(const QString& lin) {
continue;
}
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
inString = false;
}
} else if (c == '"') {
inString = true;
if (!listElement.isEmpty())
list.append(listElement);
- listElement = QString(c);
+ listElement = TQString(c);
seenSpace = false;
} else if (c == '\'') {
if (i < len - 2 && line[i + 2] == '\'') {
@@ -77,7 +77,7 @@ QStringList AdaImport::split(const QString& lin) {
listElement = line.mid(i, 3);
i += 2;
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
continue;
}
listElement += c;
@@ -88,7 +88,7 @@ QStringList AdaImport::split(const QString& lin) {
seenSpace = true;
if (!listElement.isEmpty()) {
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
}
} else {
listElement += c;
@@ -100,23 +100,23 @@ QStringList AdaImport::split(const QString& lin) {
return list;
}
-void AdaImport::fillSource(const QString& word) {
- QString lexeme;
+void AdaImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- QChar c = word[i];
+ TQChar c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
if (c == ':' && word[i + 1] == '=') {
m_source.append(":=");
i++;
} else {
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
}
@@ -124,14 +124,14 @@ void AdaImport::fillSource(const QString& word) {
m_source.append(lexeme);
}
-QString AdaImport::expand(const QString& name) {
- QRegExp pfxRegExp("^(\\w+)\\.");
+TQString AdaImport::expand(const TQString& name) {
+ TQRegExp pfxRegExp("^(\\w+)\\.");
pfxRegExp.setCaseSensitive(false);
int pos = pfxRegExp.search(name);
if (pos == -1)
return name;
- QString result = name;
- QString pfx = pfxRegExp.cap(1);
+ TQString result = name;
+ TQString pfx = pfxRegExp.cap(1);
if (m_renaming.contains(pfx)) {
result.remove(pfxRegExp);
result.prepend(m_renaming[pfx] + '.');
@@ -139,16 +139,16 @@ QString AdaImport::expand(const QString& name) {
return result;
}
-void AdaImport::parseStems(const QStringList& stems) {
+void AdaImport::parseStems(const TQStringList& stems) {
if (stems.isEmpty())
return;
- QString base = stems.first();
+ TQString base = stems.first();
uint i = 0;
while (1) {
- QString filename = base + ".ads";
+ TQString filename = base + ".ads";
if (! m_parsedFiles.contains(filename)) {
// Save current m_source and m_srcIndex.
- QStringList source(m_source);
+ TQStringList source(m_source);
uint srcIndex = m_srcIndex;
m_source.clear();
parseFile(filename);
@@ -167,7 +167,7 @@ void AdaImport::parseStems(const QStringList& stems) {
bool AdaImport::parseStmt() {
const uint srcLength = m_source.count();
- QString keyword = m_source[m_srcIndex];
+ TQString keyword = m_source[m_srcIndex];
UMLDoc *umldoc = UMLApp::app()->getDocument();
//kDebug() << '"' << keyword << '"' << endl;
if (keyword == "with") {
@@ -176,8 +176,8 @@ bool AdaImport::parseStmt() {
return false;
}
while (++m_srcIndex < srcLength && m_source[m_srcIndex] != ";") {
- QStringList components = QStringList::split(".", m_source[m_srcIndex].lower());
- const QString& prefix = components.first();
+ TQStringList components = TQStringList::split(".", m_source[m_srcIndex].lower());
+ const TQString& prefix = components.first();
if (prefix == "system" || prefix == "ada" || prefix == "gnat" ||
prefix == "interfaces" || prefix == "text_io" ||
prefix == "unchecked_conversion" ||
@@ -197,8 +197,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (keyword == "package") {
- const QString& name = advance();
- QStringList parentPkgs = QStringList::split(".", name.lower());
+ const TQString& name = advance();
+ TQStringList parentPkgs = TQStringList::split(".", name.lower());
parentPkgs.pop_back(); // exclude the current package
parseStems(parentPkgs);
UMLObject *ns = NULL;
@@ -207,7 +207,7 @@ bool AdaImport::parseStmt() {
m_scope[m_scopeIndex], m_comment);
if (m_source[m_srcIndex + 1] == "new") {
m_srcIndex++;
- QString pkgName = advance();
+ TQString pkgName = advance();
UMLObject *gp = Import_Utils::createUMLObject(Uml::ot_Package, pkgName,
m_scope[m_scopeIndex]);
gp->setStereotype("generic");
@@ -237,9 +237,9 @@ bool AdaImport::parseStmt() {
if (m_inGenericFormalPart)
return false; // skip generic formal parameter (not yet implemented)
if (keyword == "subtype") {
- QString name = advance();
+ TQString name = advance();
advance(); // "is"
- QString base = expand(advance());
+ TQString base = expand(advance());
base.remove("Standard.", false);
UMLObject *type = umldoc->findUMLObject(base, Uml::ot_UMLObject, m_scope[m_scopeIndex]);
if (type == NULL) {
@@ -257,8 +257,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (keyword == "type") {
- QString name = advance();
- QString next = advance();
+ TQString name = advance();
+ TQString next = advance();
if (next == "(") {
kDebug() << "AdaImport::parseStmt(" << name << "): "
<< "discriminant handling is not yet implemented" << endl;
@@ -290,7 +290,7 @@ bool AdaImport::parseStmt() {
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
while ((next = advance()) != ")") {
Import_Utils::addEnumLiteral(enumType, next, m_comment);
- m_comment = QString();
+ m_comment = TQString();
if (advance() != ",")
break;
}
@@ -322,7 +322,7 @@ bool AdaImport::parseStmt() {
if (t == Uml::ot_Interface) {
while ((next = advance()) == "and") {
UMLClassifier *klass = static_cast<UMLClassifier*>(ns);
- QString base = expand(advance());
+ TQString base = expand(advance());
UMLObject *p = Import_Utils::createUMLObject(Uml::ot_Interface, base, m_scope[m_scopeIndex]);
UMLClassifier *parent = static_cast<UMLClassifier*>(p);
Import_Utils::createGeneralization(klass, parent);
@@ -344,8 +344,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (next == "new") {
- QString base = expand(advance());
- QStringList baseInterfaces;
+ TQString base = expand(advance());
+ TQStringList baseInterfaces;
while ((next = advance()) == "and") {
baseInterfaces.append(expand(advance()));
}
@@ -372,8 +372,8 @@ bool AdaImport::parseStmt() {
}
if (baseInterfaces.count()) {
t = Uml::ot_Interface;
- QStringList::Iterator end(baseInterfaces.end());
- for (QStringList::Iterator bi(baseInterfaces.begin()); bi != end; ++bi) {
+ TQStringList::Iterator end(baseInterfaces.end());
+ for (TQStringList::Iterator bi(baseInterfaces.begin()); bi != end; ++bi) {
ns = Import_Utils::createUMLObject(t, *bi, m_scope[m_scopeIndex]);
parent = static_cast<UMLClassifier*>(ns);
Import_Utils::createGeneralization(klass, parent);
@@ -400,7 +400,7 @@ bool AdaImport::parseStmt() {
m_klass = NULL;
} else if (m_scopeIndex) {
if (advance() != ";") {
- QString scopeName = m_scope[m_scopeIndex]->getFullyQualifiedName();
+ TQString scopeName = m_scope[m_scopeIndex]->getFullyQualifiedName();
if (scopeName.lower() != m_source[m_srcIndex].lower())
kError() << "end: expecting " << scopeName << ", found "
<< m_source[m_srcIndex] << endl;
@@ -419,8 +419,8 @@ bool AdaImport::parseStmt() {
if (keyword == "overriding")
keyword = advance();
if (keyword == "function" || keyword == "procedure") {
- const QString& name = advance();
- QString returnType;
+ const TQString& name = advance();
+ TQString returnType;
if (advance() != "(") {
// Unlike an Ada package, a UML package does not support
// subprograms.
@@ -434,7 +434,7 @@ bool AdaImport::parseStmt() {
UMLOperation *op = NULL;
const uint MAX_PARNAMES = 16;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- QString parName[MAX_PARNAMES];
+ TQString parName[MAX_PARNAMES];
uint parNameCount = 0;
do {
if (parNameCount >= MAX_PARNAMES) {
@@ -448,8 +448,8 @@ bool AdaImport::parseStmt() {
skipStmt();
break;
}
- const QString &direction = advance();
- QString typeName;
+ const TQString &direction = advance();
+ TQString typeName;
Uml::Parameter_Direction dir = Uml::pd_In;
if (direction == "access") {
// Oops, we have to improvise here because there
@@ -521,12 +521,12 @@ bool AdaImport::parseStmt() {
if (keyword == "task" || keyword == "protected") {
// Can task and protected objects/types be mapped to UML?
bool isType = false;
- QString name = advance();
+ TQString name = advance();
if (name == "type") {
isType = true;
name = advance();
}
- QString next = advance();
+ TQString next = advance();
if (next == "(") {
skipStmt(")"); // skip discriminant
next = advance();
@@ -537,8 +537,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (keyword == "for") { // rep spec
- QString typeName = advance();
- QString next = advance();
+ TQString typeName = advance();
+ TQString next = advance();
if (next == "'") {
advance(); // skip qualifier
next = advance();
@@ -558,21 +558,21 @@ bool AdaImport::parseStmt() {
skipStmt();
return true;
}
- const QString& name = keyword;
+ const TQString& name = keyword;
if (advance() != ":") {
kError() << "adaImport: expecting \":\" at " << name << " "
<< m_source[m_srcIndex] << endl;
skipStmt();
return true;
}
- QString nextToken = advance();
+ TQString nextToken = advance();
if (nextToken == "aliased")
nextToken = advance();
- QString typeName = expand(nextToken);
- QString initialValue;
+ TQString typeName = expand(nextToken);
+ TQString initialValue;
if (advance() == ":=") {
initialValue = advance();
- QString token;
+ TQString token;
while ((token = advance()) != ";") {
initialValue.append(' ' + token);
}
diff --git a/umbrello/umbrello/codeimport/adaimport.h b/umbrello/umbrello/codeimport/adaimport.h
index 14e41926..b7f3d3de 100644
--- a/umbrello/umbrello/codeimport/adaimport.h
+++ b/umbrello/umbrello/codeimport/adaimport.h
@@ -12,8 +12,8 @@
#ifndef ADAIMPORT_H
#define ADAIMPORT_H
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "nativeimportbase.h"
#include "../umlobjectlist.h"
@@ -46,24 +46,24 @@ protected:
* Ada's tic which is liable to be confused with the beginning of a character
* constant.
*/
- QStringList split(const QString& line);
+ TQStringList split(const TQString& line);
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
/**
* Apply package renamings to the given name.
*
* @return expanded name
*/
- QString expand(const QString& name);
+ TQString expand(const TQString& name);
/**
* Parse all files that can be formed by concatenation of the given stems.
*/
- void parseStems(const QStringList& stems);
+ void parseStems(const TQStringList& stems);
bool m_inGenericFormalPart; ///< auxiliary variable
@@ -74,7 +74,7 @@ protected:
*/
UMLObjectList m_classesDefinedInThisScope;
- typedef QMap<QString, QString> StringMap;
+ typedef TQMap<TQString, TQString> StringMap;
/**
* Map of package renamings.
diff --git a/umbrello/umbrello/codeimport/classimport.cpp b/umbrello/umbrello/codeimport/classimport.cpp
index ed675bda..e32758dd 100644
--- a/umbrello/umbrello/codeimport/classimport.cpp
+++ b/umbrello/umbrello/codeimport/classimport.cpp
@@ -12,7 +12,7 @@
// own header
#include "classimport.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
// app includes
#include "../umldoc.h"
@@ -24,13 +24,13 @@
#include "pascalimport.h"
#include "cppimport.h"
-void ClassImport::importFiles(const QStringList &fileList) {
+void ClassImport::importFiles(const TQStringList &fileList) {
initialize();
UMLDoc *umldoc = UMLApp::app()->getDocument();
uint processedFilesCount = 0;
- for (QStringList::const_iterator fileIT = fileList.begin();
+ for (TQStringList::const_iterator fileIT = fileList.begin();
fileIT != fileList.end(); ++fileIT) {
- QString fileName = (*fileIT);
+ TQString fileName = (*fileIT);
umldoc->writeToStatusBar(i18n("Importing file: %1 Progress: %2/%3").
arg(fileName).arg(processedFilesCount).arg(fileList.size()));
parseFile(fileName);
@@ -39,7 +39,7 @@ void ClassImport::importFiles(const QStringList &fileList) {
umldoc->writeToStatusBar(i18n("Ready."));
}
-ClassImport *ClassImport::createImporterByFileExt(const QString &filename) {
+ClassImport *ClassImport::createImporterByFileExt(const TQString &filename) {
ClassImport *classImporter;
if (filename.endsWith(".idl"))
classImporter = new IDLImport();
@@ -47,7 +47,7 @@ ClassImport *ClassImport::createImporterByFileExt(const QString &filename) {
classImporter = new PythonImport();
else if (filename.endsWith(".java"))
classImporter = new JavaImport();
- else if (filename.contains( QRegExp("\\.ad[sba]$") ))
+ else if (filename.contains( TQRegExp("\\.ad[sba]$") ))
classImporter = new AdaImport();
else if (filename.endsWith(".pas"))
classImporter = new PascalImport();
diff --git a/umbrello/umbrello/codeimport/classimport.h b/umbrello/umbrello/codeimport/classimport.h
index 351ddec5..e9820aa1 100644
--- a/umbrello/umbrello/codeimport/classimport.h
+++ b/umbrello/umbrello/codeimport/classimport.h
@@ -12,7 +12,7 @@
#ifndef CLASSIMPORT_H
#define CLASSIMPORT_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* Interfaces classparser library to uml models
@@ -32,12 +32,12 @@ public:
*
* @param files List of files to import.
*/
- void importFiles(const QStringList &files);
+ void importFiles(const TQStringList &files);
/**
* Factory method.
*/
- static ClassImport *createImporterByFileExt(const QString &filename);
+ static ClassImport *createImporterByFileExt(const TQString &filename);
protected:
/**
@@ -54,7 +54,7 @@ protected:
*
* @param filename The file to import.
*/
- virtual void parseFile(const QString& filename) = 0;
+ virtual void parseFile(const TQString& filename) = 0;
};
diff --git a/umbrello/umbrello/codeimport/cppimport.cpp b/umbrello/umbrello/codeimport/cppimport.cpp
index 4537c038..f97a5359 100644
--- a/umbrello/umbrello/codeimport/cppimport.cpp
+++ b/umbrello/umbrello/codeimport/cppimport.cpp
@@ -12,8 +12,8 @@
// own header
#include "cppimport.h"
// qt/kde includes
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kdebug.h>
// app includes
@@ -33,7 +33,7 @@
// static members
CppDriver * CppImport::ms_driver;
-QStringList CppImport::ms_seenFiles;
+TQStringList CppImport::ms_seenFiles;
class CppDriver : public Driver {
public:
@@ -49,17 +49,17 @@ CppImport::CppImport() {
CppImport::~CppImport() {}
-void CppImport::feedTheModel(const QString& fileName) {
+void CppImport::feedTheModel(const TQString& fileName) {
if (ms_seenFiles.find(fileName) != ms_seenFiles.end())
return;
ms_seenFiles.append(fileName);
- QMap<QString, Dependence> deps = ms_driver->dependences(fileName);
+ TQMap<TQString, Dependence> deps = ms_driver->dependences(fileName);
if (! deps.empty()) {
- QMap<QString, Dependence>::Iterator it;
+ TQMap<TQString, Dependence>::Iterator it;
for (it = deps.begin(); it != deps.end(); ++it) {
if (it.data().second == Dep_Global) // don't want these
continue;
- QString includeFile = it.key();
+ TQString includeFile = it.key();
if (includeFile.isEmpty()) {
kError() << fileName << ": " << it.data().first
<< " not found" << endl;
@@ -89,10 +89,10 @@ void CppImport::initialize() {
ms_driver->addIncludePath( "/usr/include/c++" );
ms_driver->addIncludePath( "/usr/include/g++" );
ms_driver->addIncludePath( "/usr/local/include" );
- QStringList incPathList = Import_Utils::includePathList();
+ TQStringList incPathList = Import_Utils::includePathList();
if (incPathList.count()) {
- QStringList::Iterator end(incPathList.end());
- for (QStringList::Iterator i(incPathList.begin()); i != end; ++i) {
+ TQStringList::Iterator end(incPathList.end());
+ for (TQStringList::Iterator i(incPathList.begin()); i != end; ++i) {
ms_driver->addIncludePath( *i );
}
@@ -100,7 +100,7 @@ void CppImport::initialize() {
ms_seenFiles.clear();
}
-void CppImport::parseFile(const QString& fileName) {
+void CppImport::parseFile(const TQString& fileName) {
if (ms_seenFiles.find(fileName) != ms_seenFiles.end())
return;
ms_driver->parseFile( fileName );
diff --git a/umbrello/umbrello/codeimport/cppimport.h b/umbrello/umbrello/codeimport/cppimport.h
index 3d5d8195..bf980bf4 100644
--- a/umbrello/umbrello/codeimport/cppimport.h
+++ b/umbrello/umbrello/codeimport/cppimport.h
@@ -12,7 +12,7 @@
#ifndef CPPIMPORT_H
#define CPPIMPORT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "classimport.h"
class CppDriver;
@@ -39,7 +39,7 @@ protected:
*
* @param filename The file to import.
*/
- void parseFile(const QString& filename);
+ void parseFile(const TQString& filename);
private:
/**
@@ -49,10 +49,10 @@ private:
* in proper order so that references between UML objects are created
* properly.
*/
- void feedTheModel(const QString& fileName);
+ void feedTheModel(const TQString& fileName);
static CppDriver * ms_driver;
- static QStringList ms_seenFiles; ///< auxiliary buffer for feedTheModel()
+ static TQStringList ms_seenFiles; ///< auxiliary buffer for feedTheModel()
};
diff --git a/umbrello/umbrello/codeimport/idlimport.cpp b/umbrello/umbrello/codeimport/idlimport.cpp
index 6d228baf..cd2db89d 100644
--- a/umbrello/umbrello/codeimport/idlimport.cpp
+++ b/umbrello/umbrello/codeimport/idlimport.cpp
@@ -14,9 +14,9 @@
#include <stdio.h>
// qt/kde includes
-// #include <qprocess.h> //should use this instead of popen()
-#include <qstringlist.h>
-#include <qregexp.h>
+// #include <tqprocess.h> //should use this instead of popen()
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -38,8 +38,8 @@ IDLImport::~IDLImport() {
}
/// Check for split type names (e.g. unsigned long long)
-QString IDLImport::joinTypename() {
- QString typeName = m_source[m_srcIndex];
+TQString IDLImport::joinTypename() {
+ TQString typeName = m_source[m_srcIndex];
if (m_source[m_srcIndex] == "unsigned")
typeName += ' ' + advance();
if (m_source[m_srcIndex] == "long" &&
@@ -48,18 +48,18 @@ QString IDLImport::joinTypename() {
return typeName;
}
-bool IDLImport::preprocess(QString& line) {
+bool IDLImport::preprocess(TQString& line) {
// Ignore C preprocessor generated lines.
if (line.startsWith("#"))
return true; // done
return NativeImportBase::preprocess(line);
}
-void IDLImport::fillSource(const QString& word) {
- QString lexeme;
+void IDLImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- QChar c = word[i];
+ TQChar c = word[i];
if (c.isLetterOrNumber() || c == '_') {
lexeme += c;
} else if (c == ':' && word[i + 1] == ':') {
@@ -74,28 +74,28 @@ void IDLImport::fillSource(const QString& word) {
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
if (!lexeme.isEmpty())
m_source.append(lexeme);
}
-void IDLImport::parseFile(const QString& filename) {
+void IDLImport::parseFile(const TQString& filename) {
if (filename.contains('/')) {
- QString path = filename;
- path.remove( QRegExp("/[^/]+$") );
+ TQString path = filename;
+ path.remove( TQRegExp("/[^/]+$") );
kDebug() << "IDLImport::parseFile: adding path " << path << endl;
Import_Utils::addIncludePath(path);
}
- QStringList includePaths = Import_Utils::includePathList();
- //QProcess command("cpp", UMLAp::app());
- QString command("cpp -C"); // -C means "preserve comments"
- for (QStringList::Iterator pathIt = includePaths.begin();
+ TQStringList includePaths = Import_Utils::includePathList();
+ //TQProcess command("cpp", UMLAp::app());
+ TQString command("cpp -C"); // -C means "preserve comments"
+ for (TQStringList::Iterator pathIt = includePaths.begin();
pathIt != includePaths.end(); ++pathIt) {
- QString path = (*pathIt);
+ TQString path = (*pathIt);
//command.addArgument(" -I" + path);
command += " -I" + path;
}
@@ -106,21 +106,21 @@ void IDLImport::parseFile(const QString& filename) {
kError() << "IDLImport::parseFile: cannot popen(" << command << ")" << endl;
return;
}
- // Scan the input file into the QStringList m_source.
+ // Scan the input file into the TQStringList m_source.
m_source.clear();
char buf[256];
while (fgets(buf, sizeof(buf), fp) != NULL) {
int len = strlen(buf);
if (buf[len - 1] == '\n')
buf[--len] = '\0';
- NativeImportBase::scan( QString(buf) );
+ NativeImportBase::scan( TQString(buf) );
}
- // Parse the QStringList m_source.
+ // Parse the TQStringList m_source.
m_scopeIndex = 0;
m_scope[0] = NULL;
const uint srcLength = m_source.count();
for (m_srcIndex = 0; m_srcIndex < srcLength; m_srcIndex++) {
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
//kDebug() << '"' << keyword << '"' << endl;
if (keyword.startsWith(m_singleLineCommentIntro)) {
m_comment = keyword.mid(m_singleLineCommentIntro.length());
@@ -129,16 +129,16 @@ void IDLImport::parseFile(const QString& filename) {
if (! parseStmt())
skipStmt();
m_currentAccess = Uml::Visibility::Public;
- m_comment = QString();
+ m_comment = TQString();
}
pclose(fp);
}
bool IDLImport::parseStmt() {
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
const uint srcLength = m_source.count();
if (keyword == "module") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = static_cast<UMLPackage*>(ns);
@@ -150,19 +150,19 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "interface") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
m_klass->setStereotype("CORBAInterface");
m_klass->setAbstract(m_isAbstract);
m_isAbstract = false;
- m_comment = QString();
+ m_comment = TQString();
if (advance() == ";") // forward declaration
return true;
if (m_source[m_srcIndex] == ":") {
while (++m_srcIndex < srcLength && m_source[m_srcIndex] != "{") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
Import_Utils::createGeneralization(m_klass, baseName);
if (advance() != ",")
break;
@@ -176,7 +176,7 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "struct" || keyword == "exception") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
@@ -197,7 +197,7 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "enum") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Enum,
name, m_scope[m_scopeIndex], m_comment);
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
@@ -211,8 +211,8 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "typedef") {
- const QString& existingType = advance();
- const QString& newType = advance();
+ const TQString& existingType = advance();
+ const TQString& newType = advance();
Import_Utils::createUMLObject(Uml::ot_Class, newType, m_scope[m_scopeIndex],
m_comment, "CORBATypedef" /* stereotype */);
// @todo How do we convey the existingType ?
@@ -231,7 +231,7 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "valuetype") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
@@ -243,7 +243,7 @@ bool IDLImport::parseStmt() {
if (advance() == "truncatable")
m_srcIndex++;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != "{") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
Import_Utils::createGeneralization(m_klass, baseName);
if (advance() != ",")
break;
@@ -290,13 +290,13 @@ bool IDLImport::parseStmt() {
// (of a member of struct or valuetype, or return type
// of an operation.) Up next is the name of the attribute
// or operation.
- if (! keyword.contains( QRegExp("^\\w") )) {
+ if (! keyword.contains( TQRegExp("^\\w") )) {
kError() << "importIDL: ignoring " << keyword << endl;
return false;
}
- QString typeName = joinTypename();
- QString name = advance();
- if (name.contains( QRegExp("\\W") )) {
+ TQString typeName = joinTypename();
+ TQString name = advance();
+ if (name.contains( TQRegExp("\\W") )) {
kError() << "importIDL: expecting name in " << name << endl;
return false;
}
@@ -305,15 +305,15 @@ bool IDLImport::parseStmt() {
kError() << "importIDL: no class set for " << name << endl;
return false;
}
- QString nextToken = advance();
+ TQString nextToken = advance();
if (nextToken == "(") {
// operation
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
m_srcIndex++;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- const QString &direction = m_source[m_srcIndex++];
- QString typeName = joinTypename();
- const QString &parName = advance();
+ const TQString &direction = m_source[m_srcIndex++];
+ TQString typeName = joinTypename();
+ const TQString &parName = advance();
UMLAttribute *att = Import_Utils::addMethodParameter(op, typeName, parName);
Uml::Parameter_Direction dir;
if (Model_Utils::stringToDirection(direction, dir))
diff --git a/umbrello/umbrello/codeimport/idlimport.h b/umbrello/umbrello/codeimport/idlimport.h
index 6945364f..b5e88113 100644
--- a/umbrello/umbrello/codeimport/idlimport.h
+++ b/umbrello/umbrello/codeimport/idlimport.h
@@ -33,20 +33,20 @@ public:
* Reimplement operation from NativeImportBase.
* Need to do this because we use the external C preprocessor.
*/
- void parseFile(const QString& file);
+ void parseFile(const TQString& file);
/**
* Override operation from NativeImportBase.
*/
- bool preprocess(QString& line);
+ bool preprocess(TQString& line);
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
protected:
- QString joinTypename();
+ TQString joinTypename();
bool m_isOneway, m_isReadonly, m_isAttribute;
};
diff --git a/umbrello/umbrello/codeimport/import_utils.cpp b/umbrello/umbrello/codeimport/import_utils.cpp
index 92a87867..87206ccb 100644
--- a/umbrello/umbrello/codeimport/import_utils.cpp
+++ b/umbrello/umbrello/codeimport/import_utils.cpp
@@ -12,8 +12,8 @@
// own header
#include "import_utils.h"
// qt/kde includes
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -64,7 +64,7 @@ bool bPutAtGlobalScope = false;
/**
* The include path list (see addIncludePath() and includePathList())
*/
-QStringList incPathList;
+TQStringList incPathList;
void putAtGlobalScope(bool yesno) {
bPutAtGlobalScope = yesno;
@@ -82,13 +82,13 @@ bool newUMLObjectWasCreated() {
return bNewUMLObjectWasCreated;
}
-QString formatComment(const QString &comment) {
+TQString formatComment(const TQString &comment) {
if (comment.isEmpty())
return comment;
- QStringList lines = QStringList::split("\n", comment);
- QString& first = lines.first();
- QRegExp wordex("\\w");
+ TQStringList lines = TQStringList::split("\n", comment);
+ TQString& first = lines.first();
+ TQRegExp wordex("\\w");
if (first.startsWith("/*")) {
int wordpos = wordex.search(first);
if (wordpos != -1)
@@ -96,7 +96,7 @@ QString formatComment(const QString &comment) {
else
lines.pop_front(); // nothing interesting on this line
}
- QString& last = lines.last();
+ TQString& last = lines.last();
int endpos = last.find("*/");
if (endpos != -1) {
if (last.contains(wordex))
@@ -107,16 +107,16 @@ QString formatComment(const QString &comment) {
if (! lines.count())
return "";
- QStringList::Iterator end(lines.end());
- for (QStringList::Iterator lit(lines.begin()); lit != end; ++lit) {
- (*lit).remove(QRegExp("^\\s+"));
- (*lit).remove(QRegExp("^\\*+\\s?"));
+ TQStringList::Iterator end(lines.end());
+ for (TQStringList::Iterator lit(lines.begin()); lit != end; ++lit) {
+ (*lit).remove(TQRegExp("^\\s+"));
+ (*lit).remove(TQRegExp("^\\*+\\s?"));
}
return lines.join("\n");
}
/*
-UMLObject* findUMLObject(QString name,
+UMLObject* findUMLObject(TQString name,
Uml::Object_Type type) {
// Why an extra wrapper? See comment at addMethodParameter()
UMLObject * o = umldoc->findUMLObject(name, type);
@@ -125,11 +125,11 @@ UMLObject* findUMLObject(QString name,
*/
UMLObject *createUMLObject(Uml::Object_Type type,
- const QString& inName,
+ const TQString& inName,
UMLPackage *parentPkg,
- const QString& comment,
- const QString& stereotype) {
- QString name = inName;
+ const TQString& comment,
+ const TQString& stereotype) {
+ TQString name = inName;
UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLFolder *logicalView = umldoc->getRootFolder(Uml::mt_Logical);
const Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
@@ -142,13 +142,13 @@ UMLObject *createUMLObject(Uml::Object_Type type,
bNewUMLObjectWasCreated = false;
if (o == NULL) {
// Strip possible adornments and look again.
- int isConst = name.contains(QRegExp("^const "));
- name.remove(QRegExp("^const\\s+"));
- QString typeName(name);
- const int isAdorned = typeName.contains( QRegExp("[^\\w:\\. ]") );
+ int isConst = name.contains(TQRegExp("^const "));
+ name.remove(TQRegExp("^const\\s+"));
+ TQString typeName(name);
+ const int isAdorned = typeName.contains( TQRegExp("[^\\w:\\. ]") );
const int isPointer = typeName.contains('*');
const int isRef = typeName.contains('&');
- typeName.remove(QRegExp("[^\\w:\\. ].*$"));
+ typeName.remove(TQRegExp("[^\\w:\\. ].*$"));
typeName = typeName.simplifyWhiteSpace();
UMLObject *origType = umldoc->findUMLObject(typeName, Uml::ot_UMLObject, parentPkg);
if (origType == NULL) {
@@ -156,17 +156,17 @@ UMLObject *createUMLObject(Uml::Object_Type type,
if (bPutAtGlobalScope)
parentPkg = logicalView;
// Find, or create, the scopes.
- QStringList components;
+ TQStringList components;
if (typeName.contains("::")) {
- components = QStringList::split("::", typeName);
+ components = TQStringList::split("::", typeName);
} else if (typeName.contains(".")) {
- components = QStringList::split(".", typeName);
+ components = TQStringList::split(".", typeName);
}
if (components.count() > 1) {
typeName = components.back();
components.pop_back();
while ( components.count() ) {
- QString scopeName = components.front();
+ TQString scopeName = components.front();
components.pop_front();
o = umldoc->findUMLObject(scopeName, Uml::ot_UMLObject, parentPkg);
if (o) {
@@ -240,7 +240,7 @@ UMLObject *createUMLObject(Uml::Object_Type type,
parentPkg->addObject(o);
}
}
- QString strippedComment = formatComment(comment);
+ TQString strippedComment = formatComment(comment);
if (! strippedComment.isEmpty()) {
o->setDoc(strippedComment);
}
@@ -249,17 +249,17 @@ UMLObject *createUMLObject(Uml::Object_Type type,
}
if (gRelatedClassifier == NULL || gRelatedClassifier == o)
return o;
- QRegExp templateInstantiation("^[\\w:\\.]+\\s*<(.*)>");
+ TQRegExp templateInstantiation("^[\\w:\\.]+\\s*<(.*)>");
int pos = templateInstantiation.search(name);
if (pos == -1)
return o;
// Create dependencies on template parameters.
- QString caption = templateInstantiation.cap(1);
- QStringList params = QStringList::split(QRegExp("[^\\w:\\.]+"), caption);
+ TQString caption = templateInstantiation.cap(1);
+ TQStringList params = TQStringList::split(TQRegExp("[^\\w:\\.]+"), caption);
if (!params.count())
return o;
- QStringList::Iterator end(params.end());
- for (QStringList::Iterator it(params.begin()); it != end; ++it) {
+ TQStringList::Iterator end(params.end());
+ for (TQStringList::Iterator it(params.begin()); it != end; ++it) {
UMLObject *p = umldoc->findUMLObject(*it, Uml::ot_UMLObject, parentPkg);
if (p == NULL || p->getBaseType() == Uml::ot_Datatype)
continue;
@@ -274,16 +274,16 @@ UMLObject *createUMLObject(Uml::Object_Type type,
return o;
}
-UMLOperation* makeOperation(UMLClassifier *parent, const QString &name) {
+UMLOperation* makeOperation(UMLClassifier *parent, const TQString &name) {
UMLOperation *op = Object_Factory::createOperation(parent, name);
return op;
}
UMLObject* insertAttribute(UMLClassifier *owner,
Uml::Visibility scope,
- const QString& name,
+ const TQString& name,
UMLClassifier *attrType,
- const QString& comment /* ="" */,
+ const TQString& comment /* ="" */,
bool isStatic /* =false */) {
Uml::Object_Type ot = owner->getBaseType();
Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
@@ -299,7 +299,7 @@ UMLObject* insertAttribute(UMLClassifier *owner,
UMLAttribute *attr = owner->addAttribute(name, attrType, scope);
attr->setStatic(isStatic);
- QString strippedComment = formatComment(comment);
+ TQString strippedComment = formatComment(comment);
if (! strippedComment.isEmpty()) {
attr->setDoc(strippedComment);
}
@@ -309,9 +309,9 @@ UMLObject* insertAttribute(UMLClassifier *owner,
}
UMLObject* insertAttribute(UMLClassifier *owner, Uml::Visibility scope,
- const QString& name,
- const QString& type,
- const QString& comment /* ="" */,
+ const TQString& name,
+ const TQString& type,
+ const TQString& comment /* ="" */,
bool isStatic /* =false */) {
UMLObject *attrType = owner->findTemplate(type);
if (attrType == NULL) {
@@ -327,10 +327,10 @@ UMLObject* insertAttribute(UMLClassifier *owner, Uml::Visibility scope,
}
void insertMethod(UMLClassifier *klass, UMLOperation* &op,
- Uml::Visibility scope, const QString& type,
+ Uml::Visibility scope, const TQString& type,
bool isStatic, bool isAbstract,
bool isFriend, bool isConstructor,
- const QString& comment) {
+ const TQString& comment) {
op->setVisibility(scope);
if (!type.isEmpty() // return type may be missing (constructor/destructor)
&& type != "void") {
@@ -359,7 +359,7 @@ void insertMethod(UMLClassifier *klass, UMLOperation* &op,
if (isConstructor)
op->setStereotype("constructor");
- QString strippedComment = formatComment(comment);
+ TQString strippedComment = formatComment(comment);
if (! strippedComment.isEmpty()) {
op->setDoc(strippedComment);
}
@@ -394,8 +394,8 @@ void insertMethod(UMLClassifier *klass, UMLOperation* &op,
}
UMLAttribute* addMethodParameter(UMLOperation *method,
- const QString& type,
- const QString& name) {
+ const TQString& type,
+ const TQString& name) {
UMLClassifier *owner = static_cast<UMLClassifier*>(method->parent());
UMLObject *typeObj = owner->findTemplate(type);
if (typeObj == NULL) {
@@ -410,7 +410,7 @@ UMLAttribute* addMethodParameter(UMLOperation *method,
return attr;
}
-void addEnumLiteral(UMLEnum *enumType, const QString &literal, const QString &comment) {
+void addEnumLiteral(UMLEnum *enumType, const TQString &literal, const TQString &comment) {
UMLObject *el = enumType->addEnumLiteral(literal);
el->setDoc(comment);
}
@@ -433,28 +433,28 @@ void createGeneralization(UMLClassifier *child, UMLClassifier *parent) {
umldoc->addAssociation(assoc);
}
-void createGeneralization(UMLClassifier *child, const QString &parentName) {
+void createGeneralization(UMLClassifier *child, const TQString &parentName) {
UMLObject *parentObj = createUMLObject( Uml::ot_Class, parentName );
UMLClassifier *parent = static_cast<UMLClassifier*>(parentObj);
createGeneralization(child, parent);
}
-QStringList includePathList() {
- QStringList includePathList(incPathList);
+TQStringList includePathList() {
+ TQStringList includePathList(incPathList);
char *umbrello_incpath = getenv( "UMBRELLO_INCPATH" );
if (umbrello_incpath) {
- includePathList += QStringList::split( ':', umbrello_incpath );
+ includePathList += TQStringList::split( ':', umbrello_incpath );
}
return includePathList;
}
-void addIncludePath(const QString& path) {
+void addIncludePath(const TQString& path) {
if (! incPathList.contains(path))
incPathList.append(path);
}
-bool isDatatype(const QString& name, UMLPackage *parentPkg) {
+bool isDatatype(const TQString& name, UMLPackage *parentPkg) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLObject * o = umldoc->findUMLObject(name, Uml::ot_Datatype, parentPkg);
return (o!=NULL);
diff --git a/umbrello/umbrello/codeimport/import_utils.h b/umbrello/umbrello/codeimport/import_utils.h
index 7d36bc77..f04aa3be 100644
--- a/umbrello/umbrello/codeimport/import_utils.h
+++ b/umbrello/umbrello/codeimport/import_utils.h
@@ -12,7 +12,7 @@
#ifndef IMPORT_UTILS_H
#define IMPORT_UTILS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "../umlnamespace.h"
#include "../umlattributelist.h"
@@ -34,10 +34,10 @@ namespace Import_Utils {
* Find or create a document object.
*/
UMLObject* createUMLObject(Uml::Object_Type type,
- const QString& name,
+ const TQString& name,
UMLPackage *parentPkg = NULL,
- const QString& comment = QString::null,
- const QString& stereotype = QString::null);
+ const TQString& comment = TQString::null,
+ const TQString& stereotype = TQString::null);
/**
* Control whether an object which is newly created by createUMLObject()
* is put at the global scope.
@@ -66,18 +66,18 @@ namespace Import_Utils {
* Create a UMLAttribute and insert it into the document.
*/
UMLObject* insertAttribute(UMLClassifier *klass, Uml::Visibility scope,
- const QString& name,
- const QString& type,
- const QString& comment = QString::null,
+ const TQString& name,
+ const TQString& type,
+ const TQString& comment = TQString::null,
bool isStatic = false);
/**
* Create a UMLAttribute and insert it into the document.
* Use the specified existing attrType.
*/
UMLObject* insertAttribute(UMLClassifier *klass, Uml::Visibility scope,
- const QString& name,
+ const TQString& name,
UMLClassifier *attrType,
- const QString& comment /* ="" */,
+ const TQString& comment /* ="" */,
bool isStatic /* =false */);
/**
* Create a UMLOperation.
@@ -88,7 +88,7 @@ namespace Import_Utils {
* a conflict with a pre-existing parameterless method of the same
* name.)
*/
- UMLOperation* makeOperation(UMLClassifier *parent, const QString &name);
+ UMLOperation* makeOperation(UMLClassifier *parent, const TQString &name);
/**
* Insert the UMLOperation into the given classifier.
@@ -109,10 +109,10 @@ namespace Import_Utils {
* @param comment The Documentation for this method
*/
void insertMethod(UMLClassifier *klass, UMLOperation* &op,
- Uml::Visibility scope, const QString& type,
+ Uml::Visibility scope, const TQString& type,
bool isStatic, bool isAbstract,
bool isFriend = false, bool isConstructor = false,
- const QString& comment = QString::null);
+ const TQString& comment = TQString::null);
/**
* Add an argument to a UMLOperation.
@@ -120,14 +120,14 @@ namespace Import_Utils {
* prefixes in the `type'.
*/
UMLAttribute* addMethodParameter(UMLOperation *method,
- const QString& type,
- const QString& name);
+ const TQString& type,
+ const TQString& name);
/**
* Add an enum literal to an UMLEnum.
*/
- void addEnumLiteral(UMLEnum *enumType, const QString &literal,
- const QString &comment = QString());
+ void addEnumLiteral(UMLEnum *enumType, const TQString &literal,
+ const TQString &comment = TQString());
/**
* Create a generalization from the given child classifier to the given
@@ -139,12 +139,12 @@ namespace Import_Utils {
* Create a generalization from the existing child UMLObject to the given
* parent class name.
*/
- void createGeneralization(UMLClassifier *child, const QString &parentName);
+ void createGeneralization(UMLClassifier *child, const TQString &parentName);
/**
* Strip comment lines of leading whitespace and stars.
*/
- QString formatComment(const QString &comment);
+ TQString formatComment(const TQString &comment);
/**
* Return the list of paths set by previous calls to addIncludePath()
@@ -152,12 +152,12 @@ namespace Import_Utils {
* This list can be used for finding #included (or Ada with'ed or...)
* files.
*/
- QStringList includePathList();
+ TQStringList includePathList();
/**
* Add a path to the include path list.
*/
- void addIncludePath(const QString& path);
+ void addIncludePath(const TQString& path);
/**
* Returns whether the last createUMLObject() actually created
@@ -168,7 +168,7 @@ namespace Import_Utils {
/**
* Returns true if a type is an actual Datatype
*/
- bool isDatatype(const QString& name, UMLPackage *parentPkg = NULL);
+ bool isDatatype(const TQString& name, UMLPackage *parentPkg = NULL);
} // end namespace Import_Utils
diff --git a/umbrello/umbrello/codeimport/javaimport.cpp b/umbrello/umbrello/codeimport/javaimport.cpp
index 8df6e5e7..7f62a1a9 100644
--- a/umbrello/umbrello/codeimport/javaimport.cpp
+++ b/umbrello/umbrello/codeimport/javaimport.cpp
@@ -13,10 +13,10 @@
#include "javaimport.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -29,7 +29,7 @@
#include "../operation.h"
#include "../attribute.h"
-QStringList JavaImport::s_filesAlreadyParsed;
+TQStringList JavaImport::s_filesAlreadyParsed;
int JavaImport::s_parseDepth = 0;
JavaImport::JavaImport() : NativeImportBase("//") {
@@ -45,7 +45,7 @@ void JavaImport::initVars() {
}
/// Catenate possible template arguments/array dimensions to the end of the type name.
-QString JavaImport::joinTypename(QString typeName) {
+TQString JavaImport::joinTypename(TQString typeName) {
if (m_source[m_srcIndex + 1] == "<" ||
m_source[m_srcIndex + 1] == "[") {
uint start = ++m_srcIndex;
@@ -62,19 +62,19 @@ QString JavaImport::joinTypename(QString typeName) {
return typeName;
}
-void JavaImport::fillSource(const QString& word) {
- QString lexeme;
+void JavaImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- const QChar& c = word[i];
+ const TQChar& c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
if (!lexeme.isEmpty())
@@ -83,15 +83,15 @@ void JavaImport::fillSource(const QString& word) {
///Spawn off an import of the specified file
-void JavaImport::spawnImport( QString file ) {
+void JavaImport::spawnImport( TQString file ) {
// if the file is being parsed, don't bother
//
if (s_filesAlreadyParsed.contains( file ) ) {
return;
}
- if (QFile::exists(file)) {
+ if (TQFile::exists(file)) {
JavaImport importer;
- QStringList fileList;
+ TQStringList fileList;
fileList.append( file );
s_filesAlreadyParsed.append( file );
importer.importFiles( fileList );
@@ -100,7 +100,7 @@ void JavaImport::spawnImport( QString file ) {
///returns the UML Object if found, or null otherwise
-UMLObject* findObject( QString name, UMLPackage *parentPkg ) {
+UMLObject* findObject( TQString name, UMLPackage *parentPkg ) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLObject * o = umldoc->findUMLObject(name, Uml::ot_UMLObject , parentPkg);
return o;
@@ -108,14 +108,14 @@ UMLObject* findObject( QString name, UMLPackage *parentPkg ) {
///Resolve the specified className
-UMLObject* JavaImport::resolveClass (QString className) {
+UMLObject* JavaImport::resolveClass (TQString className) {
kDebug() << "importJava trying to resolve " << className << endl;
// keep track if we are dealing with an array
//
bool isArray = className.contains('[');
// remove any [] so that the class itself can be resolved
//
- QString baseClassName = className;
+ TQString baseClassName = className;
baseClassName.remove('[');
baseClassName.remove(']');
@@ -123,7 +123,7 @@ UMLObject* JavaImport::resolveClass (QString className) {
// current package, which is in the same directory as the current file
// being parsed
//
- QStringList file = QStringList::split( '/', m_currentFileName);
+ TQStringList file = TQStringList::split( '/', m_currentFileName);
// remove the filename. This leaves the full path to the containing
// dir which should also include the package hierarchy
//
@@ -132,9 +132,9 @@ UMLObject* JavaImport::resolveClass (QString className) {
// the file we're looking for might be in the same directory as the
// current class
//
- QString myDir = file.join( "/" );
- QString myFile = '/' + myDir + '/' + baseClassName + ".java";
- if ( QFile::exists(myFile) ) {
+ TQString myDir = file.join( "/" );
+ TQString myFile = '/' + myDir + '/' + baseClassName + ".java";
+ if ( TQFile::exists(myFile) ) {
spawnImport( myFile );
if ( isArray ) {
// we have imported the type. For arrays we want to return
@@ -147,7 +147,7 @@ UMLObject* JavaImport::resolveClass (QString className) {
// the class we want is not in the same package as the one being imported.
// use the imports to find the one we want.
//
- QStringList package = QStringList::split( '.', m_currentPackage);
+ TQStringList package = TQStringList::split( '.', m_currentPackage);
int dirsInPackageCount = package.size();
for (int count=0; count < dirsInPackageCount; count ++ ) {
@@ -156,27 +156,27 @@ UMLObject* JavaImport::resolveClass (QString className) {
file.pop_back();
}
// this is now the root of any further source imports
- QString sourceRoot = '/' + file.join("/") + '/';
+ TQString sourceRoot = '/' + file.join("/") + '/';
- for (QStringList::Iterator pathIt = m_imports.begin();
+ for (TQStringList::Iterator pathIt = m_imports.begin();
pathIt != m_imports.end(); ++pathIt) {
- QString import = (*pathIt);
- QStringList split = QStringList::split( '.', import );
+ TQString import = (*pathIt);
+ TQStringList split = TQStringList::split( '.', import );
split.pop_back(); // remove the * or the classname
if ( import.endsWith( "*" ) || import.endsWith( baseClassName) ) {
// check if the file we want is in this imported package
// convert the org.test type package into a filename
//
- QString aFile = sourceRoot + split.join("/") + '/' + baseClassName + ".java";
- if ( QFile::exists(aFile) ) {
+ TQString aFile = sourceRoot + split.join("/") + '/' + baseClassName + ".java";
+ if ( TQFile::exists(aFile) ) {
spawnImport( aFile );
// we need to set the package for the class that will be resolved
// start at the root package
UMLPackage *parent = m_scope[0];
UMLPackage *current = NULL;
- for (QStringList::Iterator it = split.begin(); it != split.end(); ++it) {
- QString name = (*it);
+ for (TQStringList::Iterator it = split.begin(); it != split.end(); ++it) {
+ TQString name = (*it);
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
name, parent);
current = static_cast<UMLPackage*>(ns);
@@ -197,7 +197,7 @@ UMLObject* JavaImport::resolveClass (QString className) {
/// keep track of the current file being parsed and reset the list of imports
-void JavaImport::parseFile(const QString& filename) {
+void JavaImport::parseFile(const TQString& filename) {
m_currentFileName= filename;
m_imports.clear();
// default visibility is Impl, unless we are an interface, then it is
@@ -223,14 +223,14 @@ void JavaImport::parseFile(const QString& filename) {
bool JavaImport::parseStmt() {
const uint srcLength = m_source.count();
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
//kDebug() << '"' << keyword << '"' << endl;
if (keyword == "package") {
m_currentPackage = advance();
- const QString& qualifiedName = m_currentPackage;
- QStringList names = QStringList::split(".", qualifiedName);
- for (QStringList::Iterator it = names.begin(); it != names.end(); ++it) {
- QString name = (*it);
+ const TQString& qualifiedName = m_currentPackage;
+ TQStringList names = TQStringList::split(".", qualifiedName);
+ for (TQStringList::Iterator it = names.begin(); it != names.end(); ++it) {
+ TQString name = (*it);
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = static_cast<UMLPackage*>(ns);
@@ -242,7 +242,7 @@ bool JavaImport::parseStmt() {
return true;
}
if (keyword == "class" || keyword == "interface") {
- const QString& name = advance();
+ const TQString& name = advance();
const Uml::Object_Type t = (keyword == "class" ? Uml::ot_Class : Uml::ot_Interface);
UMLObject *ns = Import_Utils::createUMLObject(t, name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
@@ -270,14 +270,14 @@ bool JavaImport::parseStmt() {
return false;
}
while (1) {
- const QString arg = m_source[++start];
- if (! arg.contains( QRegExp("^[A-Za-z_]") )) {
+ const TQString arg = m_source[++start];
+ if (! arg.contains( TQRegExp("^[A-Za-z_]") )) {
kDebug() << "importJava(" << name << "): cannot handle template syntax ("
<< arg << ")" << endl;
break;
}
/* UMLTemplate *tmpl = */ m_klass->addTemplate(arg);
- const QString next = m_source[++start];
+ const TQString next = m_source[++start];
if (next == ">")
break;
if (next != ",") {
@@ -289,7 +289,7 @@ bool JavaImport::parseStmt() {
advance(); // skip over ">"
}
if (m_source[m_srcIndex] == "extends") {
- const QString& baseName = advance();
+ const TQString& baseName = advance();
// try to resolve the class we are extending, or if impossible
// create a placeholder
UMLObject *parent = resolveClass( baseName );
@@ -304,7 +304,7 @@ bool JavaImport::parseStmt() {
}
if (m_source[m_srcIndex] == "implements") {
while (m_srcIndex < srcLength - 1 && advance() != "{") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
// try to resolve the interface we are implementing, if this fails
// create a placeholder
UMLObject *interface = resolveClass( baseName );
@@ -327,14 +327,14 @@ bool JavaImport::parseStmt() {
return true;
}
if (keyword == "enum") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Enum,
name, m_scope[m_scopeIndex], m_comment);
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
skipStmt("{");
while (m_srcIndex < srcLength - 1 && advance() != "}") {
Import_Utils::addEnumLiteral(enumType, m_source[m_srcIndex]);
- QString next = advance();
+ TQString next = advance();
if (next == "{" || next == "(") {
if (! skipToClosing(next[0]))
return false;
@@ -389,7 +389,7 @@ bool JavaImport::parseStmt() {
}
if (keyword == "import") {
// keep track of imports so we can resolve classes we are dependent on
- QString import = advance();
+ TQString import = advance();
if ( import.endsWith(".") ) {
//this most likely an import that ends with a *
//
@@ -420,28 +420,28 @@ bool JavaImport::parseStmt() {
// (of a member of class or interface, or return type
// of an operation.) Up next is the name of the attribute
// or operation.
- if (! keyword.contains( QRegExp("^\\w") )) {
+ if (! keyword.contains( TQRegExp("^\\w") )) {
kError() << "importJava: ignoring " << keyword << endl;
return false;
}
- QString typeName = m_source[m_srcIndex];
+ TQString typeName = m_source[m_srcIndex];
typeName = joinTypename(typeName);
// At this point we need a class.
if (m_klass == NULL) {
kError() << "importJava: no class set for " << typeName << endl;
return false;
}
- QString name = advance();
- QString nextToken;
+ TQString name = advance();
+ TQString nextToken;
if (typeName == m_klass->getName() && name == "(") {
// Constructor.
nextToken = name;
name = typeName;
- typeName = QString();
+ typeName = TQString();
} else {
nextToken = advance();
}
- if (name.contains( QRegExp("\\W") )) {
+ if (name.contains( TQRegExp("\\W") )) {
kError() << "importJava: expecting name in " << name << endl;
return false;
}
@@ -450,13 +450,13 @@ bool JavaImport::parseStmt() {
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
m_srcIndex++;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- QString typeName = m_source[m_srcIndex];
+ TQString typeName = m_source[m_srcIndex];
if ( typeName == "final" || typeName.startsWith( "//") ) {
// ignore the "final" keyword and any comments in method args
typeName = advance();
}
typeName = joinTypename(typeName);
- QString parName = advance();
+ TQString parName = advance();
// the Class might not be resolved yet so resolve it if necessary
UMLObject *obj = resolveClass(typeName);
if (obj) {
diff --git a/umbrello/umbrello/codeimport/javaimport.h b/umbrello/umbrello/codeimport/javaimport.h
index 30fa2395..05dcbcb1 100644
--- a/umbrello/umbrello/codeimport/javaimport.h
+++ b/umbrello/umbrello/codeimport/javaimport.h
@@ -40,27 +40,27 @@ protected:
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
/**
* Keep track of the filename currently being parsed
*/
- void parseFile(const QString& filename);
+ void parseFile(const TQString& filename);
/**
* Try to resolve the specified class the current class depends on
*/
- UMLObject* resolveClass (QString className);
+ UMLObject* resolveClass (TQString className);
/**
* spawn off an import of the specified file
*/
- void spawnImport(QString file);
+ void spawnImport(TQString file);
/**
* figure out if the type is really an array or template of the given typeName
*/
- QString joinTypename(QString typeName);
+ TQString joinTypename(TQString typeName);
/**
* true if the member var or method is declared static
@@ -70,23 +70,23 @@ protected:
/**
* The current filename being parsed
*/
- QString m_currentFileName;
+ TQString m_currentFileName;
/**
* the current package of the file being parsed
*/
- QString m_currentPackage;
+ TQString m_currentPackage;
/**
* the imports included in the current file
*/
- QStringList m_imports;
+ TQStringList m_imports;
/**
* Keep track of the files we have already parsed so we don't
* reparse the same ones over and over again.
*/
- static QStringList s_filesAlreadyParsed;
+ static TQStringList s_filesAlreadyParsed;
/**
* Keep track of the parses so that the filesAlreadyParsed
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
index 1ca07eb6..e6a7e2b5 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
@@ -18,10 +18,10 @@
*/
#include "ast.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
-QString nodeTypeToString( int type )
+TQString nodeTypeToString( int type )
{
switch( type )
{
@@ -117,7 +117,7 @@ QString nodeTypeToString( int type )
return "Custom";
}
- return QString::null;
+ return TQString::null;
}
@@ -224,18 +224,18 @@ void NameAST::addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNam
m_classOrNamespaceNameList.append( classOrNamespaceName.release() );
}
-QString NameAST::text() const
+TQString NameAST::text() const
{
if( !m_unqualifiedName.get() )
- return QString::null;
+ return TQString::null;
- QString str;
+ TQString str;
if( m_global )
str += "::";
- QStringList l;
- QPtrListIterator<ClassOrNamespaceNameAST> it( m_classOrNamespaceNameList );
+ TQStringList l;
+ TQPtrListIterator<ClassOrNamespaceNameAST> it( m_classOrNamespaceNameList );
while( it.current() ){
str += it.current()->text() + "::";
++it;
@@ -406,11 +406,11 @@ void TemplateArgumentListAST::addArgument( AST::Node& arg )
m_argumentList.append( arg.release() );
}
-QString TemplateArgumentListAST::text() const
+TQString TemplateArgumentListAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<AST> it( m_argumentList );
+ TQPtrListIterator<AST> it( m_argumentList );
while( it.current() ){
l.append( it.current()->text() );
++it;
@@ -459,14 +459,14 @@ void ClassOrNamespaceNameAST::setTemplateArgumentList( TemplateArgumentListAST::
if( m_templateArgumentList.get() ) m_templateArgumentList->setParent( this );
}
-QString ClassOrNamespaceNameAST::text() const
+TQString ClassOrNamespaceNameAST::text() const
{
if( !m_name.get() )
- return QString::null;
+ return TQString::null;
- QString str = m_name->text();
+ TQString str = m_name->text();
if( m_templateArgumentList.get() )
- str += QString::fromLatin1("< ") + m_templateArgumentList->text() + QString::fromLatin1(" >");
+ str += TQString::fromLatin1("< ") + m_templateArgumentList->text() + TQString::fromLatin1(" >");
return str;
}
@@ -488,9 +488,9 @@ void TypeSpecifierAST::setCv2Qualify( GroupAST::Node& cv2Qualify )
if( m_cv2Qualify.get() ) m_cv2Qualify->setParent( this );
}
-QString TypeSpecifierAST::text() const
+TQString TypeSpecifierAST::text() const
{
- QString str;
+ TQString str;
if( m_cvQualify.get() )
str += m_cvQualify->text() + ' ';
@@ -499,7 +499,7 @@ QString TypeSpecifierAST::text() const
str += m_name->text();
if( m_cv2Qualify.get() )
- str += QString(" ") + m_cv2Qualify->text();
+ str += TQString(" ") + m_cv2Qualify->text();
return str;
}
@@ -558,7 +558,7 @@ void ElaboratedTypeSpecifierAST::setKind( AST::Node& kind )
if( m_kind.get() ) m_kind->setParent( this );
}
-QString ElaboratedTypeSpecifierAST::text() const
+TQString ElaboratedTypeSpecifierAST::text() const
{
if( m_kind.get() )
return m_kind->text() + ' ' + TypeSpecifierAST::text();
@@ -960,9 +960,9 @@ void ParameterDeclarationAST::setExpression( AST::Node& expression )
if( m_expression.get() ) m_expression->setParent( this );
}
-QString ParameterDeclarationAST::text() const
+TQString ParameterDeclarationAST::text() const
{
- QString str;
+ TQString str;
if( m_typeSpec.get() )
str += m_typeSpec->text() + ' ';
@@ -970,7 +970,7 @@ QString ParameterDeclarationAST::text() const
str += m_declarator->text();
if( m_expression.get() )
- str += QString( " = " ) + m_expression->text();
+ str += TQString( " = " ) + m_expression->text();
return str;
}
@@ -990,11 +990,11 @@ void ParameterDeclarationListAST::addParameter( ParameterDeclarationAST::Node& p
m_parameterList.append( parameter.release() );
}
-QString ParameterDeclarationListAST::text() const
+TQString ParameterDeclarationListAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<ParameterDeclarationAST> it( m_parameterList );
+ TQPtrListIterator<ParameterDeclarationAST> it( m_parameterList );
while( it.current() ){
l.append( it.current()->text() );
++it;
@@ -1021,9 +1021,9 @@ void ParameterDeclarationClauseAST::setEllipsis( AST::Node& ellipsis )
if( m_ellipsis.get() ) m_ellipsis->setParent( this );
}
-QString ParameterDeclarationClauseAST::text() const
+TQString ParameterDeclarationClauseAST::text() const
{
- QString str;
+ TQString str;
if( m_parameterDeclarationList.get() )
str += m_parameterDeclarationList->text();
@@ -1050,11 +1050,11 @@ void GroupAST::addNode( AST::Node& node )
m_nodeList.append( node.release() );
}
-QString GroupAST::text() const
+TQString GroupAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<AST> it( m_nodeList );
+ TQPtrListIterator<AST> it( m_nodeList );
while( it.current() ){
l.append( it.current()->text() );
++it;
@@ -1078,11 +1078,11 @@ void AccessDeclarationAST::addAccess( AST::Node& access )
m_accessList.append( access.release() );
}
-QString AccessDeclarationAST::text() const
+TQString AccessDeclarationAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<AST> it( m_accessList );
+ TQPtrListIterator<AST> it( m_accessList );
while( it.current() ){
l.append( it.current()->text() );
++it;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.h b/umbrello/umbrello/codeimport/kdevcppparser/ast.h
index 932cf5dd..e2bd7835 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.h
@@ -21,8 +21,8 @@
#define __ast_h
#include <memory>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#if defined( Q_OS_WIN32 ) || defined( Q_CC_SUN )
@@ -174,7 +174,7 @@ enum NodeType
NodeType_Custom = 2000
};
-QString nodeTypeToString( int type );
+TQString nodeTypeToString( int type );
#if defined(CPPPARSER_QUICK_ALLOCATOR)
@@ -199,7 +199,7 @@ QString nodeTypeToString( int type );
struct Slice
{
- QString source;
+ TQString source;
int position;
int length;
@@ -232,31 +232,31 @@ public:
void getEndPosition( int* line, int* col ) const;
#ifndef CPPPARSER_NO_CHILDREN
- QPtrList<AST> children() { return m_children; }
+ TQPtrList<AST> children() { return m_children; }
void appendChild( AST* child );
void removeChild( AST* child );
#endif
- virtual inline QString text() const
+ virtual inline TQString text() const
{ return m_slice.source.mid(m_slice.position, m_slice.length); }
- QString comment() const
+ TQString comment() const
{ return m_comment; }
inline void setSlice( const Slice& slice )
{ m_slice = slice; }
- inline void setSlice( const QString &text, int position, int length )
+ inline void setSlice( const TQString &text, int position, int length )
{
m_slice.source = text;
m_slice.position = position;
m_slice.length = length;
}
- inline void setText(const QString &text)
+ inline void setText(const TQString &text)
{ setSlice(text, 0, text.length()); }
- void setComment( const QString &comment )
+ void setComment( const TQString &comment )
{ m_comment = comment; }
private:
@@ -266,9 +266,9 @@ private:
int m_endLine, m_endColumn;
Slice m_slice;
#ifndef CPPPARSER_NO_CHILDREN
- QPtrList<AST> m_children;
+ TQPtrList<AST> m_children;
#endif
- QString m_comment;
+ TQString m_comment;
private:
AST( const AST& source );
@@ -286,13 +286,13 @@ public:
public:
GroupAST();
- QPtrList<AST> nodeList() { return m_nodeList; }
+ TQPtrList<AST> nodeList() { return m_nodeList; }
void addNode( AST::Node& node );
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<AST> m_nodeList;
+ TQPtrList<AST> m_nodeList;
private:
GroupAST( const GroupAST& source );
@@ -312,12 +312,12 @@ public:
TemplateArgumentListAST();
void addArgument( AST::Node& arg );
- QPtrList<AST> argumentList() { return m_argumentList; }
+ TQPtrList<AST> argumentList() { return m_argumentList; }
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<AST> m_argumentList;
+ TQPtrList<AST> m_argumentList;
private:
TemplateArgumentListAST( const TemplateArgumentListAST& source );
@@ -341,7 +341,7 @@ public:
TemplateArgumentListAST* templateArgumentList() { return m_templateArgumentList.get(); }
void setTemplateArgumentList( TemplateArgumentListAST::Node& templateArgumentList );
- virtual QString text() const;
+ virtual TQString text() const;
private:
AST::Node m_name;
@@ -367,17 +367,17 @@ public:
void setGlobal( bool b );
void addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNamespaceName );
- QPtrList<ClassOrNamespaceNameAST> classOrNamespaceNameList() { return m_classOrNamespaceNameList; }
+ TQPtrList<ClassOrNamespaceNameAST> classOrNamespaceNameList() { return m_classOrNamespaceNameList; }
ClassOrNamespaceNameAST* unqualifiedName() { return m_unqualifiedName.get(); }
void setUnqualifiedName( ClassOrNamespaceNameAST::Node& unqualifiedName );
- virtual QString text() const;
+ virtual TQString text() const;
private:
bool m_global;
ClassOrNamespaceNameAST::Node m_unqualifiedName;
- QPtrList<ClassOrNamespaceNameAST> m_classOrNamespaceNameList;
+ TQPtrList<ClassOrNamespaceNameAST> m_classOrNamespaceNameList;
private:
NameAST( const NameAST& source );
@@ -445,13 +445,13 @@ public:
public:
AccessDeclarationAST();
- QPtrList<AST> accessList() { return m_accessList; }
+ TQPtrList<AST> accessList() { return m_accessList; }
void addAccess( AST::Node& access );
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<AST> m_accessList;
+ TQPtrList<AST> m_accessList;
private:
AccessDeclarationAST( const AccessDeclarationAST& source );
@@ -478,7 +478,7 @@ public:
GroupAST* cv2Qualify() { return m_cv2Qualify.get(); }
void setCv2Qualify( GroupAST::Node& cv2Qualify );
- virtual QString text() const;
+ virtual TQString text() const;
private:
NameAST::Node m_name;
@@ -532,10 +532,10 @@ public:
BaseClauseAST();
void addBaseSpecifier( BaseSpecifierAST::Node& baseSpecifier );
- QPtrList<BaseSpecifierAST> baseSpecifierList() { return m_baseSpecifierList; }
+ TQPtrList<BaseSpecifierAST> baseSpecifierList() { return m_baseSpecifierList; }
private:
- QPtrList<BaseSpecifierAST> m_baseSpecifierList;
+ TQPtrList<BaseSpecifierAST> m_baseSpecifierList;
private:
BaseClauseAST( const BaseClauseAST& source );
@@ -562,14 +562,14 @@ public:
BaseClauseAST* baseClause() { return m_baseClause.get(); }
void setBaseClause( BaseClauseAST::Node& baseClause );
- QPtrList<DeclarationAST> declarationList() { return m_declarationList; }
+ TQPtrList<DeclarationAST> declarationList() { return m_declarationList; }
void addDeclaration( DeclarationAST::Node& declaration );
private:
GroupAST::Node m_winDeclSpec;
AST::Node m_classKey;
BaseClauseAST::Node m_baseClause;
- QPtrList<DeclarationAST> m_declarationList;
+ TQPtrList<DeclarationAST> m_declarationList;
private:
ClassSpecifierAST( const ClassSpecifierAST& source );
@@ -614,10 +614,10 @@ public:
EnumSpecifierAST();
void addEnumerator( EnumeratorAST::Node& enumerator );
- QPtrList<EnumeratorAST> enumeratorList() { return m_enumeratorList; }
+ TQPtrList<EnumeratorAST> enumeratorList() { return m_enumeratorList; }
private:
- QPtrList<EnumeratorAST> m_enumeratorList;
+ TQPtrList<EnumeratorAST> m_enumeratorList;
private:
EnumSpecifierAST( const EnumSpecifierAST& source );
@@ -638,7 +638,7 @@ public:
AST* kind() { return m_kind.get(); }
void setKind( AST::Node& kind );
- virtual QString text() const;
+ virtual TQString text() const;
private:
AST::Node m_kind;
@@ -661,10 +661,10 @@ public:
LinkageBodyAST();
void addDeclaration( DeclarationAST::Node& ast );
- QPtrList<DeclarationAST> declarationList() { return m_declarationList; }
+ TQPtrList<DeclarationAST> declarationList() { return m_declarationList; }
private:
- QPtrList<DeclarationAST> m_declarationList;
+ TQPtrList<DeclarationAST> m_declarationList;
private:
LinkageBodyAST( const LinkageBodyAST& source );
@@ -812,7 +812,7 @@ public:
public:
DeclaratorAST();
- QPtrList<AST> ptrOpList() { return m_ptrOpList; }
+ TQPtrList<AST> ptrOpList() { return m_ptrOpList; }
void addPtrOp( AST::Node& ptrOp );
DeclaratorAST* subDeclarator() { return m_subDeclarator.get(); }
@@ -824,7 +824,7 @@ public:
AST* bitfieldInitialization() { return m_bitfieldInitialization.get(); }
void setBitfieldInitialization( AST::Node& bitfieldInitialization );
- QPtrList<AST> arrayDimensionList() { return m_arrayDimensionList; }
+ TQPtrList<AST> arrayDimensionList() { return m_arrayDimensionList; }
void addArrayDimension( AST::Node& arrayDimension );
class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); }
@@ -838,11 +838,11 @@ public:
void setExceptionSpecification( GroupAST::Node& exceptionSpecification );
private:
- QPtrList<AST> m_ptrOpList;
+ TQPtrList<AST> m_ptrOpList;
Node m_subDeclarator;
NameAST::Node m_declaratorId;
AST::Node m_bitfieldInitialization;
- QPtrList<AST> m_arrayDimensionList;
+ TQPtrList<AST> m_arrayDimensionList;
AUTO_PTR<class ParameterDeclarationClauseAST> m_parameterDeclarationClause;
AST::Node m_constant;
GroupAST::Node m_exceptionSpecification;
@@ -872,7 +872,7 @@ public:
AST* expression() { return m_expression.get(); }
void setExpression( AST::Node& expression );
- virtual QString text() const;
+ virtual TQString text() const;
private:
TypeSpecifierAST::Node m_typeSpec;
@@ -895,13 +895,13 @@ public:
public:
ParameterDeclarationListAST();
- QPtrList<ParameterDeclarationAST> parameterList() { return m_parameterList; }
+ TQPtrList<ParameterDeclarationAST> parameterList() { return m_parameterList; }
void addParameter( ParameterDeclarationAST::Node& parameter );
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<ParameterDeclarationAST> m_parameterList;
+ TQPtrList<ParameterDeclarationAST> m_parameterList;
private:
ParameterDeclarationListAST( const ParameterDeclarationListAST& source );
@@ -925,7 +925,7 @@ public:
AST* ellipsis() { return m_ellipsis.get(); }
void setEllipsis( AST::Node& ellipsis );
- virtual QString text() const;
+ virtual TQString text() const;
private:
ParameterDeclarationListAST::Node m_parameterDeclarationList;
@@ -974,11 +974,11 @@ public:
public:
InitDeclaratorListAST();
- QPtrList<InitDeclaratorAST> initDeclaratorList() { return m_initDeclaratorList; }
+ TQPtrList<InitDeclaratorAST> initDeclaratorList() { return m_initDeclaratorList; }
void addInitDeclarator( InitDeclaratorAST::Node& decl );
private:
- QPtrList<InitDeclaratorAST> m_initDeclaratorList;
+ TQPtrList<InitDeclaratorAST> m_initDeclaratorList;
private:
InitDeclaratorListAST( const InitDeclaratorListAST& source );
@@ -1048,11 +1048,11 @@ public:
public:
TemplateParameterListAST();
- QPtrList<TemplateParameterAST> templateParameterList() { return m_templateParameterList; }
+ TQPtrList<TemplateParameterAST> templateParameterList() { return m_templateParameterList; }
void addTemplateParameter( TemplateParameterAST::Node& templateParameter );
private:
- QPtrList<TemplateParameterAST> m_templateParameterList;
+ TQPtrList<TemplateParameterAST> m_templateParameterList;
private:
TemplateParameterListAST( const TemplateParameterListAST& source );
@@ -1348,11 +1348,11 @@ public:
public:
StatementListAST();
- QPtrList<StatementAST> statementList() { return m_statementList; }
+ TQPtrList<StatementAST> statementList() { return m_statementList; }
void addStatement( StatementAST::Node& statement );
private:
- QPtrList<StatementAST> m_statementList;
+ TQPtrList<StatementAST> m_statementList;
private:
StatementListAST( const StatementListAST& source );
@@ -1436,10 +1436,10 @@ public:
TranslationUnitAST();
void addDeclaration( DeclarationAST::Node& ast );
- QPtrList<DeclarationAST> declarationList() { return m_declarationList; }
+ TQPtrList<DeclarationAST> declarationList() { return m_declarationList; }
private:
- QPtrList<DeclarationAST> m_declarationList;
+ TQPtrList<DeclarationAST> m_declarationList;
private:
TranslationUnitAST( const TranslationUnitAST& source );
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp
index e30f0c1e..45cfd8ed 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp
@@ -12,8 +12,8 @@
#include "ast_utils.h"
#include "ast.h"
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -35,8 +35,8 @@ AST* findNodeAt( AST* node, int line, int column )
if( (line > startLine || (line == startLine && column >= startColumn)) &&
(line < endLine || (line == endLine && column < endColumn)) ){
- QPtrList<AST> children = node->children();
- QPtrListIterator<AST> it( children );
+ TQPtrList<AST> children = node->children();
+ TQPtrListIterator<AST> it( children );
while( it.current() ){
AST* a = it.current();
++it;
@@ -52,7 +52,7 @@ AST* findNodeAt( AST* node, int line, int column )
return 0;
}
-void scopeOfNode( AST* ast, QStringList& scope )
+void scopeOfNode( AST* ast, TQStringList& scope )
{
if( !ast )
return;
@@ -60,13 +60,13 @@ void scopeOfNode( AST* ast, QStringList& scope )
if( ast->parent() )
scopeOfNode( ast->parent(), scope );
- QString s;
+ TQString s;
switch( ast->nodeType() )
{
case NodeType_ClassSpecifier:
if( ((ClassSpecifierAST*)ast)->name() ){
s = ((ClassSpecifierAST*)ast)->name()->text();
- s = s.isEmpty() ? QString::fromLatin1("<unnamed>") : s;
+ s = s.isEmpty() ? TQString::fromLatin1("<unnamed>") : s;
scope.push_back( s );
}
break;
@@ -74,7 +74,7 @@ void scopeOfNode( AST* ast, QStringList& scope )
case NodeType_Namespace:
{
AST* namespaceName = ((NamespaceAST*)ast)->namespaceName();
- s = namespaceName ? namespaceName->text() : QString::fromLatin1("<unnamed>");
+ s = namespaceName ? namespaceName->text() : TQString::fromLatin1("<unnamed>");
scope.push_back( s );
}
break;
@@ -88,8 +88,8 @@ void scopeOfNode( AST* ast, QStringList& scope )
if ( !d->declaratorId() )
break;
- QPtrList<ClassOrNamespaceNameAST> l = d->declaratorId()->classOrNamespaceNameList();
- QPtrListIterator<ClassOrNamespaceNameAST> nameIt( l );
+ TQPtrList<ClassOrNamespaceNameAST> l = d->declaratorId()->classOrNamespaceNameList();
+ TQPtrListIterator<ClassOrNamespaceNameAST> nameIt( l );
while( nameIt.current() ){
AST* name = nameIt.current()->name();
scope.push_back( name->text() );
@@ -105,24 +105,24 @@ void scopeOfNode( AST* ast, QStringList& scope )
}
-QString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove
+TQString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove
{
if( !typeSpec )
- return QString::null;
+ return TQString::null;
- return typeSpec->text().replace( QRegExp(" :: "), "::" );
+ return typeSpec->text().replace( TQRegExp(" :: "), "::" );
}
-QString declaratorToString( DeclaratorAST* declarator, const QString& scope, bool skipPtrOp )
+TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, bool skipPtrOp )
{
if( !declarator )
- return QString::null;
+ return TQString::null;
- QString text;
+ TQString text;
if( !skipPtrOp ){
- QPtrList<AST> ptrOpList = declarator->ptrOpList();
- for( QPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
+ TQPtrList<AST> ptrOpList = declarator->ptrOpList();
+ for( TQPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
text += it.current()->text();
}
text += ' ';
@@ -131,13 +131,13 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo
text += scope;
if( declarator->subDeclarator() )
- text += QString::fromLatin1("(") + declaratorToString(declarator->subDeclarator()) + QString::fromLatin1(")");
+ text += TQString::fromLatin1("(") + declaratorToString(declarator->subDeclarator()) + TQString::fromLatin1(")");
if( declarator->declaratorId() )
text += declarator->declaratorId()->text();
- QPtrList<AST> arrays = declarator->arrayDimensionList();
- QPtrListIterator<AST> it( arrays );
+ TQPtrList<AST> arrays = declarator->arrayDimensionList();
+ TQPtrListIterator<AST> it( arrays );
while( it.current() ){
text += "[]";
++it;
@@ -148,11 +148,11 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo
ParameterDeclarationListAST* l = declarator->parameterDeclarationClause()->parameterDeclarationList();
if( l != 0 ){
- QPtrList<ParameterDeclarationAST> params = l->parameterList();
- QPtrListIterator<ParameterDeclarationAST> it( params );
+ TQPtrList<ParameterDeclarationAST> params = l->parameterList();
+ TQPtrListIterator<ParameterDeclarationAST> it( params );
while( it.current() ){
- QString type = typeSpecToString( it.current()->typeSpec() );
+ TQString type = typeSpecToString( it.current()->typeSpec() );
text += type;
if( !type.isEmpty() )
text += ' ';
@@ -171,6 +171,6 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo
text += " const";
}
- return text.replace( QRegExp(" :: "), "::" ).simplifyWhiteSpace();
+ return text.replace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace();
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h
index 187647b7..1e3c86e1 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h
@@ -12,7 +12,7 @@
#ifndef __ast_utils_h
#define __ast_utils_h
-#include <qstring.h>
+#include <tqstring.h>
class AST;
class DeclaratorAST;
@@ -22,8 +22,8 @@ class QStringList;
namespace KTextEditor{ class EditInterface; }
AST* findNodeAt( AST* unit, int line, int column );
-void scopeOfNode( AST* ast, QStringList& );
-QString typeSpecToString( TypeSpecifierAST* typeSpec );
-QString declaratorToString( DeclaratorAST* declarator, const QString& scope = QString::null, bool skipPtrOp=false );
+void scopeOfNode( AST* ast, TQStringList& );
+TQString typeSpecToString( TypeSpecifierAST* typeSpec );
+TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope = TQString::null, bool skipPtrOp=false );
#endif // __ast_utils_h
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
index e7d0b848..5763ec5e 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
@@ -13,9 +13,9 @@
// own header
#include "cpptree2uml.h"
// qt/kde includes
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "ast_utils.h"
@@ -27,7 +27,7 @@
// FIXME The next include is motivated by template params
#include "../../template.h"
-CppTree2Uml::CppTree2Uml( const QString& fileName)
+CppTree2Uml::CppTree2Uml( const TQString& fileName)
: m_anon( 0 ), m_nsCnt( 0 ), m_clsCnt( 0 )
{
m_fileName = URLUtil::canonicalPath(fileName);
@@ -64,10 +64,10 @@ void CppTree2Uml::parseNamespace( NamespaceAST* ast )
return;
}
- QString nsName;
+ TQString nsName;
if( !ast->namespaceName() || ast->namespaceName()->text().isEmpty() ){
- QFileInfo fileInfo( m_fileName );
- QString shortFileName = fileInfo.baseName();
+ TQFileInfo fileInfo( m_fileName );
+ TQString shortFileName = fileInfo.baseName();
nsName.sprintf( "(%s_%d)", shortFileName.local8Bit().data(), m_anon++ );
} else {
@@ -100,7 +100,7 @@ void CppTree2Uml::parseTypedef( TypedefAST* ast )
DeclaratorAST* oldDeclarator = m_currentDeclarator;
if( ast && ast->initDeclaratorList() && ast->initDeclaratorList()->initDeclaratorList().count() > 0 ) {
- QPtrList<InitDeclaratorAST> lst( ast->initDeclaratorList()->initDeclaratorList() );
+ TQPtrList<InitDeclaratorAST> lst( ast->initDeclaratorList()->initDeclaratorList() );
m_currentDeclarator = lst.at( 0 )->declarator();
}
@@ -115,18 +115,18 @@ void CppTree2Uml::parseTypedef( TypedefAST* ast )
InitDeclaratorListAST* declarators = ast->initDeclaratorList();
if( typeSpec && declarators ){
- QString typeId;
+ TQString typeId;
if( typeSpec->name() )
typeId = typeSpec->name()->text();
- QPtrList<InitDeclaratorAST> l( declarators->initDeclaratorList() );
- QPtrListIterator<InitDeclaratorAST> it( l );
+ TQPtrList<InitDeclaratorAST> l( declarators->initDeclaratorList() );
+ TQPtrListIterator<InitDeclaratorAST> it( l );
InitDeclaratorAST* initDecl = 0;
while( 0 != (initDecl = it.current()) ){
- QString type, id;
+ TQString type, id;
if( initDecl->declarator() ){
type = typeOfDeclaration( typeSpec, initDecl->declarator() );
@@ -178,8 +178,8 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
TemplateParameterListAST* parmListAST = ast->templateParameterList();
if (parmListAST == NULL)
return;
- QPtrList<TemplateParameterAST> parmList = parmListAST->templateParameterList();
- for (QPtrListIterator<TemplateParameterAST> it(parmList); it.current(); ++it) {
+ TQPtrList<TemplateParameterAST> parmList = parmListAST->templateParameterList();
+ for (TQPtrListIterator<TemplateParameterAST> it(parmList); it.current(); ++it) {
// The template is either a typeParameter or a typeValueParameter.
TemplateParameterAST* tmplParmNode = it.current();
@@ -187,7 +187,7 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
if (typeParmNode) {
NameAST* nameNode = typeParmNode->name();
if (nameNode) {
- QString typeName = nameNode->unqualifiedName()->text();
+ TQString typeName = nameNode->unqualifiedName()->text();
Model_Utils::NameAndType nt(typeName, NULL);
m_templateParams.append(nt);
} else {
@@ -204,7 +204,7 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
<< " typeSpec is NULL" << endl;
continue;
}
- QString typeName = typeSpec->name()->text();
+ TQString typeName = typeSpec->name()->text();
UMLObject *t = Import_Utils::createUMLObject( Uml::ot_UMLObject, typeName,
m_currentNamespace[m_nsCnt] );
DeclaratorAST* declNode = valueNode->declarator();
@@ -214,7 +214,7 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
<< " nameNode is NULL" << endl;
continue;
}
- QString paramName = nameNode->unqualifiedName()->text();
+ TQString paramName = nameNode->unqualifiedName()->text();
Model_Utils::NameAndType nt(paramName, t);
m_templateParams.append(nt);
}
@@ -235,9 +235,9 @@ void CppTree2Uml::parseSimpleDeclaration( SimpleDeclarationAST* ast )
parseTypeSpecifier( typeSpec );
if( declarators ){
- QPtrList<InitDeclaratorAST> l = declarators->initDeclaratorList();
+ TQPtrList<InitDeclaratorAST> l = declarators->initDeclaratorList();
- QPtrListIterator<InitDeclaratorAST> it( l );
+ TQPtrListIterator<InitDeclaratorAST> it( l );
while( it.current() ){
parseDeclaration( ast->functionSpecifier(), ast->storageSpecifier(), typeSpec, it.current() );
++it;
@@ -266,10 +266,10 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast )
bool isConstructor = false;
if( funSpec ){
- QPtrList<AST> l = funSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = funSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "virtual" ) isVirtual = true;
else if( text == "inline" ) isInline = true;
++it;
@@ -277,17 +277,17 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast )
}
if( storageSpec ){
- QPtrList<AST> l = storageSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = storageSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "friend" ) isFriend = true;
else if( text == "static" ) isStatic = true;
++it;
}
}
- QString id = d->declaratorId()->unqualifiedName()->text().stripWhiteSpace();
+ TQString id = d->declaratorId()->unqualifiedName()->text().stripWhiteSpace();
UMLClassifier *c = m_currentClass[m_clsCnt];
if (c == NULL) {
@@ -296,7 +296,7 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast )
return;
}
- QString returnType = typeOfDeclaration( typeSpec, d );
+ TQString returnType = typeOfDeclaration( typeSpec, d );
UMLOperation *m = Import_Utils::makeOperation(c, id);
// if a class has no return type, it could be a constructor or
// a destructor
@@ -323,17 +323,17 @@ void CppTree2Uml::parseClassSpecifier( ClassSpecifierAST* ast )
bool oldInSlots = m_inSlots;
bool oldInSignals = m_inSignals;
- QString kind = ast->classKey()->text();
+ TQString kind = ast->classKey()->text();
m_currentAccess=Uml::Visibility::fromString(kind);
m_inSlots = false;
m_inSignals = false;
- QString className;
+ TQString className;
if( !ast->name() && m_currentDeclarator && m_currentDeclarator->declaratorId() ) {
className = m_currentDeclarator->declaratorId()->text().stripWhiteSpace();
} else if( !ast->name() ){
- QFileInfo fileInfo( m_fileName );
- QString shortFileName = fileInfo.baseName();
+ TQFileInfo fileInfo( m_fileName );
+ TQString shortFileName = fileInfo.baseName();
className.sprintf( "(%s_%d)", shortFileName.local8Bit().data(), m_anon++ );
} else {
className = ast->name()->unqualifiedName()->text().stripWhiteSpace();
@@ -341,13 +341,13 @@ void CppTree2Uml::parseClassSpecifier( ClassSpecifierAST* ast )
//#ifdef DEBUG_CPPTREE2UML
kDebug() << "CppTree2Uml::parseClassSpecifier: name=" << className << endl;
//#endif
- if( !scopeOfName( ast->name(), QStringList() ).isEmpty() ){
+ if( !scopeOfName( ast->name(), TQStringList() ).isEmpty() ){
kDebug() << "skip private class declarations" << endl;
return;
}
if (className.isEmpty()) {
- className = "anon_" + QString::number(m_anon);
+ className = "anon_" + TQString::number(m_anon);
m_anon++;
}
UMLObject * o = Import_Utils::createUMLObject( Uml::ot_Class, className,
@@ -387,17 +387,17 @@ void CppTree2Uml::parseEnumSpecifier( EnumSpecifierAST* ast )
NameAST *nameNode = ast->name();
if (nameNode == NULL)
return; // skip constants
- QString typeName = nameNode->unqualifiedName()->text().stripWhiteSpace();
+ TQString typeName = nameNode->unqualifiedName()->text().stripWhiteSpace();
if (typeName.isEmpty())
return; // skip constants
UMLObject *o = Import_Utils::createUMLObject( Uml::ot_Enum, typeName,
m_currentNamespace[m_nsCnt],
ast->comment() );
- QPtrList<EnumeratorAST> l = ast->enumeratorList();
- QPtrListIterator<EnumeratorAST> it( l );
+ TQPtrList<EnumeratorAST> l = ast->enumeratorList();
+ TQPtrListIterator<EnumeratorAST> it( l );
while ( it.current() ) {
- QString enumLiteral = it.current()->id()->text();
+ TQString enumLiteral = it.current()->id()->text();
Import_Utils::addEnumLiteral( (UMLEnum*)o, enumLiteral );
++it;
}
@@ -409,9 +409,9 @@ void CppTree2Uml::parseElaboratedTypeSpecifier( ElaboratedTypeSpecifierAST* type
/// @todo Refine - Currently only handles class forward declarations.
/// - Using typeSpec->text() is probably not good, decode
/// the kind() instead.
- QString text = typeSpec->text();
+ TQString text = typeSpec->text();
kDebug() << "CppTree2Uml::parseElaboratedTypeSpecifier: text is " << text << endl;
- text.remove(QRegExp("^class\\s+"));
+ text.remove(TQRegExp("^class\\s+"));
UMLObject *o = Import_Utils::createUMLObject(Uml::ot_Class, text, m_currentNamespace[m_nsCnt]);
flushTemplateParams( static_cast<UMLClassifier*>(o) );
}
@@ -434,11 +434,11 @@ void CppTree2Uml::parseDeclaration( GroupAST* funSpec, GroupAST* storageSpec,
while( t && t->subDeclarator() )
t = t->subDeclarator();
- QString id;
+ TQString id;
if( t && t->declaratorId() && t->declaratorId()->unqualifiedName() )
id = t->declaratorId()->unqualifiedName()->text();
- if( !scopeOfDeclarator(d, QStringList()).isEmpty() ){
+ if( !scopeOfDeclarator(d, TQStringList()).isEmpty() ){
kDebug() << "CppTree2Uml::parseDeclaration (" << id << "): skipping."
<< endl;
return;
@@ -451,16 +451,16 @@ void CppTree2Uml::parseDeclaration( GroupAST* funSpec, GroupAST* storageSpec,
return;
}
- QString typeName = typeOfDeclaration( typeSpec, d );
+ TQString typeName = typeOfDeclaration( typeSpec, d );
bool isFriend = false;
bool isStatic = false;
//bool isInitialized = decl->initializer() != 0;
if( storageSpec ){
- QPtrList<AST> l = storageSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = storageSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "friend" ) isFriend = true;
else if( text == "static" ) isStatic = true;
++it;
@@ -474,9 +474,9 @@ void CppTree2Uml::parseDeclaration( GroupAST* funSpec, GroupAST* storageSpec,
void CppTree2Uml::parseAccessDeclaration( AccessDeclarationAST * access )
{
- QPtrList<AST> l = access->accessList();
+ TQPtrList<AST> l = access->accessList();
- QString accessStr = l.at( 0 )->text();
+ TQString accessStr = l.at( 0 )->text();
m_currentAccess=Uml::Visibility::fromString(accessStr);
@@ -495,10 +495,10 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
bool isConstructor = false;
if( funSpec ){
- QPtrList<AST> l = funSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = funSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "virtual" ) isVirtual = true;
else if( text == "inline" ) isInline = true;
++it;
@@ -506,10 +506,10 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
}
if( storageSpec ){
- QPtrList<AST> l = storageSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = storageSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "friend" ) isFriend = true;
else if( text == "static" ) isStatic = true;
++it;
@@ -517,7 +517,7 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
}
DeclaratorAST* d = decl->declarator();
- QString id = d->declaratorId()->unqualifiedName()->text();
+ TQString id = d->declaratorId()->unqualifiedName()->text();
UMLClassifier *c = m_currentClass[m_clsCnt];
if (c == NULL) {
@@ -526,7 +526,7 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
return;
}
- QString returnType = typeOfDeclaration( typeSpec, d );
+ TQString returnType = typeOfDeclaration( typeSpec, d );
UMLOperation *m = Import_Utils::makeOperation(c, id);
// if a class has no return type, it could be a constructor or
// a destructor
@@ -546,17 +546,17 @@ void CppTree2Uml::parseFunctionArguments(DeclaratorAST* declarator,
if( clause && clause->parameterDeclarationList() ){
ParameterDeclarationListAST* params = clause->parameterDeclarationList();
- QPtrList<ParameterDeclarationAST> l( params->parameterList() );
- QPtrListIterator<ParameterDeclarationAST> it( l );
+ TQPtrList<ParameterDeclarationAST> l( params->parameterList() );
+ TQPtrListIterator<ParameterDeclarationAST> it( l );
while( it.current() ){
ParameterDeclarationAST* param = it.current();
++it;
- QString name;
+ TQString name;
if (param->declarator())
- name = declaratorToString(param->declarator(), QString::null, true );
+ name = declaratorToString(param->declarator(), TQString::null, true );
- QString tp = typeOfDeclaration( param->typeSpec(), param->declarator() );
+ TQString tp = typeOfDeclaration( param->typeSpec(), param->declarator() );
if (tp != "void")
Import_Utils::addMethodParameter( method, tp, name );
@@ -564,17 +564,17 @@ void CppTree2Uml::parseFunctionArguments(DeclaratorAST* declarator,
}
}
-QString CppTree2Uml::typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator )
+TQString CppTree2Uml::typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator )
{
if( !typeSpec || !declarator )
- return QString::null;
+ return TQString::null;
- QString text;
+ TQString text;
text += typeSpec->text();
- QPtrList<AST> ptrOpList = declarator->ptrOpList();
- for( QPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
+ TQPtrList<AST> ptrOpList = declarator->ptrOpList();
+ for( TQPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
text += it.current()->text();
}
@@ -583,8 +583,8 @@ QString CppTree2Uml::typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAS
void CppTree2Uml::parseBaseClause( BaseClauseAST * baseClause, UMLClassifier* klass )
{
- QPtrList<BaseSpecifierAST> l = baseClause->baseSpecifierList();
- QPtrListIterator<BaseSpecifierAST> it( l );
+ TQPtrList<BaseSpecifierAST> l = baseClause->baseSpecifierList();
+ TQPtrListIterator<BaseSpecifierAST> it( l );
while( it.current() ){
BaseSpecifierAST* baseSpecifier = it.current();
++it;
@@ -595,19 +595,19 @@ void CppTree2Uml::parseBaseClause( BaseClauseAST * baseClause, UMLClassifier* kl
continue;
}
- QString baseName = baseSpecifier->name()->text();
+ TQString baseName = baseSpecifier->name()->text();
Import_Utils::createGeneralization( klass, baseName );
}
}
-QStringList CppTree2Uml::scopeOfName( NameAST* id, const QStringList& startScope )
+TQStringList CppTree2Uml::scopeOfName( NameAST* id, const TQStringList& startScope )
{
- QStringList scope = startScope;
+ TQStringList scope = startScope;
if( id && id->classOrNamespaceNameList().count() ){
if( id->isGlobal() )
scope.clear();
- QPtrList<ClassOrNamespaceNameAST> l = id->classOrNamespaceNameList();
- QPtrListIterator<ClassOrNamespaceNameAST> it( l );
+ TQPtrList<ClassOrNamespaceNameAST> l = id->classOrNamespaceNameList();
+ TQPtrListIterator<ClassOrNamespaceNameAST> it( l );
while( it.current() ){
if( it.current()->name() ){
scope << it.current()->name()->text();
@@ -619,7 +619,7 @@ QStringList CppTree2Uml::scopeOfName( NameAST* id, const QStringList& startScope
return scope;
}
-QStringList CppTree2Uml::scopeOfDeclarator( DeclaratorAST* d, const QStringList& startScope )
+TQStringList CppTree2Uml::scopeOfDeclarator( DeclaratorAST* d, const TQStringList& startScope )
{
return scopeOfName( d->declaratorId(), startScope );
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h
index b9791372..7248c782 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h
@@ -13,7 +13,7 @@
#define CPPTREE2UML_H
#include "tree_parser.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "../../model_utils.h"
// fwd decls
@@ -24,7 +24,7 @@ class UMLPackage;
class CppTree2Uml: public TreeParser
{
public:
- CppTree2Uml( const QString& fileName);
+ CppTree2Uml( const TQString& fileName);
virtual ~CppTree2Uml();
//FileDom file() { return m_file; }
@@ -60,11 +60,11 @@ public:
virtual void parseBaseClause( BaseClauseAST* baseClause, UMLClassifier* klass );
private:
- //NamespaceDom findOrInsertNamespace( NamespaceAST* ast, const QString& name );
+ //NamespaceDom findOrInsertNamespace( NamespaceAST* ast, const TQString& name );
- QString typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator );
- QStringList scopeOfName( NameAST* id, const QStringList& scope );
- QStringList scopeOfDeclarator( DeclaratorAST* d, const QStringList& scope );
+ TQString typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator );
+ TQStringList scopeOfName( NameAST* id, const TQStringList& scope );
+ TQStringList scopeOfDeclarator( DeclaratorAST* d, const TQStringList& scope );
/**
* Flush template parameters pending in m_templateParams to the klass.
*/
@@ -72,15 +72,15 @@ private:
private:
//FileDom m_file;
- QString m_fileName;
- QStringList m_currentScope;
+ TQString m_fileName;
+ TQStringList m_currentScope;
Uml::Visibility m_currentAccess;
bool m_inSlots;
bool m_inSignals;
int m_anon;
bool m_inStorageSpec;
bool m_inTypedef;
- QString m_comment;
+ TQString m_comment;
Model_Utils::NameAndType_List m_templateParams;
DeclaratorAST* m_currentDeclarator;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp
index ac626c00..1a804c81 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp
@@ -22,29 +22,29 @@
#include "parser.h"
#include <kdebug.h>
#include <stdlib.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
class DefaultSourceProvider: public SourceProvider
{
public:
DefaultSourceProvider() {}
- virtual QString contents( const QString& fileName )
+ virtual TQString contents( const TQString& fileName )
{
- QString source;
+ TQString source;
- QFile f( fileName );
+ TQFile f( fileName );
if( f.open(IO_ReadOnly) ){
- QTextStream s( &f );
+ TQTextStream s( &f );
source = s.read();
f.close();
}
return source;
}
- virtual bool isModified( const QString& fileName )
+ virtual bool isModified( const TQString& fileName )
{
Q_UNUSED( fileName );
return true;
@@ -94,13 +94,13 @@ void Driver::reset( )
}
}
-void Driver::remove( const QString & fileName )
+void Driver::remove( const TQString & fileName )
{
m_dependences.remove( fileName );
m_problems.remove( fileName );
removeAllMacrosInFile( fileName );
- QMap<QString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
+ TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
if( it != m_parsedUnits.end() ){
TranslationUnitAST* unit = *it;
m_parsedUnits.remove( it );
@@ -108,9 +108,9 @@ void Driver::remove( const QString & fileName )
}
}
-void Driver::removeAllMacrosInFile( const QString& fileName )
+void Driver::removeAllMacrosInFile( const TQString& fileName )
{
- QMap<QString, Macro>::Iterator it = m_macros.begin();
+ TQMap<TQString, Macro>::Iterator it = m_macros.begin();
while( it != m_macros.end() ){
Macro m = *it++;
if( m.fileName() == fileName )
@@ -118,38 +118,38 @@ void Driver::removeAllMacrosInFile( const QString& fileName )
}
}
-TranslationUnitAST::Node Driver::takeTranslationUnit( const QString& fileName )
+TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName )
{
- QMap<QString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
+ TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
TranslationUnitAST::Node unit( *it );
//m_parsedUnits.remove( it );
m_parsedUnits[ fileName] = 0;
return unit;
}
-TranslationUnitAST* Driver::translationUnit( const QString& fileName ) const
+TranslationUnitAST* Driver::translationUnit( const TQString& fileName ) const
{
- QMap<QString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.find( fileName );
+ TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.find( fileName );
return it != m_parsedUnits.end() ? *it : 0;
}
-void Driver::addDependence( const QString & fileName, const Dependence & dep )
+void Driver::addDependence( const TQString & fileName, const Dependence & dep )
{
- QFileInfo fileInfo( dep.first );
- QString fn = fileInfo.absFilePath();
+ TQFileInfo fileInfo( dep.first );
+ TQString fn = fileInfo.absFilePath();
if ( !depresolv ){
findOrInsertDependenceList( fileName ).insert( fn, dep );
return;
}
- QString file = findIncludeFile( dep );
+ TQString file = findIncludeFile( dep );
findOrInsertDependenceList( fileName ).insert( file, dep );
if ( m_parsedUnits.find(file) != m_parsedUnits.end() )
return;
- if ( !QFile::exists( file ) ) {
+ if ( !TQFile::exists( file ) ) {
Problem p( "Couldn't find include file " + dep.first,
lexer ? lexer->currentLine() : -1,
lexer ? lexer->currentColumn() : -1 );
@@ -157,7 +157,7 @@ void Driver::addDependence( const QString & fileName, const Dependence & dep )
return;
}
- QString cfn = m_currentFileName;
+ TQString cfn = m_currentFileName;
Lexer *l = lexer;
parseFile( file );
m_currentFileName = cfn;
@@ -169,60 +169,60 @@ void Driver::addMacro( const Macro & macro )
m_macros.insert( macro.name(), macro );
}
-void Driver::addProblem( const QString & fileName, const Problem & problem )
+void Driver::addProblem( const TQString & fileName, const Problem & problem )
{
findOrInsertProblemList( fileName ).append( problem );
}
-QMap< QString, Dependence >& Driver::findOrInsertDependenceList( const QString & fileName )
+TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQString & fileName )
{
- QMap<QString, QMap<QString, Dependence> >::Iterator it = m_dependences.find( fileName );
+ TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.find( fileName );
if( it != m_dependences.end() )
return it.data();
- QMap<QString, Dependence> l;
+ TQMap<TQString, Dependence> l;
m_dependences.insert( fileName, l );
return m_dependences[ fileName ];
}
-QValueList < Problem >& Driver::findOrInsertProblemList( const QString & fileName )
+TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileName )
{
- QMap<QString, QValueList<Problem> >::Iterator it = m_problems.find( fileName );
+ TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.find( fileName );
if( it != m_problems.end() )
return it.data();
- QValueList<Problem> l;
+ TQValueList<Problem> l;
m_problems.insert( fileName, l );
return m_problems[ fileName ];
}
-QMap< QString, Dependence > Driver::dependences( const QString & fileName ) const
+TQMap< TQString, Dependence > Driver::dependences( const TQString & fileName ) const
{
- QMap<QString, QMap<QString, Dependence> >::ConstIterator it = m_dependences.find( fileName );
+ TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.find( fileName );
if( it != m_dependences.end() )
return it.data();
- return QMap<QString, Dependence>();
+ return TQMap<TQString, Dependence>();
}
-QMap< QString, Macro > Driver::macros() const
+TQMap< TQString, Macro > Driver::macros() const
{
return m_macros;
}
-QValueList < Problem > Driver::problems( const QString & fileName ) const
+TQValueList < Problem > Driver::problems( const TQString & fileName ) const
{
- QMap<QString, QValueList<Problem> >::ConstIterator it = m_problems.find( fileName );
+ TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.find( fileName );
if( it != m_problems.end() )
return it.data();
- return QValueList<Problem>();
+ return TQValueList<Problem>();
}
-void Driver::parseFile( const QString& fileName, bool onlyPreProcess, bool force )
+void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool force )
{
- QFileInfo fileInfo( fileName );
- QString absFilePath = fileInfo.absFilePath();
+ TQFileInfo fileInfo( fileName );
+ TQString absFilePath = fileInfo.absFilePath();
- QMap<QString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( absFilePath );
+ TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( absFilePath );
if( force && it != m_parsedUnits.end() ){
takeTranslationUnit( absFilePath );
@@ -252,7 +252,7 @@ void Driver::parseFile( const QString& fileName, bool onlyPreProcess, bool force
fileParsed( fileName );
}
- m_currentFileName = QString::null;
+ m_currentFileName = TQString::null;
lexer = 0;
}
@@ -385,37 +385,37 @@ void Driver::setupParser( Parser * parser )
Q_UNUSED( parser );
}
-void Driver::removeMacro( const QString& macroName )
+void Driver::removeMacro( const TQString& macroName )
{
m_macros.remove( macroName );
}
-void Driver::addIncludePath( const QString &path )
+void Driver::addIncludePath( const TQString &path )
{
if( !path.stripWhiteSpace().isEmpty() )
m_includePaths << path;
}
-QString Driver::findIncludeFile( const Dependence& dep ) const
+TQString Driver::findIncludeFile( const Dependence& dep ) const
{
- QString fileName = dep.first;
+ TQString fileName = dep.first;
if( dep.second == Dep_Local ){
- QString path = QFileInfo( currentFileName() ).dirPath( true );
- QFileInfo fileInfo( QFileInfo(path, fileName) );
+ TQString path = TQFileInfo( currentFileName() ).dirPath( true );
+ TQFileInfo fileInfo( TQFileInfo(path, fileName) );
if ( fileInfo.exists() && fileInfo.isFile() )
return fileInfo.absFilePath();
}
- QStringList::ConstIterator end(m_includePaths.end());
- for ( QStringList::ConstIterator it(m_includePaths.begin()); it != end; ++it ) {
- QFileInfo fileInfo( *it, fileName );
+ TQStringList::ConstIterator end(m_includePaths.end());
+ for ( TQStringList::ConstIterator it(m_includePaths.begin()); it != end; ++it ) {
+ TQFileInfo fileInfo( *it, fileName );
if ( fileInfo.exists() && fileInfo.isFile() )
return fileInfo.absFilePath();
}
- return QString::null;
+ return TQString::null;
}
void Driver::setResolveDependencesEnabled( bool enabled )
@@ -429,7 +429,7 @@ void Driver::setupPreProcessor()
{
}
-void Driver::fileParsed( const QString & fileName )
+void Driver::fileParsed( const TQString & fileName )
{
Q_UNUSED( fileName );
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.h b/umbrello/umbrello/codeimport/kdevcppparser/driver.h
index f6e9f100..6c53a939 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/driver.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.h
@@ -22,10 +22,10 @@
#include "ast.h"
-#include <qpair.h>
-#include <qvaluestack.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqpair.h>
+#include <tqvaluestack.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class Lexer;
class Parser;
@@ -46,7 +46,7 @@ public:
Problem( const Problem& source )
: m_text( source.m_text ), m_line( source.m_line ),
m_column( source.m_column ), m_level( source.m_level ) {}
- Problem( const QString& text, int line, int column, int level=Level_Error )
+ Problem( const TQString& text, int line, int column, int level=Level_Error )
: m_text( text ), m_line( line ), m_column( column ), m_level(level) {}
Problem& operator = ( const Problem& source )
@@ -63,13 +63,13 @@ public:
return m_text == p.m_text && m_line == p.m_line && m_column == p.m_column && m_level == p.m_level;
}
- QString text() const { return m_text; }
+ TQString text() const { return m_text; }
int line() const { return m_line; }
int column() const { return m_column; }
int level() const { return m_level; }
private:
- QString m_text;
+ TQString m_text;
int m_line;
int m_column;
int m_level;
@@ -81,16 +81,16 @@ enum
Dep_Local
};
-typedef QPair<QString, int> Dependence;
+typedef QPair<TQString, int> Dependence;
class Macro
{
public:
- typedef QString Argument;
+ typedef TQString Argument;
public:
Macro( bool hasArguments = false ): m_hasArguments( hasArguments ) {}
- Macro( const QString &n, const QString &b ) : m_name( n ), m_body( b ), m_hasArguments( false ) {}
+ Macro( const TQString &n, const TQString &b ) : m_name( n ), m_body( b ), m_hasArguments( false ) {}
Macro( const Macro& source )
: m_name( source.m_name),
@@ -119,29 +119,29 @@ public:
m_argumentList == source.m_argumentList;
}
- QString name() const { return m_name; }
- void setName( const QString& name ) { m_name = name; }
+ TQString name() const { return m_name; }
+ void setName( const TQString& name ) { m_name = name; }
- QString fileName() const { return m_fileName; }
- void setFileName( const QString& fileName ) { m_fileName = fileName; }
+ TQString fileName() const { return m_fileName; }
+ void setFileName( const TQString& fileName ) { m_fileName = fileName; }
- QString body() const { return m_body; }
- void setBody( const QString& body ) { m_body = body; }
+ TQString body() const { return m_body; }
+ void setBody( const TQString& body ) { m_body = body; }
bool hasArguments() const { return m_hasArguments; }
void setHasArguments( bool hasArguments ) { m_hasArguments = hasArguments; }
- QValueList<Argument> argumentList() const { return m_argumentList; }
+ TQValueList<Argument> argumentList() const { return m_argumentList; }
void clearArgumentList() { m_argumentList.clear(); m_hasArguments = false; }
void addArgument( const Argument& argument ) { m_argumentList << argument; }
- void addArgumentList( const QValueList<Argument>& arguments ) { m_argumentList += arguments; }
+ void addArgumentList( const TQValueList<Argument>& arguments ) { m_argumentList += arguments; }
private:
- QString m_name;
- QString m_fileName;
- QString m_body;
+ TQString m_name;
+ TQString m_fileName;
+ TQString m_body;
bool m_hasArguments;
- QValueList<Argument> m_argumentList;
+ TQValueList<Argument> m_argumentList;
};
class SourceProvider
@@ -150,8 +150,8 @@ public:
SourceProvider() {}
virtual ~SourceProvider() {}
- virtual QString contents( const QString& fileName ) = 0;
- virtual bool isModified( const QString& fileName ) = 0;
+ virtual TQString contents( const TQString& fileName ) = 0;
+ virtual bool isModified( const TQString& fileName ) = 0;
private:
SourceProvider( const SourceProvider& source );
@@ -169,34 +169,34 @@ public:
virtual void reset();
- virtual void parseFile( const QString& fileName, bool onlyPreProcesss=false, bool force=false );
- virtual void fileParsed( const QString& fileName );
- virtual void remove( const QString& fileName );
+ virtual void parseFile( const TQString& fileName, bool onlyPreProcesss=false, bool force=false );
+ virtual void fileParsed( const TQString& fileName );
+ virtual void remove( const TQString& fileName );
- virtual void addDependence( const QString& fileName, const Dependence& dep );
+ virtual void addDependence( const TQString& fileName, const Dependence& dep );
virtual void addMacro( const Macro& macro );
- virtual void addProblem( const QString& fileName, const Problem& problem );
+ virtual void addProblem( const TQString& fileName, const Problem& problem );
- QString currentFileName() const { return m_currentFileName; }
- TranslationUnitAST::Node takeTranslationUnit( const QString& fileName );
- TranslationUnitAST* translationUnit( const QString& fileName ) const;
- QMap<QString, Dependence> dependences( const QString& fileName ) const;
- QMap<QString, Macro> macros() const;
- QValueList<Problem> problems( const QString& fileName ) const;
+ TQString currentFileName() const { return m_currentFileName; }
+ TranslationUnitAST::Node takeTranslationUnit( const TQString& fileName );
+ TranslationUnitAST* translationUnit( const TQString& fileName ) const;
+ TQMap<TQString, Dependence> dependences( const TQString& fileName ) const;
+ TQMap<TQString, Macro> macros() const;
+ TQValueList<Problem> problems( const TQString& fileName ) const;
- bool hasMacro( const QString& name ) const { return m_macros.contains( name ); }
- const Macro& macro( const QString& name ) const { return m_macros[ name ]; }
- Macro& macro( const QString& name ) { return m_macros[ name ]; }
+ bool hasMacro( const TQString& name ) const { return m_macros.contains( name ); }
+ const Macro& macro( const TQString& name ) const { return m_macros[ name ]; }
+ Macro& macro( const TQString& name ) { return m_macros[ name ]; }
- virtual void removeMacro( const QString& macroName );
- virtual void removeAllMacrosInFile( const QString& fileName );
+ virtual void removeMacro( const TQString& macroName );
+ virtual void removeAllMacrosInFile( const TQString& fileName );
- QStringList includePaths() const { return m_includePaths; }
- virtual void addIncludePath( const QString &path );
+ TQStringList includePaths() const { return m_includePaths; }
+ virtual void addIncludePath( const TQString &path );
/// @todo remove
- const QMap<QString, TranslationUnitAST*> &parsedUnits() const { return m_parsedUnits; }
+ const TQMap<TQString, TranslationUnitAST*> &parsedUnits() const { return m_parsedUnits; }
virtual void setResolveDependencesEnabled( bool enabled );
bool isResolveDependencesEnabled() const { return depresolv; }
@@ -207,17 +207,17 @@ protected:
virtual void setupPreProcessor();
private:
- QMap<QString, Dependence>& findOrInsertDependenceList( const QString& fileName );
- QValueList<Problem>& findOrInsertProblemList( const QString& fileName );
- QString findIncludeFile( const Dependence& dep ) const;
+ TQMap<TQString, Dependence>& findOrInsertDependenceList( const TQString& fileName );
+ TQValueList<Problem>& findOrInsertProblemList( const TQString& fileName );
+ TQString findIncludeFile( const Dependence& dep ) const;
private:
- QString m_currentFileName;
- QMap< QString, QMap<QString, Dependence> > m_dependences;
- QMap<QString, Macro> m_macros;
- QMap< QString, QValueList<Problem> > m_problems;
- QMap<QString, TranslationUnitAST*> m_parsedUnits;
- QStringList m_includePaths;
+ TQString m_currentFileName;
+ TQMap< TQString, TQMap<TQString, Dependence> > m_dependences;
+ TQMap<TQString, Macro> m_macros;
+ TQMap< TQString, TQValueList<Problem> > m_problems;
+ TQMap<TQString, TranslationUnitAST*> m_parsedUnits;
+ TQStringList m_includePaths;
uint depresolv : 1;
Lexer *lexer;
SourceProvider* m_sourceProvider;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/errors.h b/umbrello/umbrello/codeimport/kdevcppparser/errors.h
index 813d3a3f..6751475e 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/errors.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/errors.h
@@ -20,15 +20,15 @@
#ifndef ERRORS_H
#define ERRORS_H
-#include <qstring.h>
+#include <tqstring.h>
struct Error{
int code;
int level;
- QString text;
+ TQString text;
- Error( int c, int l, const QString& s )
+ Error( int c, int l, const TQString& s )
: code( c ), level( l ), text( s )
{}
};
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp
index 68dd2e6f..11b326f6 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp
@@ -24,12 +24,12 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#if defined( KDEVELOP_BGPARSER )
-#include <qthread.h>
+#include <tqthread.h>
class KDevTread: public QThread
{
@@ -54,8 +54,8 @@ using namespace std;
struct LexerData
{
- typedef QMap<QString, QString> Scope;
- typedef QValueList<Scope> StaticChain;
+ typedef TQMap<TQString, TQString> Scope;
+ typedef TQValueList<Scope> StaticChain;
StaticChain staticChain;
@@ -70,13 +70,13 @@ struct LexerData
staticChain.pop_front();
}
- void bind( const QString& name, const QString& value )
+ void bind( const TQString& name, const TQString& value )
{
Q_ASSERT( staticChain.size() > 0 );
staticChain.front().insert( name, value );
}
- bool hasBind( const QString& name ) const
+ bool hasBind( const TQString& name ) const
{
StaticChain::ConstIterator it = staticChain.begin();
while( it != staticChain.end() ){
@@ -90,7 +90,7 @@ struct LexerData
return false;
}
- QString apply( const QString& name ) const
+ TQString apply( const TQString& name ) const
{
StaticChain::ConstIterator it = staticChain.begin();
while( it != staticChain.end() ){
@@ -101,7 +101,7 @@ struct LexerData
return scope[ name ];
}
- return QString::null;
+ return TQString::null;
}
};
@@ -127,7 +127,7 @@ Lexer::~Lexer()
delete( d );
}
-void Lexer::setSource( const QString& source )
+void Lexer::setSource( const TQString& source )
{
reset();
m_source = source;
@@ -143,7 +143,7 @@ void Lexer::reset()
m_index = 0;
m_size = 0;
m_tokens.clear();
- m_source = QString::null;
+ m_source = TQString::null;
m_ptr = 0;
m_endPtr = 0;
m_startLine = false;
@@ -160,12 +160,12 @@ void Lexer::reset()
// ### should all be done with a "long" type IMO
int Lexer::toInt( const Token& token )
{
- QString s = token.text();
+ TQString s = token.text();
if( token.type() == Token_number_literal ){
// hex literal ?
if( s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
return s.mid( 2 ).toInt( 0, 16 );
- QString n;
+ TQString n;
int i = 0;
while( i < int(s.length()) && s[i].isDigit() )
n += s[i++];
@@ -211,8 +211,8 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
int startLine = m_currentLine;
int startColumn = m_currentColumn;
- QChar ch = currentChar();
- QChar ch1 = peekChar();
+ TQChar ch = currentChar();
+ TQChar ch1 = peekChar();
if( ch.isNull() || ch.isSpace() ){
/* skip */
@@ -224,7 +224,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
int start = currentPosition();
readIdentifier(); // read the directive
- QString directive = m_source.mid( start, currentPosition() - start );
+ TQString directive = m_source.mid( start, currentPosition() - start );
handleDirective( directive );
} else if( m_startLine && m_skipping[ m_ifLevel ] ){
@@ -272,7 +272,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
} else if( ch.isLetter() || ch == '_' ){
int start = currentPosition();
readIdentifier();
- QString ide = m_source.mid( start, currentPosition() - start );
+ TQString ide = m_source.mid( start, currentPosition() - start );
int k = Lookup::find( &keyword, ide );
if( m_preprocessorEnabled && m_driver->hasMacro(ide) &&
(k == -1 || !m_driver->macro(ide).body().isEmpty()) ){
@@ -290,7 +290,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
Macro m = m_driver->macro( ide );
//m_driver->removeMacro( m.name() );
- QString ellipsisArg;
+ TQString ellipsisArg;
if( m.hasArguments() ){
int endIde = currentPosition();
@@ -303,11 +303,11 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
while( currentChar() && argIdx<argCount ){
readWhiteSpaces();
- QString argName = m.argumentList()[ argIdx ];
+ TQString argName = m.argumentList()[ argIdx ];
bool ellipsis = argName == "...";
- QString arg = readArgument();
+ TQString arg = readArgument();
if( !ellipsis )
d->bind( argName, arg );
@@ -352,7 +352,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
// tokenize the macro body
- QString textToInsert;
+ TQString textToInsert;
m_endPtr = currentPosition() + m.body().length();
while( currentChar() ){
@@ -371,24 +371,24 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
if( tok == Token_eof )
break;
- QString tokText = tok.text();
- QString str = (tok == Token_identifier && d->hasBind(tokText)) ? d->apply( tokText ) : tokText;
+ TQString tokText = tok.text();
+ TQString str = (tok == Token_identifier && d->hasBind(tokText)) ? d->apply( tokText ) : tokText;
if( str == ide ){
//Problem p( i18n("unsafe use of macro '%1'").arg(ide), m_currentLine, m_currentColumn );
//m_driver->addProblem( m_driver->currentFileName(), p );
m_driver->removeMacro( ide );
- // str = QString::null;
+ // str = TQString::null;
}
if( stringify ) {
- textToInsert.append( QString::fromLatin1("\"") + str + QString::fromLatin1("\" ") );
+ textToInsert.append( TQString::fromLatin1("\"") + str + TQString::fromLatin1("\" ") );
} else if( merge ){
textToInsert.truncate( textToInsert.length() - 1 );
textToInsert.append( str );
} else if( tok == Token_ellipsis && d->hasBind("...") ){
textToInsert.append( ellipsisArg );
} else {
- textToInsert.append( str + QString::fromLatin1(" ") );
+ textToInsert.append( str + TQString::fromLatin1(" ") );
}
}
@@ -408,7 +408,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
tk.setStartPosition( startLine, startColumn );
tk.setEndPosition( m_currentLine, m_currentColumn );
} else if( m_skipWordsEnabled ){
- QMap< QString, QPair<SkipType, QString> >::Iterator pos = m_words.find( ide );
+ TQMap< TQString, QPair<SkipType, TQString> >::Iterator pos = m_words.find( ide );
if( pos != m_words.end() ){
if( (*pos).first == SkipWordAndArguments ){
readWhiteSpaces();
@@ -419,7 +419,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
#if defined( KDEVELOP_BGPARSER )
qthread_yield();
#endif
- m_source.insert( currentPosition(), QString(" ") + (*pos).second + QString(" ") );
+ m_source.insert( currentPosition(), TQString(" ") + (*pos).second + TQString(" ") );
m_endPtr = m_source.length();
}
} else if( /*qt_rx.exactMatch(ide) ||*/
@@ -502,7 +502,7 @@ void Lexer::resetSkipWords()
m_words.clear();
}
-void Lexer::addSkipWord( const QString& word, SkipType skipType, const QString& str )
+void Lexer::addSkipWord( const TQString& word, SkipType skipType, const TQString& str )
{
m_words[ word ] = qMakePair( skipType, str );
}
@@ -531,17 +531,17 @@ void Lexer::skip( int l, int r )
m_currentColumn = svCurrentColumn;
}
-QString Lexer::readArgument()
+TQString Lexer::readArgument()
{
int count = 0;
- QString arg;
+ TQString arg;
readWhiteSpaces();
while( currentChar() ){
readWhiteSpaces();
- QChar ch = currentChar();
+ TQChar ch = currentChar();
if( ch.isNull() || (!count && (ch == ',' || ch == ')')) )
break;
@@ -562,7 +562,7 @@ QString Lexer::readArgument()
return arg.stripWhiteSpace();
}
-void Lexer::handleDirective( const QString& directive )
+void Lexer::handleDirective( const TQString& directive )
{
m_inPreproc = true;
@@ -623,7 +623,7 @@ int Lexer::macroDefined()
readWhiteSpaces( false );
int startWord = currentPosition();
readIdentifier();
- QString word = m_source.mid( startWord, currentPosition() - startWord );
+ TQString word = m_source.mid( startWord, currentPosition() - startWord );
bool r = m_driver->hasMacro( word );
return r;
@@ -636,7 +636,7 @@ void Lexer::processDefine( Macro& m )
int startMacroName = currentPosition();
readIdentifier();
- QString macroName = m_source.mid( startMacroName, int(currentPosition()-startMacroName) );
+ TQString macroName = m_source.mid( startMacroName, int(currentPosition()-startMacroName) );
m_driver->removeMacro( macroName );
m.setName( macroName );
@@ -656,7 +656,7 @@ void Lexer::processDefine( Macro& m )
else
readIdentifier();
- QString arg = m_source.mid( startArg, int(currentPosition()-startArg) );
+ TQString arg = m_source.mid( startArg, int(currentPosition()-startArg) );
m.addArgument( Macro::Argument(arg) );
@@ -673,7 +673,7 @@ void Lexer::processDefine( Macro& m )
setPreprocessorEnabled( true );
- QString body;
+ TQString body;
while( currentChar() && currentChar() != '\n' ){
if( currentChar().isSpace() ){
@@ -685,7 +685,7 @@ void Lexer::processDefine( Macro& m )
nextToken( tk, true );
if( tk.type() != -1 ){
- QString s = tk.text();
+ TQString s = tk.text();
body += s;
}
}
@@ -777,16 +777,16 @@ void Lexer::processInclude()
readWhiteSpaces( false );
if( currentChar() ){
- QChar ch = currentChar();
+ TQChar ch = currentChar();
if( ch == '"' || ch == '<' ){
nextChar();
- QChar ch2 = ch == QChar('"') ? QChar('"') : QChar('>');
+ TQChar ch2 = ch == TQChar('"') ? TQChar('"') : TQChar('>');
int startWord = currentPosition();
while( currentChar() && currentChar() != ch2 )
nextChar();
if( currentChar() ){
- QString word = m_source.mid( startWord, int(currentPosition()-startWord) );
+ TQString word = m_source.mid( startWord, int(currentPosition()-startWord) );
m_driver->addDependence( m_driver->currentFileName(),
Dependence(word, ch == '"' ? Dep_Local : Dep_Global) );
nextChar();
@@ -800,7 +800,7 @@ void Lexer::processUndef()
readWhiteSpaces();
int startWord = currentPosition();
readIdentifier();
- QString word = m_source.mid( startWord, currentPosition() - startWord );
+ TQString word = m_source.mid( startWord, currentPosition() - startWord );
m_driver->removeMacro( word );
}
@@ -824,7 +824,7 @@ int Lexer::macroPrimary()
case '!':
case '~':
{
- QChar tk = currentChar();
+ TQChar tk = currentChar();
nextChar();
int result = macroPrimary();
if( tk == '-' ) return -result;
@@ -973,7 +973,7 @@ int Lexer::macroLogicalAnd()
nextChar( 2 );
int start = currentPosition();
result = macroBoolOr() && result;
- QString s = m_source.mid( start, currentPosition() - start );
+ TQString s = m_source.mid( start, currentPosition() - start );
}
return result;
}
@@ -996,7 +996,7 @@ int Lexer::macroExpression()
}
// *IMPORTANT*
-// please, don't include lexer.moc here, because Lexer isn't a QObject class!!
+// please, don't include lexer.moc here, because Lexer isn't a TQObject class!!
// if you have problem while recompiling try to remove cppsupport/.deps,
// cppsupport/Makefile.in and rerun automake/autoconf
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lexer.h b/umbrello/umbrello/codeimport/kdevcppparser/lexer.h
index da656591..4851c183 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lexer.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lexer.h
@@ -22,11 +22,11 @@
#include "driver.h"
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluestack.h>
-#include <qpair.h>
-#include <qptrvector.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluestack.h>
+#include <tqpair.h>
+#include <tqptrvector.h>
enum Type {
Token_eof = 0,
@@ -148,7 +148,7 @@ class Token
{
public:
Token();
- Token( int type, int position, int length, const QString& text );
+ Token( int type, int position, int length, const TQString& text );
Token( const Token& source );
Token& operator = ( const Token& source );
@@ -171,7 +171,7 @@ public:
int position() const;
void setPosition( int position );
- QString text() const;
+ TQString text() const;
private:
int m_type;
@@ -181,7 +181,7 @@ private:
int m_startColumn;
int m_endLine;
int m_endColumn;
- QString m_text;
+ TQString m_text;
friend class Lexer;
friend class Parser;
@@ -212,10 +212,10 @@ public:
void setPreprocessorEnabled( bool enabled );
void resetSkipWords();
- void addSkipWord( const QString& word, SkipType skipType=SkipWord, const QString& str = QString::null );
+ void addSkipWord( const TQString& word, SkipType skipType=SkipWord, const TQString& str = TQString::null );
- QString source() const;
- void setSource( const QString& source );
+ TQString source() const;
+ void setSource( const TQString& source );
int index() const;
void setIndex( int index );
@@ -235,8 +235,8 @@ public:
int currentColumn() const { return m_currentColumn; }
private:
- QChar currentChar() const;
- QChar peekChar( int n=1 ) const;
+ TQChar currentChar() const;
+ TQChar peekChar( int n=1 ) const;
int currentPosition() const;
void tokenize();
@@ -259,7 +259,7 @@ private:
// preprocessor (based on an article of Al Stevens on Dr.Dobb's journal)
int testIfLevel();
int macroDefined();
- QString readArgument();
+ TQString readArgument();
int macroPrimary();
int macroMultiplyDivide();
@@ -273,7 +273,7 @@ private:
int macroLogicalOr();
int macroExpression();
- void handleDirective( const QString& directive );
+ void handleDirective( const TQString& directive );
void processDefine( Macro& macro );
void processElse();
void processElif();
@@ -287,24 +287,24 @@ private:
private:
LexerData* d;
Driver* m_driver;
- QPtrVector< Token > m_tokens;
+ TQPtrVector< Token > m_tokens;
int m_size;
int m_index;
- QString m_source;
+ TQString m_source;
int m_ptr;
int m_endPtr;
bool m_recordComments;
bool m_recordWhiteSpaces;
bool m_startLine;
- QMap< QString, QPair<SkipType, QString> > m_words;
+ TQMap< TQString, QPair<SkipType, TQString> > m_words;
int m_currentLine;
int m_currentColumn;
bool m_skipWordsEnabled;
// preprocessor
- QMemArray<bool> m_skipping;
- QMemArray<bool> m_trueTest;
+ TQMemArray<bool> m_skipping;
+ TQMemArray<bool> m_trueTest;
int m_ifLevel;
bool m_preprocessorEnabled;
bool m_inPreproc;
@@ -326,7 +326,7 @@ inline Token::Token()
{
}
-inline Token::Token( int type, int position, int length, const QString& text )
+inline Token::Token( int type, int position, int length, const TQString& text )
: m_type( type ),
m_position( position ),
m_length( length ),
@@ -396,7 +396,7 @@ inline int Token::position() const
return m_position;
}
-inline QString Token::text() const
+inline TQString Token::text() const
{
return m_text.mid(m_position, m_length);
}
@@ -460,7 +460,7 @@ inline void Lexer::setRecordWhiteSpaces( bool record )
m_recordWhiteSpaces = record;
}
-inline QString Lexer::source() const
+inline TQString Lexer::source() const
{
return m_source;
}
@@ -524,7 +524,7 @@ inline void Lexer::readIdentifier()
inline void Lexer::readWhiteSpaces( bool skipNewLine )
{
while( !currentChar().isNull() ){
- QChar ch = currentChar();
+ TQChar ch = currentChar();
if( ch == '\n' && !skipNewLine ){
break;
@@ -544,7 +544,7 @@ inline void Lexer::readLineComment()
while( !currentChar().isNull() && currentChar() != '\n' ){
if( m_reportMessages && currentChar() == '@' && m_source.mid(currentPosition()+1, 4).lower() == "todo" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -561,7 +561,7 @@ inline void Lexer::readLineComment()
} else
if( m_reportMessages && m_source.mid(currentPosition(), 5).lower() == "fixme" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -588,7 +588,7 @@ inline void Lexer::readMultiLineComment()
return;
} else if( m_reportMessages && currentChar() == '@' && m_source.mid(currentPosition()+1, 4).lower() == "todo" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -604,7 +604,7 @@ inline void Lexer::readMultiLineComment()
} else
if( m_reportMessages && m_source.mid(currentPosition(), 5).lower() == "fixme" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -682,7 +682,7 @@ inline int Lexer::findOperator3() const
int n = int(m_endPtr - m_ptr);
if( n >= 3){
- QChar ch = currentChar(), ch1=peekChar(), ch2=peekChar(2);
+ TQChar ch = currentChar(), ch1=peekChar(), ch2=peekChar(2);
if( ch == '<' && ch1 == '<' && ch2 == '=' ) return Token_assign;
else if( ch == '>' && ch1 == '>' && ch2 == '=' ) return Token_assign;
@@ -698,7 +698,7 @@ inline int Lexer::findOperator2() const
int n = int(m_endPtr - m_ptr);
if( n>=2 ){
- QChar ch = currentChar(), ch1=peekChar();
+ TQChar ch = currentChar(), ch1=peekChar();
if( ch == ':' && ch1 == ':' ) return Token_scope;
else if( ch == '.' && ch1 == '*' ) return Token_ptrmem;
@@ -752,14 +752,14 @@ inline int Lexer::currentPosition() const
return m_ptr;
}
-inline QChar Lexer::currentChar() const
+inline TQChar Lexer::currentChar() const
{
- return m_ptr < m_endPtr ? m_source[m_ptr] : QChar::null;
+ return m_ptr < m_endPtr ? m_source[m_ptr] : TQChar::null;
}
-inline QChar Lexer::peekChar( int n ) const
+inline TQChar Lexer::peekChar( int n ) const
{
- return m_ptr+n < m_endPtr ? m_source[m_ptr + n] : QChar::null;
+ return m_ptr+n < m_endPtr ? m_source[m_ptr + n] : TQChar::null;
}
inline bool Lexer::eof() const
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp
index 8831e6f3..f46b9270 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp
@@ -29,7 +29,7 @@
#include <string.h>
const HashEntry* Lookup::findEntry( const struct HashTable *table,
- const QChar *c, unsigned int len )
+ const TQChar *c, unsigned int len )
{
if (table->type != 2) {
kdDebug() << "KJS: Unknown hash table version" << endl;
@@ -69,13 +69,13 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table,
}
const HashEntry* Lookup::findEntry( const struct HashTable *table,
- const QString &s )
+ const TQString &s )
{
return findEntry( table, s.unicode(), s.length() );
}
int Lookup::find(const struct HashTable *table,
- const QChar *c, unsigned int len)
+ const TQChar *c, unsigned int len)
{
const HashEntry *entry = findEntry( table, c, len );
if (entry)
@@ -83,12 +83,12 @@ int Lookup::find(const struct HashTable *table,
return -1;
}
-int Lookup::find(const struct HashTable *table, const QString &s)
+int Lookup::find(const struct HashTable *table, const TQString &s)
{
return find(table, s.unicode(), s.length());
}
-unsigned int Lookup::hash(const QChar *c, unsigned int len)
+unsigned int Lookup::hash(const TQChar *c, unsigned int len)
{
unsigned int val = 0;
// ignoring rower byte
@@ -98,7 +98,7 @@ unsigned int Lookup::hash(const QChar *c, unsigned int len)
return val;
}
-unsigned int Lookup::hash(const QString &key)
+unsigned int Lookup::hash(const TQString &key)
{
return hash(key.unicode(), key.length());
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h
index 225c3ab0..b2bad4de 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h
@@ -24,7 +24,7 @@
#ifndef _KJSLOOKUP_H_
#define _KJSLOOKUP_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
/**
@@ -95,8 +95,8 @@
/**
* Find an entry in the table, and return its value (i.e. the value field of HashEntry)
*/
- static int find(const struct HashTable *table, const QString& s);
- static int find(const struct HashTable *table, const QChar *c, unsigned int len);
+ static int find(const struct HashTable *table, const TQString& s);
+ static int find(const struct HashTable *table, const TQChar *c, unsigned int len);
/**
* Find an entry in the table, and return the entry
@@ -104,15 +104,15 @@
* especially the attr field.
*/
static const HashEntry* findEntry(const struct HashTable *table,
- const QString &s);
+ const TQString &s);
static const HashEntry* findEntry(const struct HashTable *table,
- const QChar *c, unsigned int len);
+ const TQChar *c, unsigned int len);
/**
* Calculate the hash value for a given key
*/
- static unsigned int hash(const QString &key);
- static unsigned int hash(const QChar *c, unsigned int len);
+ static unsigned int hash(const TQString &key);
+ static unsigned int hash(const TQChar *c, unsigned int len);
static unsigned int hash(const char *s);
};
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp b/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp
index 184352d5..9b93384c 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp
@@ -24,9 +24,9 @@
#include "errors.h"
// qt
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qasciidict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqasciidict.h>
#include <kdebug.h>
#include <klocale.h>
@@ -132,7 +132,7 @@ bool Parser::reportError( const Error& err )
const Token& token = lex->lookAhead( 0 );
lex->getTokenPosition( token, &line, &col );
- QString s = lex->lookAhead(0).text();
+ TQString s = lex->lookAhead(0).text();
s = s.left( 30 ).stripWhiteSpace();
if( s.isEmpty() )
s = i18n( "<eof>" );
@@ -143,7 +143,7 @@ bool Parser::reportError( const Error& err )
return true;
}
-bool Parser::reportError( const QString& msg )
+bool Parser::reportError( const TQString& msg )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::reportError()" << endl;
if( m_problems < m_maxProblems ){
@@ -314,9 +314,9 @@ bool Parser::skipCommaExpression( AST::Node& node )
if( !skipExpression(expr) )
return false;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !skipExpression(expr) ){
@@ -468,7 +468,7 @@ bool Parser::parseDeclaration( DeclarationAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseDeclaration()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -830,9 +830,9 @@ bool Parser::parseTemplateArgumentList( TemplateArgumentListAST::Node& node, boo
return false;
ast->addArgument( templArg );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseTemplateArgument(templArg) ){
@@ -951,7 +951,7 @@ bool Parser::parseTemplateDeclaration( DeclarationAST::Node& node )
bool Parser::parseOperator( AST::Node& /*node*/ )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseOperator()" << endl;
- QString text = lex->lookAhead(0).text();
+ TQString text = lex->lookAhead(0).text();
switch( lex->lookAhead(0) ){
case Token_new:
@@ -1394,7 +1394,7 @@ bool Parser::parseEnumSpecifier( TypeSpecifierAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseEnumSpecifier()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -1426,7 +1426,7 @@ bool Parser::parseEnumSpecifier( TypeSpecifierAST::Node& node )
if( parseEnumerator(enumerator) ){
ast->addEnumerator( enumerator );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
comment = "";
advanceAndCheckTrailingComment( comment );
@@ -1472,9 +1472,9 @@ bool Parser::parseTemplateParameterList( TemplateParameterListAST::Node& node )
}
ast->addTemplateParameter( param );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseTemplateParameter(param) ){
@@ -1702,7 +1702,7 @@ bool Parser::parseInitDeclaratorList( InitDeclaratorListAST::Node& node )
}
ast->addInitDeclarator( decl );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
comment = "";
advanceAndCheckTrailingComment( comment );
@@ -1777,9 +1777,9 @@ bool Parser::parseParameterDeclarationList( ParameterDeclarationListAST::Node& n
}
ast->addParameter( param );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( lex->lookAhead(0) == Token_ellipsis )
@@ -1878,7 +1878,7 @@ bool Parser::parseClassSpecifier( TypeSpecifierAST::Node& node )
}
}
- QString comment;
+ TQString comment;
while (lex->lookAhead(0) == Token_comment) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -1942,7 +1942,7 @@ bool Parser::parseAccessSpecifier( AST::Node& node )
return false;
}
-void Parser::advanceAndCheckTrailingComment(QString& comment)
+void Parser::advanceAndCheckTrailingComment(TQString& comment)
{
Token t = lex->tokenAt( lex->index() );
int previousTokenEndLine = 0;
@@ -1963,7 +1963,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseMemberSpecification()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -2148,7 +2148,7 @@ bool Parser::parseEnumerator( EnumeratorAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseEnumerator()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -2226,9 +2226,9 @@ bool Parser::parseBaseClause( BaseClauseAST::Node& node )
if( parseBaseSpecifier(baseSpec) ){
bca->addBaseSpecifier( baseSpec );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseBaseSpecifier(baseSpec) ){
@@ -2280,9 +2280,9 @@ bool Parser::parseMemInitializerList( AST::Node& /*node*/ )
return false;
}
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( parseMemInitializer(init) ){
@@ -2325,9 +2325,9 @@ bool Parser::parseTypeIdList( GroupAST::Node& node )
GroupAST::Node ast = CreateNode<GroupAST>();
ast->addNode( typeId );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( parseTypeId(typeId) ){
if (!comment.isEmpty())
@@ -2991,7 +2991,7 @@ bool Parser::parseDeclarationStatement( StatementAST::Node& node )
return true;
}
-bool Parser::parseDeclarationInternal( DeclarationAST::Node& node, QString& comment )
+bool Parser::parseDeclarationInternal( DeclarationAST::Node& node, TQString& comment )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseDeclarationInternal()" << endl;
@@ -3231,9 +3231,9 @@ bool Parser::parseFunctionBody( StatementListAST::Node& node )
return true;
}
-QString Parser::toString( int start, int end, const QString& sep ) const
+TQString Parser::toString( int start, int end, const TQString& sep ) const
{
- QStringList l;
+ TQStringList l;
for( int i=start; i<end; ++i ){
l << lex->tokenAt(i).text();
@@ -3902,9 +3902,9 @@ bool Parser::parseCommaExpression( AST::Node& node )
if( !parseAssignmentExpression(expr) )
return false;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseAssignmentExpression(expr) )
@@ -4108,9 +4108,9 @@ bool Parser::parseIdentifierList( GroupAST::Node & node )
ast->addNode( tk );
lex->nextToken();
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( lex->lookAhead(0) == Token_identifier ){
AST_FROM_TOKEN( tk, lex->index() );
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/parser.h b/umbrello/umbrello/codeimport/kdevcppparser/parser.h
index 23876e9f..9be954c2 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/parser.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/parser.h
@@ -22,10 +22,10 @@
#include "ast.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvaluestack.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluestack.h>
struct ParserPrivateData;
@@ -42,7 +42,7 @@ public:
private:
virtual bool reportError( const Error& err );
- /** @todo remove*/ virtual bool reportError( const QString& msg );
+ /** @todo remove*/ virtual bool reportError( const TQString& msg );
/** @todo remove*/ virtual void syntaxError();
public: /*rules*/
@@ -60,7 +60,7 @@ public: /*rules*/
bool parseTypedef( DeclarationAST::Node& node );
bool parseAsmDefinition( DeclarationAST::Node& node );
bool parseTemplateDeclaration( DeclarationAST::Node& node );
- bool parseDeclarationInternal( DeclarationAST::Node& node, QString& comment );
+ bool parseDeclarationInternal( DeclarationAST::Node& node, TQString& comment );
bool parseUnqualifiedName( ClassOrNamespaceNameAST::Node& node );
bool parseStringLiteral( AST::Node& node );
@@ -196,13 +196,13 @@ public: /*rules*/
bool parseObjcOpenBracketExpr( AST::Node& node );
bool parseObjcCloseBracket( AST::Node& node );
- void advanceAndCheckTrailingComment(QString& comment);
+ void advanceAndCheckTrailingComment(TQString& comment);
bool skipUntil( int token );
bool skipUntilDeclaration();
bool skipUntilStatement();
bool skip( int l, int r );
- QString toString( int start, int end, const QString& sep=" " ) const;
+ TQString toString( int start, int end, const TQString& sep=" " ) const;
private:
ParserPrivateData* d;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp b/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp
index 2f81c3b6..454c4b99 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp
@@ -32,8 +32,8 @@ void TreeParser::parseTranslationUnit( TranslationUnitAST* translationUnit )
{
//kdDebug(9007) << "TreeParser::parseTranslationUnit()" << endl;
- QPtrList<DeclarationAST> declarations = translationUnit->declarationList();
- QPtrListIterator<DeclarationAST> it( declarations );
+ TQPtrList<DeclarationAST> declarations = translationUnit->declarationList();
+ TQPtrListIterator<DeclarationAST> it( declarations );
while( it.current() ){
parseDeclaration( it.current() );
++it;
@@ -153,8 +153,8 @@ void TreeParser::parseFunctionDefinition( FunctionDefinitionAST* def )
void TreeParser::parseLinkageBody( LinkageBodyAST* linkageBody )
{
//kdDebug(9007) << "TreeParser::parseLinkageBody()" << endl;
- QPtrList<DeclarationAST> declarations = linkageBody->declarationList();
- for( QPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
+ TQPtrList<DeclarationAST> declarations = linkageBody->declarationList();
+ for( TQPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
parseDeclaration( it.current() );
}
}
@@ -181,8 +181,8 @@ void TreeParser::parseTypeSpecifier( TypeSpecifierAST* typeSpec )
void TreeParser::parseClassSpecifier( ClassSpecifierAST* classSpec )
{
//kdDebug(9007) << "TreeParser::parseClassSpecifier()" << endl;
- QPtrList<DeclarationAST> declarations = classSpec->declarationList();
- for( QPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
+ TQPtrList<DeclarationAST> declarations = classSpec->declarationList();
+ for( TQPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
parseDeclaration( it.current() );
}
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp
index 9b48649d..5235bc3c 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp
@@ -20,10 +20,10 @@
*/
#include "urlutil.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <unistd.h>
@@ -39,27 +39,27 @@
// Namespace URLUtil
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::filename(const QString & name) {
+TQString URLUtil::filename(const TQString & name) {
int slashPos = name.findRev("/");
return slashPos<0 ? name : name.mid(slashPos+1);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::directory(const QString & name) {
+TQString URLUtil::directory(const TQString & name) {
int slashPos = name.findRev("/");
- return slashPos<0 ? QString("") : name.left(slashPos);
+ return slashPos<0 ? TQString("") : name.left(slashPos);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slashPolicy) {
+TQString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slashPolicy) {
bool slashPrefix = slashPolicy & SLASH_PREFIX;
bool slashSuffix = slashPolicy & SLASH_SUFFIX;
if (parent == child)
- return slashPrefix ? QString("/") : QString("");
+ return slashPrefix ? TQString("/") : TQString("");
- if (!parent.isParentOf(child)) return QString();
+ if (!parent.isParentOf(child)) return TQString();
int a=slashPrefix ? -1 : 1;
int b=slashSuffix ? 1 : -1;
return child.path(b).mid(parent.path(a).length());
@@ -67,15 +67,15 @@ QString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slas
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::relativePath(const QString & parent, const QString & child, uint slashPolicy) {
+TQString URLUtil::relativePath(const TQString & parent, const TQString & child, uint slashPolicy) {
return relativePath(KURL(parent), KURL(child), slashPolicy);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::upDir(const QString & path, bool slashSuffix) {
+TQString URLUtil::upDir(const TQString & path, bool slashSuffix) {
int slashPos = path.findRev("/");
- if (slashPos<1) return QString::null;
+ if (slashPos<1) return TQString::null;
return path.mid(0,slashPos+ (slashSuffix ? 1 : 0) );
}
@@ -93,41 +93,41 @@ KURL URLUtil::mergeURL(const KURL & source, const KURL & dest, const KURL & chil
if (dest == child) return source;
// calculate
- QString childUrlStr = child.url(-1);
- QString destStemStr = dest.url(1);
- QString sourceStemStr = source.url(1);
+ TQString childUrlStr = child.url(-1);
+ TQString destStemStr = dest.url(1);
+ TQString sourceStemStr = source.url(1);
return KURL(sourceStemStr.append( childUrlStr.mid( destStemStr.length() ) ) );
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::getExtension(const QString & path) {
+TQString URLUtil::getExtension(const TQString & path) {
int dotPos = path.findRev('.');
- if (dotPos<0) return QString("");
+ if (dotPos<0) return TQString("");
return path.mid(dotPos+1);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &url )
+TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &url )
{
- QString absBase = extractPathNameAbsolute( baseDirUrl ),
+ TQString absBase = extractPathNameAbsolute( baseDirUrl ),
absRef = extractPathNameAbsolute( url );
int i = absRef.find( absBase, 0, true );
if (i == -1)
- return QString();
+ return TQString();
if (absRef == absBase)
- return QString( "." );
+ return TQString( "." );
else
- return absRef.replace( 0, absBase.length(), QString() );
+ return absRef.replace( 0, absBase.length(), TQString() );
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameRelative(const QString &basePath, const KURL &url )
+TQString URLUtil::extractPathNameRelative(const TQString &basePath, const KURL &url )
{
#if (KDE_VERSION_MINOR!=0) || (KDE_VERSION_MAJOR!=3)
KURL baseDirUrl = KURL::fromPathOrURL( basePath );
@@ -139,7 +139,7 @@ QString URLUtil::extractPathNameRelative(const QString &basePath, const KURL &ur
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameRelative(const QString &basePath, const QString &absFilePath )
+TQString URLUtil::extractPathNameRelative(const TQString &basePath, const TQString &absFilePath )
{
#if (KDE_VERSION_MINOR!=0) || (KDE_VERSION_MAJOR!=3)
KURL baseDirUrl = KURL::fromPathOrURL( basePath ),
@@ -153,7 +153,7 @@ QString URLUtil::extractPathNameRelative(const QString &basePath, const QString
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameAbsolute( const KURL &url )
+TQString URLUtil::extractPathNameAbsolute( const KURL &url )
{
if (isDirectory( url ))
return url.path( +1 ); // with trailing "/" if none is present
@@ -162,9 +162,9 @@ QString URLUtil::extractPathNameAbsolute( const KURL &url )
// Ok, this is an over-tight pre-condition on "url" since I hope nobody will never
// stress this function with absurd cases ... but who knows?
/*
- QString path = url.path();
- QFileInfo fi( path ); // Argh: QFileInfo is back ;))
- return ( fi.exists()? path : QString() );
+ TQString path = url.path();
+ TQFileInfo fi( path ); // Argh: TQFileInfo is back ;))
+ return ( fi.exists()? path : TQString() );
*/
return url.path();
}
@@ -179,14 +179,14 @@ bool URLUtil::isDirectory( const KURL &url )
///////////////////////////////////////////////////////////////////////////////
-bool URLUtil::isDirectory( const QString &absFilePath )
+bool URLUtil::isDirectory( const TQString &absFilePath )
{
- return QDir( absFilePath ).exists();
+ return TQDir( absFilePath ).exists();
}
///////////////////////////////////////////////////////////////////////////////
-void URLUtil::dump( const KURL::List &urls, const QString &aMessage )
+void URLUtil::dump( const KURL::List &urls, const TQString &aMessage )
{
if (!aMessage.isNull())
{
@@ -203,9 +203,9 @@ void URLUtil::dump( const KURL::List &urls, const QString &aMessage )
///////////////////////////////////////////////////////////////////////////////
-QStringList URLUtil::toRelativePaths( const QString &baseDir, const KURL::List &urls)
+TQStringList URLUtil::toRelativePaths( const TQString &baseDir, const KURL::List &urls)
{
- QStringList paths;
+ TQStringList paths;
for (size_t i=0; i<urls.count(); ++i)
{
@@ -217,25 +217,25 @@ QStringList URLUtil::toRelativePaths( const QString &baseDir, const KURL::List &
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::relativePathToFile( const QString & dirUrl, const QString & fileUrl )
+TQString URLUtil::relativePathToFile( const TQString & dirUrl, const TQString & fileUrl )
{
if (dirUrl.isEmpty() || (dirUrl == "/"))
return fileUrl;
- QStringList dir = QStringList::split("/", dirUrl, false);
- QStringList file = QStringList::split("/", fileUrl, false);
+ TQStringList dir = TQStringList::split("/", dirUrl, false);
+ TQStringList file = TQStringList::split("/", fileUrl, false);
- QString resFileName = file.last();
+ TQString resFileName = file.last();
file.remove(file.last());
uint i = 0;
while ( (i < dir.count()) && (i < (file.count())) && (dir[i] == file[i]) )
i++;
- QString result_up;
- QString result_down;
- QString currDir;
- QString currFile;
+ TQString result_up;
+ TQString result_down;
+ TQString currDir;
+ TQString currFile;
do
{
i >= dir.count() ? currDir = "" : currDir = dir[i];
@@ -261,17 +261,17 @@ QString URLUtil::relativePathToFile( const QString & dirUrl, const QString & fil
///////////////////////////////////////////////////////////////////////////////
-// code from qt-3.1.2 version of QDir::canonicalPath()
-QString URLUtil::canonicalPath( const QString & path )
+// code from qt-3.1.2 version of TQDir::canonicalPath()
+TQString URLUtil::canonicalPath( const TQString & path )
{
- QString r;
+ TQString r;
char cur[PATH_MAX+1];
if ( ::getcwd( cur, PATH_MAX ) )
{
char tmp[PATH_MAX+1];
- if( ::realpath( QFile::encodeName( path ), tmp ) )
+ if( ::realpath( TQFile::encodeName( path ), tmp ) )
{
- r = QFile::decodeName( tmp );
+ r = TQFile::decodeName( tmp );
}
//always make sure we go back to the current dir
::chdir( cur );
@@ -283,7 +283,7 @@ QString URLUtil::canonicalPath( const QString & path )
//written by "Dawit A." <adawit@kde.org>
//borrowed from his patch to KShell
-QString URLUtil::envExpand ( const QString& str )
+TQString URLUtil::envExpand ( const TQString& str )
{
uint len = str.length();
@@ -294,11 +294,11 @@ QString URLUtil::envExpand ( const QString& str )
if (pos < 0)
pos = len;
- char* ret = getenv( QConstString(str.unicode()+1, pos-1).string().local8Bit().data() );
+ char* ret = getenv( TQConstString(str.unicode()+1, pos-1).string().local8Bit().data() );
if (ret)
{
- QString expandedStr ( QFile::decodeName( ret ) );
+ TQString expandedStr ( TQFile::decodeName( ret ) );
if (pos < (int)len)
expandedStr += str.mid(pos);
return expandedStr;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h
index 590069dc..75486983 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h
@@ -21,8 +21,8 @@
#ifndef _URLUTIL_H_
#define _URLUTIL_H_
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kurl.h>
namespace URLUtil
@@ -32,19 +32,19 @@ namespace URLUtil
/**
* Returns the filename part of a pathname (i.e. everything past the last slash)
*/
- QString filename(const QString & pathName);
+ TQString filename(const TQString & pathName);
/**
* Returns the directory part of a path (i.e. everything up to but not including the last slash)
*/
- QString directory(const QString & pathName);
+ TQString directory(const TQString & pathName);
/**
* Returns the relative path between a parent and child URL, or blank if the specified child is not a child of parent
*/
- QString relativePath(const KURL & parent, const KURL & child, uint slashPolicy = SLASH_PREFIX);
+ TQString relativePath(const KURL & parent, const KURL & child, uint slashPolicy = SLASH_PREFIX);
/**
* Returns the relative path between a parent and child URL, or blank if the specified child is not a child of parent
*/
- QString relativePath(const QString & parent, const QString & child, uint slashPolicy = SLASH_PREFIX);
+ TQString relativePath(const TQString & parent, const TQString & child, uint slashPolicy = SLASH_PREFIX);
/**
* Returns the relative path between a directory and file. Should never return empty path.
* Example:
@@ -52,11 +52,11 @@ namespace URLUtil
* fileUrl: /home/test/lib/mylib.cpp
* returns: ../lib/mylib.cpp
*/
- QString relativePathToFile( const QString & dirUrl, const QString & fileUrl );
+ TQString relativePathToFile( const TQString & dirUrl, const TQString & fileUrl );
/**
*Returns the path 'up one level' - the opposite of what filename returns
*/
- QString upDir(const QString & path, bool slashSuffix = false);
+ TQString upDir(const TQString & path, bool slashSuffix = false);
/**
* 'Merges' URLs - changes a URL that starts with dest to start with source instead
* Example:
@@ -69,7 +69,7 @@ namespace URLUtil
/**
* Returns the file extension for a filename or path
*/
- QString getExtension(const QString & path);
+ TQString getExtension(const TQString & path);
/**
* Given a base directory url in @p baseDirUrl and the url referring to a date sub-directory or file,
@@ -79,44 +79,44 @@ namespace URLUtil
* KURL baseUrl, dirUrl;
* baseUrl.setPath( "/home/mario/src/kdevelop/" );
* dirUrl.setPath( "/home/mario/src/kdevelop/parts/cvs/" );
- * QString relPathName = extractDirPathRelative( baseUrl, url ); // == "parts/cvs/"
- * QString absPathName = extractDirPathAbsolute( url ); // == "/home/mario/src/kdevelop/parts/cvs/"
+ * TQString relPathName = extractDirPathRelative( baseUrl, url ); // == "parts/cvs/"
+ * TQString absPathName = extractDirPathAbsolute( url ); // == "/home/mario/src/kdevelop/parts/cvs/"
* </code>
* Note that if you pass a file name in @p url (instead of a directory) or the @p baseUrl is not contained
* in @p url then the function will return "" (void string).
*/
- QString extractPathNameRelative(const KURL &baseDirUrl, const KURL &url );
- QString extractPathNameRelative(const QString &basePath, const KURL &url );
- QString extractPathNameRelative(const QString &basePath, const QString &absFilePath );
+ TQString extractPathNameRelative(const KURL &baseDirUrl, const KURL &url );
+ TQString extractPathNameRelative(const TQString &basePath, const KURL &url );
+ TQString extractPathNameRelative(const TQString &basePath, const TQString &absFilePath );
/**
* Will return the absolute path name referred in @p url.
* Look at above for an example.
*/
- QString extractPathNameAbsolute( const KURL &url );
+ TQString extractPathNameAbsolute( const KURL &url );
/**
- * Returns a QStringList of relative (to @p baseDir) paths from a list of KURLs in @p urls
+ * Returns a TQStringList of relative (to @p baseDir) paths from a list of KURLs in @p urls
*/
- QStringList toRelativePaths( const QString &baseDir, const KURL::List &urls);
+ TQStringList toRelativePaths( const TQString &baseDir, const KURL::List &urls);
/**
* If @p url is a directory will return true, false otherwise.
*/
bool isDirectory( const KURL &url );
- bool isDirectory( const QString &absFilePath );
+ bool isDirectory( const TQString &absFilePath );
/**
* Will dump the list of KURL @p urls on standard output, eventually printing @ aMessage if it
* is not null.
*/
- void dump( const KURL::List &urls, const QString &aMessage = QString::null );
+ void dump( const KURL::List &urls, const TQString &aMessage = TQString::null );
/**
- * Same as QDir::canonicalPath in later versions of QT. Earlier versions of QT
+ * Same as TQDir::canonicalPath in later versions of QT. Earlier versions of QT
* had this broken, so it's reproduced here.
*/
- QString canonicalPath( const QString & path );
+ TQString canonicalPath( const TQString & path );
/**
* Performs environment variable expansion on @p variable.
@@ -125,7 +125,7 @@ namespace URLUtil
* @return the expanded environment variable value. if the variable
* cannot be expanded, @p variable itself is returned.
*/
- QString envExpand ( const QString &variable );
+ TQString envExpand ( const TQString &variable );
}
diff --git a/umbrello/umbrello/codeimport/nativeimportbase.cpp b/umbrello/umbrello/codeimport/nativeimportbase.cpp
index 058b4d19..b2f7dac3 100644
--- a/umbrello/umbrello/codeimport/nativeimportbase.cpp
+++ b/umbrello/umbrello/codeimport/nativeimportbase.cpp
@@ -13,15 +13,15 @@
#include "nativeimportbase.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
-NativeImportBase::NativeImportBase(const QString &singleLineCommentIntro) {
+NativeImportBase::NativeImportBase(const TQString &singleLineCommentIntro) {
m_singleLineCommentIntro = singleLineCommentIntro;
m_srcIndex = 0;
m_scopeIndex = 0; // index 0 is reserved for global scope
@@ -34,24 +34,24 @@ NativeImportBase::NativeImportBase(const QString &singleLineCommentIntro) {
NativeImportBase::~NativeImportBase() {
}
-void NativeImportBase::setMultiLineComment(const QString &intro, const QString &end) {
+void NativeImportBase::setMultiLineComment(const TQString &intro, const TQString &end) {
m_multiLineCommentIntro = intro;
m_multiLineCommentEnd = end;
}
-void NativeImportBase::setMultiLineAltComment(const QString &intro, const QString &end) {
+void NativeImportBase::setMultiLineAltComment(const TQString &intro, const TQString &end) {
m_multiLineAltCommentIntro = intro;
m_multiLineAltCommentEnd = end;
}
-void NativeImportBase::skipStmt(QString until /* = ";" */) {
+void NativeImportBase::skipStmt(TQString until /* = ";" */) {
const uint srcLength = m_source.count();
while (m_srcIndex < srcLength && m_source[m_srcIndex] != until)
m_srcIndex++;
}
-bool NativeImportBase::skipToClosing(QChar opener) {
- QString closing;
+bool NativeImportBase::skipToClosing(TQChar opener) {
+ TQString closing;
switch (opener) {
case '{':
closing = "}";
@@ -70,12 +70,12 @@ bool NativeImportBase::skipToClosing(QChar opener) {
<< "): " << "illegal input character" << endl;
return false;
}
- const QString opening(opener);
+ const TQString opening(opener);
skipStmt(opening);
const uint srcLength = m_source.count();
int nesting = 0;
while (m_srcIndex < srcLength) {
- QString nextToken = advance();
+ TQString nextToken = advance();
if (nextToken.isEmpty())
break;
if (nextToken == closing) {
@@ -91,7 +91,7 @@ bool NativeImportBase::skipToClosing(QChar opener) {
return true;
}
-QString NativeImportBase::advance() {
+TQString NativeImportBase::advance() {
while (m_srcIndex < m_source.count() - 1) {
if (m_source[++m_srcIndex].startsWith(m_singleLineCommentIntro))
m_comment += m_source[m_srcIndex];
@@ -102,12 +102,12 @@ QString NativeImportBase::advance() {
// if last item in m_source is a comment then it is dropped too
(m_srcIndex == m_source.count() - 1 &&
m_source[m_srcIndex].startsWith(m_singleLineCommentIntro))) {
- return QString();
+ return TQString();
}
return m_source[m_srcIndex];
}
-bool NativeImportBase::preprocess(QString& line) {
+bool NativeImportBase::preprocess(TQString& line) {
if (m_multiLineCommentIntro.isEmpty())
return false;
// Check for end of multi line comment.
@@ -126,7 +126,7 @@ bool NativeImportBase::preprocess(QString& line) {
delimiterLen = m_multiLineCommentEnd.length();
}
if (pos > 0) {
- QString text = line.mid(0, pos - 1);
+ TQString text = line.mid(0, pos - 1);
m_comment += text.stripWhiteSpace();
}
m_source.append(m_singleLineCommentIntro + m_comment); // denotes comments in `m_source'
@@ -162,7 +162,7 @@ bool NativeImportBase::preprocess(QString& line) {
if (endpos == -1) {
m_inComment = true;
if (pos + delimIntroLen < (int)line.length()) {
- QString cmnt = line.mid(pos + delimIntroLen);
+ TQString cmnt = line.mid(pos + delimIntroLen);
m_comment += cmnt.stripWhiteSpace() + "\n";
}
if (pos == 0)
@@ -170,16 +170,16 @@ bool NativeImportBase::preprocess(QString& line) {
line = line.left(pos);
} else { // It's a multiline comment on a single line.
if (endpos > pos + delimIntroLen) {
- QString cmnt = line.mid(pos + delimIntroLen, endpos - pos - delimIntroLen);
+ TQString cmnt = line.mid(pos + delimIntroLen, endpos - pos - delimIntroLen);
cmnt = cmnt.stripWhiteSpace();
if (!cmnt.isEmpty())
m_source.append(m_singleLineCommentIntro + cmnt);
}
endpos++; // endpos now points at the slash of "*/"
- QString pre;
+ TQString pre;
if (pos > 0)
pre = line.left(pos);
- QString post;
+ TQString post;
if (endpos + delimEndLen < (int)line.length())
post = line.mid(endpos + 1);
line = pre + post;
@@ -190,20 +190,20 @@ bool NativeImportBase::preprocess(QString& line) {
/// Split the line so that a string is returned as a single element of the list,
/// when not in a string then split at white space.
-QStringList NativeImportBase::split(const QString& lin) {
- QStringList list;
- QString listElement;
- QChar stringIntro = 0; // buffers the string introducer character
+TQStringList NativeImportBase::split(const TQString& lin) {
+ TQStringList list;
+ TQString listElement;
+ TQChar stringIntro = 0; // buffers the string introducer character
bool seenSpace = false;
- QString line = lin.stripWhiteSpace();
+ TQString line = lin.stripWhiteSpace();
for (uint i = 0; i < line.length(); i++) {
- const QChar& c = line[i];
+ const TQChar& c = line[i];
if (stringIntro) { // we are in a string
listElement += c;
if (c == stringIntro) {
if (line[i - 1] != '\\') {
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
stringIntro = 0; // we are no longer in a string
}
}
@@ -219,7 +219,7 @@ QStringList NativeImportBase::split(const QString& lin) {
seenSpace = true;
if (!listElement.isEmpty()) {
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
}
} else {
listElement += c;
@@ -233,23 +233,23 @@ QStringList NativeImportBase::split(const QString& lin) {
/// The lexer. Tokenizes the given string and fills `m_source'.
/// Stores possible comments in `m_comment'.
-void NativeImportBase::scan(QString line) {
+void NativeImportBase::scan(TQString line) {
if (preprocess(line))
return;
// Check for single line comment.
int pos = line.find(m_singleLineCommentIntro);
if (pos != -1) {
- QString cmnt = line.mid(pos);
+ TQString cmnt = line.mid(pos);
m_source.append(cmnt);
if (pos == 0)
return;
line = line.left(pos);
}
- if (line.contains(QRegExp("^\\s*$")))
+ if (line.contains(TQRegExp("^\\s*$")))
return;
- QStringList words = split(line);
- for (QStringList::Iterator it = words.begin(); it != words.end(); ++it) {
- QString word = *it;
+ TQStringList words = split(line);
+ for (TQStringList::Iterator it = words.begin(); it != words.end(); ++it) {
+ TQString word = *it;
if (word[0] == '"' || word[0] == '\'')
m_source.append(word); // string constants are handled by split()
else
@@ -260,34 +260,34 @@ void NativeImportBase::scan(QString line) {
void NativeImportBase::initVars() {
}
-void NativeImportBase::parseFile(const QString& filename) {
- QString nameWithoutPath = filename;
- nameWithoutPath.remove(QRegExp("^.*/"));
+void NativeImportBase::parseFile(const TQString& filename) {
+ TQString nameWithoutPath = filename;
+ nameWithoutPath.remove(TQRegExp("^.*/"));
if (m_parsedFiles.contains(nameWithoutPath))
return;
m_parsedFiles.append(nameWithoutPath);
- QString fname = filename;
- const QString msgPrefix = "NativeImportBase::parseFile(" + filename + "): ";
+ TQString fname = filename;
+ const TQString msgPrefix = "NativeImportBase::parseFile(" + filename + "): ";
if (filename.contains('/')) {
- QString path = filename;
- path.remove( QRegExp("/[^/]+$") );
+ TQString path = filename;
+ path.remove( TQRegExp("/[^/]+$") );
kDebug() << msgPrefix << "adding path " << path << endl;
Import_Utils::addIncludePath(path);
}
- if (! QFile::exists(filename)) {
+ if (! TQFile::exists(filename)) {
if (filename.startsWith("/")) {
kError() << msgPrefix << "cannot find file" << endl;
return;
}
bool found = false;
- QStringList includePaths = Import_Utils::includePathList();
- for (QStringList::Iterator pathIt = includePaths.begin();
+ TQStringList includePaths = Import_Utils::includePathList();
+ for (TQStringList::Iterator pathIt = includePaths.begin();
pathIt != includePaths.end(); ++pathIt) {
- QString path = (*pathIt);
+ TQString path = (*pathIt);
if (! path.endsWith("/")) {
path.append("/");
}
- if (QFile::exists(path + filename)) {
+ if (TQFile::exists(path + filename)) {
fname.prepend(path);
found = true;
break;
@@ -298,30 +298,30 @@ void NativeImportBase::parseFile(const QString& filename) {
return;
}
}
- QFile file(fname);
+ TQFile file(fname);
if (! file.open(IO_ReadOnly)) {
kError() << msgPrefix << "cannot open file" << endl;
return;
}
kDebug() << msgPrefix << "parsing." << endl;
- // Scan the input file into the QStringList m_source.
+ // Scan the input file into the TQStringList m_source.
m_source.clear();
m_srcIndex = 0;
initVars();
- QTextStream stream(&file);
+ TQTextStream stream(&file);
while (! stream.atEnd()) {
- QString line = stream.readLine();
+ TQString line = stream.readLine();
scan(line);
}
file.close();
- // Parse the QStringList m_source.
+ // Parse the TQStringList m_source.
m_klass = NULL;
m_currentAccess = Uml::Visibility::Public;
m_scopeIndex = 0;
m_scope[0] = NULL; // index 0 is reserved for global scope
const uint srcLength = m_source.count();
for (m_srcIndex = 0; m_srcIndex < srcLength; m_srcIndex++) {
- const QString& firstToken = m_source[m_srcIndex];
+ const TQString& firstToken = m_source[m_srcIndex];
//kDebug() << '"' << firstToken << '"' << endl;
if (firstToken.startsWith(m_singleLineCommentIntro)) {
m_comment = firstToken.mid(m_singleLineCommentIntro.length());
@@ -329,7 +329,7 @@ void NativeImportBase::parseFile(const QString& filename) {
}
if (! parseStmt())
skipStmt();
- m_comment = QString();
+ m_comment = TQString();
}
kDebug() << msgPrefix << "end of parse." << endl;
}
diff --git a/umbrello/umbrello/codeimport/nativeimportbase.h b/umbrello/umbrello/codeimport/nativeimportbase.h
index cc82fd91..03a78a5c 100644
--- a/umbrello/umbrello/codeimport/nativeimportbase.h
+++ b/umbrello/umbrello/codeimport/nativeimportbase.h
@@ -12,8 +12,8 @@
#ifndef NATIVEIMPORTBASE_H
#define NATIVEIMPORTBASE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "classimport.h"
#include "../umlnamespace.h"
@@ -47,7 +47,7 @@ public:
* Constructor
* @param singleLineCommentIntro "//" for IDL and Java, "--" for Ada
*/
- NativeImportBase(const QString &singleLineCommentIntro);
+ NativeImportBase(const TQString &singleLineCommentIntro);
virtual ~NativeImportBase();
protected:
@@ -64,12 +64,12 @@ protected:
* @param end In languages with a C style multiline comment
* this is star-slash.
*/
- void setMultiLineComment(const QString &intro, const QString &end);
+ void setMultiLineComment(const TQString &intro, const TQString &end);
/**
* Set the delimiter strings for an alternative form of
* multi line comment. See setMultiLineComment().
*/
- void setMultiLineAltComment(const QString &intro, const QString &end);
+ void setMultiLineAltComment(const TQString &intro, const TQString &end);
/**
* Import a single file.
@@ -78,12 +78,12 @@ protected:
*
* @param filename The file to import.
*/
- virtual void parseFile(const QString& filename);
+ virtual void parseFile(const TQString& filename);
/**
* Initialize auxiliary variables.
* This is called by the default implementation of parseFile()
- * after scanning (before parsing the QStringList m_source.)
+ * after scanning (before parsing the TQStringList m_source.)
* The default implementation is empty.
*/
virtual void initVars();
@@ -95,7 +95,7 @@ protected:
*
* @param line The line to scan.
*/
- void scan(QString line);
+ void scan(TQString line);
/**
* Preprocess a line.
@@ -108,21 +108,21 @@ protected:
* false if there are still items left in the line
* for further analysis.
*/
- virtual bool preprocess(QString& line);
+ virtual bool preprocess(TQString& line);
/**
* Split the line so that a string is returned as a single element of the list.
* When not in a string then split at white space.
* The default implementation is suitable for C style strings and char constants.
*/
- virtual QStringList split(const QString& line);
+ virtual TQStringList split(const TQString& line);
/**
* Analyze the given word and fill `m_source'.
* A "word" is a whitespace delimited item from the input line.
* To be provided by the specific importer class.
*/
- virtual void fillSource(const QString& word) = 0;
+ virtual void fillSource(const TQString& word) = 0;
/**
* Parse the statement which starts at m_source[m_srcIndex]
@@ -138,7 +138,7 @@ protected:
* Advance m_srcIndex until m_source[m_srcIndex] contains the lexeme
* given by `until'.
*/
- void skipStmt(QString until = ";");
+ void skipStmt(TQString until = ";");
/**
* Advance m_srcIndex to the index of the corresponding closing character
@@ -148,24 +148,24 @@ protected:
* @return True for success, false for misuse (invalid opener) or
* if no matching closing character is found in m_source.
*/
- bool skipToClosing(QChar opener);
+ bool skipToClosing(TQChar opener);
/**
* Advance m_srcIndex until m_source[m_srcIndex] contains a non-comment.
* Comments encountered during advancement are accumulated in `m_comment'.
- * If m_srcIndex hits the end of m_source then QString::null is returned.
+ * If m_srcIndex hits the end of m_source then TQString::null is returned.
*/
- QString advance();
+ TQString advance();
/**
* How to start a single line comment in this programming language.
*/
- QString m_singleLineCommentIntro;
+ TQString m_singleLineCommentIntro;
/**
* The scanned lexemes.
*/
- QStringList m_source;
+ TQStringList m_source;
/**
* Used for indexing m_source.
*/
@@ -191,7 +191,7 @@ protected:
/**
* Intermediate accumulator for comment text.
*/
- QString m_comment;
+ TQString m_comment;
/**
* True if we are currently in a multi-line comment.
* Only applies to languages with multi-line comments.
@@ -208,19 +208,19 @@ protected:
* whether the name is already present in this list in order to
* avoid parsing the same file multiple times.
*/
- QStringList m_parsedFiles;
+ TQStringList m_parsedFiles;
/**
* Multi line comment delimiters
*/
- QString m_multiLineCommentIntro;
- QString m_multiLineCommentEnd;
+ TQString m_multiLineCommentIntro;
+ TQString m_multiLineCommentEnd;
/**
* Some languages support an alternative set of multi line
* comment delimiters.
*/
- QString m_multiLineAltCommentIntro;
- QString m_multiLineAltCommentEnd;
+ TQString m_multiLineAltCommentIntro;
+ TQString m_multiLineAltCommentEnd;
};
#endif
diff --git a/umbrello/umbrello/codeimport/pascalimport.cpp b/umbrello/umbrello/codeimport/pascalimport.cpp
index ffe291ff..a769571d 100644
--- a/umbrello/umbrello/codeimport/pascalimport.cpp
+++ b/umbrello/umbrello/codeimport/pascalimport.cpp
@@ -14,7 +14,7 @@
#include <stdio.h>
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -41,23 +41,23 @@ void PascalImport::initVars() {
NativeImportBase::m_currentAccess = Uml::Visibility::Public;
}
-void PascalImport::fillSource(const QString& word) {
- QString lexeme;
+void PascalImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- QChar c = word[i];
+ TQChar c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
if (c == ':' && word[i + 1] == '=') {
m_source.append(":=");
i++;
} else {
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
}
@@ -68,7 +68,7 @@ void PascalImport::fillSource(const QString& word) {
void PascalImport::checkModifiers(bool& isVirtual, bool& isAbstract) {
const uint srcLength = m_source.count();
while (m_srcIndex < srcLength - 1) {
- QString lookAhead = m_source[m_srcIndex + 1].lower();
+ TQString lookAhead = m_source[m_srcIndex + 1].lower();
if (lookAhead != "virtual" && lookAhead != "abstract" &&
lookAhead != "override" &&
lookAhead != "register" && lookAhead != "cdecl" &&
@@ -87,12 +87,12 @@ void PascalImport::checkModifiers(bool& isVirtual, bool& isAbstract) {
bool PascalImport::parseStmt() {
const uint srcLength = m_source.count();
- QString keyword = m_source[m_srcIndex].lower();
+ TQString keyword = m_source[m_srcIndex].lower();
//kDebug() << '"' << keyword << '"' << endl;
if (keyword == "uses") {
while (m_srcIndex < srcLength - 1) {
- QString unit = advance();
- const QString& prefix = unit.lower();
+ TQString unit = advance();
+ const TQString& prefix = unit.lower();
if (prefix == "sysutils" || prefix == "types" || prefix == "classes" ||
prefix == "graphics" || prefix == "controls" || prefix == "strings" ||
prefix == "forms" || prefix == "windows" || prefix == "messages" ||
@@ -103,10 +103,10 @@ bool PascalImport::parseStmt() {
break;
continue;
}
- QString filename = unit + ".pas";
+ TQString filename = unit + ".pas";
if (! m_parsedFiles.contains(unit)) {
// Save current m_source and m_srcIndex.
- QStringList source(m_source);
+ TQStringList source(m_source);
uint srcIndex = m_srcIndex;
m_source.clear();
parseFile(filename);
@@ -123,7 +123,7 @@ bool PascalImport::parseStmt() {
return true;
}
if (keyword == "unit") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package, name,
m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = static_cast<UMLPackage*>(ns);
@@ -209,13 +209,13 @@ bool PascalImport::parseStmt() {
checkModifiers(dummyVirtual, dummyAbstract);
return true;
}
- const QString& name = advance();
+ const TQString& name = advance();
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
if (m_source[m_srcIndex + 1] == "(") {
advance();
const uint MAX_PARNAMES = 16;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- QString nextToken = m_source[m_srcIndex + 1].lower();
+ TQString nextToken = m_source[m_srcIndex + 1].lower();
Uml::Parameter_Direction dir = Uml::pd_In;
if (nextToken == "var") {
dir = Uml::pd_InOut;
@@ -226,7 +226,7 @@ bool PascalImport::parseStmt() {
dir = Uml::pd_Out;
advance();
}
- QString parName[MAX_PARNAMES];
+ TQString parName[MAX_PARNAMES];
uint parNameCount = 0;
do {
if (parNameCount >= MAX_PARNAMES) {
@@ -259,7 +259,7 @@ bool PascalImport::parseStmt() {
break;
}
}
- QString returnType;
+ TQString returnType;
if (keyword == "function") {
if (advance() != ":") {
kError() << "importPascal: expecting \":\" at function "
@@ -283,8 +283,8 @@ bool PascalImport::parseStmt() {
return true;
}
if (m_klass == NULL) {
- const QString& name = m_source[m_srcIndex];
- QString nextToken = advance();
+ const TQString& name = m_source[m_srcIndex];
+ TQString nextToken = advance();
if (nextToken != "=") {
kDebug() << "PascalImport::parseStmt(" << name << "): "
<< "expecting '=' at " << nextToken << endl;
@@ -325,15 +325,15 @@ bool PascalImport::parseStmt() {
UMLObject *ns = Import_Utils::createUMLObject(t, name,
m_scope[m_scopeIndex], m_comment);
UMLClassifier *klass = static_cast<UMLClassifier*>(ns);
- m_comment = QString();
- QString lookAhead = m_source[m_srcIndex + 1];
+ m_comment = TQString();
+ TQString lookAhead = m_source[m_srcIndex + 1];
if (lookAhead == "(") {
advance();
do {
- QString base = advance();
+ TQString base = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class, base, NULL);
UMLClassifier *parent = static_cast<UMLClassifier*>(ns);
- m_comment = QString();
+ m_comment = TQString();
Import_Utils::createGeneralization(klass, parent);
} while (advance() == ",");
if (m_source[m_srcIndex] != ")") {
@@ -379,7 +379,7 @@ bool PascalImport::parseStmt() {
skipStmt();
return true;
}
- QString name, stereotype;
+ TQString name, stereotype;
if (keyword == "property") {
stereotype = keyword;
name = advance();
@@ -392,11 +392,11 @@ bool PascalImport::parseStmt() {
skipStmt();
return true;
}
- QString typeName = advance();
- QString initialValue;
+ TQString typeName = advance();
+ TQString initialValue;
if (advance() == "=") {
initialValue = advance();
- QString token;
+ TQString token;
while ((token = advance()) != ";") {
initialValue.append(' ' + token);
}
diff --git a/umbrello/umbrello/codeimport/pascalimport.h b/umbrello/umbrello/codeimport/pascalimport.h
index 975dc423..55c0b2bd 100644
--- a/umbrello/umbrello/codeimport/pascalimport.h
+++ b/umbrello/umbrello/codeimport/pascalimport.h
@@ -38,7 +38,7 @@ protected:
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
/**
* Check for, and skip over, all modifiers following a method.
diff --git a/umbrello/umbrello/codeimport/pythonimport.cpp b/umbrello/umbrello/codeimport/pythonimport.cpp
index af59cf8a..2436699a 100644
--- a/umbrello/umbrello/codeimport/pythonimport.cpp
+++ b/umbrello/umbrello/codeimport/pythonimport.cpp
@@ -13,8 +13,8 @@
#include "pythonimport.h"
// qt/kde includes
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -41,26 +41,26 @@ void PythonImport::initVars() {
m_braceWasOpened = false;
}
-bool PythonImport::preprocess(QString& line) {
+bool PythonImport::preprocess(TQString& line) {
if (NativeImportBase::preprocess(line))
return true;
// Handle single line comment
int pos = line.find(m_singleLineCommentIntro);
if (pos != -1) {
- QString cmnt = line.mid(pos);
+ TQString cmnt = line.mid(pos);
m_source.append(cmnt);
m_srcIndex++;
if (pos == 0)
return true;
line = line.left(pos);
- line.remove( QRegExp("\\s+$") );
+ line.remove( TQRegExp("\\s+$") );
}
// Transform changes in indentation into braces a la C++/Java/Perl/...
- pos = line.find( QRegExp("\\S") );
+ pos = line.find( TQRegExp("\\S") );
if (pos == -1)
return true;
bool isContinuation = false;
- int leadingWhite = line.left(pos).contains( QRegExp("\\s") );
+ int leadingWhite = line.left(pos).contains( TQRegExp("\\s") );
if (leadingWhite > m_srcIndent[m_srcIndentIndex]) {
if (m_srcIndex == 0) {
kError() << "PythonImport::preprocess(): internal error 1" << endl;
@@ -80,7 +80,7 @@ bool PythonImport::preprocess(QString& line) {
}
}
if (line.endsWith(":")) {
- line.replace( QRegExp(":$"), "{" );
+ line.replace( TQRegExp(":$"), "{" );
m_braceWasOpened = true;
} else {
m_braceWasOpened = false;
@@ -90,20 +90,20 @@ bool PythonImport::preprocess(QString& line) {
return false; // The input was not completely consumed by preprocessing.
}
-void PythonImport::fillSource(const QString& word) {
- QString lexeme;
+void PythonImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- const QChar& c = word[i];
+ const TQChar& c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
m_srcIndex++;
- lexeme = QString();
+ lexeme = TQString();
}
- m_source.append(QString(c));
+ m_source.append(TQString(c));
m_srcIndex++;
}
}
@@ -117,7 +117,7 @@ void PythonImport::skipBody() {
if (m_source[m_srcIndex] != "{")
skipStmt("{");
int braceNesting = 0;
- QString token;
+ TQString token;
while (!(token = advance()).isNull()) {
if (token == "}") {
if (braceNesting <= 0)
@@ -131,16 +131,16 @@ void PythonImport::skipBody() {
bool PythonImport::parseStmt() {
const uint srcLength = m_source.count();
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
if (keyword == "class") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
- m_comment = QString();
+ m_comment = TQString();
if (advance() == "(") {
while (m_srcIndex < srcLength - 1 && advance() != ")") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
Import_Utils::createGeneralization(m_klass, baseName);
if (advance() != ",")
break;
@@ -157,7 +157,7 @@ bool PythonImport::parseStmt() {
skipBody();
return true;
}
- const QString& name = advance();
+ const TQString& name = advance();
// operation
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
if (advance() != "(") {
@@ -166,7 +166,7 @@ bool PythonImport::parseStmt() {
return true;
}
while (m_srcIndex < srcLength && advance() != ")") {
- const QString& parName = m_source[m_srcIndex];
+ const TQString& parName = m_source[m_srcIndex];
UMLAttribute *att = Import_Utils::addMethodParameter(op, "string", parName);
if (advance() != ",")
break;
diff --git a/umbrello/umbrello/codeimport/pythonimport.h b/umbrello/umbrello/codeimport/pythonimport.h
index 41fea0d4..d5c62a91 100644
--- a/umbrello/umbrello/codeimport/pythonimport.h
+++ b/umbrello/umbrello/codeimport/pythonimport.h
@@ -38,7 +38,7 @@ protected:
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& line);
+ void fillSource(const TQString& line);
/**
* Reimplement operation from NativeImportBase.
@@ -48,7 +48,7 @@ protected:
* Removal of Python's indentation sensitivity simplifies subsequent
* processing using Umbrello's native import framework.
*/
- bool preprocess(QString& line);
+ bool preprocess(TQString& line);
/**
* Skip ahead to outermost closing brace
diff --git a/umbrello/umbrello/codemethodblock.cpp b/umbrello/umbrello/codemethodblock.cpp
index 4a6e1f6a..c5fc22be 100644
--- a/umbrello/umbrello/codemethodblock.cpp
+++ b/umbrello/umbrello/codemethodblock.cpp
@@ -22,7 +22,7 @@
// Constructors/Destructors
//
-CodeMethodBlock::CodeMethodBlock ( ClassifierCodeDocument * doc, UMLObject * parentObj, const QString & body, const QString & comment)
+CodeMethodBlock::CodeMethodBlock ( ClassifierCodeDocument * doc, UMLObject * parentObj, const TQString & body, const TQString & comment)
: CodeBlockWithComments ((CodeDocument*)doc, body, comment), OwnedCodeBlock (parentObj)
{
initFields();
@@ -46,28 +46,28 @@ CodeDocument * CodeMethodBlock::getParentDocument() {
/**
* Get the starting text that begins this method before the body is printed.
*/
-QString CodeMethodBlock::getStartMethodText() const {
+TQString CodeMethodBlock::getStartMethodText() const {
return m_startMethod;
}
/**
* Get the ending text that finishes this method after the body is printed.
*/
-QString CodeMethodBlock::getEndMethodText() const {
+TQString CodeMethodBlock::getEndMethodText() const {
return m_endMethod;
}
/**
* Set the starting text that begins this method before the body is printed.
*/
-void CodeMethodBlock::setStartMethodText (const QString &value) {
+void CodeMethodBlock::setStartMethodText (const TQString &value) {
m_startMethod = value;
}
/**
* Set the ending text that finishes this method after the body is printed.
*/
-void CodeMethodBlock::setEndMethodText (const QString &value) {
+void CodeMethodBlock::setEndMethodText (const TQString &value) {
m_endMethod = value;
}
@@ -83,7 +83,7 @@ void CodeMethodBlock::release () {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeMethodBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem) {
+void CodeMethodBlock::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & elem) {
// set super-class attributes
CodeBlockWithComments::setAttributesOnNode(doc, elem);
@@ -92,7 +92,7 @@ void CodeMethodBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & el
// set local class attributes
if(getContentType() != AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
elem.setAttribute("startMethodText",encodeText(getStartMethodText(),endLine));
elem.setAttribute("endMethodText",encodeText(getEndMethodText(),endLine));
}
@@ -102,7 +102,7 @@ void CodeMethodBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & el
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeMethodBlock::setAttributesFromNode ( QDomElement & elem) {
+void CodeMethodBlock::setAttributesFromNode ( TQDomElement & elem) {
// set attributes from the XMI
CodeBlockWithComments::setAttributesFromNode(elem); // superclass load
@@ -111,7 +111,7 @@ void CodeMethodBlock::setAttributesFromNode ( QDomElement & elem) {
// now load local attributes
if(getContentType() != AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
setStartMethodText(decodeText(elem.attribute("startMethodText",""),endLine));
setEndMethodText(decodeText(elem.attribute("endMethodText",""),endLine));
}
@@ -135,21 +135,21 @@ void CodeMethodBlock::setAttributesFromObject(TextBlock * obj)
/**
* @return QString
*/
-QString CodeMethodBlock::toString ( ) {
+TQString CodeMethodBlock::toString ( ) {
- QString string = QString("");
+ TQString string = TQString("");
if(getWriteOutText()) {
- QString indent = getIndentationString();
- QString bodyIndent = getIndentationString(getIndentationLevel()+1);
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString bodyIndent = getIndentationString(getIndentationLevel()+1);
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString startMethod = formatMultiLineText ( getStartMethodText(), indent, endLine);
- QString body = formatMultiLineText (getText(), bodyIndent, endLine);
- QString endMethod = formatMultiLineText( getEndMethodText(), indent, endLine);
+ TQString startMethod = formatMultiLineText ( getStartMethodText(), indent, endLine);
+ TQString body = formatMultiLineText (getText(), bodyIndent, endLine);
+ TQString endMethod = formatMultiLineText( getEndMethodText(), indent, endLine);
- QString comment = getComment()->toString();
+ TQString comment = getComment()->toString();
if(!comment.isEmpty() && getComment()->getWriteOutText())
string.append(comment);
@@ -170,8 +170,8 @@ QString CodeMethodBlock::toString ( ) {
void CodeMethodBlock::initFields ( ) {
- m_startMethod = QString("");
- m_endMethod = QString("");
+ m_startMethod = TQString("");
+ m_endMethod = TQString("");
}
void CodeMethodBlock::syncToParent ( )
diff --git a/umbrello/umbrello/codemethodblock.h b/umbrello/umbrello/codemethodblock.h
index 65cbe2e8..41555627 100644
--- a/umbrello/umbrello/codemethodblock.h
+++ b/umbrello/umbrello/codemethodblock.h
@@ -18,7 +18,7 @@
#ifndef CODEMETHODBLOCK_H
#define CODEMETHODBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "ownedcodeblock.h"
#include "codeblockwithcomments.h"
@@ -45,7 +45,7 @@ public:
* Constructors
*/
CodeMethodBlock ( ClassifierCodeDocument * doc, UMLObject * parentObj,
- const QString & body = "", const QString & comment = "");
+ const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
@@ -58,17 +58,17 @@ public:
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/**
* Get the starting text that begins this method before the body is printed.
*/
- QString getStartMethodText () const;
+ TQString getStartMethodText () const;
/**
* Get the ending text that finishes this method after the body is printed.
*/
- QString getEndMethodText () const;
+ TQString getEndMethodText () const;
// get the parent code document
CodeDocument * getParentDocument();
@@ -85,12 +85,12 @@ protected:
/**
* Set the starting text that begins this method before the body is printed.
*/
- void setStartMethodText (const QString &value);
+ void setStartMethodText (const TQString &value);
/**
* Set the ending text that finishes this method after the body is printed.
*/
- void setEndMethodText (const QString &value);
+ void setEndMethodText (const TQString &value);
/** this is the method called from within syncToparent().
* to update the start and end Method text. It is called
@@ -107,12 +107,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
@@ -120,8 +120,8 @@ protected:
private:
- QString m_startMethod;
- QString m_endMethod;
+ TQString m_startMethod;
+ TQString m_endMethod;
void initFields ( );
diff --git a/umbrello/umbrello/codeoperation.cpp b/umbrello/umbrello/codeoperation.cpp
index 3e98af8f..13f5121b 100644
--- a/umbrello/umbrello/codeoperation.cpp
+++ b/umbrello/umbrello/codeoperation.cpp
@@ -32,7 +32,7 @@
// Constructors/Destructors
//
-CodeOperation::CodeOperation ( ClassifierCodeDocument * doc , UMLOperation * parentOp, const QString & body, const QString & comment)
+CodeOperation::CodeOperation ( ClassifierCodeDocument * doc , UMLOperation * parentOp, const TQString & body, const TQString & comment)
: CodeMethodBlock ( doc, parentOp, body, comment)
{
init(parentOp);
@@ -67,11 +67,11 @@ void CodeOperation::removeParameter ( CodeParameter * remove_object ) {
/**
* Get the list of Parameter objects held by m_parameterVector
- * @return QPtrList<CodeParameter *> list of Parameter objects held by
+ * @return TQPtrList<CodeParameter *> list of Parameter objects held by
* m_parameterVector
*/
/*
-QPtrList<CodeParameter> CodeOperation::getParameterList ( ) {
+TQPtrList<CodeParameter> CodeOperation::getParameterList ( ) {
return m_parameterVector;
}
*/
@@ -88,8 +88,8 @@ UMLOperation * CodeOperation::getParentOperation( ) {
/** Save the XMI representation of this object
*/
-void CodeOperation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "codeoperation" );
+void CodeOperation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "codeoperation" );
// set attributes
setAttributesOnNode(doc, blockElement);
@@ -100,19 +100,19 @@ void CodeOperation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* load params from the appropriate XMI element node.
*/
-void CodeOperation::loadFromXMI ( QDomElement & root )
+void CodeOperation::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
-QString CodeOperation::findTag (UMLOperation * op) {
- return QString("operation_" + ID2STR(op->getID()));
+TQString CodeOperation::findTag (UMLOperation * op) {
+ return TQString("operation_" + ID2STR(op->getID()));
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeOperation::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem)
+void CodeOperation::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & elem)
{
CodeMethodBlock::setAttributesOnNode(doc,elem); // superclass
@@ -122,7 +122,7 @@ void CodeOperation::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeOperation::setAttributesFromNode ( QDomElement & element)
+void CodeOperation::setAttributesFromNode ( TQDomElement & element)
{
CodeMethodBlock::setAttributesFromNode(element); // superclass
@@ -133,7 +133,7 @@ void CodeOperation::setAttributesFromNode ( QDomElement & element)
// we simply need to record the parent operation here
// m_parentOperation->disconnect(this); // always disconnect from current parent
- QString idStr = element.attribute("parent_id","-1");
+ TQString idStr = element.attribute("parent_id","-1");
Uml::IDType id = STR2ID(idStr);
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(id);
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
@@ -163,7 +163,7 @@ void CodeOperation::init (UMLOperation * parentOp)
setTag(CodeOperation::findTag(parentOp));
// not needed.. done by parent "ownedcodeblock" class
- // connect(parentOp,SIGNAL(modified()),this,SLOT(syncToParent()));
+ // connect(parentOp,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
diff --git a/umbrello/umbrello/codeoperation.h b/umbrello/umbrello/codeoperation.h
index abe97e75..7ac63dd3 100644
--- a/umbrello/umbrello/codeoperation.h
+++ b/umbrello/umbrello/codeoperation.h
@@ -17,7 +17,7 @@
#ifndef CODEOPERATION_H
#define CODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codemethodblock.h"
#include "operation.h"
@@ -36,7 +36,7 @@ public:
* Constructors
*/
CodeOperation ( ClassifierCodeDocument * doc , UMLOperation * parent,
- const QString & body = "", const QString & comment = "");
+ const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
@@ -51,16 +51,16 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** Find the value of the tag that this operation would have.
*/
- static QString findTag (UMLOperation * op) ;
+ static TQString findTag (UMLOperation * op) ;
/** set the class attributes from a passed object
*/
@@ -69,17 +69,17 @@ public:
protected:
// list of parameters used by this code operation.
- // QPtrList<CodeParameter> m_parameterVector;
+ // TQPtrList<CodeParameter> m_parameterVector;
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration() = 0;
virtual void updateContent();
diff --git a/umbrello/umbrello/codeparameter.cpp b/umbrello/umbrello/codeparameter.cpp
index f2f429fa..5ee7345c 100644
--- a/umbrello/umbrello/codeparameter.cpp
+++ b/umbrello/umbrello/codeparameter.cpp
@@ -34,7 +34,7 @@
//
CodeParameter::CodeParameter ( ClassifierCodeDocument * parentDoc, UMLObject * parentObject )
- : QObject ( (QObject*) parentObject, "ACodeParam")
+ : TQObject ( (TQObject*) parentObject, "ACodeParam")
{
initFields( parentDoc, parentObject );
}
@@ -71,7 +71,7 @@ bool CodeParameter::getStatic ( ) {
* The name of this code parameter.
* @return the value
*/
-QString CodeParameter::getName ( ) const {
+TQString CodeParameter::getName ( ) const {
return m_parentObject->getName();
}
@@ -81,7 +81,7 @@ QString CodeParameter::getName ( ) const {
* an object)
* @return the value of type
*/
-QString CodeParameter::getTypeName ( ) {
+TQString CodeParameter::getTypeName ( ) {
UMLAttribute * at = (UMLAttribute*) m_parentObject;
return at->getTypeName();
}
@@ -100,7 +100,7 @@ Uml::Visibility CodeParameter::getVisibility ( ) const {
* The initial value of this code parameter
* @param new_var the new value of m_initialValue
*/
-void CodeParameter::setInitialValue ( const QString &new_var ) {
+void CodeParameter::setInitialValue ( const TQString &new_var ) {
m_initialValue = new_var;
}
@@ -109,7 +109,7 @@ void CodeParameter::setInitialValue ( const QString &new_var ) {
* The initial value of this code parameter
* @return the value of m_initialValue
*/
-QString CodeParameter::getInitialValue ( ) {
+TQString CodeParameter::getInitialValue ( ) {
return m_initialValue;
}
@@ -141,7 +141,7 @@ UMLObject * CodeParameter::getParentObject ( ) {
// need to get the ID of the parent object
// this is kind of broken for UMLRoles.
-QString CodeParameter::getID () {
+TQString CodeParameter::getID () {
UMLRole * role = dynamic_cast<UMLRole*>(m_parentObject);
if(role)
{
@@ -157,7 +157,7 @@ QString CodeParameter::getID () {
// Other methods
//
-void CodeParameter::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void CodeParameter::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
@@ -176,7 +176,7 @@ void CodeParameter::setAttributesOnNode ( QDomDocument & doc, QDomElement & bloc
blockElement.setAttribute("initialValue",getInitialValue());
// a comment which we will store in its own separate child node block
- QDomElement commElement = doc.createElement( "header" );
+ TQDomElement commElement = doc.createElement( "header" );
getComment()->saveToXMI(doc, commElement); // comment
blockElement.appendChild( commElement);
@@ -185,10 +185,10 @@ void CodeParameter::setAttributesOnNode ( QDomDocument & doc, QDomElement & bloc
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeParameter::setAttributesFromNode ( QDomElement & root) {
+void CodeParameter::setAttributesFromNode ( TQDomElement & root) {
// set local attributes, parent object first
- QString idStr = root.attribute("parent_id","-1");
+ TQString idStr = root.attribute("parent_id","-1");
Uml::IDType id = STR2ID(idStr);
// always disconnect
@@ -238,14 +238,14 @@ void CodeParameter::setAttributesFromNode ( QDomElement & root) {
// load comment now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
bool gotComment = false;
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "header" ) {
- QDomNode cnode = element.firstChild();
- QDomElement celem = cnode.toElement();
+ TQDomNode cnode = element.firstChild();
+ TQDomElement celem = cnode.toElement();
getComment()->loadFromXMI(celem);
gotComment = true;
break;
@@ -276,12 +276,12 @@ void CodeParameter::initFields ( ClassifierCodeDocument * doc, UMLObject * obj)
m_parentObject = obj;
m_parentDocument = doc;
- m_initialValue = QString("");
+ m_initialValue = TQString("");
m_comment = CodeGenFactory::newCodeComment(m_parentDocument);
m_comment->setText(getParentObject()->getDoc());
- connect(m_parentObject,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(m_parentObject,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
#include "codeparameter.moc"
diff --git a/umbrello/umbrello/codeparameter.h b/umbrello/umbrello/codeparameter.h
index 8ee4dc45..05fa96f8 100644
--- a/umbrello/umbrello/codeparameter.h
+++ b/umbrello/umbrello/codeparameter.h
@@ -82,7 +82,7 @@ public:
* The name of this code parameter.
* @return the value of parameter name
*/
- QString getName ( ) const;
+ TQString getName ( ) const;
/**
* Get the value of m_typeName
@@ -90,7 +90,7 @@ public:
* an object)
* @return the value of m_typeName
*/
- virtual QString getTypeName ( );
+ virtual TQString getTypeName ( );
/**
* Get the value of m_visibility
@@ -104,14 +104,14 @@ public:
* The initial value of this code parameter
* @param new_var the new value of m_initialValue
*/
- virtual void setInitialValue ( const QString &new_var );
+ virtual void setInitialValue ( const TQString &new_var );
/**
* Get the value of m_initialValue
* The initial value of this code parameter
* @return the value of m_initialValue
*/
- virtual QString getInitialValue ( );
+ virtual TQString getInitialValue ( );
/**
* Set a Comment
@@ -124,7 +124,7 @@ public:
CodeComment * getComment ( );
// the id of this parameter is the same as the parent UMLObject id.
- QString getID ();
+ TQString getID ();
protected:
@@ -133,12 +133,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
private:
@@ -147,7 +147,7 @@ private:
CodeComment * m_comment;
// The initial value of this code parameter
- QString m_initialValue;
+ TQString m_initialValue;
void initFields ( ClassifierCodeDocument * doc, UMLObject * obj);
diff --git a/umbrello/umbrello/codeviewerstate.h b/umbrello/umbrello/codeviewerstate.h
index 0a45fce9..aab0f60b 100644
--- a/umbrello/umbrello/codeviewerstate.h
+++ b/umbrello/umbrello/codeviewerstate.h
@@ -12,8 +12,8 @@
#ifndef CODEVIEWERSTATE_H
#define CODEVIEWERSTATE_H
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
namespace Settings {
@@ -23,14 +23,14 @@ struct CodeViewerState {
int width;
bool showHiddenBlocks;
bool blocksAreHighlighted;
- QFont font;
- QColor paperColor;
- QColor fontColor;
- QColor selectedColor;
- QColor editBlockColor;
- QColor nonEditBlockColor;
- QColor umlObjectColor;
- QColor hiddenColor;
+ TQFont font;
+ TQColor paperColor;
+ TQColor fontColor;
+ TQColor selectedColor;
+ TQColor editBlockColor;
+ TQColor nonEditBlockColor;
+ TQColor umlObjectColor;
+ TQColor hiddenColor;
};
}
diff --git a/umbrello/umbrello/component.cpp b/umbrello/umbrello/component.cpp
index 6c8f674b..eb69ccd1 100644
--- a/umbrello/umbrello/component.cpp
+++ b/umbrello/umbrello/component.cpp
@@ -20,7 +20,7 @@
#include "model_utils.h"
#include "clipboard/idchangelog.h"
-UMLComponent::UMLComponent(const QString & name, Uml::IDType id)
+UMLComponent::UMLComponent(const TQString & name, Uml::IDType id)
: UMLPackage(name, id) {
init();
}
@@ -39,12 +39,12 @@ UMLObject* UMLComponent::clone() const {
return clone;
}
-void UMLComponent::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement componentElement = UMLObject::save("UML:Component", qDoc);
+void UMLComponent::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement componentElement = UMLObject::save("UML:Component", qDoc);
componentElement.setAttribute("executable", m_executable);
// Save contained components if any.
if (m_objects.count()) {
- QDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
+ TQDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
for (UMLObject *obj = m_objects.first(); obj; obj = m_objects.next())
obj->saveToXMI (qDoc, ownedElement);
componentElement.appendChild(ownedElement);
@@ -52,15 +52,15 @@ void UMLComponent::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(componentElement);
}
-bool UMLComponent::load(QDomElement& element) {
- QString executable = element.attribute("executable", "0");
+bool UMLComponent::load(TQDomElement& element) {
+ TQString executable = element.attribute("executable", "0");
m_executable = (bool)executable.toInt();
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (Uml::tagEq(type, "Namespace.ownedElement") ||
diff --git a/umbrello/umbrello/component.h b/umbrello/umbrello/component.h
index 014cf39e..c67495ab 100644
--- a/umbrello/umbrello/component.h
+++ b/umbrello/umbrello/component.h
@@ -36,7 +36,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLComponent(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLComponent(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -57,7 +57,7 @@ public:
* Creates the UML:Component element including its operations,
* attributes and templates
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* sets m_executable
@@ -74,7 +74,7 @@ protected:
* Loads the UML:Component element including its operations,
* attributes and templates
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
/**
diff --git a/umbrello/umbrello/componentwidget.cpp b/umbrello/umbrello/componentwidget.cpp
index f4c38270..84bae8b0 100644
--- a/umbrello/umbrello/componentwidget.cpp
+++ b/umbrello/umbrello/componentwidget.cpp
@@ -13,7 +13,7 @@
#include "componentwidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
// app includes
#include <kdebug.h>
@@ -45,13 +45,13 @@ void ComponentWidget::init() {
ComponentWidget::~ComponentWidget() {}
-void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ComponentWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLComponent *umlcomp = static_cast<UMLComponent*>(m_pObject);
if (umlcomp == NULL)
return;
UMLWidget::setPen(p);
if ( umlcomp->getExecutable() ) {
- QPen thickerPen = p.pen();
+ TQPen thickerPen = p.pen();
thickerPen.setWidth(2);
p.setPen(thickerPen);
}
@@ -63,18 +63,18 @@ void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
- const QString stereotype = m_pObject->getStereotype();
+ TQString name = getName();
+ const TQString stereotype = m_pObject->getStereotype();
p.drawRect(offsetX + 2*COMPONENT_MARGIN, offsetY, w - 2*COMPONENT_MARGIN, h);
p.drawRect(offsetX, offsetY + h/2 - fontHeight/2 - fontHeight, COMPONENT_MARGIN*4, fontHeight);
p.drawRect(offsetX, offsetY + h/2 + fontHeight/2, COMPONENT_MARGIN*4, fontHeight);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
@@ -105,14 +105,14 @@ void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize ComponentWidget::calculateSize() {
+TQSize ComponentWidget::calculateSize() {
if ( !m_pObject) {
- return QSize(70, 70);
+ return TQSize(70, 70);
}
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
- QString name = m_pObject->getName();
+ TQString name = m_pObject->getName();
if ( UMLWidget::getIsInstance() ) {
name = UMLWidget::getInstanceName() + " : " + name;
}
@@ -130,11 +130,11 @@ QSize ComponentWidget::calculateSize() {
int height = (2*fontHeight) + (COMPONENT_MARGIN * 3);
- return QSize(width, height);
+ return TQSize(width, height);
}
-void ComponentWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("componentwidget");
+void ComponentWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("componentwidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/componentwidget.h b/umbrello/umbrello/componentwidget.h
index 7266ef01..d07b0536 100644
--- a/umbrello/umbrello/componentwidget.h
+++ b/umbrello/umbrello/componentwidget.h
@@ -46,18 +46,18 @@ public:
/**
* Overrides standard method
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "componentwidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
diff --git a/umbrello/umbrello/configurable.cpp b/umbrello/umbrello/configurable.cpp
index 5aaec43c..2b2447b3 100644
--- a/umbrello/umbrello/configurable.cpp
+++ b/umbrello/umbrello/configurable.cpp
@@ -19,7 +19,7 @@
#include "configurable.h"
// Qt includes
-#include <qstringlist.h>
+#include <tqstringlist.h>
// KDE includes
#include <kdebug.h>
@@ -45,13 +45,13 @@ Configurable::~Configurable()
bool
Configurable::loadPlugins(KConfig *config,
- const QString &key)
+ const TQString &key)
{
bool ret = true;
- QStringList names = config->readListEntry(key);
+ TQStringList names = config->readListEntry(key);
for(uint i = 0; i != names.size(); i++) {
- const QString &name = names[i];
+ const TQString &name = names[i];
kdDebug() << "loading plugin " << name << endl;
diff --git a/umbrello/umbrello/configurable.h b/umbrello/umbrello/configurable.h
index 8debcba1..e26c4e87 100644
--- a/umbrello/umbrello/configurable.h
+++ b/umbrello/umbrello/configurable.h
@@ -19,8 +19,8 @@
#ifndef UMBRELLO_CONFIGURABLE_H
#define UMBRELLO_CONFIGURABLE_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
// forward declarations
class KLibrary;
@@ -97,7 +97,7 @@ protected:
*
* @return True on success, false on failure.
*/
- bool loadPlugins(KConfig *config, const QString &key);
+ bool loadPlugins(KConfig *config, const TQString &key);
/**
* This is a convenience method for derived classes. When a functional object
@@ -109,7 +109,7 @@ protected:
bool unloadPlugins();
private:
- typedef QPtrList<Plugin> PluginList;
+ typedef TQPtrList<Plugin> PluginList;
PluginList _plugins; ///< List of loaded plugins
};
diff --git a/umbrello/umbrello/datatypewidget.cpp b/umbrello/umbrello/datatypewidget.cpp
index 33509b95..4e8aef78 100644
--- a/umbrello/umbrello/datatypewidget.cpp
+++ b/umbrello/umbrello/datatypewidget.cpp
@@ -13,7 +13,7 @@
#include "datatypewidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -39,7 +39,7 @@ void DatatypeWidget::init() {
m_pMenu = 0;
}
-void DatatypeWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void DatatypeWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if (UMLWidget::getUseFillColour()) {
p.setBrush(UMLWidget::getFillColour());
@@ -50,14 +50,14 @@ void DatatypeWidget::draw(QPainter& p, int offsetX, int offsetY) {
int w = width();
int h = height();
- QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
int fontHeight = fm.lineSpacing();
- QString name = getName();
+ TQString name = getName();
p.drawRect(offsetX, offsetY, w, h);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
p.setFont(font);
p.drawText(offsetX + DATATYPE_MARGIN, offsetY,
@@ -74,12 +74,12 @@ void DatatypeWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize DatatypeWidget::calculateSize() {
+TQSize DatatypeWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
int width, height;
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
int lines = 1;//always have one line - for name
@@ -99,16 +99,16 @@ QSize DatatypeWidget::calculateSize() {
//allow for width margin
width += DATATYPE_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void DatatypeWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement conceptElement = qDoc.createElement("datatypewidget");
+void DatatypeWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement conceptElement = qDoc.createElement("datatypewidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
-bool DatatypeWidget::loadFromXMI( QDomElement & qElement ) {
+bool DatatypeWidget::loadFromXMI( TQDomElement & qElement ) {
return UMLWidget::loadFromXMI(qElement);
}
diff --git a/umbrello/umbrello/datatypewidget.h b/umbrello/umbrello/datatypewidget.h
index fb60d536..81a53ca6 100644
--- a/umbrello/umbrello/datatypewidget.h
+++ b/umbrello/umbrello/datatypewidget.h
@@ -46,23 +46,23 @@ public:
/**
* Overrides standard method.
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "datatypewidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads from a "datatypewidget" XMI element.
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
diff --git a/umbrello/umbrello/dialog_utils.cpp b/umbrello/umbrello/dialog_utils.cpp
index a6d1ff2c..43e92a93 100644
--- a/umbrello/umbrello/dialog_utils.cpp
+++ b/umbrello/umbrello/dialog_utils.cpp
@@ -13,10 +13,10 @@
#include "dialog_utils.h"
// qt/kde includes
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <kinputdialog.h>
// app includes
@@ -25,26 +25,26 @@
namespace Dialog_Utils {
-QLineEdit* makeLabeledEditField(QGroupBox *containingBox, QGridLayout *layout, int row,
- QLabel * &label, const QString& labelText,
- QLineEdit * &editField,
- const QString& editFieldText /* = QString::null */)
+TQLineEdit* makeLabeledEditField(TQGroupBox *containingBox, TQGridLayout *layout, int row,
+ TQLabel * &label, const TQString& labelText,
+ TQLineEdit * &editField,
+ const TQString& editFieldText /* = TQString::null */)
{
- label = new QLabel(labelText, containingBox);
+ label = new TQLabel(labelText, containingBox);
layout->addWidget(label, row, 0);
- editField = new QLineEdit(editFieldText, containingBox);
+ editField = new TQLineEdit(editFieldText, containingBox);
layout->addWidget(editField, row, 1 );
label->setBuddy(editField);
return editField;
}
-void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
- const QString& dialogPrompt, const QString& defaultName) {
+void askNameForWidget(UMLWidget * &targetWidget, const TQString& dialogTitle,
+ const TQString& dialogPrompt, const TQString& defaultName) {
bool pressedOK = false;
- QString name = KInputDialog::getText(dialogTitle, dialogPrompt, defaultName, &pressedOK, UMLApp::app());
+ TQString name = KInputDialog::getText(dialogTitle, dialogPrompt, defaultName, &pressedOK, UMLApp::app());
if (pressedOK) {
targetWidget->setName(name);
diff --git a/umbrello/umbrello/dialog_utils.h b/umbrello/umbrello/dialog_utils.h
index a414a7a7..0ee2f59a 100644
--- a/umbrello/umbrello/dialog_utils.h
+++ b/umbrello/umbrello/dialog_utils.h
@@ -12,7 +12,7 @@
#ifndef DIALOG_UTILS_H
#define DIALOG_UTILS_H
-#include <qstring.h>
+#include <tqstring.h>
class QGroupBox;
class QGridLayout;
@@ -30,19 +30,19 @@ namespace Dialog_Utils {
/**
* Create a labeled text lineedit widget.
*
- * @param containingBox The containing QGroupBox.
- * @param layout The QGridLayout to use.
- * @param row The row number within the QGridLayout.
- * @param label The QLabel object allocated (return value)
+ * @param containingBox The containing TQGroupBox.
+ * @param layout The TQGridLayout to use.
+ * @param row The row number within the TQGridLayout.
+ * @param label The TQLabel object allocated (return value)
* @param labelText The label text.
- * @param editField The QLineEdit object allocated (return value)
+ * @param editField The TQLineEdit object allocated (return value)
* @param editFieldText Initialization text in the editField (optional.)
- * @return a pointer to the QLineEdit so you can setFocus() if necessary
+ * @return a pointer to the TQLineEdit so you can setFocus() if necessary
*/
-QLineEdit* makeLabeledEditField(QGroupBox *containingBox, QGridLayout *layout, int row,
- QLabel * &label, const QString& labelText,
- QLineEdit * &editField,
- const QString& editFieldText = QString::null);
+TQLineEdit* makeLabeledEditField(TQGroupBox *containingBox, TQGridLayout *layout, int row,
+ TQLabel * &label, const TQString& labelText,
+ TQLineEdit * &editField,
+ const TQString& editFieldText = TQString::null);
/**
* Helper function for requesting a name for an UMLWidget using a dialog.
@@ -54,8 +54,8 @@ QLineEdit* makeLabeledEditField(QGroupBox *containingBox, QGridLayout *layout, i
* @param dialogPrompt Prompt of the dialog.
* @param defaultName Default value of the name field.
*/
-void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
- const QString& dialogPrompt, const QString& defaultName);
+void askNameForWidget(UMLWidget * &targetWidget, const TQString& dialogTitle,
+ const TQString& dialogPrompt, const TQString& defaultName);
}
diff --git a/umbrello/umbrello/dialogs/activitydialog.cpp b/umbrello/umbrello/dialogs/activitydialog.cpp
index d34782a5..ed7f779e 100644
--- a/umbrello/umbrello/dialogs/activitydialog.cpp
+++ b/umbrello/umbrello/dialogs/activitydialog.cpp
@@ -13,7 +13,7 @@
#include "activitydialog.h"
//qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
//kde includes
#include <kiconloader.h>
@@ -67,17 +67,17 @@ void ActivityDialog::applyPage( Page page ) {
}
void ActivityDialog::setupGeneralPage() {
- QString types[ ] = { i18n("Initial activity"), i18n("Activity"), i18n("End activity"), i18n( "Branch/Merge"), i18n( "Fork/Join" ) };
+ TQString types[ ] = { i18n("Initial activity"), i18n("Activity"), i18n("End activity"), i18n( "Branch/Merge"), i18n( "Fork/Join" ) };
ActivityWidget::ActivityType type = m_pActivityWidget -> getActivityType();
- QVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
- m_GenPageWidgets.generalGB = new QGroupBox( i18n( "Properties"), (QWidget *)page );
+ TQVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
+ m_GenPageWidgets.generalGB = new TQGroupBox( i18n( "Properties"), (TQWidget *)page );
- QGridLayout * generalLayout = new QGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
+ TQGridLayout * generalLayout = new TQGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
generalLayout -> setSpacing( spacingHint() );
generalLayout -> setMargin( fontMetrics().height() );
- QString actType ( types[ (int)type ] );
+ TQString actType ( types[ (int)type ] );
Dialog_Utils::makeLabeledEditField( m_GenPageWidgets.generalGB, generalLayout, 0,
m_GenPageWidgets.typeL, i18n("Activity type:"),
m_GenPageWidgets.typeLE, actType );
@@ -87,13 +87,13 @@ void ActivityDialog::setupGeneralPage() {
m_GenPageWidgets.nameL, i18n("Activity name:"),
m_GenPageWidgets.nameLE );
- m_GenPageWidgets.docGB = new QGroupBox( i18n( "Documentation"), (QWidget *)page );
+ m_GenPageWidgets.docGB = new TQGroupBox( i18n( "Documentation"), (TQWidget *)page );
- QHBoxLayout * docLayout = new QHBoxLayout( m_GenPageWidgets.docGB );
+ TQHBoxLayout * docLayout = new TQHBoxLayout( m_GenPageWidgets.docGB );
docLayout -> setSpacing( spacingHint() );
docLayout -> setMargin( fontMetrics().height() );
- m_GenPageWidgets.docMLE = new QMultiLineEdit( m_GenPageWidgets.docGB );
+ m_GenPageWidgets.docMLE = new TQMultiLineEdit( m_GenPageWidgets.docGB );
m_GenPageWidgets.docMLE -> setText( m_pActivityWidget -> getDoc() );
docLayout -> addWidget( m_GenPageWidgets.docMLE );
@@ -105,14 +105,14 @@ void ActivityDialog::setupGeneralPage() {
}
void ActivityDialog::setupFontPage() {
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pActivityWidget -> getFont() );
}
void ActivityDialog::setupColorPage() {
- QFrame * colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame * colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage( colorPage, m_pActivityWidget );
m_pColorLayout -> addWidget(m_pColorPage);
}
diff --git a/umbrello/umbrello/dialogs/activitydialog.h b/umbrello/umbrello/dialogs/activitydialog.h
index 4dc5980b..ccc746c3 100644
--- a/umbrello/umbrello/dialogs/activitydialog.h
+++ b/umbrello/umbrello/dialogs/activitydialog.h
@@ -13,10 +13,10 @@
#define ACTIVITYDIALOG_H
//qt class includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmultilineedit.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmultilineedit.h>
+#include <tqgroupbox.h>
//kde class includes
#include <kdialogbase.h>
@@ -124,11 +124,11 @@ protected:
bool m_bChangesMade;
struct GeneralPageWidgets {
- QLabel * nameL, * typeL;
- QLineEdit * nameLE, * typeLE;
- QMultiLineEdit * docMLE;
+ TQLabel * nameL, * typeL;
+ TQLineEdit * nameLE, * typeLE;
+ TQMultiLineEdit * docMLE;
- QGroupBox * docGB, * generalGB;
+ TQGroupBox * docGB, * generalGB;
}
m_GenPageWidgets;
};
diff --git a/umbrello/umbrello/dialogs/activitypage.cpp b/umbrello/umbrello/dialogs/activitypage.cpp
index 8d3f5931..5a728576 100644
--- a/umbrello/umbrello/dialogs/activitypage.cpp
+++ b/umbrello/umbrello/dialogs/activitypage.cpp
@@ -18,10 +18,10 @@
#include <klocale.h>
#include <kbuttonbox.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
-ActivityPage::ActivityPage( QWidget * pParent, StateWidget * pWidget ) : QWidget( pParent ) {
+ActivityPage::ActivityPage( TQWidget * pParent, StateWidget * pWidget ) : TQWidget( pParent ) {
m_pStateWidget = pWidget;
m_pMenu = 0;
setupPage();
@@ -32,24 +32,24 @@ ActivityPage::~ActivityPage() {}
void ActivityPage::setupPage() {
int margin = fontMetrics().height();
- QVBoxLayout * mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( this );
mainLayout -> setSpacing(10);
- m_pActivityGB = new QGroupBox(i18n("Activities"), this );
+ m_pActivityGB = new TQGroupBox(i18n("Activities"), this );
// vertical box layout for the activity lists, arrow buttons and the button box
- QVBoxLayout* listVBoxLayout = new QVBoxLayout( m_pActivityGB );
+ TQVBoxLayout* listVBoxLayout = new TQVBoxLayout( m_pActivityGB );
listVBoxLayout -> setMargin(margin);
listVBoxLayout -> setSpacing ( 10 );
//horizontal box contains the list box and the move up/down buttons
- QHBoxLayout* listHBoxLayout = new QHBoxLayout( listVBoxLayout );
+ TQHBoxLayout* listHBoxLayout = new TQHBoxLayout( listVBoxLayout );
- m_pActivityLB = new QListBox(m_pActivityGB );
+ m_pActivityLB = new TQListBox(m_pActivityGB );
listHBoxLayout -> addWidget(m_pActivityLB);
- QVBoxLayout * buttonLayout = new QVBoxLayout( listHBoxLayout );
+ TQVBoxLayout * buttonLayout = new TQVBoxLayout( listHBoxLayout );
m_pTopArrowB = new KArrowButton( m_pActivityGB );
m_pTopArrowB -> setEnabled( false );
@@ -69,42 +69,42 @@ void ActivityPage::setupPage() {
KButtonBox* buttonBox = new KButtonBox(m_pActivityGB);
- buttonBox->addButton( i18n("New Activity..."), this, SLOT(slotNewActivity()) );
+ buttonBox->addButton( i18n("New Activity..."), this, TQT_SLOT(slotNewActivity()) );
m_pDeleteActivityButton = buttonBox->addButton( i18n("Delete"),
- this, SLOT(slotDelete()) );
- m_pRenameButton = buttonBox->addButton( i18n("Rename"), this, SLOT(slotRename()) );
+ this, TQT_SLOT(slotDelete()) );
+ m_pRenameButton = buttonBox->addButton( i18n("Rename"), this, TQT_SLOT(slotRename()) );
listVBoxLayout->addWidget(buttonBox);
mainLayout -> addWidget( m_pActivityGB );
//now fill activity list box
- QStringList list = m_pStateWidget -> getActivityList();
- QStringList::Iterator end(list.end());
+ TQStringList list = m_pStateWidget -> getActivityList();
+ TQStringList::Iterator end(list.end());
- for( QStringList::Iterator it(list.begin()); it != end; ++it ) {
+ for( TQStringList::Iterator it(list.begin()); it != end; ++it ) {
m_pActivityLB -> insertItem( *it );
}
//now setup the signals
- connect(m_pActivityLB, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotClicked(QListBoxItem *)));
- connect(m_pActivityLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pActivityLB, TQT_SIGNAL(clicked(TQListBoxItem *)), this, TQT_SLOT(slotClicked(TQListBoxItem *)));
+ connect(m_pActivityLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pActivityLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pActivityLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
- connect( m_pTopArrowB, SIGNAL( clicked() ), this, SLOT( slotTopClicked() ) );
- connect( m_pUpArrowB, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
- connect( m_pDownArrowB, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
- connect( m_pBottomArrowB, SIGNAL( clicked() ), this, SLOT( slotBottomClicked() ) );
+ connect( m_pTopArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTopClicked() ) );
+ connect( m_pUpArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
+ connect( m_pDownArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
+ connect( m_pBottomArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBottomClicked() ) );
- connect( m_pActivityLB, SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( slotDoubleClicked( QListBoxItem* ) ) );
+ connect( m_pActivityLB, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ), this, TQT_SLOT( slotDoubleClicked( TQListBoxItem* ) ) );
enableWidgets(false);
}
void ActivityPage::updateActivities() {
- QStringList list;
+ TQStringList list;
int count = m_pActivityLB -> count();
for( int i = 0; i < count; i++ ) {
list.append( m_pActivityLB -> text( i ) );
@@ -130,7 +130,7 @@ void ActivityPage::slotMenuSelection( int sel ) {
void ActivityPage::slotNewActivity() {
bool ok = false;
- QString name = m_pActivityLB->currentText();
+ TQString name = m_pActivityLB->currentText();
name = KInputDialog::getText( i18n("New Activity"), i18n("Enter the name of the new activity:"),
i18n("new activity"), &ok, UMLApp::app() );
if( ok && name.length() > 0 ) {
@@ -140,7 +140,7 @@ void ActivityPage::slotNewActivity() {
}
void ActivityPage::slotDelete() {
- QString name = m_pActivityLB->currentText();
+ TQString name = m_pActivityLB->currentText();
m_pStateWidget->removeActivity(name);
m_pActivityLB->removeItem( m_pActivityLB->currentItem() );
slotClicked(0);
@@ -148,8 +148,8 @@ void ActivityPage::slotDelete() {
void ActivityPage::slotRename() {
bool ok = false;
- QString name = m_pActivityLB -> currentText();
- QString oldName = name;
+ TQString name = m_pActivityLB -> currentText();
+ TQString oldName = name;
name = KInputDialog::getText( i18n("Rename Activity"), i18n("Enter the new name of the activity:"), name, &ok, UMLApp::app() );
if( ok && name.length() > 0 ) {
m_pActivityLB -> changeItem( name, m_pActivityLB -> currentItem());
@@ -157,16 +157,16 @@ void ActivityPage::slotRename() {
}
}
-void ActivityPage::slotRightButtonClicked(QListBoxItem * /*item*/, const QPoint &/* p*/) {
+void ActivityPage::slotRightButtonClicked(TQListBoxItem * /*item*/, const TQPoint &/* p*/) {
if(m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void ActivityPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p)
+void ActivityPage::slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p)
{
ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined;
if( item ) { //pressed on an item
@@ -177,13 +177,13 @@ void ActivityPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p)
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
}
@@ -195,11 +195,11 @@ void ActivityPage::slotTopClicked() {
return;
//swap the text around in the ListBox
- QString currentString = m_pActivityLB->text( index );
+ TQString currentString = m_pActivityLB->text( index );
m_pActivityLB->removeItem( index );
m_pActivityLB->insertItem( currentString, 0 );
//set the moved item selected
- QListBoxItem* item = m_pActivityLB->item( 0 );
+ TQListBoxItem* item = m_pActivityLB->item( 0 );
m_pActivityLB->setSelected( item, true );
slotClicked(item);
@@ -214,12 +214,12 @@ void ActivityPage::slotUpClicked() {
}
//swap the text around ( meaning attributes )
- QString aboveString = m_pActivityLB -> text( index - 1 );
- QString currentString = m_pActivityLB -> text( index );
+ TQString aboveString = m_pActivityLB -> text( index - 1 );
+ TQString currentString = m_pActivityLB -> text( index );
m_pActivityLB -> changeItem( currentString, index -1 );
m_pActivityLB -> changeItem( aboveString, index );
//set the moved atttribute selected
- QListBoxItem * item = m_pActivityLB -> item( index - 1 );
+ TQListBoxItem * item = m_pActivityLB -> item( index - 1 );
m_pActivityLB -> setSelected( item, true );
slotClicked(item);
}
@@ -233,12 +233,12 @@ void ActivityPage::slotDownClicked() {
}
//swap the text around ( meaning attributes )
- QString belowString = m_pActivityLB -> text( index + 1 );
- QString currentString = m_pActivityLB -> text( index );
+ TQString belowString = m_pActivityLB -> text( index + 1 );
+ TQString currentString = m_pActivityLB -> text( index );
m_pActivityLB -> changeItem( currentString, index + 1 );
m_pActivityLB -> changeItem( belowString, index );
//set the moved atttribute selected
- QListBoxItem * item = m_pActivityLB -> item( index + 1 );
+ TQListBoxItem * item = m_pActivityLB -> item( index + 1 );
m_pActivityLB -> setSelected( item, true );
slotClicked(item);
}
@@ -252,18 +252,18 @@ void ActivityPage::slotBottomClicked() {
return;
//swap the text around in the ListBox
- QString currentString = m_pActivityLB->text( index );
+ TQString currentString = m_pActivityLB->text( index );
m_pActivityLB->removeItem( index );
m_pActivityLB->insertItem( currentString, m_pActivityLB->count() );
//set the moved item selected
- QListBoxItem* item = m_pActivityLB->item( m_pActivityLB->count() - 1 );
+ TQListBoxItem* item = m_pActivityLB->item( m_pActivityLB->count() - 1 );
m_pActivityLB->setSelected( item, true );
slotClicked( item );
}
-void ActivityPage::slotClicked(QListBoxItem *item) {
+void ActivityPage::slotClicked(TQListBoxItem *item) {
//make sure clicked on an item
if(!item) {
enableWidgets(false);
@@ -273,7 +273,7 @@ void ActivityPage::slotClicked(QListBoxItem *item) {
}
}
-void ActivityPage::slotDoubleClicked(QListBoxItem* item) {
+void ActivityPage::slotDoubleClicked(TQListBoxItem* item) {
if (item) {
slotRename();
}
diff --git a/umbrello/umbrello/dialogs/activitypage.h b/umbrello/umbrello/dialogs/activitypage.h
index 7d391b96..57a079e6 100644
--- a/umbrello/umbrello/dialogs/activitypage.h
+++ b/umbrello/umbrello/dialogs/activitypage.h
@@ -12,9 +12,9 @@
#ifndef ACTIVITYPAGE_H
#define ACTIVITYPAGE_H
//qt includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
//kde includes
#include <karrowbutton.h>
//app includes
@@ -26,13 +26,13 @@ class ListPopupMenu;
* @author Paul Hensgen
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ActivityPage : public QWidget {
+class ActivityPage : public TQWidget {
Q_OBJECT
public:
/**
* Constructor
*/
- ActivityPage( QWidget * pParent, StateWidget * pWidget );
+ ActivityPage( TQWidget * pParent, StateWidget * pWidget );
/**
* Deconstructor
@@ -67,21 +67,21 @@ protected:
*/
ListPopupMenu * m_pMenu;
//GUI widgets
- QListBox * m_pActivityLB;
- QGroupBox * m_pActivityGB;
+ TQListBox * m_pActivityLB;
+ TQGroupBox * m_pActivityGB;
KArrowButton * m_pUpArrowB, * m_pDownArrowB, * m_pTopArrowB, *m_pBottomArrowB;
- QPushButton* m_pDeleteActivityButton;
- QPushButton* m_pRenameButton;
+ TQPushButton* m_pDeleteActivityButton;
+ TQPushButton* m_pRenameButton;
public slots:
/**
* Popup menu item selected
*/
void slotMenuSelection( int sel );
- void slotClicked( QListBoxItem* item );
- void slotDoubleClicked( QListBoxItem* item );
- void slotRightButtonClicked(QListBoxItem* item, const QPoint& p);
- void slotRightButtonPressed(QListBoxItem* item, const QPoint& p);
+ void slotClicked( TQListBoxItem* item );
+ void slotDoubleClicked( TQListBoxItem* item );
+ void slotRightButtonClicked(TQListBoxItem* item, const TQPoint& p);
+ void slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p);
void slotTopClicked();
void slotUpClicked();
void slotDownClicked();
diff --git a/umbrello/umbrello/dialogs/assocgenpage.cpp b/umbrello/umbrello/dialogs/assocgenpage.cpp
index 9be13ee0..b093cae0 100644
--- a/umbrello/umbrello/dialogs/assocgenpage.cpp
+++ b/umbrello/umbrello/dialogs/assocgenpage.cpp
@@ -13,7 +13,7 @@
#include "assocgenpage.h"
// qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kcombobox.h>
// kde includes
@@ -25,8 +25,8 @@
#include "../association.h"
#include "../dialog_utils.h"
-AssocGenPage::AssocGenPage (UMLDoc *d, QWidget *parent, AssociationWidget *assoc)
- : QWidget(parent)
+AssocGenPage::AssocGenPage (UMLDoc *d, TQWidget *parent, AssociationWidget *assoc)
+ : TQWidget(parent)
{
m_pAssociationWidget = assoc;
@@ -46,38 +46,38 @@ void AssocGenPage::constructWidget() {
// general configuration of the GUI
int margin = fontMetrics().height();
setMinimumSize(310,330);
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
// group boxes for name, documentation properties
- QGroupBox *nameGB = new QGroupBox(this);
- QGroupBox *docGB = new QGroupBox(this);
+ TQGroupBox *nameGB = new TQGroupBox(this);
+ TQGroupBox *docGB = new TQGroupBox(this);
nameGB -> setTitle(i18n("Properties"));
docGB -> setTitle(i18n("Documentation"));
topLayout -> addWidget(nameGB);
topLayout -> addWidget(docGB);
- QGridLayout * nameLayout = new QGridLayout(nameGB, 2, 2);
+ TQGridLayout * nameLayout = new TQGridLayout(nameGB, 2, 2);
nameLayout -> setSpacing(6);
nameLayout -> setMargin(margin);
//Association name
- QLabel *pAssocNameL = NULL;
- QLineEdit* nameField = Dialog_Utils::makeLabeledEditField( nameGB, nameLayout, 0,
+ TQLabel *pAssocNameL = NULL;
+ TQLineEdit* nameField = Dialog_Utils::makeLabeledEditField( nameGB, nameLayout, 0,
pAssocNameL, i18n("Name:"),
m_pAssocNameLE, m_pAssociationWidget->getName() );
nameField->setFocus();
// document
- QHBoxLayout * docLayout = new QHBoxLayout(docGB);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(docGB);
docLayout -> setMargin(margin);
- m_pDoc = new QMultiLineEdit(docGB);
+ m_pDoc = new TQMultiLineEdit(docGB);
docLayout -> addWidget(m_pDoc);
m_pDoc-> setText(m_pAssociationWidget-> getDoc());
Uml::Association_Type currentType = m_pAssociationWidget->getAssocType();
- QString currentTypeAsString = UMLAssociation::typeAsString(currentType);
- QLabel *pTypeL = new QLabel(i18n("Type:"), nameGB);
+ TQString currentTypeAsString = UMLAssociation::typeAsString(currentType);
+ TQLabel *pTypeL = new TQLabel(i18n("Type:"), nameGB);
nameLayout->addWidget(pTypeL, 1, 0);
/* Here is a list of all the supported choices for changing
@@ -90,7 +90,7 @@ void AssocGenPage::constructWidget() {
m_AssocTypeStrings.clear();
for (uint i=0; i<m_AssocTypes.size(); ++i) {
if (m_AssocTypes[i] == currentType) found=true;
- QString typeStr = UMLAssociation::typeAsString(m_AssocTypes[i]);
+ TQString typeStr = UMLAssociation::typeAsString(m_AssocTypes[i]);
m_AssocTypeStrings << typeStr;
}
@@ -108,7 +108,7 @@ void AssocGenPage::constructWidget() {
m_pTypeCB->setCurrentText(currentTypeAsString);
m_pTypeCB->setDuplicatesEnabled(false);//only allow one of each type in box
m_pTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
nameLayout->addWidget(m_pTypeCB, 1, 1);
diff --git a/umbrello/umbrello/dialogs/assocgenpage.h b/umbrello/umbrello/dialogs/assocgenpage.h
index 3eff137f..4cd34421 100644
--- a/umbrello/umbrello/dialogs/assocgenpage.h
+++ b/umbrello/umbrello/dialogs/assocgenpage.h
@@ -13,15 +13,15 @@
#define ASSOCGENPAGE_H
//quicktime class includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqvaluelist.h>
//my class includes
#include "../umlobject.h"
@@ -40,7 +40,7 @@ class KComboBox;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class AssocGenPage : public QWidget {
+class AssocGenPage : public TQWidget {
Q_OBJECT
public:
@@ -51,7 +51,7 @@ public:
* @param parent The parent to the AssocGenPage.
* @param a The AssociationWidget to display the properties of.
*/
- AssocGenPage(UMLDoc *d, QWidget *parent, AssociationWidget *a);
+ AssocGenPage(UMLDoc *d, TQWidget *parent, AssociationWidget *a);
/**
* Standard deconstructor.
@@ -65,15 +65,15 @@ public:
void updateObject();
private:
- QLineEdit * m_pAssocNameLE;
+ TQLineEdit * m_pAssocNameLE;
KComboBox *m_pTypeCB;
- /* Choices for the QComboBox, and we store ints and strings
+ /* Choices for the TQComboBox, and we store ints and strings
so we can translate both ways */
- QValueList<Uml::Association_Type> m_AssocTypes;
- QStringList m_AssocTypeStrings;
+ TQValueList<Uml::Association_Type> m_AssocTypes;
+ TQStringList m_AssocTypeStrings;
- QMultiLineEdit * m_pDoc;
+ TQMultiLineEdit * m_pDoc;
AssociationWidget *m_pAssociationWidget;
UMLDoc * m_pUmldoc;
diff --git a/umbrello/umbrello/dialogs/assocpage.cpp b/umbrello/umbrello/dialogs/assocpage.cpp
index 1b3cf5ad..feb193eb 100644
--- a/umbrello/umbrello/dialogs/assocpage.cpp
+++ b/umbrello/umbrello/dialogs/assocpage.cpp
@@ -10,53 +10,53 @@
***************************************************************************/
#include "assocpage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include "assocpropdlg.h"
-AssocPage::AssocPage(QWidget *parent, UMLView * v, UMLObject * o) : QWidget(parent) {
+AssocPage::AssocPage(TQWidget *parent, UMLView * v, UMLObject * o) : TQWidget(parent) {
m_pObject = o;
m_pView = v;
int margin = fontMetrics().height();
- QHBoxLayout * mainLayout = new QHBoxLayout(this);
+ TQHBoxLayout * mainLayout = new TQHBoxLayout(this);
mainLayout -> setSpacing(10);
- m_pAssocGB = new QGroupBox(i18n("Associations"), this);
+ m_pAssocGB = new TQGroupBox(i18n("Associations"), this);
mainLayout -> addWidget(m_pAssocGB);
- QHBoxLayout * layout = new QHBoxLayout(m_pAssocGB);
+ TQHBoxLayout * layout = new TQHBoxLayout(m_pAssocGB);
layout -> setSpacing(10);
layout -> setMargin(margin);
- m_pAssocLB = new QListBox(m_pAssocGB);
+ m_pAssocLB = new TQListBox(m_pAssocGB);
layout -> addWidget(m_pAssocLB);
setMinimumSize(310, 330);
fillListBox();
m_pMenu = 0;
- connect(m_pAssocLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ connect(m_pAssocLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- connect(m_pAssocLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pAssocLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pAssocLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pAssocLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
AssocPage::~AssocPage() {
- disconnect(m_pAssocLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ disconnect(m_pAssocLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- disconnect(m_pAssocLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ disconnect(m_pAssocLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- disconnect(m_pAssocLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ disconnect(m_pAssocLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
-void AssocPage::slotDoubleClick(QListBoxItem * i) {
+void AssocPage::slotDoubleClick(TQListBoxItem * i) {
if(!i)
return;
@@ -84,27 +84,27 @@ void AssocPage::fillListBox() {
}
}
-void AssocPage::slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/) {
+void AssocPage::slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/) {
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void AssocPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p) {
+void AssocPage::slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p) {
if(!item)
return;
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, ListPopupMenu::mt_Association_Selected);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
}
void AssocPage::slotPopupMenuSel(int id) {
diff --git a/umbrello/umbrello/dialogs/assocpage.h b/umbrello/umbrello/dialogs/assocpage.h
index 60e1e339..a38aa2ac 100644
--- a/umbrello/umbrello/dialogs/assocpage.h
+++ b/umbrello/umbrello/dialogs/assocpage.h
@@ -13,10 +13,10 @@
#ifndef ASSOCPAGE_H
#define ASSOCPAGE_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqptrlist.h>
#include "../umlobject.h"
#include "../umlview.h"
@@ -38,7 +38,7 @@
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class AssocPage : public QWidget {
+class AssocPage : public TQWidget {
Q_OBJECT
public:
/**
@@ -48,7 +48,7 @@ public:
* @param v The view the UMLObject being represented.
* @param o The UMLObject being represented
*/
- AssocPage(QWidget *parent, UMLView * v, UMLObject * o);
+ AssocPage(TQWidget *parent, UMLView * v, UMLObject * o);
/**
* Standard deconstructor.
@@ -57,8 +57,8 @@ public:
private:
UMLObject * m_pObject;
UMLView * m_pView;
- QListBox * m_pAssocLB;
- QGroupBox * m_pAssocGB;
+ TQListBox * m_pAssocLB;
+ TQGroupBox * m_pAssocGB;
AssociationWidgetList m_List;
ListPopupMenu * m_pMenu;
@@ -67,9 +67,9 @@ private:
*/
void fillListBox();
public slots:
- void slotDoubleClick(QListBoxItem * i);
- void slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/);
- void slotRightButtonPressed(QListBoxItem * item, const QPoint & p);
+ void slotDoubleClick(TQListBoxItem * i);
+ void slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/);
+ void slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p);
void slotPopupMenuSel(int id);
};
diff --git a/umbrello/umbrello/dialogs/assocpropdlg.cpp b/umbrello/umbrello/dialogs/assocpropdlg.cpp
index 2458da13..1d5b9c77 100644
--- a/umbrello/umbrello/dialogs/assocpropdlg.cpp
+++ b/umbrello/umbrello/dialogs/assocpropdlg.cpp
@@ -13,8 +13,8 @@
#include "assocpropdlg.h"
// qt/kde includes
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,7 +35,7 @@
#include "../umlview.h"
-AssocPropDlg::AssocPropDlg (QWidget *parent, AssociationWidget * assocWidget, int pageNum)
+AssocPropDlg::AssocPropDlg (TQWidget *parent, AssociationWidget * assocWidget, int pageNum)
: KDialogBase(IconList, i18n("Association Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_ASSOCPROPDLG_", true, true)
{
@@ -84,15 +84,15 @@ void AssocPropDlg::setupPages (AssociationWidget *assocWidget)
{
// general page
- QFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
- QHBoxLayout *genLayout = new QHBoxLayout(page);
+ TQFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQHBoxLayout *genLayout = new TQHBoxLayout(page);
page -> setMinimumSize(310, 330);
m_pGenPage = new AssocGenPage (m_pDoc, page, assocWidget);
genLayout -> addWidget(m_pGenPage);
// role page
- QFrame * newPage = addPage( i18n("Roles"), i18n("Role Settings"), DesktopIcon( "misc") );
- QHBoxLayout * roleLayout = new QHBoxLayout(newPage);
+ TQFrame * newPage = addPage( i18n("Roles"), i18n("Role Settings"), DesktopIcon( "misc") );
+ TQHBoxLayout * roleLayout = new TQHBoxLayout(newPage);
// newPage -> setMinimumSize(310, 330);
m_pRolePage = new AssocRolePage(m_pDoc, newPage, assocWidget);
roleLayout -> addWidget(m_pRolePage);
@@ -106,8 +106,8 @@ void AssocPropDlg::setupFontPage()
if( !m_pAssoc)
return;
- QVBox *page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts"));
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox *page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts"));
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser->setFont( m_pAssoc->getFont());
m_pChooser->setSampleText(i18n("Association font"));
}
diff --git a/umbrello/umbrello/dialogs/assocpropdlg.h b/umbrello/umbrello/dialogs/assocpropdlg.h
index a5bdad6e..8fbbebe8 100644
--- a/umbrello/umbrello/dialogs/assocpropdlg.h
+++ b/umbrello/umbrello/dialogs/assocpropdlg.h
@@ -40,7 +40,7 @@ public:
* @param pageNum The page to show first.
*/
- AssocPropDlg(QWidget *parent, AssociationWidget *a, int pageNum = 0);
+ AssocPropDlg(TQWidget *parent, AssociationWidget *a, int pageNum = 0);
/**
* Standard deconstructor
diff --git a/umbrello/umbrello/dialogs/assocrolepage.cpp b/umbrello/umbrello/dialogs/assocrolepage.cpp
index 807a7e1e..adb7dcc3 100644
--- a/umbrello/umbrello/dialogs/assocrolepage.cpp
+++ b/umbrello/umbrello/dialogs/assocrolepage.cpp
@@ -13,7 +13,7 @@
#include "assocrolepage.h"
// qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
// kde includes
#include <klocale.h>
@@ -23,8 +23,8 @@
// local includes
#include "../dialog_utils.h"
-AssocRolePage::AssocRolePage (UMLDoc *d, QWidget *parent, AssociationWidget *assoc)
- : QWidget(parent)
+AssocRolePage::AssocRolePage (UMLDoc *d, TQWidget *parent, AssociationWidget *assoc)
+ : TQWidget(parent)
{
m_pAssociationWidget = assoc;
@@ -45,12 +45,12 @@ AssocRolePage::~AssocRolePage() {}
void AssocRolePage::constructWidget() {
// underlying roles and objects
- QString nameA = m_pAssociationWidget->getRoleName(Uml::A);
- QString nameB = m_pAssociationWidget->getRoleName(Uml::B);
- QString titleA = i18n("Role A Properties");
- QString titleB = i18n("Role B Properties");
- QString widgetNameA = m_pAssociationWidget->getWidget(Uml::A)->getName();
- QString widgetNameB = m_pAssociationWidget->getWidget(Uml::B)->getName();
+ TQString nameA = m_pAssociationWidget->getRoleName(Uml::A);
+ TQString nameB = m_pAssociationWidget->getRoleName(Uml::B);
+ TQString titleA = i18n("Role A Properties");
+ TQString titleB = i18n("Role B Properties");
+ TQString widgetNameA = m_pAssociationWidget->getWidget(Uml::A)->getName();
+ TQString widgetNameB = m_pAssociationWidget->getWidget(Uml::B)->getName();
if(!widgetNameA.isEmpty())
titleA.append(" (" + widgetNameA + ')');
if(!widgetNameB.isEmpty())
@@ -59,28 +59,28 @@ void AssocRolePage::constructWidget() {
// general configuration of the GUI
int margin = fontMetrics().height();
- QGridLayout * mainLayout = new QGridLayout(this, 4, 2);
+ TQGridLayout * mainLayout = new TQGridLayout(this, 4, 2);
mainLayout -> setSpacing(6);
// group boxes for role, documentation properties
- QGroupBox *propsAGB = new QGroupBox(this);
- QGroupBox *propsBGB = new QGroupBox(this);
- QButtonGroup * scopeABG = new QButtonGroup(i18n("Role A Visibility"), this );
- QButtonGroup * scopeBBG = new QButtonGroup(i18n("Role B Visibility"), this );
- QButtonGroup * changeABG = new QButtonGroup(i18n("Role A Changeability"), this );
- QButtonGroup * changeBBG = new QButtonGroup(i18n("Role B Changeability"), this );
- QGroupBox *docAGB = new QGroupBox(this);
- QGroupBox *docBGB = new QGroupBox(this);
+ TQGroupBox *propsAGB = new TQGroupBox(this);
+ TQGroupBox *propsBGB = new TQGroupBox(this);
+ TQButtonGroup * scopeABG = new TQButtonGroup(i18n("Role A Visibility"), this );
+ TQButtonGroup * scopeBBG = new TQButtonGroup(i18n("Role B Visibility"), this );
+ TQButtonGroup * changeABG = new TQButtonGroup(i18n("Role A Changeability"), this );
+ TQButtonGroup * changeBBG = new TQButtonGroup(i18n("Role B Changeability"), this );
+ TQGroupBox *docAGB = new TQGroupBox(this);
+ TQGroupBox *docBGB = new TQGroupBox(this);
propsAGB -> setTitle(titleA);
propsBGB -> setTitle(titleB);
docAGB -> setTitle(i18n("Documentation"));
docBGB -> setTitle(i18n("Documentation"));
- QGridLayout * propsALayout = new QGridLayout(propsAGB, 2, 2);
+ TQGridLayout * propsALayout = new TQGridLayout(propsAGB, 2, 2);
propsALayout -> setSpacing(6);
propsALayout -> setMargin(margin);
- QGridLayout * propsBLayout = new QGridLayout(propsBGB, 3, 2);
+ TQGridLayout * propsBLayout = new TQGridLayout(propsBGB, 3, 2);
propsBLayout -> setSpacing(6);
propsBLayout -> setMargin(margin);
@@ -88,31 +88,31 @@ void AssocRolePage::constructWidget() {
//
// Rolename A
- QLabel *pRoleAL = NULL;
+ TQLabel *pRoleAL = NULL;
Dialog_Utils::makeLabeledEditField( propsAGB, propsALayout, 0,
pRoleAL, i18n("Rolename:"),
m_pRoleALE, nameA );
// Multi A
- QLabel *pMultiAL = NULL;
+ TQLabel *pMultiAL = NULL;
Dialog_Utils::makeLabeledEditField( propsAGB, propsALayout, 1,
pMultiAL, i18n("Multiplicity:"),
m_pMultiALE, m_pAssociationWidget->getMulti(Uml::A) );
// Visibility A
- QHBoxLayout * scopeALayout = new QHBoxLayout(scopeABG);
+ TQHBoxLayout * scopeALayout = new TQHBoxLayout(scopeABG);
scopeALayout -> setMargin(margin);
- m_PublicARB = new QRadioButton(i18n("Public"), scopeABG);
+ m_PublicARB = new TQRadioButton(i18n("Public"), scopeABG);
scopeALayout -> addWidget(m_PublicARB);
- m_PrivateARB = new QRadioButton(i18n("Private"), scopeABG);
+ m_PrivateARB = new TQRadioButton(i18n("Private"), scopeABG);
scopeALayout -> addWidget(m_PrivateARB);
- m_ProtectedARB = new QRadioButton(i18n("Protected"), scopeABG);
+ m_ProtectedARB = new TQRadioButton(i18n("Protected"), scopeABG);
scopeALayout -> addWidget(m_ProtectedARB);
- m_ImplementationARB = new QRadioButton(i18n("Implementation"), scopeABG);
+ m_ImplementationARB = new TQRadioButton(i18n("Implementation"), scopeABG);
scopeALayout -> addWidget(m_ImplementationARB);
Uml::Visibility scope = m_pAssociationWidget->getVisibility(Uml::A);
@@ -126,16 +126,16 @@ void AssocRolePage::constructWidget() {
m_ProtectedARB -> setChecked( true );
// Changeability A
- QHBoxLayout * changeALayout = new QHBoxLayout(changeABG);
+ TQHBoxLayout * changeALayout = new TQHBoxLayout(changeABG);
changeALayout -> setMargin(margin);
- m_ChangeableARB = new QRadioButton(i18n("Changeable"), changeABG);
+ m_ChangeableARB = new TQRadioButton(i18n("Changeable"), changeABG);
changeALayout -> addWidget(m_ChangeableARB);
- m_FrozenARB = new QRadioButton(i18n("Frozen"), changeABG);
+ m_FrozenARB = new TQRadioButton(i18n("Frozen"), changeABG);
changeALayout -> addWidget(m_FrozenARB);
- m_AddOnlyARB = new QRadioButton(i18n("Add only"), changeABG);
+ m_AddOnlyARB = new TQRadioButton(i18n("Add only"), changeABG);
changeALayout -> addWidget(m_AddOnlyARB);
Uml::Changeability_Type changeability = m_pAssociationWidget->getChangeability(Uml::A);
@@ -147,32 +147,32 @@ void AssocRolePage::constructWidget() {
m_AddOnlyARB -> setChecked( true );
// Rolename B
- QLabel * pRoleBL = NULL;
+ TQLabel * pRoleBL = NULL;
Dialog_Utils::makeLabeledEditField( propsBGB, propsBLayout, 0,
pRoleBL, i18n("Rolename:"),
m_pRoleBLE, nameB );
// Multi B
- QLabel * pMultiBL = NULL;
+ TQLabel * pMultiBL = NULL;
Dialog_Utils::makeLabeledEditField( propsBGB, propsBLayout, 1,
pMultiBL, i18n("Multiplicity:"),
m_pMultiBLE, m_pAssociationWidget->getMulti(Uml::B) );
// Visibility B
- QHBoxLayout * scopeBLayout = new QHBoxLayout(scopeBBG);
+ TQHBoxLayout * scopeBLayout = new TQHBoxLayout(scopeBBG);
scopeBLayout -> setMargin(margin);
- m_PublicBRB = new QRadioButton(i18n("Public"), scopeBBG);
+ m_PublicBRB = new TQRadioButton(i18n("Public"), scopeBBG);
scopeBLayout -> addWidget(m_PublicBRB);
- m_PrivateBRB = new QRadioButton(i18n("Private"), scopeBBG);
+ m_PrivateBRB = new TQRadioButton(i18n("Private"), scopeBBG);
scopeBLayout -> addWidget(m_PrivateBRB);
- m_ProtectedBRB = new QRadioButton(i18n("Protected"), scopeBBG);
+ m_ProtectedBRB = new TQRadioButton(i18n("Protected"), scopeBBG);
scopeBLayout -> addWidget(m_ProtectedBRB);
- m_ImplementationBRB = new QRadioButton(i18n("Implementation"), scopeBBG);
+ m_ImplementationBRB = new TQRadioButton(i18n("Implementation"), scopeBBG);
scopeBLayout -> addWidget(m_ImplementationBRB);
scope = m_pAssociationWidget->getVisibility(Uml::B);
@@ -186,16 +186,16 @@ void AssocRolePage::constructWidget() {
m_ImplementationBRB -> setChecked( true );
// Changeability B
- QHBoxLayout * changeBLayout = new QHBoxLayout(changeBBG);
+ TQHBoxLayout * changeBLayout = new TQHBoxLayout(changeBBG);
changeBLayout -> setMargin(margin);
- m_ChangeableBRB = new QRadioButton(i18n("Changeable"), changeBBG);
+ m_ChangeableBRB = new TQRadioButton(i18n("Changeable"), changeBBG);
changeBLayout -> addWidget(m_ChangeableBRB);
- m_FrozenBRB = new QRadioButton(i18n("Frozen"), changeBBG);
+ m_FrozenBRB = new TQRadioButton(i18n("Frozen"), changeBBG);
changeBLayout -> addWidget(m_FrozenBRB);
- m_AddOnlyBRB = new QRadioButton(i18n("Add only"), changeBBG);
+ m_AddOnlyBRB = new TQRadioButton(i18n("Add only"), changeBBG);
changeBLayout -> addWidget(m_AddOnlyBRB);
changeability = m_pAssociationWidget->getChangeability(Uml::B);
@@ -210,23 +210,23 @@ void AssocRolePage::constructWidget() {
//
// Document A
- QHBoxLayout * docALayout = new QHBoxLayout(docAGB);
+ TQHBoxLayout * docALayout = new TQHBoxLayout(docAGB);
docALayout -> setMargin(margin);
- m_pDocA = new QMultiLineEdit(docAGB);
+ m_pDocA = new TQMultiLineEdit(docAGB);
docALayout -> addWidget(m_pDocA);
m_pDocA-> setText(m_pAssociationWidget-> getRoleDoc(Uml::A));
// m_pDocA-> setText("<<not implemented yet>>");
// m_pDocA-> setEnabled(false);
- m_pDocA->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDocA->setWordWrap(TQMultiLineEdit::WidgetWidth);
// Document B
- QHBoxLayout * docBLayout = new QHBoxLayout(docBGB);
+ TQHBoxLayout * docBLayout = new TQHBoxLayout(docBGB);
docBLayout -> setMargin(margin);
- m_pDocB = new QMultiLineEdit(docBGB);
+ m_pDocB = new TQMultiLineEdit(docBGB);
docBLayout -> addWidget(m_pDocB);
m_pDocB-> setText(m_pAssociationWidget-> getRoleDoc(Uml::B));
// m_pDocB-> setEnabled(false);
- m_pDocB->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDocB->setWordWrap(TQMultiLineEdit::WidgetWidth);
// add group boxes to main layout
mainLayout -> addWidget( propsAGB, 0, 0);
diff --git a/umbrello/umbrello/dialogs/assocrolepage.h b/umbrello/umbrello/dialogs/assocrolepage.h
index c1c4d603..440707cc 100644
--- a/umbrello/umbrello/dialogs/assocrolepage.h
+++ b/umbrello/umbrello/dialogs/assocrolepage.h
@@ -13,14 +13,14 @@
#define ASSOCROLEPAGE_H
//quicktime class includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
//my class includes
#include "../umlobject.h"
@@ -36,7 +36,7 @@
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class AssocRolePage : public QWidget {
+class AssocRolePage : public TQWidget {
Q_OBJECT
public:
@@ -47,7 +47,7 @@ public:
* @param parent The parent to the AssocRolePage.
* @param a The AssociationWidget to display the properties of.
*/
- AssocRolePage(UMLDoc *d, QWidget *parent, AssociationWidget *a);
+ AssocRolePage(UMLDoc *d, TQWidget *parent, AssociationWidget *a);
/**
* Standard deconstructor.
@@ -61,15 +61,15 @@ public:
void updateObject();
private:
- QLineEdit *m_pRoleALE, *m_pRoleBLE, *m_pMultiALE, *m_pMultiBLE;
- QMultiLineEdit *m_pDocA, *m_pDocB;
+ TQLineEdit *m_pRoleALE, *m_pRoleBLE, *m_pMultiALE, *m_pMultiBLE;
+ TQMultiLineEdit *m_pDocA, *m_pDocB;
AssociationWidget *m_pAssociationWidget;
UMLDoc * m_pUmldoc;
ObjectWidget *m_pWidget;
- QRadioButton *m_PublicARB, *m_ProtectedARB, *m_PrivateARB, *m_ImplementationARB;
- QRadioButton *m_PublicBRB, *m_ProtectedBRB, *m_PrivateBRB, *m_ImplementationBRB;
- QRadioButton *m_ChangeableARB, *m_AddOnlyARB, *m_FrozenARB;
- QRadioButton *m_ChangeableBRB, *m_AddOnlyBRB, *m_FrozenBRB;
+ TQRadioButton *m_PublicARB, *m_ProtectedARB, *m_PrivateARB, *m_ImplementationARB;
+ TQRadioButton *m_PublicBRB, *m_ProtectedBRB, *m_PrivateBRB, *m_ImplementationBRB;
+ TQRadioButton *m_ChangeableARB, *m_AddOnlyARB, *m_FrozenARB;
+ TQRadioButton *m_ChangeableBRB, *m_AddOnlyBRB, *m_FrozenBRB;
void constructWidget();
diff --git a/umbrello/umbrello/dialogs/classgenpage.cpp b/umbrello/umbrello/dialogs/classgenpage.cpp
index 01b3d3c7..d633b6ae 100644
--- a/umbrello/umbrello/dialogs/classgenpage.cpp
+++ b/umbrello/umbrello/dialogs/classgenpage.cpp
@@ -13,14 +13,14 @@
#include "classgenpage.h"
// qt includes
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
// kde includes
#include <klocale.h>
@@ -38,11 +38,11 @@
#include "../umlview.h"
#include "../stereotype.h"
-ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(parent) {
+ClassGenPage::ClassGenPage(UMLDoc* d, TQWidget* parent, UMLObject* o) : TQWidget(parent) {
m_pWidget = 0;
m_pObject = 0;
m_pInstanceWidget = 0;
- QString name;
+ TQString name;
int margin = fontMetrics().height();
Uml::Object_Type t = o -> getBaseType();
m_pUmldoc = d;
@@ -70,17 +70,17 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
kWarning() << "creating class gen page for unknown widget type" << endl;
}
setMinimumSize(310,330);
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
//setup name
- QGridLayout * m_pNameLayout = new QGridLayout(topLayout, 4, 2);
+ TQGridLayout * m_pNameLayout = new TQGridLayout(topLayout, 4, 2);
m_pNameLayout -> setSpacing(6);
- m_pNameL = new QLabel(this);
+ m_pNameL = new TQLabel(this);
m_pNameL -> setText(name);
m_pNameLayout -> addWidget(m_pNameL, 0, 0);
- m_pClassNameLE = new QLineEdit(this);
+ m_pClassNameLE = new TQLineEdit(this);
m_pNameLayout -> addWidget(m_pClassNameLE, 0, 1);
m_pClassNameLE->setFocus();
m_pNameL->setBuddy(m_pClassNameLE);
@@ -90,7 +90,7 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
m_pAbstractCB = 0;
m_pDeconCB = 0;
- m_pStereoTypeL = new QLabel(i18n("&Stereotype name:"), this);
+ m_pStereoTypeL = new TQLabel(i18n("&Stereotype name:"), this);
m_pNameLayout -> addWidget(m_pStereoTypeL, 1, 0);
m_pStereoTypeCB = new KComboBox(true, this);
@@ -104,10 +104,10 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
}
if (t == Uml::ot_Class || t == Uml::ot_Interface) {
- m_pPackageL = new QLabel(i18n("&Package name:"), this);
+ m_pPackageL = new TQLabel(i18n("&Package name:"), this);
m_pNameLayout -> addWidget(m_pPackageL, 2, 0);
- m_pPackageLE = new QLineEdit(this);
+ m_pPackageLE = new TQLineEdit(this);
m_pNameLayout -> addWidget(m_pPackageLE, 2, 1);
m_pPackageLE -> setText(o -> getPackage());
@@ -116,40 +116,40 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
}
if (t == Uml::ot_Class || t == Uml::ot_UseCase ) {
- QString abstractCaption;
+ TQString abstractCaption;
if ( t == Uml::ot_Class ) {
abstractCaption = i18n("A&bstract class");
} else {
abstractCaption = i18n("A&bstract use case");
}
- m_pAbstractCB = new QCheckBox( abstractCaption, this );
+ m_pAbstractCB = new TQCheckBox( abstractCaption, this );
m_pAbstractCB -> setChecked( o -> getAbstract() );
m_pNameLayout -> addWidget( m_pAbstractCB, 3, 0 );
}
if (t == Uml::ot_Component) {
- m_pExecutableCB = new QCheckBox(i18n("&Executable"), this);
+ m_pExecutableCB = new TQCheckBox(i18n("&Executable"), this);
m_pExecutableCB->setChecked( (static_cast<UMLComponent*>(o))->getExecutable() );
m_pNameLayout->addWidget( m_pExecutableCB, 3, 0 );
}
if (t == Uml::ot_Artifact) {
//setup artifact draw as
- m_pDrawAsBG = new QButtonGroup(i18n("Draw As"), this);
- QHBoxLayout* drawAsLayout = new QHBoxLayout(m_pDrawAsBG);
+ m_pDrawAsBG = new TQButtonGroup(i18n("Draw As"), this);
+ TQHBoxLayout* drawAsLayout = new TQHBoxLayout(m_pDrawAsBG);
drawAsLayout->setMargin(margin);
m_pDrawAsBG->setExclusive(true);
- m_pDefaultRB = new QRadioButton(i18n("&Default"), m_pDrawAsBG);
+ m_pDefaultRB = new TQRadioButton(i18n("&Default"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pDefaultRB);
- m_pFileRB = new QRadioButton(i18n("&File"), m_pDrawAsBG);
+ m_pFileRB = new TQRadioButton(i18n("&File"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pFileRB);
- m_pLibraryRB = new QRadioButton(i18n("&Library"), m_pDrawAsBG);
+ m_pLibraryRB = new TQRadioButton(i18n("&Library"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pLibraryRB);
- m_pTableRB = new QRadioButton(i18n("&Table"), m_pDrawAsBG);
+ m_pTableRB = new TQRadioButton(i18n("&Table"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pTableRB);
topLayout->addWidget(m_pDrawAsBG);
@@ -168,31 +168,31 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
}
//setup scope
- m_pButtonBG = new QButtonGroup(i18n("Visibility"), this);
- QHBoxLayout * scopeLayout = new QHBoxLayout(m_pButtonBG);
+ m_pButtonBG = new TQButtonGroup(i18n("Visibility"), this);
+ TQHBoxLayout * scopeLayout = new TQHBoxLayout(m_pButtonBG);
scopeLayout -> setMargin(margin);
m_pButtonBG -> setExclusive(true);
- m_pPublicRB = new QRadioButton(i18n("P&ublic"), m_pButtonBG);
+ m_pPublicRB = new TQRadioButton(i18n("P&ublic"), m_pButtonBG);
scopeLayout -> addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("P&rivate"), m_pButtonBG);
+ m_pPrivateRB = new TQRadioButton(i18n("P&rivate"), m_pButtonBG);
scopeLayout -> addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("Pro&tected"), m_pButtonBG);
+ m_pProtectedRB = new TQRadioButton(i18n("Pro&tected"), m_pButtonBG);
scopeLayout -> addWidget(m_pProtectedRB);
topLayout -> addWidget(m_pButtonBG);
- m_pImplementationRB = new QRadioButton(i18n("Imple&mentation"), m_pButtonBG);
+ m_pImplementationRB = new TQRadioButton(i18n("Imple&mentation"), m_pButtonBG);
scopeLayout -> addWidget(m_pImplementationRB);
topLayout -> addWidget(m_pButtonBG);
//setup documentation
- m_pDocGB = new QGroupBox(this);
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ m_pDocGB = new TQGroupBox(this);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setMargin(margin);
m_pDocGB -> setTitle(i18n("Documentation"));
- m_pDoc = new QMultiLineEdit(m_pDocGB);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
docLayout -> addWidget(m_pDoc);
topLayout -> addWidget(m_pDocGB);
@@ -213,7 +213,7 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
// manage stereotypes
m_pStereoTypeCB -> setDuplicatesEnabled(false);//only allow one of each type in box
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- insertStereotype (QString("")); // an empty stereotype is the default
+ insertStereotype (TQString("")); // an empty stereotype is the default
int defaultStereotype=0;
bool foundDefaultStereotype = false;
for (UMLStereotypeListIt it(m_pUmldoc->getStereotypes()); it.current(); ++it) {
@@ -232,11 +232,11 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
m_pStereoTypeCB -> setCurrentItem(-1);
///////////
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
//////////
}
-ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, ObjectWidget* o) : QWidget(parent) {
+ClassGenPage::ClassGenPage(UMLDoc* d, TQWidget* parent, ObjectWidget* o) : TQWidget(parent) {
m_pObject = 0;
m_pInstanceWidget = 0;
m_pWidget = o;
@@ -246,62 +246,62 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, ObjectWidget* o) : QWidge
//int t = o -> getBaseType();
m_pUmldoc = d;
setMinimumSize(310,330);
- QGridLayout * topLayout = new QGridLayout(this, 2, 1);
+ TQGridLayout * topLayout = new TQGridLayout(this, 2, 1);
topLayout -> setSpacing(6);
//setup name
- QGridLayout * m_pNameLayout = new QGridLayout(topLayout, 3, 2);
+ TQGridLayout * m_pNameLayout = new TQGridLayout(topLayout, 3, 2);
m_pNameLayout -> setSpacing(6);
- m_pNameL = new QLabel(this);
+ m_pNameL = new TQLabel(this);
m_pNameL -> setText(i18n("Class name:"));
m_pNameLayout -> addWidget(m_pNameL, 0, 0);
- m_pClassNameLE = new QLineEdit(this);
+ m_pClassNameLE = new TQLineEdit(this);
m_pClassNameLE -> setText(o -> getName());
m_pNameLayout -> addWidget(m_pClassNameLE, 0, 1);
- m_pInstanceL = new QLabel(this);
+ m_pInstanceL = new TQLabel(this);
m_pInstanceL -> setText(i18n("Instance name:"));
m_pNameLayout -> addWidget(m_pInstanceL, 1, 0);
- m_pInstanceLE = new QLineEdit(this);
+ m_pInstanceLE = new TQLineEdit(this);
m_pInstanceLE -> setText(o -> getInstanceName());
m_pNameLayout -> addWidget(m_pInstanceLE, 1, 1);
UMLView *view = UMLApp::app()->getCurrentView();
- m_pDrawActorCB = new QCheckBox( i18n( "Draw as actor" ) , this );
+ m_pDrawActorCB = new TQCheckBox( i18n( "Draw as actor" ) , this );
m_pDrawActorCB -> setChecked( o -> getDrawAsActor() );
m_pNameLayout -> addWidget( m_pDrawActorCB, 2, 0 );
if(view -> getType() == Uml::dt_Collaboration) {
- m_pMultiCB = new QCheckBox(i18n("Multiple instance"), this);
+ m_pMultiCB = new TQCheckBox(i18n("Multiple instance"), this);
m_pMultiCB -> setChecked(o -> getMultipleInstance());
m_pNameLayout -> addWidget(m_pMultiCB, 2,1);
if( m_pDrawActorCB -> isChecked() )
m_pMultiCB -> setEnabled( false );
} else//sequence diagram
{
- m_pDeconCB = new QCheckBox(i18n("Show destruction"), this);
+ m_pDeconCB = new TQCheckBox(i18n("Show destruction"), this);
m_pDeconCB->setChecked(o->getShowDestruction());
m_pNameLayout -> addWidget(m_pDeconCB, 2,1);
}
//setup documentation
- m_pDocGB = new QGroupBox(this);
+ m_pDocGB = new TQGroupBox(this);
topLayout -> addWidget(m_pDocGB, 1, 0);
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setMargin(margin);
m_pDocGB -> setTitle(i18n("Documentation"));
- m_pDoc = new QMultiLineEdit(m_pDocGB);
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
m_pDoc-> setText(o -> getDoc());
docLayout -> addWidget(m_pDoc);
m_pObject = 0;//needs to be set to zero
if( m_pMultiCB )
- connect( m_pDrawActorCB, SIGNAL( toggled( bool ) ), this, SLOT( slotActorToggled( bool ) ) );
+ connect( m_pDrawActorCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotActorToggled( bool ) ) );
}
-ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWidget(parent) {
+ClassGenPage::ClassGenPage(UMLDoc* d, TQWidget* parent, UMLWidget* widget) : TQWidget(parent) {
m_pWidget = 0;
m_pObject = 0;
m_pInstanceWidget = widget;
@@ -311,13 +311,13 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
//int t = o -> getBaseType();
m_pUmldoc = d;
setMinimumSize(310,330);
- QGridLayout* topLayout = new QGridLayout(this, 2, 1);
+ TQGridLayout* topLayout = new TQGridLayout(this, 2, 1);
topLayout->setSpacing(6);
//setup name
- QGridLayout* m_pNameLayout = new QGridLayout(topLayout, 3, 2);
+ TQGridLayout* m_pNameLayout = new TQGridLayout(topLayout, 3, 2);
m_pNameLayout->setSpacing(6);
- m_pNameL = new QLabel(this);
+ m_pNameL = new TQLabel(this);
if (widget->getBaseType() == Uml::wt_Component) {
m_pNameL->setText(i18n("Component name:"));
} else if (widget->getBaseType() == Uml::wt_Node) {
@@ -327,11 +327,11 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
}
m_pNameLayout->addWidget(m_pNameL, 0, 0);
- m_pClassNameLE = new QLineEdit(this);
+ m_pClassNameLE = new TQLineEdit(this);
m_pClassNameLE->setText(widget->getName());
m_pNameLayout->addWidget(m_pClassNameLE, 0, 1);
- m_pStereoTypeL = new QLabel(i18n("Stereotype name:"), this);
+ m_pStereoTypeL = new TQLabel(i18n("Stereotype name:"), this);
m_pNameLayout->addWidget(m_pStereoTypeL, 1, 0);
m_pStereoTypeCB = new KComboBox(true, this);
@@ -340,23 +340,23 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
m_pStereoTypeCB->setCurrentText( widget->getUMLObject()->getStereotype() );
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- m_pInstanceL = new QLabel(this);
+ m_pInstanceL = new TQLabel(this);
m_pInstanceL->setText(i18n("Instance name:"));
m_pNameLayout->addWidget(m_pInstanceL, 2, 0);
- m_pInstanceLE = new QLineEdit(this);
+ m_pInstanceLE = new TQLineEdit(this);
m_pInstanceLE->setText(widget->getInstanceName());
m_pNameLayout->addWidget(m_pInstanceLE, 2, 1);
//setup documentation
- m_pDocGB = new QGroupBox(this);
+ m_pDocGB = new TQGroupBox(this);
topLayout->addWidget(m_pDocGB, 1, 0);
- QHBoxLayout* docLayout = new QHBoxLayout(m_pDocGB);
+ TQHBoxLayout* docLayout = new TQHBoxLayout(m_pDocGB);
docLayout->setMargin(margin);
m_pDocGB->setTitle(i18n("Documentation"));
- m_pDoc = new QMultiLineEdit(m_pDocGB);
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
m_pDoc->setText(widget->getDoc());
docLayout->addWidget(m_pDoc);
m_pObject = 0;//needs to be set to zero
@@ -364,7 +364,7 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
ClassGenPage::~ClassGenPage() {}
-void ClassGenPage::insertStereotype( const QString& type, int index )
+void ClassGenPage::insertStereotype( const TQString& type, int index )
{
m_pStereoTypeCB->insertItem( type, index );
m_pStereoTypeCB->completionObject()->addItem( type );
@@ -372,7 +372,7 @@ void ClassGenPage::insertStereotype( const QString& type, int index )
void ClassGenPage::updateObject() {
if(m_pObject) {
- QString name = m_pClassNameLE -> text();
+ TQString name = m_pClassNameLE -> text();
m_pObject -> setDoc(m_pDoc -> text());
@@ -437,7 +437,7 @@ void ClassGenPage::updateObject() {
m_pWidget -> setDrawAsActor( m_pDrawActorCB -> isChecked() );
if( m_pDeconCB )
m_pWidget -> setShowDestruction( m_pDeconCB -> isChecked() );
- QString name = m_pClassNameLE -> text();
+ TQString name = m_pClassNameLE -> text();
m_pWidget -> setDoc(m_pDoc -> text());
UMLObject * o = m_pWidget -> getUMLObject();
UMLObject * old = m_pUmldoc -> findUMLObject(name);
@@ -448,7 +448,7 @@ void ClassGenPage::updateObject() {
o -> setName(name);
} else if (m_pInstanceWidget) {
m_pInstanceWidget->setInstanceName(m_pInstanceLE->text());
- QString name = m_pClassNameLE->text();
+ TQString name = m_pClassNameLE->text();
m_pInstanceWidget->setDoc(m_pDoc->text());
UMLObject* o = m_pInstanceWidget->getUMLObject();
UMLObject* old = m_pUmldoc->findUMLObject(name);
diff --git a/umbrello/umbrello/dialogs/classgenpage.h b/umbrello/umbrello/dialogs/classgenpage.h
index 6fd0f7d3..6fad1cde 100644
--- a/umbrello/umbrello/dialogs/classgenpage.h
+++ b/umbrello/umbrello/dialogs/classgenpage.h
@@ -12,7 +12,7 @@
#ifndef CLASSGENPAGE_H
#define CLASSGENPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QGroupBox;
class QLabel;
@@ -36,7 +36,7 @@ class UMLDoc;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ClassGenPage : public QWidget {
+class ClassGenPage : public TQWidget {
Q_OBJECT
public:
@@ -47,7 +47,7 @@ public:
* @param parent The parent to the ClassGenPage.
* @param o The UMLObject to display the properties of.
*/
- ClassGenPage(UMLDoc *d, QWidget *parent, UMLObject * o);
+ ClassGenPage(UMLDoc *d, TQWidget *parent, UMLObject * o);
/**
* Sets up the ClassGenPage for an ObjectWidget
@@ -56,7 +56,7 @@ public:
* @param parent The parent to the ClassGenPage.
* @param o The ObjectWidget to display the properties of.
*/
- ClassGenPage(UMLDoc *d, QWidget *parent, ObjectWidget * o);
+ ClassGenPage(UMLDoc *d, TQWidget *parent, ObjectWidget * o);
/**
* Sets up the ClassGenPage for a UMLWidget instance (used
@@ -66,7 +66,7 @@ public:
* @param parent The parent to the ClassGenPage.
* @param widget The UMLWidget to display the properties of.
*/
- ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget);
+ ClassGenPage(UMLDoc* d, TQWidget* parent, UMLWidget* widget);
/**
* Standard deconstructor.
@@ -79,23 +79,23 @@ public:
*/
void updateObject();
private:
- QGroupBox *m_pDocGB;
- QButtonGroup * m_pButtonBG;
- QLabel * m_pNameL, * m_pInstanceL, * m_pStereoTypeL, * m_pPackageL;
- QLineEdit * m_pClassNameLE, *m_pInstanceLE, * m_pPackageLE;
+ TQGroupBox *m_pDocGB;
+ TQButtonGroup * m_pButtonBG;
+ TQLabel * m_pNameL, * m_pInstanceL, * m_pStereoTypeL, * m_pPackageL;
+ TQLineEdit * m_pClassNameLE, *m_pInstanceLE, * m_pPackageLE;
KComboBox * m_pStereoTypeCB;
- QRadioButton *m_pPublicRB, *m_pPrivateRB, *m_pProtectedRB, *m_pImplementationRB;
- QCheckBox * m_pMultiCB, * m_pDrawActorCB, * m_pAbstractCB, * m_pDeconCB;
- QMultiLineEdit * m_pDoc;
+ TQRadioButton *m_pPublicRB, *m_pPrivateRB, *m_pProtectedRB, *m_pImplementationRB;
+ TQCheckBox * m_pMultiCB, * m_pDrawActorCB, * m_pAbstractCB, * m_pDeconCB;
+ TQMultiLineEdit * m_pDoc;
UMLObject * m_pObject;
UMLDoc * m_pUmldoc;
ObjectWidget * m_pWidget;
UMLWidget* m_pInstanceWidget;
- QButtonGroup* m_pDrawAsBG;
- QRadioButton* m_pDefaultRB,* m_pFileRB,* m_pLibraryRB,* m_pTableRB;
- QCheckBox* m_pExecutableCB;
+ TQButtonGroup* m_pDrawAsBG;
+ TQRadioButton* m_pDefaultRB,* m_pFileRB,* m_pLibraryRB,* m_pTableRB;
+ TQCheckBox* m_pExecutableCB;
- void insertStereotype(const QString& type, int index = -1);
+ void insertStereotype(const TQString& type, int index = -1);
public slots:
/**
diff --git a/umbrello/umbrello/dialogs/classifierlistpage.cpp b/umbrello/umbrello/dialogs/classifierlistpage.cpp
index d7148660..e59956bc 100644
--- a/umbrello/umbrello/dialogs/classifierlistpage.cpp
+++ b/umbrello/umbrello/dialogs/classifierlistpage.cpp
@@ -25,15 +25,15 @@
#include <kbuttonbox.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
using namespace Uml;
-ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifier,
- UMLDoc* doc, Uml::Object_Type type) : QWidget(parent) {
+ClassifierListPage::ClassifierListPage(TQWidget* parent, UMLClassifier* classifier,
+ UMLDoc* doc, Uml::Object_Type type) : TQWidget(parent) {
m_itemType = type;
- QString typeName("");
- QString newItemType("");
+ TQString typeName("");
+ TQString newItemType("");
if (type == ot_Attribute) {
typeName = i18n("Attributes");
newItemType = i18n("N&ew Attribute...");
@@ -61,22 +61,22 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie
setMinimumSize(310,330);
//main layout contains our two group boxes, the list and the documentation
- QVBoxLayout* mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( this );
mainLayout->setSpacing(10);
//top group box, contains a vertical layout with list box above and buttons below
- m_pItemListGB = new QGroupBox(typeName, this );
- QVBoxLayout* listVBoxLayout = new QVBoxLayout( m_pItemListGB );
+ m_pItemListGB = new TQGroupBox(typeName, this );
+ TQVBoxLayout* listVBoxLayout = new TQVBoxLayout( m_pItemListGB );
listVBoxLayout->setMargin(margin);
listVBoxLayout->setSpacing ( 10 );
//horizontal box contains the list box and the move up/down buttons
- QHBoxLayout* listHBoxLayout = new QHBoxLayout( listVBoxLayout );
- m_pItemListLB = new QListBox(m_pItemListGB);
+ TQHBoxLayout* listHBoxLayout = new TQHBoxLayout( listVBoxLayout );
+ m_pItemListLB = new TQListBox(m_pItemListGB);
listHBoxLayout->addWidget(m_pItemListLB);
//the move up/down buttons (another vertical box)
- QVBoxLayout* buttonLayout = new QVBoxLayout( listHBoxLayout );
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout( listHBoxLayout );
m_pTopArrowB = new KArrowButton( m_pItemListGB );
m_pTopArrowB->setEnabled( false );
buttonLayout->addWidget( m_pTopArrowB );
@@ -95,17 +95,17 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie
//the action buttons
KButtonBox* buttonBox = new KButtonBox(m_pItemListGB);
- buttonBox->addButton( newItemType, this, SLOT(slotNewListItem()) );
+ buttonBox->addButton( newItemType, this, TQT_SLOT(slotNewListItem()) );
m_pDeleteListItemButton = buttonBox->addButton( i18n("&Delete"),
- this, SLOT(slotDelete()) );
- m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this, SLOT(slotProperties()) );
+ this, TQT_SLOT(slotDelete()) );
+ m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this, TQT_SLOT(slotProperties()) );
listVBoxLayout->addWidget(buttonBox);
mainLayout->addWidget(m_pItemListGB);
- m_pDocGB = new QGroupBox(i18n("Documentation"), this);
- QVBoxLayout* docLayout = new QVBoxLayout( m_pDocGB );
- m_pDocTE = new QTextEdit( m_pDocGB );
+ m_pDocGB = new TQGroupBox(i18n("Documentation"), this);
+ TQVBoxLayout* docLayout = new TQVBoxLayout( m_pDocGB );
+ m_pDocTE = new TQTextEdit( m_pDocGB );
docLayout->setMargin(margin);
docLayout->setSpacing ( 10 );
docLayout->addWidget( m_pDocTE );
@@ -117,27 +117,27 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie
// to the ListItemModified slot in this class
for (UMLClassifierListItem* listItem = itemList.first(); listItem != 0; listItem = itemList.next() ) {
m_pItemListLB->insertItem(listItem->toString(Uml::st_SigNoVis));
- connect( listItem, SIGNAL(modified()),this,SLOT(slotListItemModified()) );
+ connect( listItem, TQT_SIGNAL(modified()),this,TQT_SLOT(slotListItemModified()) );
}
enableWidgets(false);//disable widgets until an att is chosen
m_pOldListItem = 0;
- connect(m_pItemListLB, SIGNAL(clicked(QListBoxItem*)), this, SLOT(slotClicked(QListBoxItem*)));
- connect(m_pItemListLB, SIGNAL(selectionChanged(QListBoxItem*)), this, SLOT(slotClicked(QListBoxItem*)));
-
- connect(m_pItemListLB, SIGNAL(rightButtonPressed(QListBoxItem*, const QPoint&)),
- this, SLOT(slotRightButtonPressed(QListBoxItem*, const QPoint&)));
-
- connect(m_pItemListLB, SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)),
- this, SLOT(slotRightButtonClicked(QListBoxItem*, const QPoint&)));
- connect(m_pDoc, SIGNAL(sigObjectCreated(UMLObject*)), this, SLOT(slotListItemCreated(UMLObject*)));
-
- connect( m_pTopArrowB, SIGNAL( clicked() ), this, SLOT( slotTopClicked() ) );
- connect( m_pUpArrowB, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
- connect( m_pDownArrowB, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
- connect( m_pBottomArrowB, SIGNAL( clicked() ), this, SLOT( slotBottomClicked() ) );
- connect( m_pItemListLB, SIGNAL( doubleClicked( QListBoxItem* ) ),
- this, SLOT( slotDoubleClick( QListBoxItem* ) ) );
+ connect(m_pItemListLB, TQT_SIGNAL(clicked(TQListBoxItem*)), this, TQT_SLOT(slotClicked(TQListBoxItem*)));
+ connect(m_pItemListLB, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), this, TQT_SLOT(slotClicked(TQListBoxItem*)));
+
+ connect(m_pItemListLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem*, const TQPoint&)));
+
+ connect(m_pItemListLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem*, const TQPoint&)));
+ connect(m_pDoc, TQT_SIGNAL(sigObjectCreated(UMLObject*)), this, TQT_SLOT(slotListItemCreated(UMLObject*)));
+
+ connect( m_pTopArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTopClicked() ) );
+ connect( m_pUpArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
+ connect( m_pDownArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
+ connect( m_pBottomArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBottomClicked() ) );
+ connect( m_pItemListLB, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ),
+ this, TQT_SLOT( slotDoubleClick( TQListBoxItem* ) ) );
}
ClassifierListPage::~ClassifierListPage() {
@@ -189,7 +189,7 @@ void ClassifierListPage::enableWidgets(bool state) {
m_pPropertiesButton->setEnabled(true);
}
-void ClassifierListPage::slotClicked(QListBoxItem*item) {
+void ClassifierListPage::slotClicked(TQListBoxItem*item) {
//if not first time an item is highlighted
//save old highlighted item first
if(m_pOldListItem) {
@@ -201,7 +201,7 @@ void ClassifierListPage::slotClicked(QListBoxItem*item) {
// focus and so at least one item is always selected; this doesn't happen, if
// there are no items of course;
//
- // for more information see Qt doc for void QListBox::clearSelection()
+ // for more information see Qt doc for void TQListBox::clearSelection()
UMLClassifierListItem* listItem;
if (item == NULL) {
if (m_pItemListLB->count() == 0) {
@@ -226,11 +226,11 @@ void ClassifierListPage::slotClicked(QListBoxItem*item) {
void ClassifierListPage::updateObject() {
saveCurrentItemDocumentation();
- QListBoxItem*i = m_pItemListLB->item(m_pItemListLB->currentItem());
+ TQListBoxItem*i = m_pItemListLB->item(m_pItemListLB->currentItem());
slotClicked(i);
// The rest of this function does nothing?!
- QStringList stringList;
+ TQStringList stringList;
int count = m_pItemListLB->count();
for( int j = 0; j < count ; j++ )
stringList.append( m_pItemListLB->text( j ) );
@@ -267,16 +267,16 @@ void ClassifierListPage::slotListItemModified() {
m_bSigWaiting = false;
}
-void ClassifierListPage::slotRightButtonClicked(QListBoxItem* /*item*/, const QPoint& /* p*/) {
+void ClassifierListPage::slotRightButtonClicked(TQListBoxItem* /*item*/, const TQPoint& /* p*/) {
if (m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void ClassifierListPage::slotRightButtonPressed(QListBoxItem* item, const QPoint& p) {
+void ClassifierListPage::slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p) {
ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined;
if (item) { //pressed on a list item
if (m_itemType == ot_Attribute) {
@@ -309,14 +309,14 @@ void ClassifierListPage::slotRightButtonPressed(QListBoxItem* item, const QPoint
}
if(m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
}
void ClassifierListPage::slotPopupMenuSel(int id) {
@@ -349,10 +349,10 @@ void ClassifierListPage::slotPopupMenuSel(int id) {
}
}
-void ClassifierListPage::printItemList(QString prologue) {
+void ClassifierListPage::printItemList(TQString prologue) {
#ifdef VERBOSE_DEBUGGING
UMLClassifierListItem* item;
- QString buf;
+ TQString buf;
UMLClassifierListItemList itemList = getItemList();
for (UMLClassifierListItemListIt it(itemList); (item = it.current()) != NULL; ++it)
buf.append(' ' + item->getName());
@@ -369,11 +369,11 @@ void ClassifierListPage::slotTopClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString currentString = m_pItemListLB->text( index );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->removeItem( index );
m_pItemListLB->insertItem( currentString, 0 );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( 0 );
+ TQListBoxItem* item = m_pItemListLB->item( 0 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
@@ -400,12 +400,12 @@ void ClassifierListPage::slotUpClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString aboveString = m_pItemListLB->text( index - 1 );
- QString currentString = m_pItemListLB->text( index );
+ TQString aboveString = m_pItemListLB->text( index - 1 );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->changeItem( currentString, index -1 );
m_pItemListLB->changeItem( aboveString, index );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( index - 1 );
+ TQListBoxItem* item = m_pItemListLB->item( index - 1 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
@@ -434,12 +434,12 @@ void ClassifierListPage::slotDownClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString belowString = m_pItemListLB->text( index + 1 );
- QString currentString = m_pItemListLB->text( index );
+ TQString belowString = m_pItemListLB->text( index + 1 );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->changeItem( currentString, index + 1 );
m_pItemListLB->changeItem( belowString, index );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( index + 1 );
+ TQListBoxItem* item = m_pItemListLB->item( index + 1 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
printItemList("itemList before change: ");
@@ -467,11 +467,11 @@ void ClassifierListPage::slotBottomClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString currentString = m_pItemListLB->text( index );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->removeItem( index );
m_pItemListLB->insertItem( currentString, m_pItemListLB->count() );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( m_pItemListLB->count() - 1 );
+ TQListBoxItem* item = m_pItemListLB->item( m_pItemListLB->count() - 1 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
@@ -489,7 +489,7 @@ void ClassifierListPage::slotBottomClicked() {
slotClicked( item );
}
-void ClassifierListPage::slotDoubleClick( QListBoxItem* item ) {
+void ClassifierListPage::slotDoubleClick( TQListBoxItem* item ) {
if( !item )
return;
diff --git a/umbrello/umbrello/dialogs/classifierlistpage.h b/umbrello/umbrello/dialogs/classifierlistpage.h
index ea1c0b9f..1dba8297 100644
--- a/umbrello/umbrello/dialogs/classifierlistpage.h
+++ b/umbrello/umbrello/dialogs/classifierlistpage.h
@@ -13,10 +13,10 @@
#define CLASSIFIERLISTPAGE_H
//qt includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qtextedit.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqtextedit.h>
//kde includes
#include <karrowbutton.h>
@@ -36,7 +36,7 @@ class UMLDoc;
* @author Paul Hensgen, Jonathan Riddell
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ClassifierListPage : public QWidget {
+class ClassifierListPage : public TQWidget {
Q_OBJECT
public:
/**
@@ -47,7 +47,7 @@ public:
* @param doc The UMLDoc document
* @param type The type of listItem this handles
*/
- ClassifierListPage(QWidget* parent, UMLClassifier* classifier, UMLDoc* doc, Uml::Object_Type type);
+ ClassifierListPage(TQWidget* parent, UMLClassifier* classifier, UMLDoc* doc, Uml::Object_Type type);
/**
* Standard deconstructor.
@@ -108,21 +108,21 @@ private:
* Utility for debugging, prints the current item list.
* Only effective if VERBOSE_DEBUGGING is defined.
*/
- void printItemList(QString prologue);
+ void printItemList(TQString prologue);
UMLClassifier* m_pClassifier;
- QGroupBox* m_pDocGB;
- QGroupBox* m_pItemListGB;
- QListBox* m_pItemListLB;
- QTextEdit* m_pDocTE;
+ TQGroupBox* m_pDocGB;
+ TQGroupBox* m_pItemListGB;
+ TQListBox* m_pItemListLB;
+ TQTextEdit* m_pDocTE;
Uml::Object_Type m_itemType;
KArrowButton* m_pTopArrowB;
KArrowButton* m_pUpArrowB;
KArrowButton* m_pDownArrowB;
KArrowButton* m_pBottomArrowB;
- QPushButton* m_pDeleteListItemButton;
- QPushButton* m_pPropertiesButton;
+ TQPushButton* m_pDeleteListItemButton;
+ TQPushButton* m_pPropertiesButton;
UMLClassifierListItem* m_pOldListItem;
UMLDoc* m_pDoc;
@@ -134,7 +134,7 @@ public slots:
* called when list view is clicked on
* calls enableWidgets()
*/
- void slotClicked(QListBoxItem* item);
+ void slotClicked(TQListBoxItem* item);
/**
* Called when an item is selected in a right click menu
@@ -143,13 +143,13 @@ public slots:
void slotListItemCreated(UMLObject* object);
void slotListItemModified();
- void slotRightButtonClicked(QListBoxItem* item, const QPoint& p);
- void slotRightButtonPressed(QListBoxItem* item, const QPoint& p);
+ void slotRightButtonClicked(TQListBoxItem* item, const TQPoint& p);
+ void slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p);
/**
* shows properties dialog for the attribute clicked on
*/
- void slotDoubleClick(QListBoxItem* item);
+ void slotDoubleClick(TQListBoxItem* item);
/**
diff --git a/umbrello/umbrello/dialogs/classoptionspage.cpp b/umbrello/umbrello/dialogs/classoptionspage.cpp
index 7a54f2dc..670d86f1 100644
--- a/umbrello/umbrello/dialogs/classoptionspage.cpp
+++ b/umbrello/umbrello/dialogs/classoptionspage.cpp
@@ -13,7 +13,7 @@
#include "classoptionspage.h"
// qt/kde includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
@@ -22,15 +22,15 @@
#include "../classifierwidget.h"
-ClassOptionsPage::ClassOptionsPage(QWidget* pParent, ClassifierWidget* pWidget)
- : QWidget( pParent ) {
+ClassOptionsPage::ClassOptionsPage(TQWidget* pParent, ClassifierWidget* pWidget)
+ : TQWidget( pParent ) {
init();
//Uml::Widget_Type type = pWidget->getBaseType();
m_pWidget = pWidget;
setupPage();
}
-ClassOptionsPage::ClassOptionsPage(QWidget* pParent, Settings::OptionState *options) : QWidget( pParent )
+ClassOptionsPage::ClassOptionsPage(TQWidget* pParent, Settings::OptionState *options) : TQWidget( pParent )
{
init();
m_options = options;
@@ -54,20 +54,20 @@ void ClassOptionsPage::setupPage() {
bool sig = false;
Uml::Signature_Type sigtype;
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
- m_pVisibilityGB = new QGroupBox(i18n("Show"), this);
+ m_pVisibilityGB = new TQGroupBox(i18n("Show"), this);
topLayout -> addWidget(m_pVisibilityGB);
- QGridLayout * visibilityLayout = new QGridLayout(m_pVisibilityGB);
+ TQGridLayout * visibilityLayout = new TQGridLayout(m_pVisibilityGB);
visibilityLayout -> setSpacing(10);
visibilityLayout -> setMargin(margin);
visibilityLayout -> setRowStretch(3, 1);
- m_pShowOpsCB = new QCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
+ m_pShowOpsCB = new TQCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
m_pShowOpsCB -> setChecked(m_pWidget -> getShowOps());
visibilityLayout -> addWidget(m_pShowOpsCB, 0, 0);
- m_pShowVisibilityCB = new QCheckBox(i18n("&Visibility"), m_pVisibilityGB);
+ m_pShowVisibilityCB = new TQCheckBox(i18n("&Visibility"), m_pVisibilityGB);
m_pShowVisibilityCB -> setChecked(m_pWidget -> getShowVisibility());
visibilityLayout -> addWidget(m_pShowVisibilityCB, 0, 1);
@@ -76,26 +76,26 @@ void ClassOptionsPage::setupPage() {
sig = false;
else
sig = true;
- m_pShowOpSigCB = new QCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
+ m_pShowOpSigCB = new TQCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
m_pShowOpSigCB -> setChecked(sig);
visibilityLayout -> addWidget(m_pShowOpSigCB, 1, 0);
- m_pShowPackageCB = new QCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
+ m_pShowPackageCB = new TQCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
m_pShowPackageCB -> setChecked(m_pWidget -> getShowPackage());
visibilityLayout -> addWidget(m_pShowPackageCB, 1, 1);
Uml::Widget_Type type = m_pWidget->getBaseType();
if (type == Uml::wt_Class) {
- m_pShowAttsCB = new QCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
+ m_pShowAttsCB = new TQCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
m_pShowAttsCB->setChecked(m_pWidget->getShowAtts());
visibilityLayout->addWidget(m_pShowAttsCB, 2, 0);
- m_pShowStereotypeCB = new QCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
+ m_pShowStereotypeCB = new TQCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
m_pShowStereotypeCB->setChecked(m_pWidget->getShowStereotype());
visibilityLayout->addWidget(m_pShowStereotypeCB, 2, 1);
- m_pShowAttSigCB = new QCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
+ m_pShowAttSigCB = new TQCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
sigtype = m_pWidget->getShowAttSigs();
if(sigtype == Uml::st_NoSig || sigtype == Uml::st_NoSigNoVis)
sig = false;
@@ -105,7 +105,7 @@ void ClassOptionsPage::setupPage() {
visibilityLayout->addWidget(m_pShowAttSigCB, 3, 0);
} else if (type == Uml::wt_Interface) {
- m_pDrawAsCircleCB = new QCheckBox(i18n("Draw as circle"), m_pVisibilityGB);
+ m_pDrawAsCircleCB = new TQCheckBox(i18n("Draw as circle"), m_pVisibilityGB);
m_pDrawAsCircleCB->setChecked( m_pWidget->getDrawAsCircle() );
visibilityLayout->addWidget(m_pDrawAsCircleCB, 2, 0);
}
@@ -115,40 +115,40 @@ void ClassOptionsPage::setupClassPageOption() {
int margin = fontMetrics().height();
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
- m_pVisibilityGB = new QGroupBox(i18n("Show"), this);
+ m_pVisibilityGB = new TQGroupBox(i18n("Show"), this);
topLayout -> addWidget(m_pVisibilityGB);
- QGridLayout * visibilityLayout = new QGridLayout(m_pVisibilityGB);
+ TQGridLayout * visibilityLayout = new TQGridLayout(m_pVisibilityGB);
visibilityLayout -> setSpacing(10);
visibilityLayout -> setMargin(margin);
- m_pShowOpsCB = new QCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
+ m_pShowOpsCB = new TQCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
m_pShowOpsCB -> setChecked( m_options->classState.showOps );
visibilityLayout -> addWidget(m_pShowOpsCB, 0, 0);
- m_pShowOpSigCB = new QCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
+ m_pShowOpSigCB = new TQCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
m_pShowOpSigCB -> setChecked(m_options->classState.showOpSig);
visibilityLayout -> addWidget(m_pShowOpSigCB, 1, 0);
visibilityLayout -> setRowStretch(3, 1);
- m_pShowAttsCB = new QCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
+ m_pShowAttsCB = new TQCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
m_pShowAttsCB -> setChecked(m_options->classState.showAtts );
visibilityLayout -> addWidget(m_pShowAttsCB, 2, 0);
- m_pShowAttSigCB = new QCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
+ m_pShowAttSigCB = new TQCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
m_pShowAttSigCB -> setChecked(m_options->classState.showAttSig);
visibilityLayout -> addWidget(m_pShowAttSigCB, 3, 0);
- m_pShowVisibilityCB = new QCheckBox(i18n("&Visibility"), m_pVisibilityGB);
+ m_pShowVisibilityCB = new TQCheckBox(i18n("&Visibility"), m_pVisibilityGB);
m_pShowVisibilityCB -> setChecked(m_options->classState.showVisibility);
visibilityLayout -> addWidget(m_pShowVisibilityCB, 0, 1);
- m_pShowPackageCB = new QCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
+ m_pShowPackageCB = new TQCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
m_pShowPackageCB -> setChecked(m_options->classState.showPackage);
visibilityLayout -> addWidget(m_pShowPackageCB, 1, 1);
- m_pShowStereotypeCB = new QCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
+ m_pShowStereotypeCB = new TQCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
m_pShowStereotypeCB -> setChecked(m_options->classState.showStereoType);
visibilityLayout -> addWidget(m_pShowStereotypeCB, 2, 1);
diff --git a/umbrello/umbrello/dialogs/classoptionspage.h b/umbrello/umbrello/dialogs/classoptionspage.h
index 50d43f8c..718944cc 100644
--- a/umbrello/umbrello/dialogs/classoptionspage.h
+++ b/umbrello/umbrello/dialogs/classoptionspage.h
@@ -13,9 +13,9 @@
#ifndef CLASSOPTIONSPAGE_H
#define CLASSOPTIONSPAGE_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
#include "../optionstate.h"
@@ -31,17 +31,17 @@ class ClassifierWidget;
* @see ClassPropDlg
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ClassOptionsPage : public QWidget {
+class ClassOptionsPage : public TQWidget {
public:
/**
* Constructor - observe and modify a Widget
*/
- ClassOptionsPage(QWidget* pParent, ClassifierWidget* pWidget);
+ ClassOptionsPage(TQWidget* pParent, ClassifierWidget* pWidget);
/**
* Constructor - observe and modify an OptionState structure
*/
- ClassOptionsPage(QWidget* pParent, Settings::OptionState *options );
+ ClassOptionsPage(TQWidget* pParent, Settings::OptionState *options );
/**
* destructor
@@ -88,11 +88,11 @@ protected:
void updateOptionState();
//GUI widgets
- QGroupBox * m_pVisibilityGB;
- QCheckBox * m_pShowVisibilityCB, * m_pShowAttSigCB;
- QCheckBox * m_pShowOpSigCB, * m_pShowAttsCB, * m_pShowOpsCB;
- QCheckBox * m_pShowStereotypeCB, * m_pShowPackageCB;
- QCheckBox* m_pDrawAsCircleCB;
+ TQGroupBox * m_pVisibilityGB;
+ TQCheckBox * m_pShowVisibilityCB, * m_pShowAttSigCB;
+ TQCheckBox * m_pShowOpSigCB, * m_pShowAttsCB, * m_pShowOpsCB;
+ TQCheckBox * m_pShowStereotypeCB, * m_pShowPackageCB;
+ TQCheckBox* m_pDrawAsCircleCB;
/**
* The classifier widget to represent in the dialog page.
diff --git a/umbrello/umbrello/dialogs/classpropdlg.cpp b/umbrello/umbrello/dialogs/classpropdlg.cpp
index 9c4848a1..169de20e 100644
--- a/umbrello/umbrello/dialogs/classpropdlg.cpp
+++ b/umbrello/umbrello/dialogs/classpropdlg.cpp
@@ -13,7 +13,7 @@
#include "classpropdlg.h"
// qt/kde includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kdebug.h>
@@ -33,7 +33,7 @@
#include "../uml.h"
#include "../umlview.h"
-ClassPropDlg::ClassPropDlg(QWidget *parent, UMLObject * c, int pageNum, bool assoc)
+ClassPropDlg::ClassPropDlg(TQWidget *parent, UMLObject * c, int pageNum, bool assoc)
: KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_CLASSDLG_", true, true) {
m_pWidget = 0;
@@ -52,7 +52,7 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, UMLObject * c, int pageNum, bool ass
showPage(pageNum);
}
-ClassPropDlg::ClassPropDlg(QWidget *parent, ObjectWidget * o)
+ClassPropDlg::ClassPropDlg(TQWidget *parent, ObjectWidget * o)
: KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_CLASSDLG_", true, true) {
m_pWidget = o;
@@ -66,14 +66,14 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, ObjectWidget * o)
m_Type = pt_ObjectWidget;
m_pObject = m_pWidget->getUMLObject();
m_pDoc = UMLApp::app()->getDocument();
- QFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
page -> setMinimumSize(310, 330);
- QHBoxLayout * topLayout = new QHBoxLayout(page);
+ TQHBoxLayout * topLayout = new TQHBoxLayout(page);
m_pGenPage = new ClassGenPage(m_pDoc, page, o);
topLayout -> addWidget(m_pGenPage);
- QFrame * newPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(newPage);
+ TQFrame * newPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(newPage);
m_pColorPage = new UMLWidgetColorPage(newPage, o);
m_pColorLayout -> addWidget(m_pColorPage);
@@ -82,7 +82,7 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, ObjectWidget * o)
setMinimumSize(340,420);
}
-ClassPropDlg::ClassPropDlg(QWidget *parent, UMLWidget * w)
+ClassPropDlg::ClassPropDlg(TQWidget *parent, UMLWidget * w)
: KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_CLASSDLG_", true, true) {
m_pWidget = w;
@@ -115,15 +115,15 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, UMLWidget * w)
//now setup the options page for classes
if (w->getBaseType() == Uml::wt_Class || w->getBaseType() == Uml::wt_Interface) {
- QFrame* newPage = addPage( i18n("Display"), i18n("Display Options"), DesktopIcon("info") );
- QHBoxLayout* m_pOptionsLayout = new QHBoxLayout(newPage);
+ TQFrame* newPage = addPage( i18n("Display"), i18n("Display Options"), DesktopIcon("info") );
+ TQHBoxLayout* m_pOptionsLayout = new TQHBoxLayout(newPage);
ClassifierWidget *cw = static_cast<ClassifierWidget*>(w);
m_pOptionsPage = new ClassOptionsPage( newPage, cw );
m_pOptionsLayout -> addWidget(m_pOptionsPage);
}
- QFrame* colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon("colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame* colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon("colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage(colorPage, w);
m_pColorLayout -> addWidget(m_pColorPage);
setupFontPage();
@@ -167,8 +167,8 @@ void ClassPropDlg::slotApply() {
}
void ClassPropDlg::setupPages(UMLObject * c, bool assoc) {
- QFrame *page = addPage(i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
- QHBoxLayout * genLayout = new QHBoxLayout(page);
+ TQFrame *page = addPage(i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQHBoxLayout * genLayout = new TQHBoxLayout(page);
page -> setMinimumSize(310, 330);
m_pGenPage = new ClassGenPage(m_pDoc, page, c);
genLayout -> addWidget(m_pGenPage);
@@ -176,52 +176,52 @@ void ClassPropDlg::setupPages(UMLObject * c, bool assoc) {
//add extra pages for class
if (ot == Uml::ot_Class ) {
//setup attributes page
- QFrame* newPage = addPage( i18n("Attributes"), i18n("Attribute Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Attributes"), i18n("Attribute Settings"), DesktopIcon("misc") );
m_pAttPage = new ClassifierListPage(newPage, (UMLClassifier *)c, m_pDoc, Uml::ot_Attribute);
- QHBoxLayout * attLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout * attLayout = new TQHBoxLayout(newPage);
attLayout -> addWidget(m_pAttPage);
}
if (ot == Uml::ot_Class || ot == Uml::ot_Interface) {
//setup operations page
- QFrame* newPage = addPage( i18n("Operations"), i18n("Operation Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Operations"), i18n("Operation Settings"), DesktopIcon("misc") );
m_pOpsPage = new ClassifierListPage(newPage, (UMLClassifier*)c, m_pDoc, Uml::ot_Operation);
- QHBoxLayout* pOpsLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* pOpsLayout = new TQHBoxLayout(newPage);
pOpsLayout -> addWidget(m_pOpsPage);
}
if (ot == Uml::ot_Class || ot == Uml::ot_Interface) {
//setup templates page
- QFrame* newPage = addPage( i18n("Templates"), i18n("Templates Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Templates"), i18n("Templates Settings"), DesktopIcon("misc") );
m_pTemplatePage = new ClassifierListPage(newPage, (UMLClassifier *)c, m_pDoc, Uml::ot_Template);
- QHBoxLayout* templatesLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* templatesLayout = new TQHBoxLayout(newPage);
templatesLayout->addWidget(m_pTemplatePage);
}
if (ot == Uml::ot_Enum) {
//setup enum literals page
- QFrame* newPage = addPage( i18n("Enum Literals"), i18n("Enum Literals Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Enum Literals"), i18n("Enum Literals Settings"), DesktopIcon("misc") );
m_pEnumLiteralPage = new ClassifierListPage(newPage, (UMLClassifier*)c, m_pDoc, Uml::ot_EnumLiteral);
- QHBoxLayout* enumLiteralsLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* enumLiteralsLayout = new TQHBoxLayout(newPage);
enumLiteralsLayout->addWidget(m_pEnumLiteralPage);
}
if (ot == Uml::ot_Entity) {
//setup enum literals page
- QFrame* newPage = addPage( i18n("Entity Attributes"), i18n("Entity Attributes Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Entity Attributes"), i18n("Entity Attributes Settings"), DesktopIcon("misc") );
m_pEntityAttributePage = new ClassifierListPage(newPage, (UMLClassifier*)c, m_pDoc, Uml::ot_EntityAttribute);
- QHBoxLayout* entityAttributesLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* entityAttributesLayout = new TQHBoxLayout(newPage);
entityAttributesLayout->addWidget(m_pEntityAttributePage);
}
if (ot == Uml::ot_Package ) {
// Set up containment page.
- QFrame* newPage = addPage( i18n("Contents"), i18n("Contents Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Contents"), i18n("Contents Settings"), DesktopIcon("misc") );
m_pPkgContentsPage = new PkgContentsPage(newPage, (UMLPackage*)(c));
- QHBoxLayout* contentsLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* contentsLayout = new TQHBoxLayout(newPage);
contentsLayout->addWidget(m_pPkgContentsPage);
}
if (assoc) {
- QFrame* newPage = addPage(i18n("Associations"), i18n("Class Associations"), DesktopIcon( "misc") );
+ TQFrame* newPage = addPage(i18n("Associations"), i18n("Class Associations"), DesktopIcon( "misc") );
m_pAssocPage = new AssocPage(newPage, UMLApp::app()->getCurrentView(), m_pObject);
- QHBoxLayout* assocLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* assocLayout = new TQHBoxLayout(newPage);
assocLayout -> addWidget(m_pAssocPage);
} else {
m_pAssocPage = 0;
@@ -229,8 +229,8 @@ void ClassPropDlg::setupPages(UMLObject * c, bool assoc) {
}
void ClassPropDlg::setupInstancePages(UMLWidget* widget) {
- QFrame* page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon("misc") );
- QHBoxLayout* genLayout = new QHBoxLayout(page);
+ TQFrame* page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon("misc") );
+ TQHBoxLayout* genLayout = new TQHBoxLayout(page);
page->setMinimumSize(310, 330);
m_pGenPage = new ClassGenPage(m_pDoc, page, widget);
genLayout->addWidget(m_pGenPage);
@@ -240,8 +240,8 @@ void ClassPropDlg::setupInstancePages(UMLWidget* widget) {
void ClassPropDlg::setupFontPage() {
if( !m_pWidget )
return;
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pWidget -> getFont() );
}
diff --git a/umbrello/umbrello/dialogs/classpropdlg.h b/umbrello/umbrello/dialogs/classpropdlg.h
index 90c5b4ec..6a107ad7 100644
--- a/umbrello/umbrello/dialogs/classpropdlg.h
+++ b/umbrello/umbrello/dialogs/classpropdlg.h
@@ -49,7 +49,7 @@ public:
* @param pageNum The page to show first.
* @param assoc Determines whether to display associations
*/
- ClassPropDlg(QWidget *parent, UMLObject *c, int pageNum = 0, bool assoc = false);
+ ClassPropDlg(TQWidget *parent, UMLObject *c, int pageNum = 0, bool assoc = false);
/**
* Sets up a ClassPropDlg.
@@ -57,7 +57,7 @@ public:
* @param parent The parent of the ClassPropDlg
* @param o The ObjectWidget to display properties of.
*/
- ClassPropDlg(QWidget *parent, ObjectWidget * o);
+ ClassPropDlg(TQWidget *parent, ObjectWidget * o);
/**
* Sets up a ClassPropDlg.
@@ -65,7 +65,7 @@ public:
* @param parent The parent of the ClassPropDlg
* @param o The UMLWidget to display properties of.
*/
- ClassPropDlg(QWidget *parent, UMLWidget * o);
+ ClassPropDlg(TQWidget *parent, UMLWidget * o);
/**
diff --git a/umbrello/umbrello/dialogs/classwizard.cpp b/umbrello/umbrello/dialogs/classwizard.cpp
index 7ac1cb27..c49e418f 100644
--- a/umbrello/umbrello/dialogs/classwizard.cpp
+++ b/umbrello/umbrello/dialogs/classwizard.cpp
@@ -26,13 +26,13 @@
#include "../umlclassifierlistitemlist.h"
#include "../classifierlistitem.h"
-ClassWizard::ClassWizard( UMLDoc * pDoc ) : KWizard( (QWidget*)pDoc -> parent(), "_CLASSWIZARD_", true) {
+ClassWizard::ClassWizard( UMLDoc * pDoc ) : KWizard( (TQWidget*)pDoc -> parent(), "_CLASSWIZARD_", true) {
m_pDoc = pDoc;
//create a unique class to start with
UMLObject * pTemp = 0;
- QString name = i18n("new_class");
- QString newName = name;
- QString num = "";
+ TQString name = i18n("new_class");
+ TQString newName = name;
+ TQString num = "";
int i = 0;
m_pClass = new UMLClassifier( newName );
do {
@@ -63,42 +63,42 @@ void ClassWizard::setupPages() {
addPage( m_pOpPage, i18n("Class Operations") );
}
-void ClassWizard::showPage( QWidget * pWidget ) {
- QWizard::showPage( pWidget );
+void ClassWizard::showPage( TQWidget * pWidget ) {
+ TQWizard::showPage( pWidget );
if( pWidget == m_pOpPage )
finishButton() -> setEnabled( true );
}
void ClassWizard::next() {
- QWidget * pWidget = currentPage();
+ TQWidget * pWidget = currentPage();
if( pWidget == m_pGenPage ) {
m_pGenPage -> updateObject();
} else if( pWidget == m_pAttPage ) {
m_pAttPage -> updateObject();
}
- QWizard::next();
+ TQWizard::next();
}
void ClassWizard::back() {
- QWidget * pWidget = currentPage();
+ TQWidget * pWidget = currentPage();
if( pWidget == m_pAttPage ) {
m_pAttPage -> updateObject();
} else if( pWidget == m_pOpPage ) {
m_pOpPage -> updateObject();
}
- QWizard::back();
+ TQWizard::back();
}
void ClassWizard::accept() {
m_pDoc -> addUMLObject( m_pClass );
m_pDoc->signalUMLObjectCreated(m_pClass);
- QWizard::accept();
+ TQWizard::accept();
}
void ClassWizard::reject() {
delete m_pClass;
- QWizard::reject();
+ TQWizard::reject();
}
void ClassWizard::help() {
diff --git a/umbrello/umbrello/dialogs/classwizard.h b/umbrello/umbrello/dialogs/classwizard.h
index bc2dabf8..77fde177 100644
--- a/umbrello/umbrello/dialogs/classwizard.h
+++ b/umbrello/umbrello/dialogs/classwizard.h
@@ -41,7 +41,7 @@ protected:
/**
* Overrides the default method.
*/
- void showPage( QWidget * pWidget );
+ void showPage( TQWidget * pWidget );
/**
* Overrides the default method.
diff --git a/umbrello/umbrello/dialogs/codeeditor.cpp b/umbrello/umbrello/dialogs/codeeditor.cpp
index c05b80bb..9fe17afc 100644
--- a/umbrello/umbrello/dialogs/codeeditor.cpp
+++ b/umbrello/umbrello/dialogs/codeeditor.cpp
@@ -22,13 +22,13 @@
#include "codeeditor.h"
// qt/kde includes
-#include <qkeysequence.h>
-#include <qcursor.h>
-#include <qcolor.h>
-#include <qlabel.h>
-#include <qbrush.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqkeysequence.h>
+#include <tqcursor.h>
+#include <tqcolor.h>
+#include <tqlabel.h>
+#include <tqbrush.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -55,14 +55,14 @@
#include "umlroledialog.h"
#include "umloperationdialog.h"
-CodeEditor::CodeEditor ( const QString & text, const QString & context, CodeViewerDialog * parent, const char * name , CodeDocument * doc)
- : QTextEdit ( text, context, parent, name)
+CodeEditor::CodeEditor ( const TQString & text, const TQString & context, CodeViewerDialog * parent, const char * name , CodeDocument * doc)
+ : TQTextEdit ( text, context, parent, name)
{
init(parent, doc);
}
CodeEditor::CodeEditor ( CodeViewerDialog * parent, const char* name, CodeDocument * doc )
- : QTextEdit ( parent, name )
+ : TQTextEdit ( parent, name )
{
init(parent, doc);
}
@@ -90,7 +90,7 @@ Settings::CodeViewerState CodeEditor::getState()
return m_parentDlg->getState();
}
-QLabel * CodeEditor::getComponentLabel() {
+TQLabel * CodeEditor::getComponentLabel() {
return m_parentDlg->componentLabel;
}
@@ -98,7 +98,7 @@ QLabel * CodeEditor::getComponentLabel() {
// FIX: used only for debugging right now.. eliminate eventually -b.t.
void CodeEditor::clicked(int para, int pos)
{
- getComponentLabel()->setText("para:"+QString::number(para)+" pos:"+QString::number(pos));
+ getComponentLabel()->setText("para:"+TQString::number(para)+" pos:"+TQString::number(pos));
}
@@ -112,7 +112,7 @@ bool CodeEditor::close ( bool alsoDelete )
m_lastTextBlockToBeEdited = 0;
}
- return QTextEdit::close(alsoDelete);
+ return TQTextEdit::close(alsoDelete);
}
@@ -177,14 +177,14 @@ void CodeEditor::editTextBlock(TextBlock * tBlock, int para) {
}
// return whether is empty or just whitespace
-bool CodeEditor::StringIsBlank(const QString &str)
+bool CodeEditor::StringIsBlank(const TQString &str)
{
if(str.isEmpty() || str.stripWhiteSpace().isEmpty())
return true;
return false;
}
-void CodeEditor::keyPressEvent ( QKeyEvent * e ) {
+void CodeEditor::keyPressEvent ( TQKeyEvent * e ) {
// kDebug() <<"KEY PRESS EVENT:["<<e->text().latin1()<<"] ascii CODE:"<<e->ascii();
@@ -195,7 +195,7 @@ void CodeEditor::keyPressEvent ( QKeyEvent * e ) {
if((e->ascii() == 10) || (e->ascii() == 13) || (e->text() == "\r\n"))
m_newLinePressed = true;
- QTextEdit::keyPressEvent(e);
+ TQTextEdit::keyPressEvent(e);
}
void CodeEditor::loadFromDocument ()
@@ -205,12 +205,12 @@ void CodeEditor::loadFromDocument ()
clearText();
// set caption on tool
- QString caption = m_parentDoc->getFileName() + m_parentDoc->getFileExtension();
+ TQString caption = m_parentDoc->getFileName() + m_parentDoc->getFileExtension();
setCaption( tr2i18n( caption.latin1() ) );
// header for document
- QString header = m_parentDoc->getHeader()->toString();
- QString componentName = QString("header for file ") +caption;
+ TQString header = m_parentDoc->getHeader()->toString();
+ TQString componentName = TQString("header for file ") +caption;
if(!StringIsBlank(header))
insert(header,m_parentDoc->getHeader(),false,getState().fontColor,
getState().nonEditBlockColor,0,componentName);
@@ -223,7 +223,7 @@ void CodeEditor::loadFromDocument ()
}
-void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable, const QColor & fgcolor, const QColor & bgcolor, UMLObject * umlobj, const QString & displayName, int startLine)
+void CodeEditor::insert (const TQString & text, TextBlock * parent, bool editable, const TQColor & fgcolor, const TQColor & bgcolor, UMLObject * umlobj, const TQString & displayName, int startLine)
{
// set some params
@@ -235,19 +235,19 @@ void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable
if(startLine == -1)
{
startLine = paragraphs()-1;
- QTextEdit::append(text); // put actual text in. Use insert instead of append so history is preserved?
+ TQTextEdit::append(text); // put actual text in. Use insert instead of append so history is preserved?
}
else
{
isInsert = true;
- QTextEdit::insertAt(text, startLine, 0);
+ TQTextEdit::insertAt(text, startLine, 0);
}
// actual put in text
// now do 'paragraph' background highlighting
// int endLine = paragraphs()-2;
- int endLine = text.contains(QRegExp("\n")) + startLine -1;
+ int endLine = text.contains(TQRegExp("\n")) + startLine -1;
if(m_isHighlighted)
for(int para=startLine;para<=endLine;para++)
setParagraphBackgroundColor(para,bgcolor);
@@ -297,7 +297,7 @@ void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable
// that are greater than zero in that type of textblock
int increase = size + 1;
- QMap<TextBlock*,TextBlockInfo*>::Iterator it;
+ TQMap<TextBlock*,TextBlockInfo*>::Iterator it;
for ( it = m_tbInfoMap->begin(); it != m_tbInfoMap->end(); ++it )
{
TextBlock * tblock = it.key();
@@ -363,18 +363,18 @@ void CodeEditor::appendText(TextBlockList * items)
}
-void CodeEditor::appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj , const QString & componentName)
+void CodeEditor::appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj , const TQString & componentName)
{
if(!comment->getWriteOutText() && !m_showHiddenBlocks)
return;
- QColor bgcolor = getState().nonEditBlockColor;
+ TQColor bgcolor = getState().nonEditBlockColor;
if(!comment->getWriteOutText() && m_showHiddenBlocks)
bgcolor = getState().hiddenColor;
- QString indent = comment->getIndentationString();
- QString text = comment->toString(); // use comment formatting, NOT formatMultiLineText(comment->toString(), indent, "\n");
+ TQString indent = comment->getIndentationString();
+ TQString text = comment->toString(); // use comment formatting, NOT formatMultiLineText(comment->toString(), indent, "\n");
if(!StringIsBlank(text))
insert(text,parent,true,getState().fontColor, bgcolor, umlObj, componentName);
@@ -385,11 +385,11 @@ void CodeEditor::appendText (CodeBlockWithComments * cb ) {
if(!cb->getWriteOutText() && !m_showHiddenBlocks)
return;
- QString indent = cb->getIndentationString();
- QString body = cb->formatMultiLineText (cb->getText(), indent, "\n");
+ TQString indent = cb->getIndentationString();
+ TQString body = cb->formatMultiLineText (cb->getText(), indent, "\n");
- QColor bgcolor = getState().editBlockColor;
- QString componentName = QString("CodeBlock");
+ TQColor bgcolor = getState().editBlockColor;
+ TQString componentName = TQString("CodeBlock");
appendText(cb->getComment(), cb, 0, componentName);
@@ -406,13 +406,13 @@ void CodeEditor::appendText (CodeClassFieldDeclarationBlock * db ) {
if(!db->getWriteOutText() && !m_showHiddenBlocks)
return;
- QString indent = db->getIndentationString();
- QString body = db->formatMultiLineText (db->getText(), indent, "\n");
+ TQString indent = db->getIndentationString();
+ TQString body = db->formatMultiLineText (db->getText(), indent, "\n");
UMLObject * parentObj = db->getParentClassField()->getParentObject();
- QColor bgcolor = getState().editBlockColor;
- QString componentName = QString("");
+ TQColor bgcolor = getState().editBlockColor;
+ TQString componentName = TQString("");
if(parentObj)
{
if(db->getParentClassField()->parentIsAttribute()) {
@@ -443,13 +443,13 @@ void CodeEditor::appendText (CodeMethodBlock * mb) {
if(!mb->getWriteOutText() && (!m_showHiddenBlocks || dynamic_cast<CodeAccessorMethod*>(mb)))
return;
- QColor bgcolor = getState().umlObjectColor;
- QString indent = mb->getIndentationString();
- QString bodyIndent = mb->getIndentationString(mb->getIndentationLevel()+1);
+ TQColor bgcolor = getState().umlObjectColor;
+ TQString indent = mb->getIndentationString();
+ TQString bodyIndent = mb->getIndentationString(mb->getIndentationLevel()+1);
- QString startText = mb->formatMultiLineText ( mb->getStartMethodText(), indent, "\n");
- QString body = mb->formatMultiLineText (mb->getText(), bodyIndent, "\n");
- QString endText = mb->formatMultiLineText( mb->getEndMethodText(), indent, "\n");
+ TQString startText = mb->formatMultiLineText ( mb->getStartMethodText(), indent, "\n");
+ TQString body = mb->formatMultiLineText (mb->getText(), bodyIndent, "\n");
+ TQString endText = mb->formatMultiLineText( mb->getEndMethodText(), indent, "\n");
if(body.isEmpty())
body = " \n";
@@ -460,7 +460,7 @@ void CodeEditor::appendText (CodeMethodBlock * mb) {
bgcolor = getState().hiddenColor;
}
- QString componentName = QString("<b>parentless method\?</b>");
+ TQString componentName = TQString("<b>parentless method\?</b>");
// ugly, but we need to know if there is a parent object here.
CodeOperation * op = dynamic_cast<CodeOperation*>(mb);
@@ -504,11 +504,11 @@ void CodeEditor::appendText (TextBlock * tb) {
if(!tb->getWriteOutText() && !m_showHiddenBlocks)
return;
- QColor bgcolor = getState().nonEditBlockColor;
+ TQColor bgcolor = getState().nonEditBlockColor;
if(!tb->getWriteOutText() && m_showHiddenBlocks)
bgcolor = getState().hiddenColor;
- QString str = tb->toString();
+ TQString str = tb->toString();
insert(str,tb,false,getState().fontColor,bgcolor);
}
@@ -521,14 +521,14 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
OwnedHierarchicalCodeBlock * test = dynamic_cast<OwnedHierarchicalCodeBlock *>(hblock);
UMLObject * parentObj = 0;
- QString componentName = QString("");
- QColor paperColor = getState().nonEditBlockColor;
+ TQString componentName = TQString("");
+ TQColor paperColor = getState().nonEditBlockColor;
if(test)
{
parentObj = test->getParentObject();
UMLClassifier *c = dynamic_cast<UMLClassifier*>(parentObj);
if (c) {
- QString typeStr;
+ TQString typeStr;
if (c->isInterface())
typeStr = "Interface";
else
@@ -545,9 +545,9 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
paperColor = getState().hiddenColor;
TextBlockList * items = hblock->getTextBlockList();
- QString indent = hblock->getIndentationString();
- QString startText = hblock->formatMultiLineText ( hblock->getStartText(), indent, "\n");
- QString endText = hblock->formatMultiLineText( hblock->getEndText(), indent, "\n");
+ TQString indent = hblock->getIndentationString();
+ TQString startText = hblock->formatMultiLineText ( hblock->getStartText(), indent, "\n");
+ TQString endText = hblock->formatMultiLineText( hblock->getEndText(), indent, "\n");
appendText(hblock->getComment(), hblock, parentObj, componentName);
@@ -559,14 +559,14 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
}
-void CodeEditor::insertParagraph ( const QString & text, int para )
+void CodeEditor::insertParagraph ( const TQString & text, int para )
{
- QTextEdit::insertParagraph(text,para);
+ TQTextEdit::insertParagraph(text,para);
}
void CodeEditor::removeParagraph ( int para )
{
- QTextEdit::removeParagraph(para);
+ TQTextEdit::removeParagraph(para);
}
// All umlobjects which may have pop-up boxes should return true here
@@ -623,10 +623,10 @@ void CodeEditor::slotInsertCodeBlockBeforeSelected()
int location = m_textBlockList.findRef(m_selectedTextBlock); // find first para of selected block
- QString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
+ TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
insert(body,newBlock,true,getState().fontColor,
- getState().editBlockColor,0,QString("CodeBlock"),location);
+ getState().editBlockColor,0,TQString("CodeBlock"),location);
}
@@ -645,21 +645,21 @@ void CodeEditor::slotInsertCodeBlockAfterSelected()
ParaInfo * lastpi = tbinfo->m_paraList.last();
int location = m_textBlockList.findRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1;
- QString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
+ TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
insert(body,newBlock,true,getState().fontColor,
- getState().editBlockColor,0,QString("CodeBlock"),location);
+ getState().editBlockColor,0,TQString("CodeBlock"),location);
}
-QPopupMenu * CodeEditor::createPopupMenu ( const QPoint & pos )
+TQPopupMenu * CodeEditor::createPopupMenu ( const TQPoint & pos )
{
TextBlock * tb = m_selectedTextBlock;
m_lastPara = paragraphAt(pos);
- QPopupMenu * menu = new QPopupMenu(this);
- // ugh. A bug in the Qt interaction between QTextEdit and Menu
+ TQPopupMenu * menu = new TQPopupMenu(this);
+ // ugh. A bug in the Qt interaction between TQTextEdit and Menu
// can sometimes trigger a clear() call of the text area after
// the popup menu is destroyed. The workaround is to disable
// the behavior by blocking the destroy signal from the menu.
@@ -668,26 +668,26 @@ QPopupMenu * CodeEditor::createPopupMenu ( const QPoint & pos )
if (m_selectedTextBlock)
{
if(tb->getWriteOutText())
- menu->insertItem("Hide",this,SLOT(slotChangeSelectedBlockView()), Key_H, 0);
+ menu->insertItem("Hide",this,TQT_SLOT(slotChangeSelectedBlockView()), Key_H, 0);
else
- menu->insertItem("Show",this,SLOT(slotChangeSelectedBlockView()), Key_S, 0);
+ menu->insertItem("Show",this,TQT_SLOT(slotChangeSelectedBlockView()), Key_S, 0);
CodeBlockWithComments * cb = dynamic_cast<CodeBlockWithComments*>(tb);
if(cb)
if(cb->getComment()->getWriteOutText())
- menu->insertItem("Hide Comment",this,SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_H, 1);
+ menu->insertItem("Hide Comment",this,TQT_SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_H, 1);
else
- menu->insertItem("Show Comment",this,SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_S, 1);
+ menu->insertItem("Show Comment",this,TQT_SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_S, 1);
menu->insertSeparator();
- menu->insertItem("Insert Code Block Before",this,SLOT(slotInsertCodeBlockBeforeSelected()), CTRL+Key_B, 2);
- menu->insertItem("Insert Code Block After",this,SLOT(slotInsertCodeBlockAfterSelected()), CTRL+Key_A, 3);
+ menu->insertItem("Insert Code Block Before",this,TQT_SLOT(slotInsertCodeBlockBeforeSelected()), CTRL+Key_B, 2);
+ menu->insertItem("Insert Code Block After",this,TQT_SLOT(slotInsertCodeBlockAfterSelected()), CTRL+Key_A, 3);
menu->insertSeparator();
- menu->insertItem("Copy",this,SLOT(slotCopyTextBlock()), CTRL+Key_C, 4);
- menu->insertItem("Paste",this,SLOT(slotPasteTextBlock()), CTRL+Key_V, 5);
- menu->insertItem("Cut",this,SLOT(slotCutTextBlock()), CTRL+Key_X, 6);
+ menu->insertItem("Copy",this,TQT_SLOT(slotCopyTextBlock()), CTRL+Key_C, 4);
+ menu->insertItem("Paste",this,TQT_SLOT(slotPasteTextBlock()), CTRL+Key_V, 5);
+ menu->insertItem("Cut",this,TQT_SLOT(slotCutTextBlock()), CTRL+Key_X, 6);
// enable/disable based on conditions
if(m_selectedTextBlock == m_parentDoc->getHeader())
@@ -783,7 +783,7 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
m_parentDoc = parentDoc;
setUndoRedoEnabled( false );
- setCursor( QCursor( 0 ) );
+ setCursor( TQCursor( 0 ) );
setMouseTracking( true );
setReadOnly (true);
m_isHighlighted = getState().blocksAreHighlighted;
@@ -794,7 +794,7 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
m_textBlockToPaste = 0;
m_selectedTextBlock = 0;
m_lastTextBlockToBeEdited = 0;
- m_tbInfoMap = new QMap<TextBlock *, TextBlockInfo*>;
+ m_tbInfoMap = new TQMap<TextBlock *, TextBlockInfo*>;
setFont( getState().font );
@@ -808,15 +808,15 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
// set some viewability parameters
//int margin = fontMetrics().height();
- QBrush pbrush = QBrush ( getState().paperColor);
+ TQBrush pbrush = TQBrush ( getState().paperColor);
setPaper(pbrush);
// setMargin(margin);
- // connect(this,SIGNAL(newLinePressed()),this,SLOT(newLinePressed()));
- // connect(this,SIGNAL(backspacePressed()),this,SLOT(backspacePressed()));
- connect(this,SIGNAL(doubleClicked(int,int)),this,SLOT(doubleClicked(int,int)));
- connect(this,SIGNAL(cursorPositionChanged(int,int)),this,SLOT(cursorPositionChanged(int,int)));
+ // connect(this,TQT_SIGNAL(newLinePressed()),this,TQT_SLOT(newLinePressed()));
+ // connect(this,TQT_SIGNAL(backspacePressed()),this,TQT_SLOT(backspacePressed()));
+ connect(this,TQT_SIGNAL(doubleClicked(int,int)),this,TQT_SLOT(doubleClicked(int,int)));
+ connect(this,TQT_SIGNAL(cursorPositionChanged(int,int)),this,TQT_SLOT(cursorPositionChanged(int,int)));
// do this last
loadFromDocument();
@@ -828,16 +828,16 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
if (block) {
CodeMethodBlock * cmb = dynamic_cast<CodeMethodBlock*>(block);
- //QString baseIndent = block->getNewEditorLine(block->getIndentationLevel()+(cmb ? 1 : 0));
- QString baseIndent = block->getIndentationString(block->getIndentationLevel()+(cmb ? 1 : 0));
+ //TQString baseIndent = block->getNewEditorLine(block->getIndentationLevel()+(cmb ? 1 : 0));
+ TQString baseIndent = block->getIndentationString(block->getIndentationLevel()+(cmb ? 1 : 0));
TextBlockInfo *info = (*m_tbInfoMap)[block];
UMLObject * parentObj = info->getParent();
int pstart = m_textBlockList.findRef(block);
- QString content = "";
+ TQString content = "";
// Assemble content from editiable paras
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
{
if(item->isEditable)
@@ -847,7 +847,7 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
int lastLineToAddNewLine = lastpara + endEdit;
for(int para=(item->start+pstart);para<=lastpara;para++)
{
- QString line = block->unformatText(text(para), baseIndent);
+ TQString line = block->unformatText(text(para), baseIndent);
content += line;
// \n are implicit in the editor (!) so we should put them
// back in, if there is any content from the line
@@ -907,13 +907,13 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
CodeMethodBlock * cmb = dynamic_cast<CodeMethodBlock*>(tBlock);
// auto-indent new lines
- QString currentParaText = text(para);
- QString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel()+(cmb ? 1 : 0));
+ TQString currentParaText = text(para);
+ TQString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel()+(cmb ? 1 : 0));
// cerr<<"AUTO INDENT:["<<baseIndent.latin1()<<"] isMethod?"<<(cmb?"true":"false")<<endl;
int minPos = baseIndent.length();
// add indent chars to the current line, if missing
- if(!m_backspacePressed && !currentParaText.contains(QRegExp('^'+baseIndent)))
+ if(!m_backspacePressed && !currentParaText.contains(TQRegExp('^'+baseIndent)))
{
insertAt(baseIndent,para,0);
setCursorPosition(para,pos+minPos);
@@ -929,7 +929,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
int endOfPriorLine = paragraphLength(para-1);
// IN this case, we remove old (para) line, and tack its
// contents on the line we are going to.
- QString contents = text(para);
+ TQString contents = text(para);
contents = contents.right(contents.length()-m_lastPos+1);
// this next thing happens when we arent deleting last line
@@ -949,7 +949,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// the indentation
if(m_backspacePressed && !priorParaIsEditable)
{
- QString contents = text(para);
+ TQString contents = text(para);
contents = contents.right(contents.length()-m_lastPos+1);
contents = baseIndent + contents.left(contents.length()-1); // left is to remove trailing space
insertParagraph(contents,para+1);
@@ -957,7 +957,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// furthermore, IF its nothing but indentation + whitespace
// we switch this back to Auto-Generated.
- if(cmb && contents.contains(QRegExp('^'+baseIndent+"\\s$")))
+ if(cmb && contents.contains(TQRegExp('^'+baseIndent+"\\s$")))
{
cmb->setContentType(CodeBlock::AutoGenerated);
cmb->syncToParent();
@@ -1008,7 +1008,7 @@ bool CodeEditor::paraIsNotSingleLine (int para)
{
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
if((pstart+item->start) <= para && (item->start+pstart+item->size) >= para )
@@ -1032,7 +1032,7 @@ bool CodeEditor::isParaEditable (int para) {
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
int pstart = m_textBlockList.findRef(tBlock);
int relativeLine = para - pstart;
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
{
if((item->start+pstart) <= para && (item->start+pstart+item->size) >= para)
@@ -1054,7 +1054,7 @@ void CodeEditor::changeTextBlockHighlighting(TextBlock * tBlock, bool selected)
if(tBlock)
{
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.findRef(tBlock);
for(ParaInfo * item = list.first(); item; item=list.next())
for(int p=(item->start+pstart);p<=(item->start+pstart+item->size);p++)
@@ -1115,7 +1115,7 @@ void CodeEditor::contractSelectedParagraph( int paraToRemove ) {
{
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
bool lowerStartPosition = false;
for(ParaInfo * item = list.first(); item; item=list.next())
@@ -1148,7 +1148,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
// add this tBlock in
m_textBlockList.insert(priorPara,tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.findRef(tBlock);
// now update the paragraph information
@@ -1170,7 +1170,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
}
-void CodeEditor::contentsMouseMoveEvent ( QMouseEvent * e )
+void CodeEditor::contentsMouseMoveEvent ( TQMouseEvent * e )
{
int para = paragraphAt(e->pos());
@@ -1212,7 +1212,7 @@ void CodeEditor::contentsMouseMoveEvent ( QMouseEvent * e )
// If connections are right, then the UMLObject will send out the modified()
// signal which will trigger a call to re-generate the appropriate code within
// the code document. Our burden is to appropriately prepare the tool: we clear
-// out ALL the textblocks in the QTextEdit widget and then re-show them
+// out ALL the textblocks in the TQTextEdit widget and then re-show them
// after the dialog disappears
void CodeEditor::rebuildView( int startCursorPos ) {
diff --git a/umbrello/umbrello/dialogs/codeeditor.h b/umbrello/umbrello/dialogs/codeeditor.h
index 57f1fb37..5956e3ab 100644
--- a/umbrello/umbrello/dialogs/codeeditor.h
+++ b/umbrello/umbrello/dialogs/codeeditor.h
@@ -19,10 +19,10 @@
#ifndef CODEEDITOR_H
#define CODEEDITOR_H
-#include <qpopupmenu.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qtextedit.h>
+#include <tqpopupmenu.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
#include "../codeviewerstate.h"
#include "../textblocklist.h"
@@ -45,7 +45,7 @@ class CodeEditor : public QTextEdit
Q_OBJECT
public:
- explicit CodeEditor ( const QString & text, const QString & context = QString(), CodeViewerDialog * parent = 0, const char * name = 0 , CodeDocument * doc = 0);
+ explicit CodeEditor ( const TQString & text, const TQString & context = TQString(), CodeViewerDialog * parent = 0, const char * name = 0 , CodeDocument * doc = 0);
explicit CodeEditor ( CodeViewerDialog * parent, const char* name = 0, CodeDocument * doc = 0);
~CodeEditor ();
@@ -62,7 +62,7 @@ protected:
void appendText (CodeClassFieldDeclarationBlock * db );
void appendText (TextBlockList * items);
void appendText (CodeMethodBlock * mb);
- void appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj = 0, const QString & compName="");
+ void appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj = 0, const TQString & compName="");
void appendText (CodeBlockWithComments * cb );
// Rebuild our view of the document. Happens whenever we change
@@ -71,26 +71,26 @@ protected:
// If connections are right, then the UMLObject will send out the modified()
// signal which will trigger a call to re-generate the appropriate code within
// the code document. Our burden is to appropriately prepare the tool: we clear
- // out ALL the textblocks in the QTextEdit widget and then re-show them
+ // out ALL the textblocks in the TQTextEdit widget and then re-show them
// after the dialog disappears
void rebuildView( int startCursorPos );
// override the QT event so we can do appropriate things
- void contentsMouseMoveEvent ( QMouseEvent * e );
+ void contentsMouseMoveEvent ( TQMouseEvent * e );
// implemented so we may capture certain key presses, namely backspace
// and 'return' events.
- void keyPressEvent ( QKeyEvent * e );
+ void keyPressEvent ( TQKeyEvent * e );
// (re) load the parent code document into the editor
void loadFromDocument();
// specialized popup menu for our tool
- QPopupMenu * createPopupMenu ( const QPoint & pos );
+ TQPopupMenu * createPopupMenu ( const TQPoint & pos );
private:
- QString parentDocName;
+ TQString parentDocName;
CodeDocument * m_parentDoc;
CodeViewerDialog * m_parentDlg;
@@ -106,17 +106,17 @@ private:
TextBlock * m_selectedTextBlock;
TextBlock * m_lastTextBlockToBeEdited;
- QMap<TextBlock*, TextBlockInfo*> *m_tbInfoMap;
+ TQMap<TextBlock*, TextBlockInfo*> *m_tbInfoMap;
TextBlockList m_textBlockList;
// main insert routine. Will append if startline is not supplied.
- void insert (const QString & text, TextBlock * parent, bool isEditable = false,
- const QColor & fgcolor = QColor("black"), const QColor & bgcolor = QColor("white"),
- UMLObject * umlobj = 0, const QString & displayName = "", int startLine = -1);
+ void insert (const TQString & text, TextBlock * parent, bool isEditable = false,
+ const TQColor & fgcolor = TQColor("black"), const TQColor & bgcolor = TQColor("white"),
+ UMLObject * umlobj = 0, const TQString & displayName = "", int startLine = -1);
void editTextBlock(TextBlock * tBlock, int para);
void clearText();
- QLabel * getComponentLabel();
+ TQLabel * getComponentLabel();
bool paraIsNotSingleLine (int para);
void expandSelectedParagraph( int where );
void contractSelectedParagraph( int where );
@@ -131,11 +131,11 @@ private:
// return whether or not the passed string is empty or
// contains nothing but whitespace
- static bool StringIsBlank( const QString &str );
+ static bool StringIsBlank( const TQString &str );
public slots:
- void insertParagraph ( const QString & text, int para );
+ void insertParagraph ( const TQString & text, int para );
void removeParagraph ( int para );
void changeHighlighting(int signal);
void changeShowHidden (int signal);
@@ -167,8 +167,8 @@ class ParaInfo {
public:
int start; // this is a relative offset from the beginning of the tblock
int size;
- QColor fgcolor;
- QColor bgcolor;
+ TQColor fgcolor;
+ TQColor bgcolor;
bool isEditable;
ParaInfo () { isEditable = false; }
@@ -176,9 +176,9 @@ public:
class TextBlockInfo {
public:
- QPtrList<ParaInfo> m_paraList;
+ TQPtrList<ParaInfo> m_paraList;
UMLObject * m_parent;
- QString displayName;
+ TQString displayName;
bool isClickable;
bool isCodeAccessorMethod;
diff --git a/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp b/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp
index f3dc25be..8fdb046c 100644
--- a/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp
+++ b/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp
@@ -17,7 +17,7 @@
// own header
#include "codegenerationoptionspage.h"
// qt/kde includes
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
// app includes
#include "../codegenerator.h"
@@ -33,11 +33,11 @@
#include <klocale.h>
//qt include
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqbuttongroup.h>
-CodeGenerationOptionsPage::CodeGenerationOptionsPage(QWidget *parent)
+CodeGenerationOptionsPage::CodeGenerationOptionsPage(TQWidget *parent)
: CodeGenerationOptionsBase(parent)
{
init();
@@ -65,7 +65,7 @@ void CodeGenerationOptionsPage::init()
m_SelectIndentationTypeBox->setCurrentItem(indentTypeToInteger(policy->getIndentationType()));
m_SelectIndentationNumber->setValue(policy->getIndentationAmount());
- connect(this,SIGNAL(syncCodeDocumentsToParent()),gen,SLOT(syncCodeToDocument()));
+ connect(this,TQT_SIGNAL(syncCodeDocumentsToParent()),gen,TQT_SLOT(syncCodeToDocument()));
// now insert the language-dependant page, should there be one
updateCodeGenerationPolicyTab();
@@ -77,7 +77,7 @@ void CodeGenerationOptionsPage::setupActiveLanguageBox()
{
int indexCounter = 0;
while (indexCounter < Uml::pl_Reserved) {
- QString language = Model_Utils::progLangToString((Uml::Programming_Language) indexCounter);
+ TQString language = Model_Utils::progLangToString((Uml::Programming_Language) indexCounter);
m_SelectLanguageBox->insertItem(language, indexCounter);
indexCounter++;
}
@@ -135,7 +135,7 @@ void CodeGenerationOptionsPage::updateCodeGenerationPolicyTab() {
else
m_pCodePolicyPage = new DefaultCodeGenPolicyPage(languageOptionsFrame, "codelangpolicypage");
- connect(this,SIGNAL(applyClicked()),m_pCodePolicyPage,SLOT(apply()));
+ connect(this,TQT_SIGNAL(applyClicked()),m_pCodePolicyPage,TQT_SLOT(apply()));
}
@@ -145,7 +145,7 @@ void CodeGenerationOptionsPage::apply() {
m_parentPolicy->setCodeVerboseDocumentComments(m_forceDoc->isChecked());
m_parentPolicy->setCodeVerboseSectionComments(m_forceSections->isChecked());
- m_parentPolicy->setOutputDirectory(QDir(m_outputDir->text()));
+ m_parentPolicy->setOutputDirectory(TQDir(m_outputDir->text()));
m_parentPolicy->setIncludeHeadings(m_includeHeadings->isChecked());
m_parentPolicy->setHeadingFileDir(m_headingsDir->text());
m_parentPolicy->setOverwritePolicy((CodeGenerationPolicy::OverwritePolicy)m_overwriteGroup->id(m_overwriteGroup->selected()));
@@ -171,8 +171,8 @@ void CodeGenerationOptionsPage::setDefaults() {
void CodeGenerationOptionsPage::browseClicked() {
- QString button = sender()->name();
- QString dir = KFileDialog::getExistingDirectory();
+ TQString button = sender()->name();
+ TQString dir = KFileDialog::getExistingDirectory();
if(dir.isEmpty())
return;
if(button=="m_browseOutput")
@@ -181,7 +181,7 @@ void CodeGenerationOptionsPage::browseClicked() {
m_headingsDir->setText(dir);
}
-QString CodeGenerationOptionsPage::getCodeGenerationLanguage() {
+TQString CodeGenerationOptionsPage::getCodeGenerationLanguage() {
return m_SelectLanguageBox->currentText();
}
diff --git a/umbrello/umbrello/dialogs/codegenerationoptionspage.h b/umbrello/umbrello/dialogs/codegenerationoptionspage.h
index ff939d08..6cd7a2e7 100644
--- a/umbrello/umbrello/dialogs/codegenerationoptionspage.h
+++ b/umbrello/umbrello/dialogs/codegenerationoptionspage.h
@@ -21,7 +21,7 @@
#ifndef CODEGENERATIONOPTIONSPAGE_H
#define CODEGENERATIONOPTIONSPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "codegenerationoptionsbase.h"
#include "../codegenerationpolicy.h"
#include "../umlnamespace.h"
@@ -40,10 +40,10 @@ class CodeGenerationPolicyPage;
class CodeGenerationOptionsPage : public CodeGenerationOptionsBase {
Q_OBJECT
public:
- CodeGenerationOptionsPage(QWidget *parent=0);
+ CodeGenerationOptionsPage(TQWidget *parent=0);
~CodeGenerationOptionsPage();
void setDefaults();
- QString getCodeGenerationLanguage();
+ TQString getCodeGenerationLanguage();
void updateCodeGenerationPolicyTab();
void apply();
diff --git a/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp b/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp
index 8deb3387..0e488e75 100644
--- a/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp
+++ b/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp
@@ -19,7 +19,7 @@
#include "codegenerationpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
// local includes
@@ -29,7 +29,7 @@
/** This is the page which comes up IF there is no special options for the
* code generator.
*/
-CodeGenerationPolicyPage::CodeGenerationPolicyPage( QWidget *parent, const char *name, CodeGenPolicyExt * policy )
+CodeGenerationPolicyPage::CodeGenerationPolicyPage( TQWidget *parent, const char *name, CodeGenPolicyExt * policy )
:CodeGenerationPolicyBase(parent,name)
{
m_parentPolicy = policy;
diff --git a/umbrello/umbrello/dialogs/codegenerationpolicypage.h b/umbrello/umbrello/dialogs/codegenerationpolicypage.h
index 16590dd3..959e34aa 100644
--- a/umbrello/umbrello/dialogs/codegenerationpolicypage.h
+++ b/umbrello/umbrello/dialogs/codegenerationpolicypage.h
@@ -20,7 +20,7 @@
#ifndef CODEGENERATIONPOLICYPAGE_H
#define CODEGENERATIONPOLICYPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "codegenerationpolicybase.h"
class CodeGenPolicyExt;
@@ -32,7 +32,7 @@ class CodeGenPolicyExt;
class CodeGenerationPolicyPage : public CodeGenerationPolicyBase {
Q_OBJECT
public:
- explicit CodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, CodeGenPolicyExt * policy = 0);
+ explicit CodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, CodeGenPolicyExt * policy = 0);
virtual ~CodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/dialogs/codegenerationwizard.cpp b/umbrello/umbrello/dialogs/codegenerationwizard.cpp
index ca726398..b64e30dc 100644
--- a/umbrello/umbrello/dialogs/codegenerationwizard.cpp
+++ b/umbrello/umbrello/dialogs/codegenerationwizard.cpp
@@ -21,10 +21,10 @@
#include "codegenerationwizard.h"
// qt/kde includes
-#include <qdir.h>
-#include <qlistview.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
+#include <tqdir.h>
+#include <tqlistview.h>
+#include <tqfileinfo.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,18 +38,18 @@
CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList)
- : CodeGenerationWizardBase((QWidget*)UMLApp::app()) {
+ : CodeGenerationWizardBase((TQWidget*)UMLApp::app()) {
m_doc = UMLApp::app()->getDocument();
m_app = UMLApp::app();
m_availableList -> setAllColumnsShowFocus(true);
- m_availableList -> setResizeMode(QListView::AllColumns);
+ m_availableList -> setResizeMode(TQListView::AllColumns);
m_selectedList -> setAllColumnsShowFocus(true);
- m_selectedList -> setResizeMode(QListView::AllColumns);
+ m_selectedList -> setResizeMode(TQListView::AllColumns);
m_statusList -> setAllColumnsShowFocus(true);
- m_statusList -> setResizeMode(QListView::AllColumns);
+ m_statusList -> setResizeMode(TQListView::AllColumns);
m_CodeGenerationOptionsPage = new CodeGenerationOptionsPage(this);
- connect( m_CodeGenerationOptionsPage, SIGNAL(languageChanged()), this, SLOT(changeLanguage()) );
+ connect( m_CodeGenerationOptionsPage, TQT_SIGNAL(languageChanged()), this, TQT_SLOT(changeLanguage()) );
insertPage(m_CodeGenerationOptionsPage, i18n("Code Generation Options"), 1);
@@ -60,7 +60,7 @@ CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList)
classList = &cList;
}
for (UMLClassifier *c = classList->first(); c ; c = classList->next()) {
- new QListViewItem( m_selectedList, c->getFullyQualifiedName());
+ new TQListViewItem( m_selectedList, c->getFullyQualifiedName());
}
setNextEnabled(page(0),m_selectedList->childCount() > 0);
@@ -68,10 +68,10 @@ CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList)
setFinishEnabled(page(2),true);
finishButton()->disconnect();
finishButton()->setText(i18n("&Generate"));
- connect(finishButton(),SIGNAL(clicked()),this,SLOT(generateCode()));
- if ( QApplication::reverseLayout() )
+ connect(finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(generateCode()));
+ if ( TQApplication::reverseLayout() )
{
- QPixmap tmpPixmap( *m_addButton->pixmap() );
+ TQPixmap tmpPixmap( *m_addButton->pixmap() );
m_addButton->setPixmap(*m_removeButton->pixmap());
m_removeButton->setPixmap(tmpPixmap);
}
@@ -105,13 +105,13 @@ void CodeGenerationWizard::generateCode() {
cancelButton()->setEnabled(false);
- connect( codeGenerator, SIGNAL(codeGenerated(UMLClassifier*, bool)),
- this, SLOT(classGenerated(UMLClassifier*, bool)) );
+ connect( codeGenerator, TQT_SIGNAL(codeGenerated(UMLClassifier*, bool)),
+ this, TQT_SLOT(classGenerated(UMLClassifier*, bool)) );
UMLClassifierList cList;
cList.setAutoDelete(false);
- for(QListViewItem *item = m_statusList->firstChild(); item;
+ for(TQListViewItem *item = m_statusList->firstChild(); item;
item = item-> nextSibling()) {
UMLClassifier *concept = m_doc->findUMLClassifier(item->text(0));
cList.append(concept);
@@ -119,13 +119,13 @@ void CodeGenerationWizard::generateCode() {
codeGenerator->writeCodeToFile(cList);
finishButton()->setText(i18n("Finish"));
finishButton()->disconnect();
- connect(finishButton(),SIGNAL(clicked()),this,SLOT(accept()));
+ connect(finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(accept()));
}
}
void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated) {
- QListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 );
+ TQListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 );
if( !item ) {
kError()<<"GenerationStatusPage::Error finding class in list view"<<endl;
} else if (generated) {
@@ -137,16 +137,16 @@ void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated
void CodeGenerationWizard::populateStatusList() {
m_statusList->clear();
- for(QListViewItem* item = m_selectedList->firstChild(); item; item = item->nextSibling()) {
- new QListViewItem(m_statusList,item->text(0),i18n("Not Yet Generated"));
+ for(TQListViewItem* item = m_selectedList->firstChild(); item; item = item->nextSibling()) {
+ new TQListViewItem(m_statusList,item->text(0),i18n("Not Yet Generated"));
}
}
-void CodeGenerationWizard::showPage(QWidget *page) {
+void CodeGenerationWizard::showPage(TQWidget *page) {
if (indexOf(page) == 2)
{
// first save the settings to the selected generator policy
- ((CodeGenerationOptionsPage*)QWizard::page(1))->apply();
+ ((CodeGenerationOptionsPage*)TQWizard::page(1))->apply();
// before going on to the final page, check that the output directory exists and is
// writable
@@ -155,14 +155,14 @@ void CodeGenerationWizard::showPage(QWidget *page) {
CodeGenerationPolicy *policy = UMLApp::app()->getCommonPolicy();
// get the output directory path
- QFileInfo info(policy->getOutputDirectory().absPath());
+ TQFileInfo info(policy->getOutputDirectory().absPath());
if(!info.exists())
{
if (KMessageBox::questionYesNo(this,
i18n("The folder %1 does not exist. Do you want to create it now?").arg(info.filePath()),
i18n("Output Folder Does Not Exist"), i18n("Create Folder"), i18n("Do Not Create")) == KMessageBox::Yes)
{
- QDir dir;
+ TQDir dir;
if(!dir.mkdir(info.filePath()))
{
KMessageBox::sorry(this,i18n("The folder could not be created.\nPlease make sure you have write access to its parent folder or select another, valid, folder."),
@@ -195,7 +195,7 @@ void CodeGenerationWizard::showPage(QWidget *page) {
}
}
populateStatusList();
- QWizard::showPage(page);
+ TQWizard::showPage(page);
}
CodeGenerator* CodeGenerationWizard::generator() {
@@ -213,7 +213,7 @@ CodeGenerator* CodeGenerationWizard::generator() {
return 0;
}
- QObject* o=fact->create(m_doc, 0, info->object.latin1());
+ TQObject* o=fact->create(m_doc, 0, info->object.latin1());
if(!o) {
kDebug()<<"could not create object"<<endl;
return 0;
@@ -226,14 +226,14 @@ CodeGenerator* CodeGenerationWizard::generator() {
return (CodeGenerator*) NULL;
}
-void CodeGenerationWizard::moveSelectedItems(QListView* fromList, QListView* toList) {
- QListViewItemIterator it(fromList, QListViewItemIterator::Selected);
+void CodeGenerationWizard::moveSelectedItems(TQListView* fromList, TQListView* toList) {
+ TQListViewItemIterator it(fromList, TQListViewItemIterator::Selected);
while (it.current()) {
- QListViewItem* selectedItem = it.current();
+ TQListViewItem* selectedItem = it.current();
- QString name = selectedItem->text(0);
+ TQString name = selectedItem->text(0);
if (!toList->findItem(name, 0)) {
- new QListViewItem(toList, name);
+ new TQListViewItem(toList, name);
}
++it;
diff --git a/umbrello/umbrello/dialogs/codegenerationwizard.h b/umbrello/umbrello/dialogs/codegenerationwizard.h
index 14d5f157..2fec8046 100644
--- a/umbrello/umbrello/dialogs/codegenerationwizard.h
+++ b/umbrello/umbrello/dialogs/codegenerationwizard.h
@@ -21,8 +21,8 @@
#ifndef CODEGENERATIONWIZARD_H
#define CODEGENERATIONWIZARD_H
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include "codegenerationwizardbase.h"
#include "settingsdlg.h"
#include "../umlclassifierlist.h"
@@ -43,10 +43,10 @@ public:
CodeGenerationWizard(UMLClassifierList *classList);
~CodeGenerationWizard();
- void showPage(QWidget *);
+ void showPage(TQWidget *);
int exec() {
- return QWizard::exec();
+ return TQWizard::exec();
}
protected slots:
@@ -78,7 +78,7 @@ private:
* second. An item is added to the second list only if it isn't already
* there (no duplicated items are created).
*/
- void moveSelectedItems(QListView* fromList, QListView* toList);
+ void moveSelectedItems(TQListView* fromList, TQListView* toList);
UMLApp* m_app;
UMLDoc* m_doc;
diff --git a/umbrello/umbrello/dialogs/codeviewerdialog.cpp b/umbrello/umbrello/dialogs/codeviewerdialog.cpp
index 5672e576..479fcb6b 100644
--- a/umbrello/umbrello/dialogs/codeviewerdialog.cpp
+++ b/umbrello/umbrello/dialogs/codeviewerdialog.cpp
@@ -19,9 +19,9 @@
#include "codeviewerdialog.h"
// qt/kde includes
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
#include "../classifiercodedocument.h"
#include "codeeditor.h"
-CodeViewerDialog::CodeViewerDialog ( QWidget* parent, CodeDocument * doc,
+CodeViewerDialog::CodeViewerDialog ( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state,
const char* name, bool modal, WFlags fl )
: CodeViewerDialogBase ( parent, name, modal, fl )
@@ -69,7 +69,7 @@ void CodeViewerDialog::initGUI ( const char * name) {
CodeViewerDialogBaseLayout->setMargin(margin);
- resize( QSize(width, height).expandedTo(minimumSizeHint()) );
+ resize( TQSize(width, height).expandedTo(minimumSizeHint()) );
}
@@ -79,12 +79,12 @@ void CodeViewerDialog::initGUI ( const char * name) {
void CodeViewerDialog::addCodeDocument( CodeDocument * doc)
{
CodeEditor * page = new CodeEditor ( this, "_codedocumenteditor_", doc );
- QString fname = doc->getFileName();
- QString ext = doc->getFileExtension();
+ TQString fname = doc->getFileName();
+ TQString ext = doc->getFileExtension();
m_tabWidget->insertTab(page, (fname + (ext.isEmpty()? "" : ext)));
- connect( m_highlightCheckBox, SIGNAL( stateChanged(int) ), page, SLOT( changeHighlighting(int) ) );
- connect( m_showHiddenCodeCB, SIGNAL( stateChanged(int) ), page, SLOT( changeShowHidden(int) ) );
+ connect( m_highlightCheckBox, TQT_SIGNAL( stateChanged(int) ), page, TQT_SLOT( changeHighlighting(int) ) );
+ connect( m_showHiddenCodeCB, TQT_SIGNAL( stateChanged(int) ), page, TQT_SLOT( changeShowHidden(int) ) );
}
diff --git a/umbrello/umbrello/dialogs/codeviewerdialog.h b/umbrello/umbrello/dialogs/codeviewerdialog.h
index 7315384f..5367ef16 100644
--- a/umbrello/umbrello/dialogs/codeviewerdialog.h
+++ b/umbrello/umbrello/dialogs/codeviewerdialog.h
@@ -19,11 +19,11 @@
#ifndef CODEVIEWERDIALOG_H
#define CODEVIEWERDIALOG_H
-#include <qcolor.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qtextedit.h>
+#include <tqcolor.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqtextedit.h>
#include "../codeviewerstate.h"
#include "codeviewerdialogbase.h"
@@ -44,14 +44,14 @@ class CodeViewerDialog : public CodeViewerDialogBase
Q_OBJECT
public:
- CodeViewerDialog ( QWidget* parent, CodeDocument * doc, Settings::CodeViewerState state,
+ CodeViewerDialog ( TQWidget* parent, CodeDocument * doc, Settings::CodeViewerState state,
const char* name = 0, bool modal = false, WFlags fl = 0 );
~CodeViewerDialog ();
/** return the code viewer state */
Settings::CodeViewerState getState( );
- QString parentDocName;
+ TQString parentDocName;
/**
* Adds a code document to the tabbed output
diff --git a/umbrello/umbrello/dialogs/codevieweroptionspage.cpp b/umbrello/umbrello/dialogs/codevieweroptionspage.cpp
index dd120569..f4715b0d 100644
--- a/umbrello/umbrello/dialogs/codevieweroptionspage.cpp
+++ b/umbrello/umbrello/dialogs/codevieweroptionspage.cpp
@@ -26,7 +26,7 @@
#include <kcolorbutton.h>
-CodeViewerOptionsPage::CodeViewerOptionsPage( Settings::CodeViewerState options, QWidget *parent, const char *name )
+CodeViewerOptionsPage::CodeViewerOptionsPage( Settings::CodeViewerState options, TQWidget *parent, const char *name )
:CodeViewerOptionsBase(parent,name)
{
init (options);
diff --git a/umbrello/umbrello/dialogs/codevieweroptionspage.h b/umbrello/umbrello/dialogs/codevieweroptionspage.h
index ec01f170..fae3cb05 100644
--- a/umbrello/umbrello/dialogs/codevieweroptionspage.h
+++ b/umbrello/umbrello/dialogs/codevieweroptionspage.h
@@ -18,7 +18,7 @@
#ifndef CODEVIEWEROPTIONSPAGE_H
#define CODEVIEWEROPTIONSPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "codevieweroptionsbase.h"
#include "../codeviewerstate.h"
@@ -29,7 +29,7 @@
class CodeViewerOptionsPage : public CodeViewerOptionsBase {
Q_OBJECT
public:
- CodeViewerOptionsPage (Settings::CodeViewerState options, QWidget *parent, const char *name=0);
+ CodeViewerOptionsPage (Settings::CodeViewerState options, TQWidget *parent, const char *name=0);
~CodeViewerOptionsPage();
Settings::CodeViewerState getOptions();
diff --git a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp
index 668d732d..3da163b7 100644
--- a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp
+++ b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp
@@ -22,17 +22,17 @@
#include "defaultcodegenpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
/** This is the page which comes up IF there is no special options for the
* code generator.
*/
-DefaultCodeGenPolicyPage::DefaultCodeGenPolicyPage ( QWidget *parent, const char *name, CodeGenPolicyExt * policy )
+DefaultCodeGenPolicyPage::DefaultCodeGenPolicyPage ( TQWidget *parent, const char *name, CodeGenPolicyExt * policy )
:CodeGenerationPolicyPage(parent,name,policy)
{
- textLabel = new QLabel(parent,"textLabel");
+ textLabel = new TQLabel(parent,"textLabel");
textLabel->setText(tr2i18n("<p align=\"center\">No Options Available.</p>"));
}
diff --git a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h
index c3d36332..74592684 100644
--- a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h
+++ b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h
@@ -11,8 +11,8 @@
#ifndef DEFAULTCODEGENPOLICYPAGE_H
#define DEFAULTCODEGENPOLICYPAGE_H
-#include <qvariant.h>
-#include <qwidget.h>
+#include <tqvariant.h>
+#include <tqwidget.h>
#include "codegenerationpolicypage.h"
class QVBoxLayout;
@@ -27,11 +27,11 @@ class DefaultCodeGenPolicyPage : public CodeGenerationPolicyPage
public:
- explicit DefaultCodeGenPolicyPage( QWidget* parent = 0, const char* name = 0, CodeGenPolicyExt * policy =0);
+ explicit DefaultCodeGenPolicyPage( TQWidget* parent = 0, const char* name = 0, CodeGenPolicyExt * policy =0);
~DefaultCodeGenPolicyPage();
- QLabel* textLabel;
+ TQLabel* textLabel;
protected:
diff --git a/umbrello/umbrello/dialogs/diagramprintpage.cpp b/umbrello/umbrello/dialogs/diagramprintpage.cpp
index cf366197..8374def4 100644
--- a/umbrello/umbrello/dialogs/diagramprintpage.cpp
+++ b/umbrello/umbrello/dialogs/diagramprintpage.cpp
@@ -13,13 +13,13 @@
#include "diagramprintpage.h"
// qt/kde includes
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qlistbox.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqlistbox.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
#include <klocale.h>
// local includes
@@ -30,53 +30,53 @@
#include "../umlnamespace.h"
-DiagramPrintPage::DiagramPrintPage(QWidget * parent, UMLDoc * m_pDoc) : KPrintDialogPage(parent), m_pDoc(m_pDoc) {
+DiagramPrintPage::DiagramPrintPage(TQWidget * parent, UMLDoc * m_pDoc) : KPrintDialogPage(parent), m_pDoc(m_pDoc) {
int margin = fontMetrics().height();
setTitle(i18n("&Diagrams"));
- QHBoxLayout * mainLayout = new QHBoxLayout(this);
+ TQHBoxLayout * mainLayout = new TQHBoxLayout(this);
mainLayout -> setSpacing(10);
mainLayout -> setMargin(margin);
- m_pFilterBG = new QButtonGroup(i18n("Filter"), this);
+ m_pFilterBG = new TQButtonGroup(i18n("Filter"), this);
mainLayout -> addWidget(m_pFilterBG);
m_pFilterBG -> setExclusive(true);
- QVBoxLayout * filter = new QVBoxLayout(m_pFilterBG);
+ TQVBoxLayout * filter = new TQVBoxLayout(m_pFilterBG);
filter -> setSpacing(10);
filter-> setMargin(margin);
- m_pCurrentRB = new QRadioButton(i18n("&Current diagram"), m_pFilterBG);
+ m_pCurrentRB = new TQRadioButton(i18n("&Current diagram"), m_pFilterBG);
filter -> addWidget(m_pCurrentRB);
m_pCurrentRB -> setChecked(true);
m_pFilterBG -> insert(m_pCurrentRB, Current);
- m_pAllRB = new QRadioButton(i18n("&All diagrams"), m_pFilterBG);
+ m_pAllRB = new TQRadioButton(i18n("&All diagrams"), m_pFilterBG);
filter -> addWidget(m_pAllRB);
m_pFilterBG -> insert(m_pAllRB, All);
- m_pSelectRB = new QRadioButton(i18n("&Select diagrams"), m_pFilterBG);
+ m_pSelectRB = new TQRadioButton(i18n("&Select diagrams"), m_pFilterBG);
filter -> addWidget(m_pSelectRB);
m_pFilterBG -> insert(m_pSelectRB, Select);
- m_pTypeRB = new QRadioButton(i18n("&Type of diagram"), m_pFilterBG);
+ m_pTypeRB = new TQRadioButton(i18n("&Type of diagram"), m_pFilterBG);
filter -> addWidget(m_pTypeRB);
m_pFilterBG -> insert(m_pTypeRB, Type);
- m_pSelectGB = new QGroupBox(i18n("Selection"), this);
+ m_pSelectGB = new TQGroupBox(i18n("Selection"), this);
mainLayout -> addWidget(m_pSelectGB);
- QVBoxLayout * select = new QVBoxLayout(m_pSelectGB);
+ TQVBoxLayout * select = new TQVBoxLayout(m_pSelectGB);
select -> setSpacing(10);
select-> setMargin(margin);
- m_pTypeCB = new QComboBox(m_pSelectGB);
+ m_pTypeCB = new TQComboBox(m_pSelectGB);
select -> addWidget(m_pTypeCB);
m_pTypeCB -> setEnabled(false);
- m_pSelectLB = new QListBox(m_pSelectGB);
+ m_pSelectLB = new TQListBox(m_pSelectGB);
select -> addWidget(m_pSelectLB);
m_pSelectLB -> setEnabled(false);
- m_pSelectLB -> setSelectionMode(QListBox::Multi);
+ m_pSelectLB -> setSelectionMode(TQListBox::Multi);
m_pSelectLB -> insertItem(UMLApp::app()->getCurrentView()->getName());
m_pSelectLB -> setSelected(0, true);
m_nIdList.clear();
@@ -85,8 +85,8 @@ DiagramPrintPage::DiagramPrintPage(QWidget * parent, UMLDoc * m_pDoc) : KPrintDi
m_ViewType = Uml::dt_Class;
- connect(m_pFilterBG, SIGNAL(clicked(int)), this, SLOT(slotClicked(int)));
- connect(m_pTypeCB, SIGNAL(activated(const QString&)), this, SLOT(slotActivated(const QString&)));
+ connect(m_pFilterBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotClicked(int)));
+ connect(m_pTypeCB, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotActivated(const TQString&)));
m_pTypeCB -> insertItem(i18n("Class"));
m_pTypeCB -> insertItem(i18n("Use Case"));
@@ -100,30 +100,30 @@ DiagramPrintPage::DiagramPrintPage(QWidget * parent, UMLDoc * m_pDoc) : KPrintDi
DiagramPrintPage::~DiagramPrintPage()
{
- disconnect(m_pFilterBG, SIGNAL(clicked(int)), this, SLOT(slotClicked(int)));
- disconnect(m_pTypeCB, SIGNAL(activated(const QString&)), this, SLOT(slotActivated(const QString&)));
+ disconnect(m_pFilterBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotClicked(int)));
+ disconnect(m_pTypeCB, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotActivated(const TQString&)));
}
-void DiagramPrintPage::getOptions( QMap<QString,QString>& opts, bool /*incldef = false*/ ) {
+void DiagramPrintPage::getOptions( TQMap<TQString,TQString>& opts, bool /*incldef = false*/ ) {
int listCount = m_pSelectLB -> count();
int count = 0;
- QString diagram(i18n("kde-uml-Diagram"));
+ TQString diagram(i18n("kde-uml-Diagram"));
for(int i=0;i<listCount;i++) {
if(m_pSelectLB -> isSelected(i)) {
UMLView *view = (UMLView *)m_pDoc -> findView(m_nIdList[i]);
- QString sCount = QString("%1").arg(count);
- QString sID = QString("%1").arg(ID2STR(view -> getID()));
+ TQString sCount = TQString("%1").arg(count);
+ TQString sID = TQString("%1").arg(ID2STR(view -> getID()));
opts.insert(diagram + sCount, sID);
count++;
}
}
- opts.insert("kde-uml-count", QString("%1").arg(count));
+ opts.insert("kde-uml-count", TQString("%1").arg(count));
}
-void DiagramPrintPage::setOptions( const QMap<QString,QString>& /*opts*/ ) {}
+void DiagramPrintPage::setOptions( const TQMap<TQString,TQString>& /*opts*/ ) {}
-bool DiagramPrintPage::isValid( QString& msg ) {
+bool DiagramPrintPage::isValid( TQString& msg ) {
int listCount = m_pSelectLB -> count();
bool sel = false;
for(int i =0;i<listCount;i++) {
@@ -139,7 +139,7 @@ bool DiagramPrintPage::isValid( QString& msg ) {
void DiagramPrintPage::slotClicked(int id) {
UMLViewList list = m_pDoc -> getViewIterator();
UMLView * view = 0;
- QString type;
+ TQString type;
// clear list with diagrams to print
m_nIdList.clear();
@@ -191,7 +191,7 @@ void DiagramPrintPage::slotClicked(int id) {
}
}
-void DiagramPrintPage::slotActivated(const QString & text) {
+void DiagramPrintPage::slotActivated(const TQString & text) {
UMLViewList list = m_pDoc -> getViewIterator();
UMLView * view = 0;
diff --git a/umbrello/umbrello/dialogs/diagramprintpage.h b/umbrello/umbrello/dialogs/diagramprintpage.h
index f2184a27..7321f1bf 100644
--- a/umbrello/umbrello/dialogs/diagramprintpage.h
+++ b/umbrello/umbrello/dialogs/diagramprintpage.h
@@ -43,7 +43,7 @@ public:
* @param parent The parent to the page.
* @param doc The @ref UMLDoc class instance being used.
*/
- DiagramPrintPage(QWidget * parent, UMLDoc *doc);
+ DiagramPrintPage(TQWidget * parent, UMLDoc *doc);
/**
* Stnadard deconstructor.
@@ -54,24 +54,24 @@ public:
* Overriden method. It builds a list with the diagram name and the diagram
* IDs.
*/
- void getOptions(QMap<QString,QString>& opts, bool /* incldef=false */);
+ void getOptions(TQMap<TQString,TQString>& opts, bool /* incldef=false */);
/**
* Overriden method.
*/
- void setOptions( const QMap<QString,QString>& /*opts*/ );
+ void setOptions( const TQMap<TQString,TQString>& /*opts*/ );
/**
* Overriden method.
*/
- bool isValid( QString& msg );
+ bool isValid( TQString& msg );
private:
- QButtonGroup * m_pFilterBG;
- QGroupBox * m_pSelectGB;
- QListBox * m_pSelectLB;
- QRadioButton * m_pAllRB, * m_pCurrentRB, * m_pSelectRB, * m_pTypeRB;
- QComboBox * m_pTypeCB;
+ TQButtonGroup * m_pFilterBG;
+ TQGroupBox * m_pSelectGB;
+ TQListBox * m_pSelectLB;
+ TQRadioButton * m_pAllRB, * m_pCurrentRB, * m_pSelectRB, * m_pTypeRB;
+ TQComboBox * m_pTypeCB;
UMLDoc * m_pDoc;
Uml::Diagram_Type m_ViewType;
@@ -79,7 +79,7 @@ private:
/**
* list containing the IDs of diagrams to print
*/
- QValueList<Uml::IDType> m_nIdList;
+ TQValueList<Uml::IDType> m_nIdList;
enum FilterType{Current = 0, All, Select, Type};
public slots:
@@ -95,7 +95,7 @@ public slots:
* Gets called when the user chooses another diagram type. Only diagrams of
* this type will be shown in the diagram box.
*/
- void slotActivated(const QString & text);
+ void slotActivated(const TQString & text);
};
#endif
diff --git a/umbrello/umbrello/dialogs/exportallviewsdialog.cpp b/umbrello/umbrello/dialogs/exportallviewsdialog.cpp
index 9f47afa5..b72901be 100644
--- a/umbrello/umbrello/dialogs/exportallviewsdialog.cpp
+++ b/umbrello/umbrello/dialogs/exportallviewsdialog.cpp
@@ -13,9 +13,9 @@
#include "exportallviewsdialog.h"
// include files for Qt
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
// kde include files
#include <kfilefiltercombo.h>
@@ -25,15 +25,15 @@
#include "../umlviewimageexportermodel.h"
ExportAllViewsDialog::ExportAllViewsDialog(
- QWidget* parent /* = 0 */,
+ TQWidget* parent /* = 0 */,
const char* name /* = 0 */,
bool modal /* = false */,
WFlags fl /* = 0*/,
- const QString &defaultMimeType /*= "image/png"*/)
+ const TQString &defaultMimeType /*= "image/png"*/)
: ExportAllViewsDialogBase(parent,name, modal,fl) {
// create and initialize m_imageType
m_imageType = new KFileFilterCombo(this, "m_imageType");
- m_imageType->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed, 0, 0, m_imageType->sizePolicy().hasHeightForWidth()));
+ m_imageType->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 0, m_imageType->sizePolicy().hasHeightForWidth()));
m_imageType->setEditable(false);
m_imageType->setMimeFilter(UMLViewImageExporterModel::supportedMimeTypes(), defaultMimeType);
@@ -48,7 +48,7 @@ ExportAllViewsDialog::ExportAllViewsDialog(
void ExportAllViewsDialog::languageChange() {
ExportAllViewsDialogBase::languageChange();
- QToolTip::add(m_imageType, tr2i18n("The format that the images will be exported to"));
+ TQToolTip::add(m_imageType, tr2i18n("The format that the images will be exported to"));
}
#include "exportallviewsdialog.moc"
diff --git a/umbrello/umbrello/dialogs/exportallviewsdialog.h b/umbrello/umbrello/dialogs/exportallviewsdialog.h
index 37b0a2f3..793f69b9 100644
--- a/umbrello/umbrello/dialogs/exportallviewsdialog.h
+++ b/umbrello/umbrello/dialogs/exportallviewsdialog.h
@@ -41,11 +41,11 @@ public:
* @param fl Window flags.
* @param defaultMimeType The default mime type that appears in the mime types list.
*
- * @see QDialog::QDialog
+ * @see TQDialog::QDialog
*/
- explicit ExportAllViewsDialog(QWidget* parent = 0, const char* name = 0,
+ explicit ExportAllViewsDialog(TQWidget* parent = 0, const char* name = 0,
bool modal = false, WFlags fl = 0,
- const QString& defaultMimeType = "image/png");
+ const TQString& defaultMimeType = "image/png");
/**
* Destructor for UMLViewImageExporterModel.
diff --git a/umbrello/umbrello/dialogs/notedialog.cpp b/umbrello/umbrello/dialogs/notedialog.cpp
index f310990d..effb585d 100644
--- a/umbrello/umbrello/dialogs/notedialog.cpp
+++ b/umbrello/umbrello/dialogs/notedialog.cpp
@@ -13,30 +13,30 @@
#include "notedialog.h"
// qt/kde includes
-#include <qlineedit.h>
-#include <qgroupbox.h>
-#include <qtextedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqgroupbox.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
-NoteDialog::NoteDialog( QWidget * parent, NoteWidget * pNote ) : KDialogBase(Plain, i18n("Note Documentation"), Help | Ok | Cancel , Ok, parent, "_NOTEDIALOG_", true, true) {
+NoteDialog::NoteDialog( TQWidget * parent, NoteWidget * pNote ) : KDialogBase(Plain, i18n("Note Documentation"), Help | Ok | Cancel , Ok, parent, "_NOTEDIALOG_", true, true) {
m_pNoteWidget = pNote;
int margin = fontMetrics().height();
- m_pDocGB = new QGroupBox(i18n("Documentation"), plainPage());
- QVBoxLayout * mainLayout = new QVBoxLayout(plainPage());
+ m_pDocGB = new TQGroupBox(i18n("Documentation"), plainPage());
+ TQVBoxLayout * mainLayout = new TQVBoxLayout(plainPage());
mainLayout -> addWidget(m_pDocGB);
mainLayout -> setSpacing(10);
mainLayout -> setMargin(margin);
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setSpacing(10);
docLayout -> setMargin(margin);
- m_pDocTE = new QTextEdit( m_pDocGB );
+ m_pDocTE = new TQTextEdit( m_pDocGB );
m_pDocTE -> setFocus();
docLayout -> addWidget( m_pDocTE );
m_pDocTE -> setText( pNote -> getDoc() );
diff --git a/umbrello/umbrello/dialogs/notedialog.h b/umbrello/umbrello/dialogs/notedialog.h
index 3efd1404..c9062ec7 100644
--- a/umbrello/umbrello/dialogs/notedialog.h
+++ b/umbrello/umbrello/dialogs/notedialog.h
@@ -32,7 +32,7 @@ public:
/**
* Constructs an NoteDialog.
*/
- NoteDialog( QWidget * parent, NoteWidget * pNote );
+ NoteDialog( TQWidget * parent, NoteWidget * pNote );
/**
* Standard deconstructor.
@@ -43,8 +43,8 @@ public slots:
void slotOk();
private:
//GUI widgets
- QGroupBox * m_pDocGB;
- QTextEdit * m_pDocTE;
+ TQGroupBox * m_pDocGB;
+ TQTextEdit * m_pDocTE;
/**
* Note widget to show documentation for.
diff --git a/umbrello/umbrello/dialogs/overwritedialogue.cpp b/umbrello/umbrello/dialogs/overwritedialogue.cpp
index b7c4a4f4..c9cb8b92 100644
--- a/umbrello/umbrello/dialogs/overwritedialogue.cpp
+++ b/umbrello/umbrello/dialogs/overwritedialogue.cpp
@@ -13,25 +13,25 @@
#include "overwritedialogue.h"
// qt/kde includes
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdebug.h>
OverwriteDialogue::OverwriteDialogue(
- const QString& fileName,
- const QString& outputDirectory,
- bool applyToAllRemaining, QWidget* parent, const char* name) :
+ const TQString& fileName,
+ const TQString& outputDirectory,
+ bool applyToAllRemaining, TQWidget* parent, const char* name) :
KDialogBase(Plain, i18n("Destination File Already Exists"), Ok|Apply|Cancel, Yes, parent, name) {
- QVBoxLayout* layout = new QVBoxLayout( plainPage(), 0, spacingHint() );
+ TQVBoxLayout* layout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
- QLabel* dialogueLabel = new QLabel(i18n("The file %1 already exists in %2.\n\nUmbrello can overwrite the file, generate a similar\nfile name or not generate this file.").arg(fileName).arg(outputDirectory), plainPage() );
+ TQLabel* dialogueLabel = new TQLabel(i18n("The file %1 already exists in %2.\n\nUmbrello can overwrite the file, generate a similar\nfile name or not generate this file.").arg(fileName).arg(outputDirectory), plainPage() );
layout->addWidget(dialogueLabel);
- m_applyToAllRemaining = new QCheckBox( i18n("&Apply to all remaining files"), plainPage() );
+ m_applyToAllRemaining = new TQCheckBox( i18n("&Apply to all remaining files"), plainPage() );
m_applyToAllRemaining->setChecked(applyToAllRemaining);
layout->addWidget(m_applyToAllRemaining);
diff --git a/umbrello/umbrello/dialogs/overwritedialogue.h b/umbrello/umbrello/dialogs/overwritedialogue.h
index a01e3366..36691466 100644
--- a/umbrello/umbrello/dialogs/overwritedialogue.h
+++ b/umbrello/umbrello/dialogs/overwritedialogue.h
@@ -34,8 +34,8 @@ public:
/**
* constructor sets up the dialog, adding checkbox and label
*/
- OverwriteDialogue(const QString& fileName, const QString& outputDirectory,
- bool applyToAllRemaining, QWidget* parent=0, const char* name=0);
+ OverwriteDialogue(const TQString& fileName, const TQString& outputDirectory,
+ bool applyToAllRemaining, TQWidget* parent=0, const char* name=0);
/**
* destrictor doesn't do anything
@@ -49,24 +49,24 @@ public:
protected slots:
/**
- * Overrides standard operation to call QDialog::done(Yes).
+ * Overrides standard operation to call TQDialog::done(Yes).
* This is a kludge, see note in class description.
*/
virtual void slotOk();
/**
- * Overrides standard operation to call QDialog::done(No).
+ * Overrides standard operation to call TQDialog::done(No).
*/
virtual void slotApply();
/**
- * Overrides standard operation to call QDialog::done(Cancel).
+ * Overrides standard operation to call TQDialog::done(Cancel).
*/
virtual void slotCancel();
private:
- QCheckBox* m_applyToAllRemaining;
+ TQCheckBox* m_applyToAllRemaining;
};
#endif
diff --git a/umbrello/umbrello/dialogs/parmpropdlg.cpp b/umbrello/umbrello/dialogs/parmpropdlg.cpp
index e8ddc245..38a75292 100644
--- a/umbrello/umbrello/dialogs/parmpropdlg.cpp
+++ b/umbrello/umbrello/dialogs/parmpropdlg.cpp
@@ -13,8 +13,8 @@
#include "parmpropdlg.h"
// qt includes
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
// kde includes
#include <klocale.h>
@@ -31,12 +31,12 @@
#include "parmpropdlg.moc"
-ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
+ParmPropDlg::ParmPropDlg(TQWidget * parent, UMLDoc * doc, UMLAttribute * a)
: KDialogBase(Plain, i18n("Parameter Properties"), Help | Ok | Cancel , Ok, parent, "_PARMPROPDLG_", true, true)
{
m_pUmldoc = doc;
m_pAtt = a;
- QString type, text, name, initialValue;
+ TQString type, text, name, initialValue;
if(!a) {
type = text = name = initialValue = "";
} else {
@@ -48,18 +48,18 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
int margin = fontMetrics().height();
setMinimumSize(300, 400);
//disableResize();
- QVBoxLayout * topLayout = new QVBoxLayout(plainPage());
+ TQVBoxLayout * topLayout = new TQVBoxLayout(plainPage());
topLayout -> setSpacing(10);
topLayout -> setMargin(margin);
- m_pParmGB = new QGroupBox(i18n("Properties"), plainPage());
+ m_pParmGB = new TQGroupBox(i18n("Properties"), plainPage());
topLayout -> addWidget(m_pParmGB);
- QGridLayout * propLayout = new QGridLayout(m_pParmGB, 4, 2);
+ TQGridLayout * propLayout = new TQGridLayout(m_pParmGB, 4, 2);
propLayout -> setSpacing(10);
propLayout -> setMargin(margin);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pParmGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pParmGB);
propLayout -> addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(m_pParmGB);
@@ -74,36 +74,36 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
m_pInitialL, i18n("&Initial value:"),
m_pInitialLE, initialValue );
- m_pStereoTypeL = new QLabel( i18n("Stereotype name:"), m_pParmGB );
+ m_pStereoTypeL = new TQLabel( i18n("Stereotype name:"), m_pParmGB );
propLayout -> addWidget(m_pStereoTypeL, 3, 0);
m_pStereoTypeCB = new KComboBox(true, m_pParmGB );
propLayout -> addWidget(m_pStereoTypeCB, 3, 1);
- m_pKind = new QButtonGroup(i18n("Passing Direction"), plainPage());
+ m_pKind = new TQButtonGroup(i18n("Passing Direction"), plainPage());
m_pKind->setExclusive(true);
- QToolTip::add(m_pKind, i18n("\"in\" is a readonly parameter, \"out\" is a writeonly parameter and \"inout\" is a parameter for reading and writing."));
+ TQToolTip::add(m_pKind, i18n("\"in\" is a readonly parameter, \"out\" is a writeonly parameter and \"inout\" is a parameter for reading and writing."));
- QHBoxLayout * kindLayout = new QHBoxLayout( m_pKind );
+ TQHBoxLayout * kindLayout = new TQHBoxLayout( m_pKind );
kindLayout->setMargin(margin);
- m_pIn = new QRadioButton( "in", m_pKind );
+ m_pIn = new TQRadioButton( "in", m_pKind );
kindLayout->addWidget( m_pIn );
- m_pInOut = new QRadioButton( "inout", m_pKind );
+ m_pInOut = new TQRadioButton( "inout", m_pKind );
kindLayout->addWidget( m_pInOut );
- m_pOut = new QRadioButton( "out", m_pKind );
+ m_pOut = new TQRadioButton( "out", m_pKind );
kindLayout->addWidget( m_pOut );
topLayout -> addWidget(m_pKind);
- m_pDocGB = new QGroupBox(i18n("Documentation"), plainPage());
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ m_pDocGB = new TQGroupBox(i18n("Documentation"), plainPage());
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setMargin(margin);
- m_pDoc = new QMultiLineEdit(m_pDocGB);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
///////////
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
//////////
m_pDoc -> setText(text);
docLayout -> addWidget(m_pDoc);
@@ -147,7 +147,7 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == type ) { //getTypeName()
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -164,7 +164,7 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
// manage stereotypes
m_pStereoTypeCB->setDuplicatesEnabled(false); //only allow one of each type in box
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- insertStereotype (QString("")); // an empty stereotype is the default
+ insertStereotype (TQString("")); // an empty stereotype is the default
int defaultStereotype=0;
bool foundDefaultStereotype = false;
for (UMLStereotypeListIt it(m_pUmldoc->getStereotypes()); it.current(); ++it) {
@@ -193,13 +193,13 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
m_pNameLE->setFocus();
}
-void ParmPropDlg::insertType( const QString& type, int index )
+void ParmPropDlg::insertType( const TQString& type, int index )
{
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
}
-void ParmPropDlg::insertStereotype( const QString& type, int index )
+void ParmPropDlg::insertStereotype( const TQString& type, int index )
{
m_pStereoTypeCB->insertItem( type, index );
m_pStereoTypeCB->completionObject()->addItem( type );
@@ -218,7 +218,7 @@ void ParmPropDlg::slotOk() {
if (m_pAtt != NULL) {
m_pAtt->setParmKind( getParmKind() );
m_pAtt->setStereotype( m_pStereoTypeCB->currentText() );
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLClassifier * pConcept = dynamic_cast<UMLClassifier*>( m_pAtt->parent()->parent() );
if (pConcept == NULL) {
kError() << "ParmPropDlg::slotOk: grandparent of " << m_pAtt->getName()
diff --git a/umbrello/umbrello/dialogs/parmpropdlg.h b/umbrello/umbrello/dialogs/parmpropdlg.h
index 25a6153a..b8efd75b 100644
--- a/umbrello/umbrello/dialogs/parmpropdlg.h
+++ b/umbrello/umbrello/dialogs/parmpropdlg.h
@@ -14,14 +14,14 @@
#include <kdialogbase.h>
#include <kcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqcombobox.h>
#include "../attribute.h"
class UMLDoc;
@@ -44,7 +44,7 @@ public:
* @param parent The parent of the dialog.
* @param a The parameter to represent.
*/
- ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a);
+ ParmPropDlg(TQWidget * parent, UMLDoc * doc, UMLAttribute * a);
/**
* Standard deconstructor.
@@ -56,7 +56,7 @@ public:
*
* @return Returns the documentation.
*/
- QString getDoc() {
+ TQString getDoc() {
return m_pDoc -> text();
}
@@ -65,7 +65,7 @@ public:
*
* @return Return the name of the parameter.
*/
- QString getName() {
+ TQString getName() {
return m_pNameLE -> text();
}
@@ -74,7 +74,7 @@ public:
*
* @return Return the initial value of the parameter.
*/
- QString getInitialValue() {
+ TQString getInitialValue() {
return m_pInitialLE -> text();
}
@@ -83,7 +83,7 @@ public:
*
* @return Return the type name of the parameter.
*/
- QString getTypeName() {
+ TQString getTypeName() {
return m_pTypeCB -> currentText();
}
@@ -102,22 +102,22 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* Inserts @p type into the stereotype-combobox as well as its completion object.
*/
- void insertStereotype( const QString& type, int index = -1 );
+ void insertStereotype( const TQString& type, int index = -1 );
private:
- QGroupBox * m_pParmGB, * m_pDocGB;
- QButtonGroup *m_pKind;
- QRadioButton * m_pIn, * m_pOut, *m_pInOut;
- QLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
+ TQGroupBox * m_pParmGB, * m_pDocGB;
+ TQButtonGroup *m_pKind;
+ TQRadioButton * m_pIn, * m_pOut, *m_pInOut;
+ TQLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
KComboBox * m_pTypeCB, * m_pStereoTypeCB;
- QLineEdit * m_pNameLE, * m_pInitialLE;
- QMultiLineEdit * m_pDoc;
+ TQLineEdit * m_pNameLE, * m_pInitialLE;
+ TQMultiLineEdit * m_pDoc;
UMLDoc * m_pUmldoc;
UMLAttribute * m_pAtt;
};
diff --git a/umbrello/umbrello/dialogs/pkgcontentspage.cpp b/umbrello/umbrello/dialogs/pkgcontentspage.cpp
index dd70f7fc..dce7c98b 100644
--- a/umbrello/umbrello/dialogs/pkgcontentspage.cpp
+++ b/umbrello/umbrello/dialogs/pkgcontentspage.cpp
@@ -10,57 +10,57 @@
***************************************************************************/
#include "pkgcontentspage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include "../umlobjectlist.h"
#include "../uml.h"
#include "../umldoc.h"
#include "classpropdlg.h"
-PkgContentsPage::PkgContentsPage(QWidget *parent, UMLPackage *pkg)
- : QWidget(parent)
+PkgContentsPage::PkgContentsPage(TQWidget *parent, UMLPackage *pkg)
+ : TQWidget(parent)
{
m_pPackage = pkg;
int margin = fontMetrics().height();
- QHBoxLayout * mainLayout = new QHBoxLayout(this);
+ TQHBoxLayout * mainLayout = new TQHBoxLayout(this);
mainLayout -> setSpacing(10);
- m_pContentGB = new QGroupBox(i18n("Contained Items"), this);
+ m_pContentGB = new TQGroupBox(i18n("Contained Items"), this);
mainLayout -> addWidget(m_pContentGB);
- QHBoxLayout * layout = new QHBoxLayout(m_pContentGB);
+ TQHBoxLayout * layout = new TQHBoxLayout(m_pContentGB);
layout -> setSpacing(10);
layout -> setMargin(margin);
- m_pContentLB = new QListBox(m_pContentGB);
+ m_pContentLB = new TQListBox(m_pContentGB);
layout -> addWidget(m_pContentLB);
setMinimumSize(310, 330);
fillListBox();
m_pMenu = 0;
- connect(m_pContentLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ connect(m_pContentLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- connect(m_pContentLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pContentLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pContentLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pContentLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
PkgContentsPage::~PkgContentsPage() {
- disconnect(m_pContentLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ disconnect(m_pContentLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- disconnect(m_pContentLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ disconnect(m_pContentLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- disconnect(m_pContentLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ disconnect(m_pContentLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
-void PkgContentsPage::slotDoubleClick(QListBoxItem * i) {
+void PkgContentsPage::slotDoubleClick(TQListBoxItem * i) {
if (!i)
return;
int item = m_pContentLB -> currentItem();
@@ -82,27 +82,27 @@ void PkgContentsPage::fillListBox() {
}
}
-void PkgContentsPage::slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/) {
+void PkgContentsPage::slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/) {
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void PkgContentsPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p) {
+void PkgContentsPage::slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p) {
if(!item)
return;
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, ListPopupMenu::mt_Association_Selected);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
}
void PkgContentsPage::slotPopupMenuSel(int id) {
diff --git a/umbrello/umbrello/dialogs/pkgcontentspage.h b/umbrello/umbrello/dialogs/pkgcontentspage.h
index 8659e672..b95e5348 100644
--- a/umbrello/umbrello/dialogs/pkgcontentspage.h
+++ b/umbrello/umbrello/dialogs/pkgcontentspage.h
@@ -12,10 +12,10 @@
#ifndef PKGCONTENTSPAGE_H
#define PKGCONTENTSPAGE_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqptrlist.h>
#include "../package.h"
#include "../listpopupmenu.h"
@@ -25,7 +25,7 @@
* @author Oliver Kellogg <okellogg@users.sourceforge.net>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class PkgContentsPage : public QWidget {
+class PkgContentsPage : public TQWidget {
Q_OBJECT
public:
/**
@@ -34,7 +34,7 @@ public:
* @param parent The parent of the page.
* @param pkg The UMLPackage being represented.
*/
- PkgContentsPage(QWidget *parent, UMLPackage *pkg);
+ PkgContentsPage(TQWidget *parent, UMLPackage *pkg);
/**
* Standard destructor.
@@ -43,8 +43,8 @@ public:
private:
UMLPackage * m_pPackage;
- QListBox * m_pContentLB;
- QGroupBox * m_pContentGB;
+ TQListBox * m_pContentLB;
+ TQGroupBox * m_pContentGB;
ListPopupMenu * m_pMenu;
/**
@@ -53,9 +53,9 @@ private:
void fillListBox();
public slots:
- void slotDoubleClick(QListBoxItem * i);
- void slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/);
- void slotRightButtonPressed(QListBoxItem * item, const QPoint & p);
+ void slotDoubleClick(TQListBoxItem * i);
+ void slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/);
+ void slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p);
void slotPopupMenuSel(int id);
};
diff --git a/umbrello/umbrello/dialogs/selectopdlg.cpp b/umbrello/umbrello/dialogs/selectopdlg.cpp
index cb9e344d..1c175752 100644
--- a/umbrello/umbrello/dialogs/selectopdlg.cpp
+++ b/umbrello/umbrello/dialogs/selectopdlg.cpp
@@ -13,7 +13,7 @@
#include "selectopdlg.h"
// qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
// kde includes
#include <klocale.h>
@@ -30,12 +30,12 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
: KDialogBase(Plain, i18n("Select Operation"), Ok | Cancel , Ok, parent, "_SELOPDLG_", true, true)
{
m_pView = parent;
- QVBoxLayout * topLayout = new QVBoxLayout(plainPage());
+ TQVBoxLayout * topLayout = new TQVBoxLayout(plainPage());
- m_pOpGB = new QGroupBox(i18n("Select Operation"), plainPage());
+ m_pOpGB = new TQGroupBox(i18n("Select Operation"), plainPage());
topLayout -> addWidget(m_pOpGB);
- QGridLayout * mainLayout = new QGridLayout(m_pOpGB, 3, 2);
+ TQGridLayout * mainLayout = new TQGridLayout(m_pOpGB, 3, 2);
mainLayout -> setSpacing(spacingHint());
mainLayout -> setMargin(fontMetrics().height());
@@ -43,7 +43,7 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
m_pSeqL, i18n("Sequence number:"),
m_pSeqLE );
- m_pOpRB = new QRadioButton(i18n("Class operation:"), m_pOpGB);
+ m_pOpRB = new TQRadioButton(i18n("Class operation:"), m_pOpGB);
mainLayout -> addWidget(m_pOpRB, 1, 0);
m_pOpCB = new KComboBox(m_pOpGB);
@@ -51,13 +51,13 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
m_pOpCB->setDuplicatesEnabled(false);//only allow one of each type in box
mainLayout -> addWidget(m_pOpCB, 1, 1);
- m_pCustomRB = new QRadioButton(i18n("Custom operation:"), m_pOpGB);
+ m_pCustomRB = new TQRadioButton(i18n("Custom operation:"), m_pOpGB);
mainLayout -> addWidget(m_pCustomRB, 2, 0);
- m_pOpLE = new QLineEdit(m_pOpGB);
+ m_pOpLE = new TQLineEdit(m_pOpGB);
mainLayout -> addWidget(m_pOpLE, 2, 1);
- m_pOpBG = new QButtonGroup(0);
+ m_pOpBG = new TQButtonGroup(0);
m_pOpBG -> insert(m_pOpRB, OP);
m_pOpBG -> insert(m_pCustomRB, CUSTOM);
m_pOpBG -> setExclusive(true);
@@ -68,23 +68,23 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
insertOperation( obj->toString(Uml::st_SigNoVis) );
}
//disableResize();
- connect(m_pOpBG, SIGNAL(clicked(int)), this, SLOT(slotSelected(int)));
+ connect(m_pOpBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSelected(int)));
m_nOpCount = c -> operations();
slotSelected(OP);
}
SelectOpDlg::~SelectOpDlg() {
- disconnect(m_pOpBG, SIGNAL(clicked(int)), this, SLOT(slotSelected(int)));
+ disconnect(m_pOpBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSelected(int)));
delete m_pOpBG;
}
-void SelectOpDlg::insertOperation( const QString& type, int index )
+void SelectOpDlg::insertOperation( const TQString& type, int index )
{
m_pOpCB->insertItem( type, index );
m_pOpCB->completionObject()->addItem( type );
}
-QString SelectOpDlg::getOpText() {
+TQString SelectOpDlg::getOpText() {
if(m_pOpRB -> isChecked())
return m_pOpCB -> currentText();
else
@@ -107,7 +107,7 @@ void SelectOpDlg::slotSelected(int id) {
m_id = id;
}
-void SelectOpDlg::setCustomOp(const QString &op) {
+void SelectOpDlg::setCustomOp(const TQString &op) {
m_pOpLE -> setText(op);
if(op.length() > 0) {
slotSelected(CUSTOM);
@@ -115,7 +115,7 @@ void SelectOpDlg::setCustomOp(const QString &op) {
}
}
-bool SelectOpDlg::setClassOp(const QString &op) {
+bool SelectOpDlg::setClassOp(const TQString &op) {
for (int i = 1; i!= m_pOpCB->count(); ++i)
{
if ( m_pOpCB->text(i) == op ) {
@@ -128,11 +128,11 @@ bool SelectOpDlg::setClassOp(const QString &op) {
return false;
}
-QString SelectOpDlg::getSeqNumber() {
+TQString SelectOpDlg::getSeqNumber() {
return m_pSeqLE->text();
}
-void SelectOpDlg::setSeqNumber(const QString &num) {
+void SelectOpDlg::setSeqNumber(const TQString &num) {
m_pSeqLE->setText(num);
}
diff --git a/umbrello/umbrello/dialogs/selectopdlg.h b/umbrello/umbrello/dialogs/selectopdlg.h
index c5d8c93b..4bbcf52b 100644
--- a/umbrello/umbrello/dialogs/selectopdlg.h
+++ b/umbrello/umbrello/dialogs/selectopdlg.h
@@ -15,12 +15,12 @@
#include <kdialogbase.h>
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kcombobox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include "../classifier.h"
class UMLView;
@@ -58,7 +58,7 @@ public:
*
* @return The operation to display.
*/
- QString getOpText();
+ TQString getOpText();
/**
* Return whether the user selected a class operation
@@ -74,41 +74,41 @@ public:
*
* @return Returns the sequence number for the operation.
*/
- QString getSeqNumber();
+ TQString getSeqNumber();
/**
* Set the sequence number text.
*
* @param num The number to set the sequence to.
*/
- void setSeqNumber(const QString &num);
+ void setSeqNumber(const TQString &num);
/**
* Set the custom operation text.
*
* @param op The operation to set as the custom operation.
*/
- void setCustomOp(const QString &op);
+ void setCustomOp(const TQString &op);
/**
* Set the class operation text.
*
* @param op The operation to set as the class operation.
* @return false if no such operation exists.
*/
- bool setClassOp(const QString &op);
+ bool setClassOp(const TQString &op);
protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertOperation( const QString& type, int index = -1 );
+ void insertOperation( const TQString& type, int index = -1 );
private:
- QGroupBox * m_pOpGB;
+ TQGroupBox * m_pOpGB;
KComboBox * m_pOpCB;
- QLabel * m_pSeqL;
- QLineEdit * m_pOpLE, * m_pSeqLE;
- QRadioButton * m_pCustomRB, * m_pOpRB;
- QButtonGroup * m_pOpBG, * m_pDocGB;
- QString m_Text;
+ TQLabel * m_pSeqL;
+ TQLineEdit * m_pOpLE, * m_pSeqLE;
+ TQRadioButton * m_pCustomRB, * m_pOpRB;
+ TQButtonGroup * m_pOpBG, * m_pDocGB;
+ TQString m_Text;
int m_nOpCount;
int m_id; ///< takes on the value OP or CUSTOM according to what the user selected
UMLView *m_pView;
diff --git a/umbrello/umbrello/dialogs/settingsdlg.cpp b/umbrello/umbrello/dialogs/settingsdlg.cpp
index 2bfaaf29..59b9ff28 100644
--- a/umbrello/umbrello/dialogs/settingsdlg.cpp
+++ b/umbrello/umbrello/dialogs/settingsdlg.cpp
@@ -13,9 +13,9 @@
#include "settingsdlg.h"
// qt includes
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
// kde includes
#include <kdebug.h>
#include <kiconloader.h>
@@ -26,12 +26,12 @@
#include "codevieweroptionspage.h"
#include "../dialog_utils.h"
-SettingsDlg::SettingsDlg( QWidget * parent, Settings::OptionState *state )
+SettingsDlg::SettingsDlg( TQWidget * parent, Settings::OptionState *state )
: KDialogBase( IconList, i18n("Umbrello Setup"),
Help | Default | Apply | Ok | Cancel, Ok, parent, 0, true, true ) {
m_bChangesApplied = false;
m_pOptionState = state;
- setHelp( "umbrello/index.html", QString::null );
+ setHelp( "umbrello/index.html", TQString::null );
setupGeneralPage();
setupFontPage();
setupUIPage();
@@ -44,33 +44,33 @@ SettingsDlg::~SettingsDlg() {}
void SettingsDlg::setupUIPage() {
//setup UI page
- QVBox * page = addVBoxPage( i18n("User Interface"), i18n("User Interface Settings"), DesktopIcon( "window_list") );
+ TQVBox * page = addVBoxPage( i18n("User Interface"), i18n("User Interface Settings"), DesktopIcon( "window_list") );
- m_UiWidgets.colorGB = new QGroupBox( i18n("Color"), page );
- QGridLayout * colorLayout = new QGridLayout( m_UiWidgets.colorGB, 3, 3 );
+ m_UiWidgets.colorGB = new TQGroupBox( i18n("Color"), page );
+ TQGridLayout * colorLayout = new TQGridLayout( m_UiWidgets.colorGB, 3, 3 );
colorLayout -> setSpacing( spacingHint() );
colorLayout -> setMargin( fontMetrics().height() );
- m_UiWidgets.lineColorL = new QLabel( i18n("Line color:"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineColorL = new TQLabel( i18n("Line color:"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineColorL, 0, 0 );
m_UiWidgets.lineColorB = new KColorButton( m_pOptionState->uiState.lineColor, m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineColorB, 0, 1 );
- m_UiWidgets.lineDefaultB = new QPushButton( i18n("D&efault Color"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineDefaultB = new TQPushButton( i18n("D&efault Color"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineDefaultB, 0, 2 );
- m_UiWidgets.fillColorL = new QLabel( i18n("Fill color:"), m_UiWidgets.colorGB );
+ m_UiWidgets.fillColorL = new TQLabel( i18n("Fill color:"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.fillColorL, 1, 0 );
m_UiWidgets.fillColorB = new KColorButton( m_pOptionState->uiState.fillColor, m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.fillColorB, 1, 1 );
- m_UiWidgets.fillDefaultB = new QPushButton( i18n("De&fault Color"), m_UiWidgets.colorGB );
+ m_UiWidgets.fillDefaultB = new TQPushButton( i18n("De&fault Color"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.fillDefaultB, 1, 2 );
- m_UiWidgets.lineWidthL = new QLabel( i18n("Line width:"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineWidthL = new TQLabel( i18n("Line width:"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineWidthL, 2, 0 );
// Low-Limit: 0, High-Limit: 10, Step: 1, Initial-Val: m_pOptionState->uiState.lineWidth
@@ -78,62 +78,62 @@ void SettingsDlg::setupUIPage() {
m_UiWidgets.lineWidthB = new KIntSpinBox( 0, 10, 1, m_pOptionState->uiState.lineWidth, 10, m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineWidthB, 2, 1 );
- m_UiWidgets.lineWidthDefaultB = new QPushButton( i18n("D&efault Width"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineWidthDefaultB = new TQPushButton( i18n("D&efault Width"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineWidthDefaultB, 2, 2 );
- m_UiWidgets.useFillColorCB = new QCheckBox( i18n("&Use fill color"), m_UiWidgets.colorGB );
+ m_UiWidgets.useFillColorCB = new TQCheckBox( i18n("&Use fill color"), m_UiWidgets.colorGB );
colorLayout -> setRowStretch( 3, 2 );
colorLayout -> addWidget( m_UiWidgets.useFillColorCB, 3, 0 );
m_UiWidgets.useFillColorCB -> setChecked( m_pOptionState->uiState.useFillColor );
//connect button signals up
- connect( m_UiWidgets.lineDefaultB, SIGNAL(clicked()), this, SLOT(slotLineBClicked()) );
- connect( m_UiWidgets.fillDefaultB, SIGNAL(clicked()), this, SLOT(slotFillBClicked()) );
+ connect( m_UiWidgets.lineDefaultB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLineBClicked()) );
+ connect( m_UiWidgets.fillDefaultB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFillBClicked()) );
}
void SettingsDlg::setupGeneralPage() {
//setup General page
- QVBox * page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQVBox * page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
// Set up undo setting
- m_GeneralWidgets.miscGB = new QGroupBox( i18n("Miscellaneous"), page );
+ m_GeneralWidgets.miscGB = new TQGroupBox( i18n("Miscellaneous"), page );
- QGridLayout * miscLayout = new QGridLayout( m_GeneralWidgets.miscGB, 2, 2 );
+ TQGridLayout * miscLayout = new TQGridLayout( m_GeneralWidgets.miscGB, 2, 2 );
miscLayout -> setSpacing( spacingHint() );
miscLayout -> setMargin( fontMetrics().height() );
- m_GeneralWidgets.undoCB = new QCheckBox( i18n("Enable undo"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.undoCB = new TQCheckBox( i18n("Enable undo"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.undoCB -> setChecked( m_pOptionState->generalState.undo );
miscLayout -> addWidget( m_GeneralWidgets.undoCB, 0, 0 );
- m_GeneralWidgets.tabdiagramsCB = new QCheckBox( i18n("Use tabbed diagrams"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.tabdiagramsCB = new TQCheckBox( i18n("Use tabbed diagrams"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.tabdiagramsCB -> setChecked( m_pOptionState->generalState.tabdiagrams );
miscLayout -> addWidget( m_GeneralWidgets.tabdiagramsCB, 0, 1 );
- m_GeneralWidgets.newcodegenCB = new QCheckBox( i18n("Use new C++/Java/Ruby generators"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.newcodegenCB = new TQCheckBox( i18n("Use new C++/Java/Ruby generators"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.newcodegenCB -> setChecked( m_pOptionState->generalState.newcodegen );
miscLayout -> addWidget( m_GeneralWidgets.newcodegenCB, 1, 0 );
- m_GeneralWidgets.angularLinesCB = new QCheckBox( i18n("Use angular association lines"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.angularLinesCB = new TQCheckBox( i18n("Use angular association lines"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.angularLinesCB -> setChecked( m_pOptionState->generalState.angularlines );
miscLayout -> addWidget( m_GeneralWidgets.angularLinesCB, 1, 1 );
//setup autosave settings
- m_GeneralWidgets.autosaveGB = new QGroupBox( i18n("Autosave"), page );
+ m_GeneralWidgets.autosaveGB = new TQGroupBox( i18n("Autosave"), page );
- QGridLayout * autosaveLayout = new QGridLayout( m_GeneralWidgets.autosaveGB, 3, 2 );
+ TQGridLayout * autosaveLayout = new TQGridLayout( m_GeneralWidgets.autosaveGB, 3, 2 );
autosaveLayout -> setSpacing( spacingHint() );
autosaveLayout -> setMargin( fontMetrics().height() );
- m_GeneralWidgets.autosaveCB = new QCheckBox( i18n("E&nable autosave"), m_GeneralWidgets.autosaveGB );
+ m_GeneralWidgets.autosaveCB = new TQCheckBox( i18n("E&nable autosave"), m_GeneralWidgets.autosaveGB );
m_GeneralWidgets.autosaveCB -> setChecked( m_pOptionState->generalState.autosave );
autosaveLayout -> addWidget( m_GeneralWidgets.autosaveCB, 0, 0 );
- m_GeneralWidgets.autosaveL = new QLabel( i18n("Select auto-save time interval (mins):"), m_GeneralWidgets.autosaveGB );
+ m_GeneralWidgets.autosaveL = new TQLabel( i18n("Select auto-save time interval (mins):"), m_GeneralWidgets.autosaveGB );
autosaveLayout -> addWidget( m_GeneralWidgets.autosaveL, 1, 0 );
m_GeneralWidgets.timeISB = new KIntSpinBox( 1, 600, 1, m_pOptionState->generalState.autosavetime, 10, m_GeneralWidgets.autosaveGB );
@@ -145,42 +145,42 @@ void SettingsDlg::setupGeneralPage() {
Dialog_Utils::makeLabeledEditField( m_GeneralWidgets.autosaveGB, autosaveLayout, 2,
m_GeneralWidgets.autosaveSuffixL, i18n("Set autosave suffix:"),
m_GeneralWidgets.autosaveSuffixT, m_pOptionState->generalState.autosavesuffix );
- QString autoSaveSuffixToolTip = i18n( "<qt><p>The autosave file will be saved to ~/autosave.xmi if the autosaving occurs "
+ TQString autoSaveSuffixToolTip = i18n( "<qt><p>The autosave file will be saved to ~/autosave.xmi if the autosaving occurs "
"before you have manually saved the file.</p>"
"<p>If you've already saved it, the autosave file will be saved in the same folder as the file "
"and will be named like the file's name, followed by the suffix specified.</p>"
"<p>If the suffix is equal to the suffix of the file you've saved, "
"the autosave will overwrite your file automatically.</p></qt>" );
- QToolTip::add( m_GeneralWidgets.autosaveSuffixL, autoSaveSuffixToolTip );
- QToolTip::add( m_GeneralWidgets.autosaveSuffixT, autoSaveSuffixToolTip );
+ TQToolTip::add( m_GeneralWidgets.autosaveSuffixL, autoSaveSuffixToolTip );
+ TQToolTip::add( m_GeneralWidgets.autosaveSuffixT, autoSaveSuffixToolTip );
//setup startup settings
- m_GeneralWidgets.startupGB = new QGroupBox( i18n("Startup"), page );
+ m_GeneralWidgets.startupGB = new TQGroupBox( i18n("Startup"), page );
- QGridLayout * startupLayout = new QGridLayout( m_GeneralWidgets.startupGB, 3, 2 );
+ TQGridLayout * startupLayout = new TQGridLayout( m_GeneralWidgets.startupGB, 3, 2 );
startupLayout -> setSpacing( spacingHint() );
startupLayout -> setMargin( fontMetrics().height() );
- m_GeneralWidgets.logoCB = new QCheckBox( i18n("Sta&rtup logo"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.logoCB = new TQCheckBox( i18n("Sta&rtup logo"), m_GeneralWidgets.startupGB );
m_GeneralWidgets.logoCB -> setChecked( m_pOptionState->generalState.logo );
startupLayout -> addWidget( m_GeneralWidgets.logoCB, 0, 0 );
- m_GeneralWidgets.tipCB = new QCheckBox( i18n("&Tip of the day"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.tipCB = new TQCheckBox( i18n("&Tip of the day"), m_GeneralWidgets.startupGB );
m_GeneralWidgets.tipCB -> setChecked( m_pOptionState->generalState.tip );
startupLayout -> addWidget( m_GeneralWidgets.tipCB, 0, 1 );
- m_GeneralWidgets.loadlastCB = new QCheckBox( i18n("&Load last project"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.loadlastCB = new TQCheckBox( i18n("&Load last project"), m_GeneralWidgets.startupGB );
m_GeneralWidgets.loadlastCB -> setChecked( m_pOptionState->generalState.loadlast );
startupLayout -> addWidget( m_GeneralWidgets.loadlastCB, 1, 0 );
- m_GeneralWidgets.startL = new QLabel( i18n("Start new project with:"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.startL = new TQLabel( i18n("Start new project with:"), m_GeneralWidgets.startupGB );
startupLayout -> addWidget( m_GeneralWidgets.startL, 2, 0 );
m_GeneralWidgets.diagramKB = new KComboBox( m_GeneralWidgets.startupGB );
m_GeneralWidgets.diagramKB->setCompletionMode( KGlobalSettings::CompletionPopup );
startupLayout -> addWidget( m_GeneralWidgets.diagramKB, 2, 1 );
- QString diagrams [] = { i18n("No Diagram"), i18n("Class Diagram"),
+ TQString diagrams [] = { i18n("No Diagram"), i18n("Class Diagram"),
i18n("Use Case Diagram"), i18n("Sequence Diagram"),
i18n("Collaboration Diagram"), i18n("State Diagram"),
i18n("Activity Diagram"), i18n("Component Diagram"),
@@ -192,13 +192,13 @@ void SettingsDlg::setupGeneralPage() {
}
m_GeneralWidgets.diagramKB->setCurrentItem( (int)m_pOptionState->generalState.diagram-1 );
- connect( m_GeneralWidgets.autosaveCB, SIGNAL(clicked()), this, SLOT(slotAutosaveCBClicked()) );
+ connect( m_GeneralWidgets.autosaveCB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAutosaveCBClicked()) );
}
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
-void SettingsDlg::insertDiagram( const QString& type, int index )
+void SettingsDlg::insertDiagram( const TQString& type, int index )
{
m_GeneralWidgets.diagramKB->insertItem( type, index );
m_GeneralWidgets.diagramKB->completionObject()->addItem( type );
@@ -207,52 +207,52 @@ void SettingsDlg::insertDiagram( const QString& type, int index )
void SettingsDlg::setupClassPage() {
//setup class settings page
- QVBox * page = addVBoxPage( i18n("Class"), i18n("Class Settings"), DesktopIcon( "edit") );
- m_ClassWidgets.visibilityGB = new QGroupBox( i18n("Visibility"), page );
+ TQVBox * page = addVBoxPage( i18n("Class"), i18n("Class Settings"), DesktopIcon( "edit") );
+ m_ClassWidgets.visibilityGB = new TQGroupBox( i18n("Visibility"), page );
- QGridLayout * visibilityLayout = new QGridLayout( m_ClassWidgets.visibilityGB );
+ TQGridLayout * visibilityLayout = new TQGridLayout( m_ClassWidgets.visibilityGB );
visibilityLayout -> setSpacing( spacingHint() );
visibilityLayout -> setMargin( fontMetrics().height() );
- m_ClassWidgets.showVisibilityCB = new QCheckBox(i18n("Show &visibility"), m_ClassWidgets.visibilityGB);
+ m_ClassWidgets.showVisibilityCB = new TQCheckBox(i18n("Show &visibility"), m_ClassWidgets.visibilityGB);
m_ClassWidgets.showVisibilityCB -> setChecked( m_pOptionState->classState.showVisibility );
visibilityLayout -> addWidget( m_ClassWidgets.showVisibilityCB, 0, 0 );
- m_ClassWidgets.showAttsCB = new QCheckBox( i18n("Show attributes"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showAttsCB = new TQCheckBox( i18n("Show attributes"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showAttsCB -> setChecked( m_pOptionState->classState.showAtts );
visibilityLayout -> addWidget( m_ClassWidgets.showAttsCB, 0, 1 );
- m_ClassWidgets.showOpsCB = new QCheckBox( i18n("Show operations"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showOpsCB = new TQCheckBox( i18n("Show operations"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showOpsCB -> setChecked( m_pOptionState->classState.showOps );
visibilityLayout -> addWidget( m_ClassWidgets.showOpsCB, 1, 0 );
- m_ClassWidgets.showStereotypeCB = new QCheckBox( i18n("Show stereot&ype"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showStereotypeCB = new TQCheckBox( i18n("Show stereot&ype"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showStereotypeCB -> setChecked( m_pOptionState->classState.showStereoType );
visibilityLayout -> addWidget( m_ClassWidgets.showStereotypeCB, 1, 1 );
- m_ClassWidgets.showAttSigCB = new QCheckBox(i18n("Show attribute signature"), m_ClassWidgets.visibilityGB);
+ m_ClassWidgets.showAttSigCB = new TQCheckBox(i18n("Show attribute signature"), m_ClassWidgets.visibilityGB);
m_ClassWidgets.showAttSigCB -> setChecked( m_pOptionState->classState.showAttSig );
visibilityLayout -> addWidget( m_ClassWidgets.showAttSigCB, 2, 0 );
- m_ClassWidgets.showPackageCB = new QCheckBox(i18n("Show package"), m_ClassWidgets.visibilityGB);
+ m_ClassWidgets.showPackageCB = new TQCheckBox(i18n("Show package"), m_ClassWidgets.visibilityGB);
m_ClassWidgets.showPackageCB -> setChecked( m_pOptionState->classState.showPackage );
visibilityLayout -> addWidget( m_ClassWidgets.showPackageCB, 2, 1 );
- m_ClassWidgets.showOpSigCB = new QCheckBox( i18n("Show operation signature"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showOpSigCB = new TQCheckBox( i18n("Show operation signature"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showOpSigCB -> setChecked( m_pOptionState->classState.showOpSig );
visibilityLayout -> addWidget( m_ClassWidgets.showOpSigCB, 3, 0 );
visibilityLayout -> setRowStretch( 3, 1 );
- m_ClassWidgets.scopeGB = new QGroupBox( i18n("Starting Scope"), page );
- QGridLayout * scopeLayout = new QGridLayout( m_ClassWidgets.scopeGB );
+ m_ClassWidgets.scopeGB = new TQGroupBox( i18n("Starting Scope"), page );
+ TQGridLayout * scopeLayout = new TQGridLayout( m_ClassWidgets.scopeGB );
scopeLayout -> setSpacing( spacingHint() );
scopeLayout -> setMargin( fontMetrics().height() );
- m_ClassWidgets.attributeLabel = new QLabel( i18n("Default attribute scope:"), m_ClassWidgets.scopeGB);
+ m_ClassWidgets.attributeLabel = new TQLabel( i18n("Default attribute scope:"), m_ClassWidgets.scopeGB);
scopeLayout -> addWidget( m_ClassWidgets.attributeLabel, 0, 0 );
- m_ClassWidgets.operationLabel = new QLabel( i18n("Default operation scope:"), m_ClassWidgets.scopeGB);
+ m_ClassWidgets.operationLabel = new TQLabel( i18n("Default operation scope:"), m_ClassWidgets.scopeGB);
scopeLayout -> addWidget( m_ClassWidgets.operationLabel, 1, 0 );
m_ClassWidgets.m_pAttribScopeCB = new KComboBox(m_ClassWidgets.scopeGB);
@@ -275,7 +275,7 @@ void SettingsDlg::setupClassPage() {
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
-void SettingsDlg::insertAttribScope( const QString& type, int index )
+void SettingsDlg::insertAttribScope( const TQString& type, int index )
{
m_ClassWidgets.m_pAttribScopeCB->insertItem( type, index );
m_ClassWidgets.m_pAttribScopeCB->completionObject()->addItem( type );
@@ -283,7 +283,7 @@ void SettingsDlg::insertAttribScope( const QString& type, int index )
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
-void SettingsDlg::insertOperationScope( const QString& type, int index )
+void SettingsDlg::insertOperationScope( const TQString& type, int index )
{
m_ClassWidgets.m_pOperationScopeCB->insertItem( type, index );
m_ClassWidgets.m_pOperationScopeCB->completionObject()->addItem( type );
@@ -291,20 +291,20 @@ void SettingsDlg::insertOperationScope( const QString& type, int index )
void SettingsDlg::setupCodeGenPage() {
//setup code generation settings page
- QVBox * page = addVBoxPage( i18n("Code Generation"), i18n("Code Generation Settings"), DesktopIcon( "source") );
+ TQVBox * page = addVBoxPage( i18n("Code Generation"), i18n("Code Generation Settings"), DesktopIcon( "source") );
m_pCodeGenPage = new CodeGenerationOptionsPage(page);
- connect( m_pCodeGenPage, SIGNAL(languageChanged()), this, SLOT(slotApply()) );
+ connect( m_pCodeGenPage, TQT_SIGNAL(languageChanged()), this, TQT_SLOT(slotApply()) );
}
void SettingsDlg::setupCodeViewerPage(Settings::CodeViewerState options) {
//setup code generation settings page
- QVBox * page = addVBoxPage( i18n("Code Viewer"), i18n("Code Viewer Settings"), DesktopIcon( "source") );
+ TQVBox * page = addVBoxPage( i18n("Code Viewer"), i18n("Code Viewer Settings"), DesktopIcon( "source") );
m_pCodeViewerPage = new CodeViewerOptionsPage(options, page);
}
void SettingsDlg::setupFontPage() {
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_FontWidgets.chooser = new KFontChooser( page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_FontWidgets.chooser = new KFontChooser( page, "font", false, TQStringList(), false);
m_FontWidgets.chooser->setFont( m_pOptionState->uiState.font );
}
@@ -348,7 +348,7 @@ void SettingsDlg::slotDefault() {
case Settings::page_UI:
m_UiWidgets.useFillColorCB -> setChecked( true );
- m_UiWidgets.fillColorB -> setColor( QColor( 255, 255, 192 ) );
+ m_UiWidgets.fillColorB -> setColor( TQColor( 255, 255, 192 ) );
m_UiWidgets.lineColorB -> setColor( Qt::red );
m_UiWidgets.lineWidthB -> setValue( 0 );
break;
@@ -429,14 +429,14 @@ void SettingsDlg::slotLineBClicked() {
}
void SettingsDlg::slotFillBClicked() {
- m_UiWidgets.fillColorB -> setColor( QColor(255, 255, 192) );
+ m_UiWidgets.fillColorB -> setColor( TQColor(255, 255, 192) );
}
void SettingsDlg::slotAutosaveCBClicked() {
m_GeneralWidgets.timeISB -> setEnabled( m_GeneralWidgets.autosaveCB -> isChecked() );
}
-QString SettingsDlg::getCodeGenerationLanguage() {
+TQString SettingsDlg::getCodeGenerationLanguage() {
return m_pCodeGenPage->getCodeGenerationLanguage();
}
diff --git a/umbrello/umbrello/dialogs/settingsdlg.h b/umbrello/umbrello/dialogs/settingsdlg.h
index 30579990..c00437b2 100644
--- a/umbrello/umbrello/dialogs/settingsdlg.h
+++ b/umbrello/umbrello/dialogs/settingsdlg.h
@@ -13,13 +13,13 @@
#ifndef SETTINGSDLG_H
#define SETTINGSDLG_H
//qt includes
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qdict.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqdict.h>
//kde includes
#include <kcombobox.h>
#include <kfontdialog.h>
@@ -45,7 +45,7 @@ class SettingsDlg : public KDialogBase {
Q_OBJECT
public:
- SettingsDlg(QWidget * parent, Settings::OptionState *state);
+ SettingsDlg(TQWidget * parent, Settings::OptionState *state);
~SettingsDlg();
//public methods
@@ -53,86 +53,86 @@ public:
return m_bChangesApplied;
}
- QString getCodeGenerationLanguage();
+ TQString getCodeGenerationLanguage();
protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertDiagram( const QString& type, int index = -1 );
+ void insertDiagram( const TQString& type, int index = -1 );
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertAttribScope( const QString& type, int index = -1 );
+ void insertAttribScope( const TQString& type, int index = -1 );
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertOperationScope( const QString& type, int index = -1 );
+ void insertOperationScope( const TQString& type, int index = -1 );
private:
//private structs
struct UIWidgets {
- QGroupBox * colorGB;
+ TQGroupBox * colorGB;
- QLabel * lineColorL;
- QLabel * fillColorL;
- QLabel * lineWidthL;
+ TQLabel * lineColorL;
+ TQLabel * fillColorL;
+ TQLabel * lineWidthL;
- QPushButton * lineDefaultB;
- QPushButton * fillDefaultB;
- QPushButton * lineWidthDefaultB;
+ TQPushButton * lineDefaultB;
+ TQPushButton * fillDefaultB;
+ TQPushButton * lineWidthDefaultB;
KColorButton * lineColorB;
KColorButton * fillColorB;
KIntSpinBox * lineWidthB;
- QCheckBox * useFillColorCB;
+ TQCheckBox * useFillColorCB;
}
;//end struct UIWidgets
struct GeneralWidgets {
- QGroupBox * miscGB;
- QGroupBox * autosaveGB;
- QGroupBox * startupGB;
+ TQGroupBox * miscGB;
+ TQGroupBox * autosaveGB;
+ TQGroupBox * startupGB;
KIntSpinBox * timeISB;
KComboBox * diagramKB;
- QCheckBox * undoCB;
- QCheckBox * tabdiagramsCB;
- QCheckBox * newcodegenCB;
- QCheckBox * angularLinesCB;
- QCheckBox * autosaveCB;
- QCheckBox * logoCB;
- QCheckBox * tipCB;
- QCheckBox * loadlastCB;
+ TQCheckBox * undoCB;
+ TQCheckBox * tabdiagramsCB;
+ TQCheckBox * newcodegenCB;
+ TQCheckBox * angularLinesCB;
+ TQCheckBox * autosaveCB;
+ TQCheckBox * logoCB;
+ TQCheckBox * tipCB;
+ TQCheckBox * loadlastCB;
// 2004-05-17 Achim Spangler: Allow definition of Suffix for autosave
// ( Default: ".xmi" )
- QLineEdit * autosaveSuffixT;
- QLabel * autosaveSuffixL;
+ TQLineEdit * autosaveSuffixT;
+ TQLabel * autosaveSuffixL;
// End AutoSave Suffix
- QLabel * startL;
- QLabel * autosaveL;
+ TQLabel * startL;
+ TQLabel * autosaveL;
}
;//end struct GeneralWidgets
struct ClassWidgets {
- QGroupBox * visibilityGB;
- QGroupBox * scopeGB;
+ TQGroupBox * visibilityGB;
+ TQGroupBox * scopeGB;
- QCheckBox * showVisibilityCB;
- QCheckBox * showAttsCB;
- QCheckBox * showOpsCB;
- QCheckBox * showStereotypeCB;
- QCheckBox * showAttSigCB;
- QCheckBox * showPackageCB;
+ TQCheckBox * showVisibilityCB;
+ TQCheckBox * showAttsCB;
+ TQCheckBox * showOpsCB;
+ TQCheckBox * showStereotypeCB;
+ TQCheckBox * showAttSigCB;
+ TQCheckBox * showPackageCB;
- QCheckBox * showOpSigCB;
+ TQCheckBox * showOpSigCB;
- QLabel * attributeLabel;
- QLabel * operationLabel;
+ TQLabel * attributeLabel;
+ TQLabel * operationLabel;
KComboBox* m_pAttribScopeCB;
KComboBox* m_pOperationScopeCB;
diff --git a/umbrello/umbrello/dialogs/statedialog.cpp b/umbrello/umbrello/dialogs/statedialog.cpp
index 691597e9..564146ec 100644
--- a/umbrello/umbrello/dialogs/statedialog.cpp
+++ b/umbrello/umbrello/dialogs/statedialog.cpp
@@ -13,11 +13,11 @@
#include "statedialog.h"
//qt includes
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmultilineedit.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmultilineedit.h>
+#include <tqgroupbox.h>
//kde includes
#include <kiconloader.h>
@@ -82,13 +82,13 @@ void StateDialog::applyPage( Page page ) {
}
void StateDialog::setupGeneralPage() {
- QString types[ ] = { i18n("Initial state"), i18n("State"), i18n("End state") };
+ TQString types[ ] = { i18n("Initial state"), i18n("State"), i18n("End state") };
StateWidget::StateType type = m_pStateWidget -> getStateType();
- QVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
- m_GenPageWidgets.generalGB = new QGroupBox( i18n( "Properties"), (QWidget *)page );
+ TQVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
+ m_GenPageWidgets.generalGB = new TQGroupBox( i18n( "Properties"), (TQWidget *)page );
- QGridLayout * generalLayout = new QGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
+ TQGridLayout * generalLayout = new TQGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
generalLayout -> setSpacing( spacingHint() );
generalLayout -> setMargin( fontMetrics().height() );
@@ -101,13 +101,13 @@ void StateDialog::setupGeneralPage() {
m_GenPageWidgets.nameL, i18n("State name:"),
m_GenPageWidgets.nameLE );
- m_GenPageWidgets.docGB = new QGroupBox( i18n( "Documentation"), (QWidget *)page );
+ m_GenPageWidgets.docGB = new TQGroupBox( i18n( "Documentation"), (TQWidget *)page );
- QHBoxLayout * docLayout = new QHBoxLayout( m_GenPageWidgets.docGB );
+ TQHBoxLayout * docLayout = new TQHBoxLayout( m_GenPageWidgets.docGB );
docLayout -> setSpacing( spacingHint() );
docLayout -> setMargin( fontMetrics().height() );
- m_GenPageWidgets.docMLE = new QMultiLineEdit( m_GenPageWidgets.docGB );
+ m_GenPageWidgets.docMLE = new TQMultiLineEdit( m_GenPageWidgets.docGB );
m_GenPageWidgets.docMLE -> setText( m_pStateWidget -> getDoc() );
docLayout -> addWidget( m_GenPageWidgets.docMLE );
@@ -121,21 +121,21 @@ void StateDialog::setupGeneralPage() {
void StateDialog::setupFontPage() {
if ( !m_pStateWidget )
return;
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pStateWidget -> getFont() );
}
void StateDialog::setupColorPage() {
- QFrame * colorPage = addPage( i18n("Color"), i18n("Widget Color"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame * colorPage = addPage( i18n("Color"), i18n("Widget Color"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage( colorPage, m_pStateWidget );
m_pColorLayout -> addWidget(m_pColorPage);
}
void StateDialog::setupActivityPage() {
- QFrame * activityPage = addPage( i18n("Activities"), i18n("Activities"), DesktopIcon( "misc") );
- QHBoxLayout * activityLayout = new QHBoxLayout( activityPage );
+ TQFrame * activityPage = addPage( i18n("Activities"), i18n("Activities"), DesktopIcon( "misc") );
+ TQHBoxLayout * activityLayout = new TQHBoxLayout( activityPage );
m_pActivityPage = new ActivityPage( activityPage, m_pStateWidget );
activityLayout -> addWidget( m_pActivityPage );
}
diff --git a/umbrello/umbrello/dialogs/statedialog.h b/umbrello/umbrello/dialogs/statedialog.h
index d364d6be..07e60898 100644
--- a/umbrello/umbrello/dialogs/statedialog.h
+++ b/umbrello/umbrello/dialogs/statedialog.h
@@ -132,11 +132,11 @@ protected:
bool m_bChangesMade;
struct GeneralPageWidgets {
- QLabel * nameL, * typeL;
- QLineEdit * nameLE, * typeLE;
- QMultiLineEdit * docMLE;
+ TQLabel * nameL, * typeL;
+ TQLineEdit * nameLE, * typeLE;
+ TQMultiLineEdit * docMLE;
- QGroupBox * docGB, * generalGB;
+ TQGroupBox * docGB, * generalGB;
}
m_GenPageWidgets;
};
diff --git a/umbrello/umbrello/dialogs/umlattributedialog.cpp b/umbrello/umbrello/dialogs/umlattributedialog.cpp
index e6a52725..d6ea57ce 100644
--- a/umbrello/umbrello/dialogs/umlattributedialog.cpp
+++ b/umbrello/umbrello/dialogs/umlattributedialog.cpp
@@ -13,13 +13,13 @@
#include "umlattributedialog.h"
// qt includes
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
// kde includes
#include <kcombobox.h>
@@ -38,7 +38,7 @@
#include "../object_factory.h"
#include "../codeimport/import_utils.h"
-UMLAttributeDialog::UMLAttributeDialog( QWidget * pParent, UMLAttribute * pAttribute )
+UMLAttributeDialog::UMLAttributeDialog( TQWidget * pParent, UMLAttribute * pAttribute )
: KDialogBase( Plain, i18n("Attribute Properties"), Help | Ok | Cancel , Ok, pParent, "_UMLATTRIBUTEDLG_", true, true) {
m_pAttribute = pAttribute;
setupDialog();
@@ -50,14 +50,14 @@ void UMLAttributeDialog::setupDialog() {
UMLDoc * pDoc = UMLApp::app()->getDocument();
int margin = fontMetrics().height();
- QVBoxLayout * mainLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( plainPage() );
- m_pValuesGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout * valuesLayout = new QGridLayout(m_pValuesGB, 5, 2);
+ m_pValuesGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout * valuesLayout = new TQGridLayout(m_pValuesGB, 5, 2);
valuesLayout -> setMargin(margin);
valuesLayout -> setSpacing(10);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pValuesGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pValuesGB);
valuesLayout -> addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(true, m_pValuesGB);
@@ -76,7 +76,7 @@ void UMLAttributeDialog::setupDialog() {
m_pStereoTypeL, i18n("Stereotype name:"),
m_pStereoTypeLE, m_pAttribute->getStereotype() );
- m_pStaticCB = new QCheckBox( i18n("Classifier &scope (\"static\")"), m_pValuesGB );
+ m_pStaticCB = new TQCheckBox( i18n("Classifier &scope (\"static\")"), m_pValuesGB );
m_pStaticCB -> setChecked( m_pAttribute -> getStatic() );
valuesLayout -> addWidget(m_pStaticCB, 4, 0);
@@ -84,20 +84,20 @@ void UMLAttributeDialog::setupDialog() {
mainLayout -> addWidget(m_pValuesGB);
- m_pScopeBG = new QButtonGroup(i18n("Visibility"), plainPage() );
- QHBoxLayout * scopeLayout = new QHBoxLayout(m_pScopeBG);
+ m_pScopeBG = new TQButtonGroup(i18n("Visibility"), plainPage() );
+ TQHBoxLayout * scopeLayout = new TQHBoxLayout(m_pScopeBG);
scopeLayout -> setMargin(margin);
- m_pPublicRB = new QRadioButton(i18n("&Public"), m_pScopeBG);
+ m_pPublicRB = new TQRadioButton(i18n("&Public"), m_pScopeBG);
scopeLayout -> addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("P&rivate"), m_pScopeBG);
+ m_pPrivateRB = new TQRadioButton(i18n("P&rivate"), m_pScopeBG);
scopeLayout -> addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("Prot&ected"), m_pScopeBG);
+ m_pProtectedRB = new TQRadioButton(i18n("Prot&ected"), m_pScopeBG);
scopeLayout -> addWidget(m_pProtectedRB);
- m_pImplementationRB = new QRadioButton(i18n("I&mplementation"), m_pScopeBG);
+ m_pImplementationRB = new TQRadioButton(i18n("I&mplementation"), m_pScopeBG);
scopeLayout -> addWidget(m_pImplementationRB);
mainLayout -> addWidget(m_pScopeBG);
@@ -125,7 +125,7 @@ void UMLAttributeDialog::setupDialog() {
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == m_pAttribute->getTypeName() ) {
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -140,17 +140,17 @@ void UMLAttributeDialog::setupDialog() {
}
m_pNameLE->setFocus();
- connect( m_pNameLE, SIGNAL( textChanged ( const QString & ) ), SLOT( slotNameChanged( const QString & ) ) );
+ connect( m_pNameLE, TQT_SIGNAL( textChanged ( const TQString & ) ), TQT_SLOT( slotNameChanged( const TQString & ) ) );
slotNameChanged(m_pNameLE->text() );
}
-void UMLAttributeDialog::slotNameChanged( const QString &_text )
+void UMLAttributeDialog::slotNameChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
bool UMLAttributeDialog::apply() {
- QString name = m_pNameLE->text();
+ TQString name = m_pNameLE->text();
if (name.isEmpty()) {
KMessageBox::error(this, i18n("You have entered an invalid attribute name."),
i18n("Attribute Name Invalid"), false);
@@ -184,7 +184,7 @@ bool UMLAttributeDialog::apply() {
m_pAttribute->setStereotype( m_pStereoTypeLE->text() );
m_pAttribute->setStatic( m_pStaticCB->isChecked() );
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLTemplate *tmplParam = pConcept->findTemplate(typeName);
if (tmplParam) {
m_pAttribute->setType(tmplParam);
@@ -225,7 +225,7 @@ void UMLAttributeDialog::slotOk() {
}
}
-void UMLAttributeDialog::insertType( const QString& type, int index )
+void UMLAttributeDialog::insertType( const TQString& type, int index )
{
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
diff --git a/umbrello/umbrello/dialogs/umlattributedialog.h b/umbrello/umbrello/dialogs/umlattributedialog.h
index 92305d61..7994c187 100644
--- a/umbrello/umbrello/dialogs/umlattributedialog.h
+++ b/umbrello/umbrello/dialogs/umlattributedialog.h
@@ -30,7 +30,7 @@ class QLineEdit;
class UMLAttributeDialog : public KDialogBase {
Q_OBJECT
public:
- UMLAttributeDialog( QWidget * pParent, UMLAttribute * pAttribute );
+ UMLAttributeDialog( TQWidget * pParent, UMLAttribute * pAttribute );
~UMLAttributeDialog();
protected:
@@ -48,7 +48,7 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* The Attribute to represent
@@ -56,13 +56,13 @@ protected:
UMLAttribute * m_pAttribute;
//GUI Widgets
- QGroupBox * m_pAttsGB, * m_pValuesGB;
- QButtonGroup * m_pScopeBG;
- QRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pImplementationRB;
- QLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
+ TQGroupBox * m_pAttsGB, * m_pValuesGB;
+ TQButtonGroup * m_pScopeBG;
+ TQRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pImplementationRB;
+ TQLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
KComboBox * m_pTypeCB;
- QLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE;
- QCheckBox* m_pStaticCB;
+ TQLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE;
+ TQCheckBox* m_pStaticCB;
public slots:
/**
@@ -75,7 +75,7 @@ public slots:
* Used when the OK button is clicked. Calls apply()
*/
void slotOk();
- void slotNameChanged( const QString & );
+ void slotNameChanged( const TQString & );
};
#endif
diff --git a/umbrello/umbrello/dialogs/umlentityattributedialog.cpp b/umbrello/umbrello/dialogs/umlentityattributedialog.cpp
index ef6a5791..55a47857 100644
--- a/umbrello/umbrello/dialogs/umlentityattributedialog.cpp
+++ b/umbrello/umbrello/dialogs/umlentityattributedialog.cpp
@@ -13,13 +13,13 @@
#include "umlentityattributedialog.h"
// qt includes
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
// kde includes
#include <kcombobox.h>
@@ -39,7 +39,7 @@
#include "../object_factory.h"
#include "../umlclassifierlist.h"
-UMLEntityAttributeDialog::UMLEntityAttributeDialog( QWidget * pParent, UMLEntityAttribute * pEntityAttribute )
+UMLEntityAttributeDialog::UMLEntityAttributeDialog( TQWidget * pParent, UMLEntityAttribute * pEntityAttribute )
: KDialogBase( Plain, i18n("Entity Attribute Properties"), Help | Ok | Cancel , Ok, pParent, "_UMLENTITYATTRIBUTEDLG_", true, true) {
m_pEntityAttribute = pEntityAttribute;
setupDialog();
@@ -51,14 +51,14 @@ void UMLEntityAttributeDialog::setupDialog() {
UMLDoc * pDoc = UMLApp::app()->getDocument();
int margin = fontMetrics().height();
- QVBoxLayout * mainLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( plainPage() );
- m_pValuesGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout * valuesLayout = new QGridLayout(m_pValuesGB, 5, 2);
+ m_pValuesGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout * valuesLayout = new TQGridLayout(m_pValuesGB, 5, 2);
valuesLayout -> setMargin(margin);
valuesLayout -> setSpacing(10);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pValuesGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pValuesGB);
valuesLayout -> addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(true, m_pValuesGB);
@@ -81,15 +81,15 @@ void UMLEntityAttributeDialog::setupDialog() {
m_pValuesL, i18n("Length/Values:"),
m_pValuesLE, m_pEntityAttribute->getValues() );
- m_pAutoIncrementCB = new QCheckBox( i18n("&Auto increment"), m_pValuesGB );
+ m_pAutoIncrementCB = new TQCheckBox( i18n("&Auto increment"), m_pValuesGB );
m_pAutoIncrementCB->setChecked( m_pEntityAttribute->getAutoIncrement() );
valuesLayout->addWidget(m_pAutoIncrementCB, 5, 0);
- m_pNullCB = new QCheckBox( i18n("Allow &null"), m_pValuesGB );
+ m_pNullCB = new TQCheckBox( i18n("Allow &null"), m_pValuesGB );
m_pNullCB->setChecked( m_pEntityAttribute->getNull() );
valuesLayout->addWidget(m_pNullCB, 6, 0);
- m_pAttributesL = new QLabel(i18n("Attributes:"), m_pValuesGB);
+ m_pAttributesL = new TQLabel(i18n("Attributes:"), m_pValuesGB);
valuesLayout->addWidget(m_pAttributesL, 7, 0);
m_pAttributesCB = new KComboBox(true, m_pValuesGB);
@@ -105,20 +105,20 @@ void UMLEntityAttributeDialog::setupDialog() {
mainLayout -> addWidget(m_pValuesGB);
- m_pScopeBG = new QButtonGroup(i18n("Indexing"), plainPage() );
- QHBoxLayout* scopeLayout = new QHBoxLayout(m_pScopeBG);
+ m_pScopeBG = new TQButtonGroup(i18n("Indexing"), plainPage() );
+ TQHBoxLayout* scopeLayout = new TQHBoxLayout(m_pScopeBG);
scopeLayout->setMargin(margin);
- m_pNoneRB = new QRadioButton(i18n("&None"), m_pScopeBG);
+ m_pNoneRB = new TQRadioButton(i18n("&None"), m_pScopeBG);
scopeLayout->addWidget(m_pNoneRB);
- m_pPublicRB = new QRadioButton(i18n("&Primary"), m_pScopeBG);
+ m_pPublicRB = new TQRadioButton(i18n("&Primary"), m_pScopeBG);
scopeLayout->addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("&Index"), m_pScopeBG);
+ m_pPrivateRB = new TQRadioButton(i18n("&Index"), m_pScopeBG);
scopeLayout->addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("&Unique"), m_pScopeBG);
+ m_pProtectedRB = new TQRadioButton(i18n("&Unique"), m_pScopeBG);
scopeLayout->addWidget(m_pProtectedRB);
mainLayout->addWidget(m_pScopeBG);
@@ -154,7 +154,7 @@ void UMLEntityAttributeDialog::setupDialog() {
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == m_pEntityAttribute->getTypeName() ) {
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -169,17 +169,17 @@ void UMLEntityAttributeDialog::setupDialog() {
}
m_pNameLE->setFocus();
- connect( m_pNameLE, SIGNAL( textChanged ( const QString & ) ), SLOT( slotNameChanged( const QString & ) ) );
+ connect( m_pNameLE, TQT_SIGNAL( textChanged ( const TQString & ) ), TQT_SLOT( slotNameChanged( const TQString & ) ) );
slotNameChanged(m_pNameLE->text() );
}
-void UMLEntityAttributeDialog::slotNameChanged( const QString &_text )
+void UMLEntityAttributeDialog::slotNameChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
bool UMLEntityAttributeDialog::apply() {
- QString name = m_pNameLE->text();
+ TQString name = m_pNameLE->text();
if (name.isEmpty()) {
KMessageBox::error(this, i18n("You have entered an invalid entity attribute name."),
i18n("Entity Attribute Name Invalid"), false);
@@ -212,7 +212,7 @@ bool UMLEntityAttributeDialog::apply() {
m_pEntityAttribute->setIndexType(Uml::None);
}
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLDoc *pDoc = UMLApp::app()->getDocument();
UMLClassifierList dataTypes = pDoc->getDatatypes();
UMLClassifier *dat;
@@ -248,12 +248,12 @@ void UMLEntityAttributeDialog::slotOk() {
}
}
-void UMLEntityAttributeDialog::insertType( const QString& type, int index ) {
+void UMLEntityAttributeDialog::insertType( const TQString& type, int index ) {
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
}
-void UMLEntityAttributeDialog::insertAttribute( const QString& type, int index ) {
+void UMLEntityAttributeDialog::insertAttribute( const TQString& type, int index ) {
m_pAttributesCB->insertItem( type, index );
m_pAttributesCB->completionObject()->addItem( type );
}
diff --git a/umbrello/umbrello/dialogs/umlentityattributedialog.h b/umbrello/umbrello/dialogs/umlentityattributedialog.h
index 0b81472e..9b837e3e 100644
--- a/umbrello/umbrello/dialogs/umlentityattributedialog.h
+++ b/umbrello/umbrello/dialogs/umlentityattributedialog.h
@@ -30,7 +30,7 @@ class QLineEdit;
class UMLEntityAttributeDialog : public KDialogBase {
Q_OBJECT
public:
- UMLEntityAttributeDialog( QWidget* pParent, UMLEntityAttribute* pEntityAttribute );
+ UMLEntityAttributeDialog( TQWidget* pParent, UMLEntityAttribute* pEntityAttribute );
~UMLEntityAttributeDialog();
protected:
@@ -48,11 +48,11 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertAttribute( const QString& type, int index = -1 );
+ void insertAttribute( const TQString& type, int index = -1 );
/**
* The EntityAttribute to represent
@@ -60,15 +60,15 @@ protected:
UMLEntityAttribute * m_pEntityAttribute;
//GUI Widgets
- QGroupBox * m_pAttsGB, * m_pValuesGB;
- QButtonGroup * m_pScopeBG;
- QRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pNoneRB;
- QLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL, * m_pValuesL, * m_pAttributesL ;
+ TQGroupBox * m_pAttsGB, * m_pValuesGB;
+ TQButtonGroup * m_pScopeBG;
+ TQRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pNoneRB;
+ TQLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL, * m_pValuesL, * m_pAttributesL ;
KComboBox * m_pTypeCB;
KComboBox * m_pAttributesCB;
- QLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE, * m_pValuesLE;
- QCheckBox* m_pAutoIncrementCB;
- QCheckBox* m_pNullCB;
+ TQLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE, * m_pValuesLE;
+ TQCheckBox* m_pAutoIncrementCB;
+ TQCheckBox* m_pNullCB;
public slots:
/**
@@ -81,7 +81,7 @@ public slots:
* Used when the OK button is clicked. Calls apply()
*/
void slotOk();
- void slotNameChanged( const QString & );
+ void slotNameChanged( const TQString & );
};
#endif
diff --git a/umbrello/umbrello/dialogs/umloperationdialog.cpp b/umbrello/umbrello/dialogs/umloperationdialog.cpp
index 07c56d52..37e8f64c 100644
--- a/umbrello/umbrello/dialogs/umloperationdialog.cpp
+++ b/umbrello/umbrello/dialogs/umloperationdialog.cpp
@@ -13,15 +13,15 @@
#include "umloperationdialog.h"
//qt includes
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
//kde includes
#include <kcombobox.h>
@@ -46,7 +46,7 @@
#include "../stereotype.h"
#include "../uniqueid.h"
-UMLOperationDialog::UMLOperationDialog( QWidget * parent, UMLOperation * pOperation )
+UMLOperationDialog::UMLOperationDialog( TQWidget * parent, UMLOperation * pOperation )
: KDialogBase( Plain, i18n("Operation Properties"), Help | Ok | Cancel , Ok, parent, "_UMLOPERATIONDLG_", true, true) {
m_pOperation = pOperation;
m_doc = UMLApp::app()->getDocument();
@@ -59,10 +59,10 @@ UMLOperationDialog::~UMLOperationDialog() {}
void UMLOperationDialog::setupDialog() {
int margin = fontMetrics().height();
- QVBoxLayout * topLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage() );
- m_pGenGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout * genLayout = new QGridLayout(m_pGenGB, 3, 4 );
+ m_pGenGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout * genLayout = new TQGridLayout(m_pGenGB, 3, 4 );
genLayout -> setColStretch(1, 1);
genLayout -> setColStretch(3, 1);
genLayout -> addColSpacing(1, 200);
@@ -74,61 +74,61 @@ void UMLOperationDialog::setupDialog() {
m_pNameL, i18n("&Name:"),
m_pNameLE, m_pOperation->getName() );
- m_pRtypeL = new QLabel(i18n("&Type:"), m_pGenGB );
+ m_pRtypeL = new TQLabel(i18n("&Type:"), m_pGenGB );
genLayout -> addWidget(m_pRtypeL, 0, 2);
m_pRtypeCB = new KComboBox(true, m_pGenGB );
genLayout -> addWidget(m_pRtypeCB, 0, 3);
m_pRtypeL->setBuddy(m_pRtypeCB);
- m_pStereoTypeL = new QLabel( i18n("Stereotype name:"), m_pGenGB );
+ m_pStereoTypeL = new TQLabel( i18n("Stereotype name:"), m_pGenGB );
genLayout -> addWidget(m_pStereoTypeL, 1, 0);
m_pStereoTypeCB = new KComboBox(true, m_pGenGB );
genLayout -> addWidget(m_pStereoTypeCB, 1, 1);
- m_pAbstractCB = new QCheckBox( i18n("&Abstract operation"), m_pGenGB );
+ m_pAbstractCB = new TQCheckBox( i18n("&Abstract operation"), m_pGenGB );
m_pAbstractCB -> setChecked( m_pOperation->getAbstract() );
genLayout -> addWidget( m_pAbstractCB, 2, 0 );
- m_pStaticCB = new QCheckBox( i18n("Classifier &scope (\"static\")"), m_pGenGB );
+ m_pStaticCB = new TQCheckBox( i18n("Classifier &scope (\"static\")"), m_pGenGB );
m_pStaticCB -> setChecked( m_pOperation->getStatic() );
genLayout -> addWidget( m_pStaticCB, 2, 1 );
- m_pQueryCB = new QCheckBox( i18n("&Query (\"const\")"), m_pGenGB );
+ m_pQueryCB = new TQCheckBox( i18n("&Query (\"const\")"), m_pGenGB );
m_pQueryCB -> setChecked( m_pOperation->getConst() );
genLayout -> addWidget( m_pQueryCB, 2, 2 );
topLayout -> addWidget( m_pGenGB );
- m_pScopeBG = new QButtonGroup(i18n("Visibility"), plainPage() );
+ m_pScopeBG = new TQButtonGroup(i18n("Visibility"), plainPage() );
- QHBoxLayout * scopeLayout = new QHBoxLayout(m_pScopeBG);
+ TQHBoxLayout * scopeLayout = new TQHBoxLayout(m_pScopeBG);
scopeLayout -> setMargin(margin);
- m_pPublicRB = new QRadioButton(i18n("P&ublic"), m_pScopeBG);
+ m_pPublicRB = new TQRadioButton(i18n("P&ublic"), m_pScopeBG);
scopeLayout -> addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("P&rivate"), m_pScopeBG);
+ m_pPrivateRB = new TQRadioButton(i18n("P&rivate"), m_pScopeBG);
scopeLayout -> addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("Prot&ected"), m_pScopeBG);
+ m_pProtectedRB = new TQRadioButton(i18n("Prot&ected"), m_pScopeBG);
scopeLayout -> addWidget(m_pProtectedRB);
- m_pImplementationRB = new QRadioButton(i18n("I&mplementation"), m_pScopeBG);
+ m_pImplementationRB = new TQRadioButton(i18n("I&mplementation"), m_pScopeBG);
scopeLayout -> addWidget(m_pImplementationRB);
topLayout -> addWidget(m_pScopeBG);
- m_pParmsGB = new QGroupBox(i18n("Parameters"), plainPage() );
- QVBoxLayout* parmsLayout = new QVBoxLayout(m_pParmsGB);
+ m_pParmsGB = new TQGroupBox(i18n("Parameters"), plainPage() );
+ TQVBoxLayout* parmsLayout = new TQVBoxLayout(m_pParmsGB);
parmsLayout->setMargin(margin);
parmsLayout->setSpacing(10);
//horizontal box contains the list box and the move up/down buttons
- QHBoxLayout* parmsHBoxLayout = new QHBoxLayout(parmsLayout);
- m_pParmsLB = new QListBox(m_pParmsGB);
+ TQHBoxLayout* parmsHBoxLayout = new TQHBoxLayout(parmsLayout);
+ m_pParmsLB = new TQListBox(m_pParmsGB);
parmsHBoxLayout->addWidget(m_pParmsLB);
//the move up/down buttons (another vertical box)
- QVBoxLayout* buttonLayout = new QVBoxLayout( parmsHBoxLayout );
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout( parmsHBoxLayout );
m_pUpButton = new KArrowButton( m_pParmsGB );
m_pUpButton->setEnabled( false );
buttonLayout->addWidget( m_pUpButton );
@@ -138,10 +138,10 @@ void UMLOperationDialog::setupDialog() {
buttonLayout->addWidget( m_pDownButton );
KButtonBox* buttonBox = new KButtonBox(m_pParmsGB);
- buttonBox->addButton( i18n("Ne&w Parameter..."), this, SLOT(slotNewParameter()) );
- m_pDeleteButton = buttonBox->addButton( i18n("&Delete"), this, SLOT(slotDeleteParameter()) );
+ buttonBox->addButton( i18n("Ne&w Parameter..."), this, TQT_SLOT(slotNewParameter()) );
+ m_pDeleteButton = buttonBox->addButton( i18n("&Delete"), this, TQT_SLOT(slotDeleteParameter()) );
m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this,
- SLOT(slotParameterProperties()) );
+ TQT_SLOT(slotParameterProperties()) );
parmsLayout->addWidget(buttonBox);
topLayout -> addWidget(m_pParmsGB);
@@ -179,7 +179,7 @@ void UMLOperationDialog::setupDialog() {
int returnBoxCount = 0;
bool foundReturnType = false;
while (returnBoxCount < m_pRtypeCB->count() && foundReturnType == false) {
- QString returnBoxString = m_pRtypeCB->text(returnBoxCount);
+ TQString returnBoxString = m_pRtypeCB->text(returnBoxCount);
if ( returnBoxString == m_pOperation->getTypeName() ) {
foundReturnType = true;
m_pRtypeCB->setCurrentItem(returnBoxCount);
@@ -213,7 +213,7 @@ void UMLOperationDialog::setupDialog() {
// manage stereotypes
m_pStereoTypeCB -> setDuplicatesEnabled(false);//only allow one of each type in box
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- insertStereotype (QString("")); // an empty stereotype is the default
+ insertStereotype (TQString("")); // an empty stereotype is the default
int defaultStereotype=0;
bool foundDefaultStereotype = false;
for (UMLStereotypeListIt it(m_doc->getStereotypes()); it.current(); ++it) {
@@ -232,35 +232,35 @@ void UMLOperationDialog::setupDialog() {
m_pStereoTypeCB->setCurrentItem(-1);
//setup parm list box signals
- connect( m_pUpButton, SIGNAL( clicked() ), this, SLOT( slotParameterUp() ) );
- connect( m_pDownButton, SIGNAL( clicked() ), this, SLOT( slotParameterDown() ) );
+ connect( m_pUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotParameterUp() ) );
+ connect( m_pDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotParameterDown() ) );
- connect(m_pParmsLB, SIGNAL(clicked(QListBoxItem*)),
- this, SLOT(slotParamsBoxClicked(QListBoxItem*)));
+ connect(m_pParmsLB, TQT_SIGNAL(clicked(TQListBoxItem*)),
+ this, TQT_SLOT(slotParamsBoxClicked(TQListBoxItem*)));
- connect(m_pParmsLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotParmRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pParmsLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotParmRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pParmsLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotParmRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pParmsLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotParmRightButtonClicked(TQListBoxItem *, const TQPoint &)));
- connect(m_pParmsLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotParmDoubleClick(QListBoxItem *)));
+ connect(m_pParmsLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotParmDoubleClick(TQListBoxItem *)));
m_pNameLE->setFocus();
- connect( m_pNameLE, SIGNAL( textChanged ( const QString & ) ), SLOT( slotNameChanged( const QString & ) ) );
+ connect( m_pNameLE, TQT_SIGNAL( textChanged ( const TQString & ) ), TQT_SLOT( slotNameChanged( const TQString & ) ) );
slotNameChanged(m_pNameLE->text() );
}
-void UMLOperationDialog::slotNameChanged( const QString &_text )
+void UMLOperationDialog::slotNameChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
-void UMLOperationDialog::slotParmRightButtonPressed(QListBoxItem *item, const QPoint &p) {
+void UMLOperationDialog::slotParmRightButtonPressed(TQListBoxItem *item, const TQPoint &p) {
ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined;
if(item)//pressed on an item
{
@@ -271,26 +271,26 @@ void UMLOperationDialog::slotParmRightButtonPressed(QListBoxItem *item, const QP
}
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotParmPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotParmPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotParmPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotParmPopupMenuSel(int)));
}
-void UMLOperationDialog::slotParmRightButtonClicked(QListBoxItem */*item*/, const QPoint &/*p*/) {
+void UMLOperationDialog::slotParmRightButtonClicked(TQListBoxItem */*item*/, const TQPoint &/*p*/) {
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotParmPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotParmPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void UMLOperationDialog::slotParmDoubleClick(QListBoxItem *item) {
+void UMLOperationDialog::slotParmDoubleClick(TQListBoxItem *item) {
if(!item)
return;
slotParmPopupMenuSel(ListPopupMenu::mt_Properties);
@@ -311,12 +311,12 @@ void UMLOperationDialog::slotNewParameter() {
int result = 0;
UMLAttribute* pAtt = 0;
- QString currentName = m_pOperation->getUniqueParameterName();
+ TQString currentName = m_pOperation->getUniqueParameterName();
UMLAttribute* newAttribute = new UMLAttribute(m_pOperation, currentName, Uml::id_Reserved);
ParmPropDlg dlg(this, m_doc, newAttribute);
result = dlg.exec();
- QString name = dlg.getName();
+ TQString name = dlg.getName();
pAtt = m_pOperation -> findParm( name );
if( result ) {
if( name.length() == 0 ) {
@@ -369,7 +369,7 @@ void UMLOperationDialog::slotParameterProperties() {
}//should never occur
ParmPropDlg dlg(this, m_doc, pOldAtt);
result = dlg.exec();
- QString name = dlg.getName();
+ TQString name = dlg.getName();
pAtt = m_pOperation->findParm( name );
if( result ) {
if( name.length() == 0 ) {
@@ -381,7 +381,7 @@ void UMLOperationDialog::slotParameterProperties() {
pOldAtt->getDoc() != dlg.getDoc() ||
pOldAtt->getInitialValue() != dlg.getInitialValue() ) {
pOldAtt->setName( name );
- QString typeName = dlg.getTypeName();
+ TQString typeName = dlg.getTypeName();
if (pOldAtt->getTypeName() != typeName) {
UMLClassifierList namesList( m_doc->getConcepts() );
UMLClassifier* obj = NULL;
@@ -415,7 +415,7 @@ void UMLOperationDialog::slotParameterUp()
UMLAttribute* pOldAtt = m_pOperation->findParm( m_pParmsLB->currentText() );
m_pOperation->moveParmLeft( pOldAtt );
- QString tmp = m_pParmsLB->currentText();
+ TQString tmp = m_pParmsLB->currentText();
m_pParmsLB->changeItem( m_pParmsLB->item( m_pParmsLB->currentItem() - 1 )->text(), m_pParmsLB->currentItem() );
m_pParmsLB->changeItem( tmp, m_pParmsLB->currentItem() - 1 );
m_doc->setModified(true);
@@ -427,7 +427,7 @@ void UMLOperationDialog::slotParameterDown()
UMLAttribute* pOldAtt = m_pOperation->findParm( m_pParmsLB->currentText() );
m_pOperation->moveParmRight( pOldAtt );
- QString tmp = m_pParmsLB->currentText();
+ TQString tmp = m_pParmsLB->currentText();
m_pParmsLB->changeItem( m_pParmsLB->item( m_pParmsLB->currentItem() + 1 )->text(), m_pParmsLB->currentItem() );
m_pParmsLB->changeItem( tmp, m_pParmsLB->currentItem() + 1 );
@@ -435,7 +435,7 @@ void UMLOperationDialog::slotParameterDown()
slotParamsBoxClicked( m_pParmsLB->selectedItem() );
}
-void UMLOperationDialog::slotParamsBoxClicked(QListBoxItem* parameterItem) {
+void UMLOperationDialog::slotParamsBoxClicked(TQListBoxItem* parameterItem) {
if (parameterItem) {
m_pDeleteButton->setEnabled(true);
m_pPropertiesButton->setEnabled(true);
@@ -451,7 +451,7 @@ void UMLOperationDialog::slotParamsBoxClicked(QListBoxItem* parameterItem) {
bool UMLOperationDialog::apply()
{
- QString name = m_pNameLE -> text();
+ TQString name = m_pNameLE -> text();
if( name.length() == 0 ) {
KMessageBox::error(this, i18n("You have entered an invalid operation name."),
i18n("Operation Name Invalid"), false);
@@ -463,9 +463,9 @@ bool UMLOperationDialog::apply()
if( classifier != 0L &&
classifier->checkOperationSignature(name, m_pOperation->getParmList(), m_pOperation) )
{
- QString msg = QString(i18n("An operation with that signature already exists in %1.\n")).arg(classifier->getName())
+ TQString msg = TQString(i18n("An operation with that signature already exists in %1.\n")).arg(classifier->getName())
+
- QString(i18n("Choose a different name or parameter list." ));
+ TQString(i18n("Choose a different name or parameter list." ));
KMessageBox::error(this, msg, i18n("Operation Name Invalid"), false);
return false;
}
@@ -480,7 +480,7 @@ bool UMLOperationDialog::apply()
else if (m_pImplementationRB -> isChecked() )
m_pOperation -> setVisibility( Uml::Visibility::Implementation );
- QString typeName = m_pRtypeCB->currentText();
+ TQString typeName = m_pRtypeCB->currentText();
UMLTemplate *tmplParam = classifier->findTemplate(typeName);
if (tmplParam)
m_pOperation->setType(tmplParam);
@@ -515,13 +515,13 @@ void UMLOperationDialog::slotOk() {
}
}
-void UMLOperationDialog::insertType( const QString& type, int index )
+void UMLOperationDialog::insertType( const TQString& type, int index )
{
m_pRtypeCB->insertItem( type, index );
m_pRtypeCB->completionObject()->addItem( type );
}
-void UMLOperationDialog::insertStereotype( const QString& type, int index )
+void UMLOperationDialog::insertStereotype( const TQString& type, int index )
{
m_pStereoTypeCB->insertItem( type, index );
m_pStereoTypeCB->completionObject()->addItem( type );
diff --git a/umbrello/umbrello/dialogs/umloperationdialog.h b/umbrello/umbrello/dialogs/umloperationdialog.h
index 1dee99ab..5d6d8ef9 100644
--- a/umbrello/umbrello/dialogs/umloperationdialog.h
+++ b/umbrello/umbrello/dialogs/umloperationdialog.h
@@ -42,7 +42,7 @@ public:
/**
* Constructor
*/
- UMLOperationDialog( QWidget * parent, UMLOperation * pOperation );
+ UMLOperationDialog( TQWidget * parent, UMLOperation * pOperation );
/**
* Deconstructor
@@ -64,7 +64,7 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* The operation to represent.
@@ -84,28 +84,28 @@ protected:
/**
* Inserts @p stereotype into the stereotype-combobox as well as its completion object.
*/
- void insertStereotype( const QString& type, int index = -1 );
+ void insertStereotype( const TQString& type, int index = -1 );
//GUI widgets
- QGroupBox * m_pParmsGB, * m_pGenGB;
- QListBox * m_pParmsLB;
- QButtonGroup * m_pScopeBG;
- QRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, *m_pImplementationRB;
- QLabel * m_pRtypeL, * m_pNameL, * m_pStereoTypeL;
+ TQGroupBox * m_pParmsGB, * m_pGenGB;
+ TQListBox * m_pParmsLB;
+ TQButtonGroup * m_pScopeBG;
+ TQRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, *m_pImplementationRB;
+ TQLabel * m_pRtypeL, * m_pNameL, * m_pStereoTypeL;
KComboBox * m_pRtypeCB, * m_pStereoTypeCB;
- QLineEdit * m_pNameLE;
- QCheckBox * m_pAbstractCB;
- QCheckBox * m_pStaticCB;
- QCheckBox * m_pQueryCB;
- QPushButton* m_pDeleteButton;
- QPushButton* m_pPropertiesButton;
+ TQLineEdit * m_pNameLE;
+ TQCheckBox * m_pAbstractCB;
+ TQCheckBox * m_pStaticCB;
+ TQCheckBox * m_pQueryCB;
+ TQPushButton* m_pDeleteButton;
+ TQPushButton* m_pPropertiesButton;
KArrowButton* m_pUpButton;
KArrowButton* m_pDownButton;
public slots:
- void slotParmRightButtonPressed(QListBoxItem *item, const QPoint &p);
- void slotParmRightButtonClicked(QListBoxItem *item, const QPoint &p);
- void slotParmDoubleClick(QListBoxItem *item);
+ void slotParmRightButtonPressed(TQListBoxItem *item, const TQPoint &p);
+ void slotParmRightButtonClicked(TQListBoxItem *item, const TQPoint &p);
+ void slotParmDoubleClick(TQListBoxItem *item);
void slotParmPopupMenuSel(int id);
void slotNewParameter();
void slotDeleteParameter();
@@ -116,7 +116,7 @@ public slots:
/**
* enables or disables buttons
*/
- void slotParamsBoxClicked(QListBoxItem* parameterItem);
+ void slotParamsBoxClicked(TQListBoxItem* parameterItem);
/**
* I don't think this is used, but if we had an apply button
@@ -128,7 +128,7 @@ public slots:
* Used when the OK button is clicked. Calls apply()
*/
void slotOk();
- void slotNameChanged( const QString & );
+ void slotNameChanged( const TQString & );
};
diff --git a/umbrello/umbrello/dialogs/umlroledialog.cpp b/umbrello/umbrello/dialogs/umlroledialog.cpp
index 91ad5c65..255f4010 100644
--- a/umbrello/umbrello/dialogs/umlroledialog.cpp
+++ b/umbrello/umbrello/dialogs/umlroledialog.cpp
@@ -13,7 +13,7 @@
#include "umlroledialog.h"
// qt/kde includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -21,7 +21,7 @@
#include "../umlrole.h"
#include "umlroleproperties.h"
-UMLRoleDialog::UMLRoleDialog( QWidget * parent, UMLRole * pRole )
+UMLRoleDialog::UMLRoleDialog( TQWidget * parent, UMLRole * pRole )
: KDialogBase( Plain, i18n("Role Properties"), Help | Ok | Cancel , Ok, parent, "_UMLROLEDLG_", true, true)
{
m_pRole = pRole;
@@ -31,11 +31,11 @@ UMLRoleDialog::UMLRoleDialog( QWidget * parent, UMLRole * pRole )
UMLRoleDialog::~UMLRoleDialog() {}
void UMLRoleDialog::setupDialog() {
- // UMLRoleDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "UMLRoleLayout");
+ // UMLRoleDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "UMLRoleLayout");
m_pRoleProps = new UMLRoleProperties(this, m_pRole);
setMainWidget( m_pRoleProps );
- resize( QSize(425, 620).expandedTo(minimumSizeHint()) );
+ resize( TQSize(425, 620).expandedTo(minimumSizeHint()) );
// topLayout -> addWidget( m_pParmsGB);
diff --git a/umbrello/umbrello/dialogs/umlroledialog.h b/umbrello/umbrello/dialogs/umlroledialog.h
index 09856d34..9f1ab218 100644
--- a/umbrello/umbrello/dialogs/umlroledialog.h
+++ b/umbrello/umbrello/dialogs/umlroledialog.h
@@ -29,7 +29,7 @@ public:
/**
* Constructor
*/
- UMLRoleDialog( QWidget * parent, UMLRole * pRole );
+ UMLRoleDialog( TQWidget * parent, UMLRole * pRole );
/**
* Deconstructor
diff --git a/umbrello/umbrello/dialogs/umlroleproperties.cpp b/umbrello/umbrello/dialogs/umlroleproperties.cpp
index 275d98f1..fe2e2f5f 100644
--- a/umbrello/umbrello/dialogs/umlroleproperties.cpp
+++ b/umbrello/umbrello/dialogs/umlroleproperties.cpp
@@ -13,15 +13,15 @@
#include "umlroleproperties.h"
// qt/kde includes
-#include <qradiobutton.h>
-#include <qtextedit.h>
-#include <qlineedit.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
-UMLRoleProperties::UMLRoleProperties ( QWidget *parent, UMLRole *role)
+UMLRoleProperties::UMLRoleProperties ( TQWidget *parent, UMLRole *role)
: UMLRolePropertiesBase (parent)
{
@@ -66,7 +66,7 @@ void UMLRoleProperties::constructWidget() {
// Documentation
//
m_pDocTE-> setText(m_pRole-> getDoc());
- //m_pDocTE->setWordWrap(QMultiLineEdit::WidgetWidth);
+ //m_pDocTE->setWordWrap(TQMultiLineEdit::WidgetWidth);
}
void UMLRoleProperties::updateObject() {
diff --git a/umbrello/umbrello/dialogs/umlroleproperties.h b/umbrello/umbrello/dialogs/umlroleproperties.h
index 34f7d3e9..61b7b8fe 100644
--- a/umbrello/umbrello/dialogs/umlroleproperties.h
+++ b/umbrello/umbrello/dialogs/umlroleproperties.h
@@ -32,7 +32,7 @@ public:
* @param parent The parent widget to the UMLRoleProperties.
* @param role The UMLRole to display the properties of.
*/
- UMLRoleProperties( QWidget *parent, UMLRole *role);
+ UMLRoleProperties( TQWidget *parent, UMLRole *role);
/**
* Standard deconstructor.
diff --git a/umbrello/umbrello/dialogs/umltemplatedialog.cpp b/umbrello/umbrello/dialogs/umltemplatedialog.cpp
index a183d95d..6075fbe4 100644
--- a/umbrello/umbrello/dialogs/umltemplatedialog.cpp
+++ b/umbrello/umbrello/dialogs/umltemplatedialog.cpp
@@ -13,11 +13,11 @@
#include "umltemplatedialog.h"
// qt includes
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
// kde includes
#include <kcombobox.h>
@@ -32,7 +32,7 @@
#include "../uml.h"
#include "../dialog_utils.h"
-UMLTemplateDialog::UMLTemplateDialog(QWidget* pParent, UMLTemplate* pTemplate)
+UMLTemplateDialog::UMLTemplateDialog(TQWidget* pParent, UMLTemplate* pTemplate)
: KDialogBase( Plain, i18n("Template Properties"), Help | Ok | Cancel , Ok, pParent, "_UMLTemplateDLG_", true, true) {
m_pTemplate = pTemplate;
setupDialog();
@@ -43,14 +43,14 @@ UMLTemplateDialog::~UMLTemplateDialog() {}
void UMLTemplateDialog::setupDialog() {
int margin = fontMetrics().height();
- QVBoxLayout* mainLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( plainPage() );
- m_pValuesGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout* valuesLayout = new QGridLayout(m_pValuesGB, 3, 2);
+ m_pValuesGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout* valuesLayout = new TQGridLayout(m_pValuesGB, 3, 2);
valuesLayout->setMargin(margin);
valuesLayout->setSpacing(10);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pValuesGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pValuesGB);
valuesLayout->addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(m_pValuesGB);
@@ -86,7 +86,7 @@ void UMLTemplateDialog::setupDialog() {
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == m_pTemplate->getTypeName() ) {
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -103,14 +103,14 @@ void UMLTemplateDialog::setupDialog() {
m_pNameLE->setFocus();
}
-void UMLTemplateDialog::insertType( const QString& type, int index )
+void UMLTemplateDialog::insertType( const TQString& type, int index )
{
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
}
bool UMLTemplateDialog::apply() {
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLDoc *pDoc = UMLApp::app()->getDocument();
UMLClassifierList namesList( pDoc->getConcepts() );
UMLClassifier* obj = 0;
@@ -123,7 +123,7 @@ bool UMLTemplateDialog::apply() {
// FIXME: This implementation is not good yet.
m_pTemplate->setTypeName( typeName );
}
- QString name = m_pNameLE->text();
+ TQString name = m_pNameLE->text();
if( name.length() == 0 ) {
KMessageBox::error(this, i18n("You have entered an invalid template name."),
i18n("Template Name Invalid"), false);
diff --git a/umbrello/umbrello/dialogs/umltemplatedialog.h b/umbrello/umbrello/dialogs/umltemplatedialog.h
index 3bdd321b..4ed1d584 100644
--- a/umbrello/umbrello/dialogs/umltemplatedialog.h
+++ b/umbrello/umbrello/dialogs/umltemplatedialog.h
@@ -32,7 +32,7 @@ class UMLTemplate;
class UMLTemplateDialog : public KDialogBase {
Q_OBJECT
public:
- UMLTemplateDialog(QWidget* pParent, UMLTemplate* pAttribute);
+ UMLTemplateDialog(TQWidget* pParent, UMLTemplate* pAttribute);
~UMLTemplateDialog();
protected:
@@ -53,11 +53,11 @@ protected:
UMLTemplate* m_pTemplate;
//GUI Widgets
- QGroupBox* m_pTemplateGB;
- QGroupBox* m_pValuesGB;
- QLabel *m_pTypeL, *m_pNameL, *m_pStereoTypeL;
+ TQGroupBox* m_pTemplateGB;
+ TQGroupBox* m_pValuesGB;
+ TQLabel *m_pTypeL, *m_pNameL, *m_pStereoTypeL;
KComboBox* m_pTypeCB;
- QLineEdit *m_pNameLE, *m_pStereoTypeLE;
+ TQLineEdit *m_pNameLE, *m_pStereoTypeLE;
public slots:
/**
@@ -74,7 +74,7 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
};
diff --git a/umbrello/umbrello/dialogs/umlviewdialog.cpp b/umbrello/umbrello/dialogs/umlviewdialog.cpp
index 94f44059..76ef776d 100644
--- a/umbrello/umbrello/dialogs/umlviewdialog.cpp
+++ b/umbrello/umbrello/dialogs/umlviewdialog.cpp
@@ -13,14 +13,14 @@
#include "umlviewdialog.h"
// qt/kde includes
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qgroupbox.h>
-#include <qtextedit.h>
-#include <qspinbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqgroupbox.h>
+#include <tqtextedit.h>
+#include <tqspinbox.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,7 +35,7 @@
#include "diagrampropertiespage.h"
-UMLViewDialog::UMLViewDialog( QWidget * pParent, UMLView * pView ) : KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
+UMLViewDialog::UMLViewDialog( TQWidget * pParent, UMLView * pView ) : KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, pParent, "_VIEWDLG_", true, true) {
m_pView = pView;
m_options = m_pView -> getOptionState();
@@ -67,7 +67,7 @@ void UMLViewDialog::setupPages()
void UMLViewDialog::setupDiagramPropertiesPage()
{
- QVBox *page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQVBox *page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
m_diagramProperties = new DiagramPropertiesPage(page);
m_diagramProperties->diagramName->setText( m_pView->getName() );
@@ -90,22 +90,22 @@ void UMLViewDialog::setupClassPage() {
return;
}
- QFrame * newPage = addPage( i18n("Display"), i18n("Classes Display Options"), DesktopIcon( "info") );
- QHBoxLayout * m_pOptionsLayout = new QHBoxLayout( newPage );
+ TQFrame * newPage = addPage( i18n("Display"), i18n("Classes Display Options"), DesktopIcon( "info") );
+ TQHBoxLayout * m_pOptionsLayout = new TQHBoxLayout( newPage );
m_pOptionsPage = new ClassOptionsPage( newPage, &m_options );
m_pOptionsLayout -> addWidget( m_pOptionsPage );
}
void UMLViewDialog::setupColorPage() {
- QFrame * colorPage = addPage( i18n("Color"), i18n("Diagram Colors"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame * colorPage = addPage( i18n("Color"), i18n("Diagram Colors"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage( colorPage, &m_options );
m_pColorLayout -> addWidget(m_pColorPage);
}
void UMLViewDialog::setupFontPage() {
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pView -> getOptionState().uiState.font );
}
@@ -157,7 +157,7 @@ void UMLViewDialog::applyPage( Page page ) {
}
void UMLViewDialog::checkName() {
- QString name = m_diagramProperties->diagramName-> text();
+ TQString name = m_diagramProperties->diagramName-> text();
UMLDoc * pDoc = UMLApp::app()-> getDocument();
UMLView * pView = pDoc -> findView( m_pView -> getType(), name );
if( name.length() == 0 ) {
diff --git a/umbrello/umbrello/dialogs/umlviewdialog.h b/umbrello/umbrello/dialogs/umlviewdialog.h
index b6fe4ebd..1a72c076 100644
--- a/umbrello/umbrello/dialogs/umlviewdialog.h
+++ b/umbrello/umbrello/dialogs/umlviewdialog.h
@@ -41,7 +41,7 @@ public:
/**
* Constructor
*/
- UMLViewDialog( QWidget * pParent, UMLView * pView );
+ UMLViewDialog( TQWidget * pParent, UMLView * pView );
/**
* Deconstructor
@@ -104,13 +104,13 @@ protected:
UMLWidgetColorPage * m_pColorPage;
//GUI widgets
- QLabel * m_pNameL, * m_pSpinXL, * m_pSpinYL;
- QLineEdit * m_pNameLE;
- QGroupBox * m_pDocGB, * m_pValuesGB;
- QCheckBox * m_pSnapToGridCB, * m_pShowSnapCB;
- QTextEdit * m_pDocTE;
- QSpinBox * m_pSnapXSB, * m_pSnapYSB;
- QSpinBox * m_pLineWidthSB;
+ TQLabel * m_pNameL, * m_pSpinXL, * m_pSpinYL;
+ TQLineEdit * m_pNameLE;
+ TQGroupBox * m_pDocGB, * m_pValuesGB;
+ TQCheckBox * m_pSnapToGridCB, * m_pShowSnapCB;
+ TQTextEdit * m_pDocTE;
+ TQSpinBox * m_pSnapXSB, * m_pSnapYSB;
+ TQSpinBox * m_pLineWidthSB;
public slots:
void slotOk();
void slotApply();
diff --git a/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp b/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp
index e234a8c2..824d708f 100644
--- a/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp
+++ b/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp
@@ -14,15 +14,15 @@
#include "../umlview.h"
#include "../umlwidget.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <kcolorbutton.h>
-UMLWidgetColorPage::UMLWidgetColorPage( QWidget *pParent, UMLWidget *pWidget ) : QWidget( pParent )
+UMLWidgetColorPage::UMLWidgetColorPage( TQWidget *pParent, UMLWidget *pWidget ) : TQWidget( pParent )
{
m_pUMLWidget = pWidget;
m_options = 0;
@@ -32,7 +32,7 @@ UMLWidgetColorPage::UMLWidgetColorPage( QWidget *pParent, UMLWidget *pWidget ) :
m_pUseFillColorCB->setChecked( pWidget -> getUseFillColour() );
}
-UMLWidgetColorPage::UMLWidgetColorPage( QWidget * pParent, Settings::OptionState *options ) : QWidget( pParent )
+UMLWidgetColorPage::UMLWidgetColorPage( TQWidget * pParent, Settings::OptionState *options ) : TQWidget( pParent )
{
m_options = options;
m_pUMLWidget = 0;
@@ -47,41 +47,41 @@ void UMLWidgetColorPage::init()
int margin = fontMetrics().height();
//setup GUI
- QVBoxLayout * topLayout = new QVBoxLayout( this );
+ TQVBoxLayout * topLayout = new TQVBoxLayout( this );
topLayout -> setSpacing( 6 );
- m_pColorGB = new QGroupBox( i18n( "Color" ), this );
+ m_pColorGB = new TQGroupBox( i18n( "Color" ), this );
topLayout -> addWidget( m_pColorGB );
- QGridLayout * colorLayout = new QGridLayout( m_pColorGB, 3, 3 );
+ TQGridLayout * colorLayout = new TQGridLayout( m_pColorGB, 3, 3 );
colorLayout -> setMargin( margin );
- m_pLineColorL = new QLabel( i18n( "&Line:" ), m_pColorGB );
+ m_pLineColorL = new TQLabel( i18n( "&Line:" ), m_pColorGB );
colorLayout -> addWidget( m_pLineColorL, 0, 0 );
m_pLineColorB = new KColorButton( m_pColorGB );
colorLayout -> addWidget( m_pLineColorB, 0, 1 );
m_pLineColorL->setBuddy(m_pLineColorB);
- m_pLineDefaultB = new QPushButton( i18n( "&Default" ), m_pColorGB) ;
+ m_pLineDefaultB = new TQPushButton( i18n( "&Default" ), m_pColorGB) ;
colorLayout -> addWidget( m_pLineDefaultB, 0, 2 );
- m_pFillColorL = new QLabel( i18n( "&Fill:" ), m_pColorGB );
+ m_pFillColorL = new TQLabel( i18n( "&Fill:" ), m_pColorGB );
colorLayout -> addWidget( m_pFillColorL, 1, 0 );
m_pFillColorB = new KColorButton( m_pColorGB );
colorLayout -> addWidget( m_pFillColorB, 1, 1 );
m_pFillColorL->setBuddy(m_pFillColorB);
- m_pFillDefaultB = new QPushButton( i18n( "D&efault" ), m_pColorGB );
+ m_pFillDefaultB = new TQPushButton( i18n( "D&efault" ), m_pColorGB );
colorLayout -> addWidget( m_pFillDefaultB, 1, 2 );
- m_pUseFillColorCB = new QCheckBox( i18n( "&Use fill" ), m_pColorGB );
+ m_pUseFillColorCB = new TQCheckBox( i18n( "&Use fill" ), m_pColorGB );
colorLayout -> setRowStretch( 2, 2 );
colorLayout -> addWidget( m_pUseFillColorCB, 2, 0 );
//connect button signals up
- connect( m_pLineDefaultB, SIGNAL( clicked() ), this, SLOT( slotLineButtonClicked() )) ;
- connect( m_pFillDefaultB, SIGNAL( clicked() ), this, SLOT( slotFillButtonClicked() ) );
+ connect( m_pLineDefaultB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotLineButtonClicked() )) ;
+ connect( m_pFillDefaultB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFillButtonClicked() ) );
}
UMLWidgetColorPage::~UMLWidgetColorPage() {}
diff --git a/umbrello/umbrello/dialogs/umlwidgetcolorpage.h b/umbrello/umbrello/dialogs/umlwidgetcolorpage.h
index 45826338..419868da 100644
--- a/umbrello/umbrello/dialogs/umlwidgetcolorpage.h
+++ b/umbrello/umbrello/dialogs/umlwidgetcolorpage.h
@@ -12,7 +12,7 @@
#ifndef UMLWIDGETCOLORPAGE_H
#define UMLWIDGETCOLORPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "../optionstate.h"
/**
@@ -27,19 +27,19 @@ class QPushButton;
class QCheckBox;
class QGroupBox;
-class UMLWidgetColorPage : public QWidget {
+class UMLWidgetColorPage : public TQWidget {
Q_OBJECT
public:
/**
* Constructor - Observe a UMLWidget
*/
- UMLWidgetColorPage( QWidget * pParent, UMLWidget * pWidget );
+ UMLWidgetColorPage( TQWidget * pParent, UMLWidget * pWidget );
/**
* Constructor - Observe an OptionState structure
*/
- UMLWidgetColorPage( QWidget * pParent, Settings::OptionState *options );
+ UMLWidgetColorPage( TQWidget * pParent, Settings::OptionState *options );
/**
* destructor
@@ -73,10 +73,10 @@ protected:
Settings::OptionState *m_options;
//GUI widgets
- QGroupBox * m_pColorGB;
- QLabel * m_pLineColorL, * m_pFillColorL;
- QCheckBox * m_pUseFillColorCB;
- QPushButton * m_pLineDefaultB, * m_pFillDefaultB;
+ TQGroupBox * m_pColorGB;
+ TQLabel * m_pLineColorL, * m_pFillColorL;
+ TQCheckBox * m_pUseFillColorCB;
+ TQPushButton * m_pLineDefaultB, * m_pFillDefaultB;
KColorButton * m_pLineColorB, * m_pFillColorB;
private:
void init();
diff --git a/umbrello/umbrello/docgenerators/docbookgenerator.cpp b/umbrello/umbrello/docgenerators/docbookgenerator.cpp
index 9907d6f9..87a84d14 100644
--- a/umbrello/umbrello/docgenerators/docbookgenerator.cpp
+++ b/umbrello/umbrello/docgenerators/docbookgenerator.cpp
@@ -31,9 +31,9 @@
#include <kmessagebox.h>
#include <kio/job.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "uml.h"
#include "umldoc.h"
@@ -53,8 +53,8 @@ bool DocbookGenerator::generateDocbookForProject()
UMLApp *app = UMLApp::app();
UMLDoc* umlDoc = app->getDocument();
KURL url = umlDoc->URL();
- QString fileName = url.fileName();
- fileName.replace(QRegExp(".xmi$"),"");
+ TQString fileName = url.fileName();
+ fileName.replace(TQRegExp(".xmi$"),"");
url.setFileName(fileName);
kDebug() << "Exporting to directory: " << url << endl;
generateDocbookForProjectInto(url);
@@ -68,7 +68,7 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
// export all views
umlDoc->writeToStatusBar(i18n("Exporting all views..."));
- QStringList errors = UMLViewImageExporterModel().exportAllViews(
+ TQStringList errors = UMLViewImageExporterModel().exportAllViews(
UMLViewImageExporterModel::mimeTypeToImageType("image/png"),
destDir, false);
if (!errors.empty())
@@ -76,8 +76,8 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
#if KDE_IS_VERSION(3,4,0)
KMessageBox::errorList(app, i18n("Some errors happened when exporting the images:"), errors);
#else
- QString errorsCaption;
- for (QStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
+ TQString errorsCaption;
+ for (TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
errorsCaption += "\n" + *it;
}
KMessageBox::error(app, i18n("Some errors happened when exporting the images:") + errorsCaption);
@@ -86,12 +86,12 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
}
//write the XMI model in an in-memory char* string
- QString xmi;
- QTextOStream xmiStream(&xmi);
+ TQString xmi;
+ TQTextOStream xmiStream(&xmi);
KTempFile tmpfile; // we need this tmp file if we are writing to a remote file
- QFile file;
+ TQFile file;
file.setName( tmpfile.name() );
// lets open the file for writing
@@ -110,7 +110,7 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
int nbparams = 0;
params[nbparams] = NULL;
- QString xsltFile(KGlobal::dirs()->findResource("appdata","xmi2docbook.xsl"));
+ TQString xsltFile(KGlobal::dirs()->findResource("appdata","xmi2docbook.xsl"));
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
@@ -130,8 +130,8 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
xmlCleanupParser();
KURL url = umlDoc->URL();
- QString fileName = url.fileName();
- fileName.replace(QRegExp(".xmi$"),".docbook");
+ TQString fileName = url.fileName();
+ fileName.replace(TQRegExp(".xmi$"),".docbook");
url.setPath(destDir.path());
url.addPath(fileName);
kDebug() << "Copying result to: " << url << endl;
diff --git a/umbrello/umbrello/docgenerators/docbookgenerator.h b/umbrello/umbrello/docgenerators/docbookgenerator.h
index 775a7383..24851380 100644
--- a/umbrello/umbrello/docgenerators/docbookgenerator.h
+++ b/umbrello/umbrello/docgenerators/docbookgenerator.h
@@ -19,7 +19,7 @@
#define DOCBOOKGENERATOR_H
#include <kurl.h>
-#include <qobject.h>
+#include <tqobject.h>
class UMLDoc;
diff --git a/umbrello/umbrello/docgenerators/main.cpp b/umbrello/umbrello/docgenerators/main.cpp
index d4b6fc4e..ea994daf 100644
--- a/umbrello/umbrello/docgenerators/main.cpp
+++ b/umbrello/umbrello/docgenerators/main.cpp
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
QCStringList xsltOpt = args->getOptionList("xslt");
if (xsltOpt.size() > 0)
{
- QString xsltFile(xsltOpt.last());
+ TQString xsltFile(xsltOpt.last());
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
diff --git a/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp b/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp
index 5da1ae75..a0555188 100644
--- a/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp
+++ b/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp
@@ -31,9 +31,9 @@
#include <kmessagebox.h>
#include <kio/job.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "uml.h"
#include "umldoc.h"
@@ -54,8 +54,8 @@ bool XhtmlGenerator::generateXhtmlForProject()
UMLApp *app = UMLApp::app();
UMLDoc* umlDoc = app->getDocument();
KURL url = umlDoc->URL();
- QString fileName = url.fileName();
- fileName.replace(QRegExp(".xmi$"),"");
+ TQString fileName = url.fileName();
+ fileName.replace(TQRegExp(".xmi$"),"");
url.setFileName(fileName);
kDebug() << "Exporting to directory: " << url << endl;
return generateXhtmlForProjectInto(url);
@@ -65,14 +65,14 @@ bool XhtmlGenerator::generateXhtmlForProjectInto(const KURL& destDir)
{
kDebug() << "First convert to docbook" << endl;
m_destDir = destDir;
-// KURL url(QString("file://")+m_tmpDir.name());
+// KURL url(TQString("file://")+m_tmpDir.name());
KIO::Job* docbookJob = DocbookGenerator().generateDocbookForProjectInto(destDir);
if (docbookJob == 0)
{
return false;
}
kDebug() << "Connecting..." << endl;
- connect(docbookJob, SIGNAL(result( KIO::Job * )), this, SLOT(slotDocbookToXhtml( KIO::Job *)));
+ connect(docbookJob, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotDocbookToXhtml( KIO::Job *)));
return true;
}
@@ -89,9 +89,9 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
UMLDoc* umlDoc = app->getDocument();
const KURL& url = umlDoc->URL();
- QString docbookName = url.fileName();
- docbookName.replace(QRegExp(".xmi$"),".docbook");
-// KURL docbookUrl(QString("file://")+m_tmpDir.name());
+ TQString docbookName = url.fileName();
+ docbookName.replace(TQRegExp(".xmi$"),".docbook");
+// KURL docbookUrl(TQString("file://")+m_tmpDir.name());
KURL docbookUrl = m_destDir;
docbookUrl.addPath(docbookName);
@@ -102,20 +102,20 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
int nbparams = 0;
params[nbparams] = NULL;
- QString xsltFileName(KGlobal::dirs()->findResource("appdata","docbook2xhtml.xsl"));
+ TQString xsltFileName(KGlobal::dirs()->findResource("appdata","docbook2xhtml.xsl"));
kDebug() << "XSLT file is'"<<xsltFileName<<"'" << endl;
- QFile xsltFile(xsltFileName);
+ TQFile xsltFile(xsltFileName);
xsltFile.open(IO_ReadOnly);
- QString xslt = xsltFile.readAll();
+ TQString xslt = xsltFile.readAll();
kDebug() << "XSLT is'"<<xslt<<"'" << endl;
xsltFile.close();
- QString localXsl = KGlobal::dirs()->findResource("data","ksgmltools2/docbook/xsl/html/docbook.xsl");
+ TQString localXsl = KGlobal::dirs()->findResource("data","ksgmltools2/docbook/xsl/html/docbook.xsl");
kDebug() << "Local xsl is'"<<localXsl<<"'" << endl;
if (!localXsl.isEmpty())
{
- localXsl = QString("href=\"file://") + localXsl + "\"";
- xslt.replace(QRegExp("href=\"http://[^\"]*\""),localXsl);
+ localXsl = TQString("href=\"file://") + localXsl + "\"";
+ xslt.replace(TQRegExp("href=\"http://[^\"]*\""),localXsl);
}
KTempFile tmpXsl;
*tmpXsl.textStream() << xslt;
@@ -144,17 +144,17 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
xsltCleanupGlobals();
xmlCleanupParser();
- QString xhtmlName = url.fileName();
- xhtmlName.replace(QRegExp(".xmi$"),".html");
+ TQString xhtmlName = url.fileName();
+ xhtmlName.replace(TQRegExp(".xmi$"),".html");
KURL xhtmlUrl = m_destDir;
xhtmlUrl.addPath(xhtmlName);
kDebug() << "Copying HTML result to: " << xhtmlUrl << endl;
KIO::Job* job = KIO::file_copy(tmpXhtml.file()->name(),xhtmlUrl,-1,true,false,false);
job->setAutoErrorHandlingEnabled(true);
- connect (job, SIGNAL(result( KIO::Job* )), this, SLOT(slotHtmlCopyFinished( KIO::Job* )));
+ connect (job, TQT_SIGNAL(result( KIO::Job* )), this, TQT_SLOT(slotHtmlCopyFinished( KIO::Job* )));
- QString cssFileName(KGlobal::dirs()->findResource("appdata","xmi.css"));
+ TQString cssFileName(KGlobal::dirs()->findResource("appdata","xmi.css"));
kDebug() << "CSS file is'"<<cssFileName<<"'" << endl;
KURL cssUrl = m_destDir;
cssUrl.addPath("xmi.css");
diff --git a/umbrello/umbrello/docgenerators/xhtmlgenerator.h b/umbrello/umbrello/docgenerators/xhtmlgenerator.h
index 46402382..ad5076cf 100644
--- a/umbrello/umbrello/docgenerators/xhtmlgenerator.h
+++ b/umbrello/umbrello/docgenerators/xhtmlgenerator.h
@@ -20,7 +20,7 @@
#include <kurl.h>
#include <ktempdir.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
diff --git a/umbrello/umbrello/docwindow.cpp b/umbrello/umbrello/docwindow.cpp
index d92c13f4..ab935d00 100644
--- a/umbrello/umbrello/docwindow.cpp
+++ b/umbrello/umbrello/docwindow.cpp
@@ -13,9 +13,9 @@
#include "docwindow.h"
// qt/kde includes
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
#include <klocale.h>
// local includes
@@ -26,19 +26,19 @@
#include "umlwidget.h"
-DocWindow::DocWindow( UMLDoc * doc, QWidget *parent, const char *name ) : QWidget( parent, name ) {
+DocWindow::DocWindow( UMLDoc * doc, TQWidget *parent, const char *name ) : TQWidget( parent, name ) {
//setup visual display
- QHBoxLayout * mainLayout = new QHBoxLayout( this );
+ TQHBoxLayout * mainLayout = new TQHBoxLayout( this );
- m_pDocGB = new QGroupBox( i18n( "Documentation" ), this );
+ m_pDocGB = new TQGroupBox( i18n( "Documentation" ), this );
mainLayout -> addWidget( m_pDocGB );
- QHBoxLayout * docLayout = new QHBoxLayout( m_pDocGB );
- m_pDocMLE = new QMultiLineEdit( m_pDocGB );
+ TQHBoxLayout * docLayout = new TQHBoxLayout( m_pDocGB );
+ m_pDocMLE = new TQMultiLineEdit( m_pDocGB );
m_pDocMLE -> setText( "" );
docLayout -> setMargin( fontMetrics().height() );
docLayout -> addWidget( m_pDocMLE);
- m_pDocMLE -> setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDocMLE -> setWordWrap(TQMultiLineEdit::WidgetWidth);
//setup the documentation variables
//show projects documentation to start
diff --git a/umbrello/umbrello/docwindow.h b/umbrello/umbrello/docwindow.h
index fb488c5f..2ab3fad0 100644
--- a/umbrello/umbrello/docwindow.h
+++ b/umbrello/umbrello/docwindow.h
@@ -12,7 +12,7 @@
#ifndef DOCWINDOW_H
#define DOCWINDOW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class AssociationWidget;
class QGroupBox;
@@ -27,13 +27,13 @@ class UMLWidget;
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class DocWindow : public QWidget {
+class DocWindow : public TQWidget {
Q_OBJECT
public:
/**
* Constructor
*/
- explicit DocWindow( UMLDoc * doc, QWidget *parent = 0, const char *name = 0 );
+ explicit DocWindow( UMLDoc * doc, TQWidget *parent = 0, const char *name = 0 );
/**
* Deconstructor
@@ -160,8 +160,8 @@ private:
Showing_Type m_Showing;
//visual widgets
- QMultiLineEdit * m_pDocMLE;
- QGroupBox * m_pDocGB;
+ TQMultiLineEdit * m_pDocMLE;
+ TQGroupBox * m_pDocGB;
};
diff --git a/umbrello/umbrello/entity.cpp b/umbrello/umbrello/entity.cpp
index b3d842ac..31ef1513 100644
--- a/umbrello/umbrello/entity.cpp
+++ b/umbrello/umbrello/entity.cpp
@@ -23,7 +23,7 @@
#include "clipboard/idchangelog.h"
#include "dialogs/umlentityattributedialog.h"
-UMLEntity::UMLEntity(const QString& name, Uml::IDType id) : UMLClassifier(name, id) {
+UMLEntity::UMLEntity(const TQString& name, Uml::IDType id) : UMLClassifier(name, id) {
init();
}
@@ -52,9 +52,9 @@ void UMLEntity::init() {
m_BaseType = Uml::ot_Entity;
}
-UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObject *type /*=NULL*/) {
+UMLAttribute* UMLEntity::createAttribute(const TQString &name /*=null*/, UMLObject *type /*=NULL*/) {
Uml::IDType id = UniqueID::gen();
- QString currentName;
+ TQString currentName;
if (name.isNull()) {
currentName = uniqChildName(Uml::ot_EntityAttribute);
} else {
@@ -64,15 +64,15 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec
Uml::Visibility scope = optionState.classState.defaultAttributeScope;
UMLEntityAttribute* newAttribute = new UMLEntityAttribute(this, currentName, id, scope, type);
- int button = QDialog::Accepted;
+ int button = TQDialog::Accepted;
bool goodName = false;
//check for name.isNull() stops dialog being shown
//when creating attribute via list view
- while (button==QDialog::Accepted && !goodName && name.isNull()) {
+ while (button==TQDialog::Accepted && !goodName && name.isNull()) {
UMLEntityAttributeDialog attributedialog(0, newAttribute);
button = attributedialog.exec();
- QString name = newAttribute->getName();
+ TQString name = newAttribute->getName();
if(name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
@@ -83,7 +83,7 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec
}
}
- if (button != QDialog::Accepted) {
+ if (button != TQDialog::Accepted) {
delete newAttribute;
return NULL;
}
@@ -95,24 +95,24 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec
return newAttribute;
}
-UMLObject* UMLEntity::addEntityAttribute(const QString& name, Uml::IDType id) {
+UMLObject* UMLEntity::addEntityAttribute(const TQString& name, Uml::IDType id) {
UMLEntityAttribute* literal = new UMLEntityAttribute(this, name, id);
m_List.append(literal);
emit entityAttributeAdded(literal);
UMLObject::emitModified();
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return literal;
}
bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, IDChangeLog* Log /* = 0*/) {
- QString name = (QString)attribute->getName();
+ TQString name = (TQString)attribute->getName();
if (findChildObject(name) == NULL) {
attribute->parent()->removeChild(attribute);
this->insertChild(attribute);
m_List.append(attribute);
emit entityAttributeAdded(attribute);
UMLObject::emitModified();
- connect(attribute,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(attribute,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
} else if (Log) {
Log->removeChangeByNewID( attribute->getID() );
@@ -122,7 +122,7 @@ bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, IDChangeLog* L
}
bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, int position) {
- QString name = (QString)attribute->getName();
+ TQString name = (TQString)attribute->getName();
if (findChildObject(name) == NULL) {
attribute->parent()->removeChild(attribute);
this->insertChild(attribute);
@@ -133,7 +133,7 @@ bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, int position)
}
emit entityAttributeAdded(attribute);
UMLObject::emitModified();
- connect(attribute,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(attribute,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
return false;
@@ -147,8 +147,8 @@ int UMLEntity::removeEntityAttribute(UMLClassifierListItem* literal) {
emit entityAttributeRemoved(literal);
UMLObject::emitModified();
// If we are deleting the object, then we don't need to disconnect..this is done auto-magically
- // for us by QObject. -b.t.
- // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ // for us by TQObject. -b.t.
+ // disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
delete literal;
return m_List.count();
}
@@ -175,8 +175,8 @@ bool UMLEntity::resolveRef() {
return success;
}
-void UMLEntity::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement entityElement = UMLObject::save("UML:Entity", qDoc);
+void UMLEntity::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement entityElement = UMLObject::save("UML:Entity", qDoc);
//save operations
UMLClassifierListItemList entityAttributes = getFilteredList(Uml::ot_EntityAttribute);
UMLClassifierListItem* pEntityAttribute = 0;
@@ -187,15 +187,15 @@ void UMLEntity::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(entityElement);
}
-bool UMLEntity::load(QDomElement& element) {
- QDomNode node = element.firstChild();
+bool UMLEntity::load(TQDomElement& element) {
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Uml::tagEq(tag, "EntityAttribute")) { // for backward compatibility
UMLEntityAttribute* pEntityAttribute = new UMLEntityAttribute(this);
if( !pEntityAttribute->loadFromXMI(tempElement) ) {
diff --git a/umbrello/umbrello/entity.h b/umbrello/umbrello/entity.h
index 7a4a2ce9..a207fbd3 100644
--- a/umbrello/umbrello/entity.h
+++ b/umbrello/umbrello/entity.h
@@ -35,7 +35,7 @@ public:
* @param name The name of the Entity.
* @param id The unique id of the Entity.
*/
- explicit UMLEntity(const QString& name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLEntity(const TQString& name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -66,7 +66,7 @@ public:
* @param type An optional type, used by when creating through UMLListView
* @return The UMLEntityAttribute created
*/
- UMLAttribute* createAttribute(const QString &name = QString::null,
+ UMLAttribute* createAttribute(const TQString &name = TQString::null,
UMLObject *type = 0);
/**
@@ -77,7 +77,7 @@ public:
* If omitted a new ID is assigned internally.
* @return Pointer to the UMLEntityAttribute created.
*/
- UMLObject* addEntityAttribute(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLObject* addEntityAttribute(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Adds an already created entityAttribute.
@@ -131,7 +131,7 @@ public:
/**
* Creates the <UML:Entity> element including its entityliterals.
*/
- virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ virtual void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
signals:
void entityAttributeAdded(UMLClassifierListItem*);
@@ -141,7 +141,7 @@ protected:
/**
* Loads the <UML:Entity> element including its entityAttributes.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
private:
/**
diff --git a/umbrello/umbrello/entityattribute.cpp b/umbrello/umbrello/entityattribute.cpp
index 8855efcb..b8030fed 100644
--- a/umbrello/umbrello/entityattribute.cpp
+++ b/umbrello/umbrello/entityattribute.cpp
@@ -12,7 +12,7 @@
// own header
#include "entityattribute.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "umlcanvasobject.h"
@@ -21,9 +21,9 @@
#include "dialogs/umlentityattributedialog.h"
#include "object_factory.h"
-UMLEntityAttribute::UMLEntityAttribute( const UMLObject *parent, const QString& name,
+UMLEntityAttribute::UMLEntityAttribute( const UMLObject *parent, const TQString& name,
Uml::IDType id, Uml::Visibility s,
- UMLObject *type, const QString& iv )
+ UMLObject *type, const TQString& iv )
: UMLAttribute(parent, name, id, s, type, iv) {
init();
if (m_pSecondary) {
@@ -44,19 +44,19 @@ void UMLEntityAttribute::init() {
m_null = false;
}
-QString UMLEntityAttribute::getAttributes() const{
+TQString UMLEntityAttribute::getAttributes() const{
return m_attributes;
}
-void UMLEntityAttribute::setAttributes(const QString& attributes) {
+void UMLEntityAttribute::setAttributes(const TQString& attributes) {
m_attributes = attributes;
}
-QString UMLEntityAttribute::getValues() const{
+TQString UMLEntityAttribute::getValues() const{
return m_values;
}
-void UMLEntityAttribute::setValues(const QString& values) {
+void UMLEntityAttribute::setValues(const TQString& values) {
m_values = values;
}
@@ -84,8 +84,8 @@ void UMLEntityAttribute::setNull(const bool nullIn) {
m_null = nullIn;
}
-QString UMLEntityAttribute::toString(Uml::Signature_Type sig) {
- QString s;
+TQString UMLEntityAttribute::toString(Uml::Signature_Type sig) {
+ TQString s;
//FIXME
if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig) {
@@ -94,7 +94,7 @@ QString UMLEntityAttribute::toString(Uml::Signature_Type sig) {
s = "";
if(sig == Uml::st_ShowSig || sig == Uml::st_SigNoVis) {
- QString string = s + getName() + " : " + getTypeName();
+ TQString string = s + getName() + " : " + getTypeName();
if(m_InitialValue.length() > 0)
string += " = " + m_InitialValue;
return string;
@@ -138,8 +138,8 @@ UMLObject* UMLEntityAttribute::clone() const
}
-void UMLEntityAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement entityattributeElement = UMLObject::save("UML:EntityAttribute", qDoc);
+void UMLEntityAttribute::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement entityattributeElement = UMLObject::save("UML:EntityAttribute", qDoc);
if (m_pSecondary == NULL) {
kDebug() << "UMLEntityAttribute::saveToXMI(" << m_Name
<< "): m_pSecondary is NULL, using local name "
@@ -157,7 +157,7 @@ void UMLEntityAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement
qElement.appendChild( entityattributeElement );
}
-bool UMLEntityAttribute::load( QDomElement & element ) {
+bool UMLEntityAttribute::load( TQDomElement & element ) {
if (! UMLAttribute::load(element))
return false;
int indexType = element.attribute( "dbindex_type", "1100" ).toInt();
@@ -169,7 +169,7 @@ bool UMLEntityAttribute::load( QDomElement & element ) {
return true;
}
-bool UMLEntityAttribute::showPropertiesDialog(QWidget* parent) {
+bool UMLEntityAttribute::showPropertiesDialog(TQWidget* parent) {
UMLEntityAttributeDialog dialog(parent, this);
return dialog.exec();
}
diff --git a/umbrello/umbrello/entityattribute.h b/umbrello/umbrello/entityattribute.h
index 76af37a7..31b3179c 100644
--- a/umbrello/umbrello/entityattribute.h
+++ b/umbrello/umbrello/entityattribute.h
@@ -37,10 +37,10 @@ public:
* @param type The type of this UMLEntityAttribute.
* @param iv The initial value of the entityattribute.
*/
- UMLEntityAttribute(const UMLObject* parent, const QString& name,
+ UMLEntityAttribute(const UMLObject* parent, const TQString& name,
Uml::IDType id = Uml::id_None,
Uml::Visibility s = Uml::Visibility::Private,
- UMLObject *type = 0, const QString& iv = 0);
+ UMLObject *type = 0, const TQString& iv = 0);
/**
* Sets up an entityattribute.
@@ -75,14 +75,14 @@ public:
*
* @return The value of the UMLEntityAttribute's attributes property.
*/
- QString getAttributes() const;
+ TQString getAttributes() const;
/**
* Sets the UMLEntityAttribute's attributes property.
*
* @param attributes The new value for the attributes property.
*/
- void setAttributes(const QString& attributes);
+ void setAttributes(const TQString& attributes);
/**
* Returns the UMLEntityAttribute's index type property.
@@ -103,14 +103,14 @@ public:
*
* @return The UMLEntityAttribute's length/values property.
*/
- QString getValues() const;
+ TQString getValues() const;
/**
* Sets the UMLEntityAttribute's length/values property.
*
* @param values The new value of the length/values property.
*/
- void setValues(const QString& values);
+ void setValues(const TQString& values);
/**
* Returns the UMLEntityAttribute's auto_increment boolean
@@ -147,17 +147,17 @@ public:
* initial value.
* @return Returns a string representation of the UMLEntityAttribute.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Creates the <UML:EntityAttribute> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Display the properties configuration dialog for the entityattribute.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
protected:
/**
@@ -169,12 +169,12 @@ protected:
/**
* Loads the <UML:EntityAttribute> XMI element.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
private:
Uml::DBIndex_Type m_indexType;
- QString m_values;
- QString m_attributes;
+ TQString m_values;
+ TQString m_attributes;
bool m_autoIncrement;
bool m_null;
};
diff --git a/umbrello/umbrello/entitywidget.cpp b/umbrello/umbrello/entitywidget.cpp
index 942de360..9dd7d7e3 100644
--- a/umbrello/umbrello/entitywidget.cpp
+++ b/umbrello/umbrello/entitywidget.cpp
@@ -13,7 +13,7 @@
#include "entitywidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -47,7 +47,7 @@ void EntityWidget::init() {
EntityWidget::~EntityWidget() {}
-void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void EntityWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if(UMLWidget::getUseFillColour())
p.setBrush(UMLWidget::getFillColour());
@@ -57,14 +57,14 @@ void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
int fontHeight = fm.lineSpacing();
- const QString name = this->getName();
+ const TQString name = this->getName();
p.drawRect(offsetX, offsetY, w, h);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
p.setFont(font);
int y = 0;
@@ -96,13 +96,13 @@ void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
p.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y);
- QFontMetrics fontMetrics(font);
+ TQFontMetrics fontMetrics(font);
UMLClassifier *classifier = (UMLClassifier*)m_pObject;
UMLClassifierListItem* entityattribute = 0;
UMLClassifierListItemList list = classifier->getFilteredList(Uml::ot_EntityAttribute);
for (entityattribute = list.first(); entityattribute; entityattribute = list.next()) {
- QString text = entityattribute->getName();
- p.setPen( QPen(Qt::black) );
+ TQString text = entityattribute->getName();
+ p.setPen( TQPen(Qt::black) );
UMLEntityAttribute* casted = dynamic_cast<UMLEntityAttribute*>( entityattribute );
if( casted && casted->getIndexType() == Uml::Primary )
{
@@ -121,17 +121,17 @@ void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize EntityWidget::calculateSize() {
+TQSize EntityWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
int width, height;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setItalic(false);
font.setUnderline(false);
font.setBold(false);
- const QFontMetrics fm(font);
+ const TQFontMetrics fm(font);
const int fontHeight = fm.lineSpacing();
@@ -173,7 +173,7 @@ QSize EntityWidget::calculateSize() {
//allow for width margin
width += ENTITY_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
void EntityWidget::slotMenuSelection(int sel) {
@@ -188,13 +188,13 @@ void EntityWidget::slotMenuSelection(int sel) {
UMLWidget::slotMenuSelection(sel);
}
-void EntityWidget::saveToXMI( QDomDocument& qDoc, QDomElement& qElement ) {
- QDomElement conceptElement = qDoc.createElement("entitywidget");
+void EntityWidget::saveToXMI( TQDomDocument& qDoc, TQDomElement& qElement ) {
+ TQDomElement conceptElement = qDoc.createElement("entitywidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
-bool EntityWidget::loadFromXMI( QDomElement & qElement ) {
+bool EntityWidget::loadFromXMI( TQDomElement & qElement ) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
diff --git a/umbrello/umbrello/entitywidget.h b/umbrello/umbrello/entitywidget.h
index 249f0984..e99da521 100644
--- a/umbrello/umbrello/entitywidget.h
+++ b/umbrello/umbrello/entitywidget.h
@@ -51,23 +51,23 @@ public:
/**
* Draws the entity as a rectangle with a box underneith with a list of literals
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "entitywidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads from an "entitywidget" XMI element.
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
public slots:
/**
diff --git a/umbrello/umbrello/enum.cpp b/umbrello/umbrello/enum.cpp
index ba3be7b4..93ee1bdd 100644
--- a/umbrello/umbrello/enum.cpp
+++ b/umbrello/umbrello/enum.cpp
@@ -22,7 +22,7 @@
#include "uniqueid.h"
#include "clipboard/idchangelog.h"
-UMLEnum::UMLEnum(const QString& name, Uml::IDType id) : UMLClassifier(name, id) {
+UMLEnum::UMLEnum(const TQString& name, Uml::IDType id) : UMLClassifier(name, id) {
init();
}
@@ -52,9 +52,9 @@ void UMLEnum::init() {
setStereotype( "enum" );
}
-UMLObject* UMLEnum::createEnumLiteral(const QString& name) {
+UMLObject* UMLEnum::createEnumLiteral(const TQString& name) {
Uml::IDType id = UniqueID::gen();
- QString currentName;
+ TQString currentName;
if (name.isNull()) {
currentName = uniqChildName(Uml::ot_EnumLiteral);
} else {
@@ -70,7 +70,7 @@ UMLObject* UMLEnum::createEnumLiteral(const QString& name) {
//when creating enum literal via list view
while (ok && !goodName && name.isNull()) {
ok = newEnumLiteral->showPropertiesDialog( UMLApp::app() );
- QString name = newEnumLiteral->getName();
+ TQString name = newEnumLiteral->getName();
if(name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
@@ -91,7 +91,7 @@ UMLObject* UMLEnum::createEnumLiteral(const QString& name) {
return newEnumLiteral;
}
-UMLObject* UMLEnum::addEnumLiteral(const QString &name, Uml::IDType id) {
+UMLObject* UMLEnum::addEnumLiteral(const TQString &name, Uml::IDType id) {
UMLObject *el = UMLCanvasObject::findChildObject(name);
if (el != NULL) {
kDebug() << "UMLEnum::addEnumLiteral: " << name
@@ -102,19 +102,19 @@ UMLObject* UMLEnum::addEnumLiteral(const QString &name, Uml::IDType id) {
m_List.append(literal);
UMLObject::emitModified();
emit enumLiteralAdded(literal);
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return literal;
}
bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, IDChangeLog* Log /* = 0*/) {
- QString name = (QString)literal->getName();
+ TQString name = (TQString)literal->getName();
if (findChildObject(name) == NULL) {
literal->parent()->removeChild(literal);
this->insertChild(literal);
m_List.append(literal);
UMLObject::emitModified();
emit enumLiteralAdded(literal);
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
} else if (Log) {
Log->removeChangeByNewID( literal->getID() );
@@ -124,7 +124,7 @@ bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, IDChangeLog* Log /* = 0*/)
}
bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, int position) {
- QString name = (QString)literal->getName();
+ TQString name = (TQString)literal->getName();
if (findChildObject(name) == NULL) {
literal->parent()->removeChild(literal);
this->insertChild(literal);
@@ -135,7 +135,7 @@ bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, int position) {
}
UMLObject::emitModified();
emit enumLiteralAdded(literal);
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
return false;
@@ -149,8 +149,8 @@ int UMLEnum::removeEnumLiteral(UMLEnumLiteral* literal) {
emit enumLiteralRemoved(literal);
UMLObject::emitModified();
// If we are deleting the object, then we don't need to disconnect..this is done auto-magically
- // for us by QObject. -b.t.
- // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ // for us by TQObject. -b.t.
+ // disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
delete literal;
return m_List.count();
}
@@ -163,8 +163,8 @@ void UMLEnum::signalEnumLiteralRemoved(UMLClassifierListItem *elit) {
emit enumLiteralRemoved(elit);
}
-void UMLEnum::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement enumElement = UMLObject::save("UML:Enumeration", qDoc);
+void UMLEnum::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement enumElement = UMLObject::save("UML:Enumeration", qDoc);
// save enum literals
UMLClassifierListItemList enumLiterals = getFilteredList(Uml::ot_EnumLiteral);
UMLClassifierListItem* pEnumLiteral = 0;
@@ -175,15 +175,15 @@ void UMLEnum::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(enumElement);
}
-bool UMLEnum::load(QDomElement& element) {
- QDomNode node = element.firstChild();
+bool UMLEnum::load(TQDomElement& element) {
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Uml::tagEq(tag, "EnumerationLiteral") ||
Uml::tagEq(tag, "EnumLiteral")) { // for backward compatibility
UMLEnumLiteral* pEnumLiteral = new UMLEnumLiteral(this);
diff --git a/umbrello/umbrello/enum.h b/umbrello/umbrello/enum.h
index 1845eb88..94532f68 100644
--- a/umbrello/umbrello/enum.h
+++ b/umbrello/umbrello/enum.h
@@ -35,7 +35,7 @@ public:
* @param name The name of the Enum.
* @param id The unique id of the Enum.
*/
- explicit UMLEnum(const QString& name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLEnum(const TQString& name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -63,7 +63,7 @@ public:
*
* @return The UMLEnum created
*/
- UMLObject* createEnumLiteral(const QString& name = QString());
+ UMLObject* createEnumLiteral(const TQString& name = TQString());
/**
* Adds an enumliteral to the enum.
@@ -73,7 +73,7 @@ public:
* If omitted a new ID is assigned internally.
* @return Pointer to the UMLEnumliteral created.
*/
- UMLObject* addEnumLiteral(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLObject* addEnumLiteral(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Adds an already created enumliteral.
@@ -121,7 +121,7 @@ public:
/**
* Creates the <UML:Enum> element including its enumliterals.
*/
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
signals:
void enumLiteralAdded(UMLClassifierListItem*);
@@ -131,7 +131,7 @@ protected:
/**
* Loads the <UML:Enum> element including its enumliterals.
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
/**
diff --git a/umbrello/umbrello/enumliteral.cpp b/umbrello/umbrello/enumliteral.cpp
index ea6eef49..8158e40e 100644
--- a/umbrello/umbrello/enumliteral.cpp
+++ b/umbrello/umbrello/enumliteral.cpp
@@ -16,7 +16,7 @@
#include <klocale.h>
UMLEnumLiteral::UMLEnumLiteral(const UMLObject *parent,
- const QString& name, Uml::IDType id)
+ const TQString& name, Uml::IDType id)
: UMLClassifierListItem(parent, name, id) {
m_BaseType = Uml::ot_EnumLiteral;
}
@@ -51,18 +51,18 @@ UMLObject* UMLEnumLiteral::clone() const
}
-void UMLEnumLiteral::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement attributeElement = UMLObject::save("UML:EnumerationLiteral", qDoc);
+void UMLEnumLiteral::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement attributeElement = UMLObject::save("UML:EnumerationLiteral", qDoc);
qElement.appendChild( attributeElement );
}
-bool UMLEnumLiteral::load(QDomElement& ) {
+bool UMLEnumLiteral::load(TQDomElement& ) {
return true;
}
-bool UMLEnumLiteral::showPropertiesDialog(QWidget* parent) {
+bool UMLEnumLiteral::showPropertiesDialog(TQWidget* parent) {
bool ok;
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), getName(), &ok, parent);
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), getName(), &ok, parent);
if ( ok && !name.isEmpty() ) {
setName(name);
return true;
diff --git a/umbrello/umbrello/enumliteral.h b/umbrello/umbrello/enumliteral.h
index 3484012e..e9a63b1a 100644
--- a/umbrello/umbrello/enumliteral.h
+++ b/umbrello/umbrello/enumliteral.h
@@ -34,7 +34,7 @@ public:
* @param id The unique id given to this UMLEnumLiteral.
*/
UMLEnumLiteral(const UMLObject* parent,
- const QString& name, Uml::IDType id = Uml::id_None);
+ const TQString& name, Uml::IDType id = Uml::id_None);
/**
* Sets up an enum literal.
@@ -67,18 +67,18 @@ public:
/**
* Creates the <UML:EnumLiteral> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Display the properties configuration dialog for the enum literal.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
protected:
/**
* Loads the <UML:EnumLiteral> XMI element (empty.)
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
};
diff --git a/umbrello/umbrello/enumwidget.cpp b/umbrello/umbrello/enumwidget.cpp
index 2d642b31..0c03b209 100644
--- a/umbrello/umbrello/enumwidget.cpp
+++ b/umbrello/umbrello/enumwidget.cpp
@@ -13,7 +13,7 @@
#include "enumwidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -52,7 +52,7 @@ void EnumWidget::init() {
EnumWidget::~EnumWidget() {}
-void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void EnumWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if(UMLWidget::getUseFillColour())
p.setBrush(UMLWidget::getFillColour());
@@ -62,9 +62,9 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- QString name;
+ TQString name;
if ( m_bShowPackage ) {
name = m_pObject->getFullyQualifiedName();
} else {
@@ -72,9 +72,9 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
p.drawRect(offsetX, offsetY, w, h);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
p.setFont(font);
p.drawText(offsetX + ENUM_MARGIN, offsetY,
@@ -95,13 +95,13 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
p.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y);
- QFontMetrics fontMetrics(font);
+ TQFontMetrics fontMetrics(font);
UMLClassifier *classifier = (UMLClassifier*)m_pObject;
UMLClassifierListItem* enumLiteral = 0;
UMLClassifierListItemList list = classifier->getFilteredList(Uml::ot_EnumLiteral);
for (enumLiteral = list.first(); enumLiteral; enumLiteral = list.next()) {
- QString text = enumLiteral->getName();
- p.setPen( QPen(Qt::black) );
+ TQString text = enumLiteral->getName();
+ p.setPen( TQPen(Qt::black) );
p.drawText(offsetX + ENUM_MARGIN, offsetY + y,
fontMetrics.width(text), fontHeight, Qt::AlignVCenter, text);
y+=fontHeight;
@@ -112,17 +112,17 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize EnumWidget::calculateSize() {
+TQSize EnumWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
int width, height;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setItalic(false);
font.setUnderline(false);
font.setBold(false);
- const QFontMetrics fm(font);
+ const TQFontMetrics fm(font);
const int fontHeight = fm.lineSpacing();
@@ -164,7 +164,7 @@ QSize EnumWidget::calculateSize() {
//allow for width margin
width += ENUM_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
void EnumWidget::slotMenuSelection(int sel) {
@@ -189,19 +189,19 @@ bool EnumWidget::getShowPackage() const {
return m_bShowPackage;
}
-void EnumWidget::saveToXMI( QDomDocument& qDoc, QDomElement& qElement ) {
- QDomElement conceptElement = qDoc.createElement("enumwidget");
+void EnumWidget::saveToXMI( TQDomDocument& qDoc, TQDomElement& qElement ) {
+ TQDomElement conceptElement = qDoc.createElement("enumwidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
conceptElement.setAttribute("showpackage", m_bShowPackage);
qElement.appendChild(conceptElement);
}
-bool EnumWidget::loadFromXMI( QDomElement & qElement ) {
+bool EnumWidget::loadFromXMI( TQDomElement & qElement ) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
- QString showpackage = qElement.attribute("showpackage", "0");
+ TQString showpackage = qElement.attribute("showpackage", "0");
m_bShowPackage = (bool)showpackage.toInt();
diff --git a/umbrello/umbrello/enumwidget.h b/umbrello/umbrello/enumwidget.h
index 7022ac61..aa61f4ea 100644
--- a/umbrello/umbrello/enumwidget.h
+++ b/umbrello/umbrello/enumwidget.h
@@ -70,23 +70,23 @@ public:
/**
* Draws the enum as a rectangle with a box underneith with a list of literals
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "enumwidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads from an "enumwidget" XMI element.
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
bool m_bShowPackage;
diff --git a/umbrello/umbrello/floatingtextwidget.cpp b/umbrello/umbrello/floatingtextwidget.cpp
index 44ea3373..fb278399 100644
--- a/umbrello/umbrello/floatingtextwidget.cpp
+++ b/umbrello/umbrello/floatingtextwidget.cpp
@@ -13,10 +13,10 @@
#include "floatingtextwidget.h"
// system includes
-#include <qregexp.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qvalidator.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -38,7 +38,7 @@
FloatingTextWidget::FloatingTextWidget(UMLView * view, Uml::Text_Role role,
- const QString& text, Uml::IDType id)
+ const TQString& text, Uml::IDType id)
: UMLWidget(view, id, new FloatingTextWidgetController(this))
{
init();
@@ -66,24 +66,24 @@ void FloatingTextWidget::init() {
FloatingTextWidget::~FloatingTextWidget() {
}
-void FloatingTextWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void FloatingTextWidget::draw(TQPainter & p, int offsetX, int offsetY) {
int w = width();
int h = height();
p.setFont( UMLWidget::getFont() );
- QColor textColor(50, 50, 50);
+ TQColor textColor(50, 50, 50);
p.setPen(textColor);
p.drawText( offsetX , offsetY,w,h, Qt::AlignCenter, getDisplayText() );
if(m_bSelected)
drawSelected(&p, offsetX, offsetY);
}
-void FloatingTextWidget::resizeEvent(QResizeEvent * /*re*/) {}
+void FloatingTextWidget::resizeEvent(TQResizeEvent * /*re*/) {}
-QSize FloatingTextWidget::calculateSize() {
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+TQSize FloatingTextWidget::calculateSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
int h = fm.lineSpacing();
int w = fm.width( getDisplayText() );
- return QSize(w + 8, h + 4); // give a small margin
+ return TQSize(w + 8, h + 4); // give a small margin
}
void FloatingTextWidget::slotMenuSelection(int sel) {
@@ -108,7 +108,7 @@ void FloatingTextWidget::slotMenuSelection(int sel) {
UMLClassifier* c = m_pLink->getOperationOwner();
if (c == NULL) {
bool ok = false;
- QString opText = KInputDialog::getText(i18n("Name"),
+ TQString opText = KInputDialog::getText(i18n("Name"),
i18n("Enter operation name:"),
getText(), &ok, m_pView);
if (ok)
@@ -133,7 +133,7 @@ void FloatingTextWidget::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Change_Font:
{
- QFont font = getFont();
+ TQFont font = getFont();
if( KFontDialog::getFont( font, false, m_pView ) ) {
if( m_Role == Uml::tr_Floating || m_Role == Uml::tr_Seq_Message ) {
setFont( font );
@@ -156,8 +156,8 @@ void FloatingTextWidget::slotMenuSelection(int sel) {
}
void FloatingTextWidget::handleRename() {
- QRegExpValidator v(QRegExp(".*"), 0);
- QString t;
+ TQRegExpValidator v(TQRegExp(".*"), 0);
+ TQString t;
if( m_Role == Uml::tr_RoleAName || m_Role == Uml::tr_RoleBName ) {
t = i18n("Enter role name:");
} else if (m_Role == Uml::tr_MultiA || m_Role == Uml::tr_MultiB) {
@@ -175,13 +175,13 @@ void FloatingTextWidget::handleRename() {
t = i18n("ERROR");
}
bool ok = false;
- QString newText = KInputDialog::getText(i18n("Rename"), t, getText(), &ok,
+ TQString newText = KInputDialog::getText(i18n("Rename"), t, getText(), &ok,
m_pView, NULL, &v);
if (!ok || newText == getText())
return;
}
-void FloatingTextWidget::changeName(const QString& newText)
+void FloatingTextWidget::changeName(const TQString& newText)
{
if (m_pLink && !isTextValid(newText)) {
@@ -189,16 +189,16 @@ void FloatingTextWidget::changeName(const QString& newText)
if (assoc) {
switch (m_Role) {
case Uml::tr_MultiA:
- assoc->setMulti(QString(), Uml::A);
+ assoc->setMulti(TQString(), Uml::A);
break;
case Uml::tr_MultiB:
- assoc->setMulti(QString(), Uml::B);
+ assoc->setMulti(TQString(), Uml::B);
break;
case Uml::tr_RoleAName:
- assoc->setRoleName(QString(), Uml::A);
+ assoc->setRoleName(TQString(), Uml::A);
break;
case Uml::tr_RoleBName:
- assoc->setRoleName(QString(), Uml::B);
+ assoc->setRoleName(TQString(), Uml::B);
break;
case Uml::tr_ChangeA:
assoc->setChangeability(Uml::chg_Changeable, Uml::A);
@@ -207,13 +207,13 @@ void FloatingTextWidget::changeName(const QString& newText)
assoc->setChangeability(Uml::chg_Changeable, Uml::B);
break;
default:
- assoc->setName(QString());
+ assoc->setName(TQString());
break;
}
} else {
MessageWidget *msg = dynamic_cast<MessageWidget*>(m_pLink);
if (msg) {
- msg->setName(QString());
+ msg->setName(TQString());
m_pView->removeWidget(this);
}
}
@@ -230,13 +230,13 @@ void FloatingTextWidget::changeName(const QString& newText)
update();
}
-void FloatingTextWidget::setText(const QString &t) {
+void FloatingTextWidget::setText(const TQString &t) {
if (m_Role == Uml::tr_Seq_Message || m_Role == Uml::tr_Seq_Message_Self) {
- QString seqNum, op;
+ TQString seqNum, op;
m_pLink->getSeqNumAndOp(seqNum, op);
if (seqNum.length() > 0 || op.length() > 0) {
if (! m_pView->getShowOpSig())
- op.replace( QRegExp("\\(.*\\)"), "()" );
+ op.replace( TQRegExp("\\(.*\\)"), "()" );
m_Text = seqNum.append(": ").append( op );
} else
m_Text = t;
@@ -246,14 +246,14 @@ void FloatingTextWidget::setText(const QString &t) {
update();
}
-void FloatingTextWidget::setPreText (const QString &t)
+void FloatingTextWidget::setPreText (const TQString &t)
{
m_PreText = t;
updateComponentSize();
update();
}
-void FloatingTextWidget::setPostText(const QString &t) {
+void FloatingTextWidget::setPostText(const TQString &t) {
m_PostText = t;
updateComponentSize();
update();
@@ -261,7 +261,7 @@ void FloatingTextWidget::setPostText(const QString &t) {
void FloatingTextWidget::changeTextDlg() {
bool ok = false;
- QString newText = KInputDialog::getText(i18n("Change Text"), i18n("Enter new text:"), getText(), &ok, m_pView);
+ TQString newText = KInputDialog::getText(i18n("Change Text"), i18n("Enter new text:"), getText(), &ok, m_pView);
if(ok && newText != getText() && isTextValid(newText)) {
setText( newText );
@@ -278,7 +278,7 @@ void FloatingTextWidget::showOpDlg() {
kError() << "FloatingTextWidget::showOpDlg: m_pLink is NULL" << endl;
return;
}
- QString seqNum, opText;
+ TQString seqNum, opText;
UMLClassifier* c = m_pLink->getSeqNumAndOp(seqNum, opText);
if (c == NULL) {
kError() << "FloatingTextWidget::showOpDlg: "
@@ -320,7 +320,7 @@ void FloatingTextWidget::showOpDlg() {
if (od.m_pReturnType)
op->setType(od.m_pReturnType);
m_pLink->setOperation(op);
- opText = QString();
+ opText = TQString();
} else {
m_pLink->setOperation(NULL);
}
@@ -331,15 +331,15 @@ void FloatingTextWidget::showOpDlg() {
setMessageText();
}
-QString FloatingTextWidget::getPreText() const {
+TQString FloatingTextWidget::getPreText() const {
return m_PreText;
}
-QString FloatingTextWidget::getPostText() const {
+TQString FloatingTextWidget::getPostText() const {
return m_PostText;
}
-QString FloatingTextWidget::getText() const {
+TQString FloatingTextWidget::getText() const {
//test to make sure not just the ":" between the seq number
//and the actual message widget
// hmm. this section looks like it could have been avoided by using pre-, post- text
@@ -352,9 +352,9 @@ QString FloatingTextWidget::getText() const {
return m_Text;
}
-QString FloatingTextWidget::getDisplayText() const
+TQString FloatingTextWidget::getDisplayText() const
{
- QString displayText = m_Text;
+ TQString displayText = m_Text;
displayText.prepend(m_PreText);
displayText.append(m_PostText);
return displayText;
@@ -383,7 +383,7 @@ Uml::Text_Role FloatingTextWidget::getRole() const {
return m_Role;
}
-bool FloatingTextWidget::isTextValid( const QString &text ) {
+bool FloatingTextWidget::isTextValid( const TQString &text ) {
int length = text.length();
if(length < 1)
return false;
@@ -405,8 +405,8 @@ void FloatingTextWidget::showProperties() {
}
}
-void FloatingTextWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement textElement = qDoc.createElement( "floatingtext" );
+void FloatingTextWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement textElement = qDoc.createElement( "floatingtext" );
UMLWidget::saveToXMI( qDoc, textElement );
textElement.setAttribute( "text", m_Text );
textElement.setAttribute( "pretext", m_PreText );
@@ -421,11 +421,11 @@ void FloatingTextWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement
qElement.appendChild( textElement );
}
-bool FloatingTextWidget::loadFromXMI( QDomElement & qElement ) {
+bool FloatingTextWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
- QString role = qElement.attribute( "role", "" );
+ TQString role = qElement.attribute( "role", "" );
if( !role.isEmpty() )
m_Role = (Uml::Text_Role)role.toInt();
diff --git a/umbrello/umbrello/floatingtextwidget.h b/umbrello/umbrello/floatingtextwidget.h
index a8a1bfa8..75e25be0 100644
--- a/umbrello/umbrello/floatingtextwidget.h
+++ b/umbrello/umbrello/floatingtextwidget.h
@@ -59,7 +59,7 @@ public:
* @param id The ID to assign (-1 will prompt a new ID.)
*/
explicit FloatingTextWidget(UMLView * view, Uml::Text_Role role = Uml::tr_Floating,
- const QString& text = "", Uml::IDType id = Uml::id_None);
+ const TQString& text = "", Uml::IDType id = Uml::id_None);
/**
* destructor
@@ -71,47 +71,47 @@ public:
*
* @param t The text to display.
*/
- void setText(const QString &t);
+ void setText(const TQString &t);
/**
* Set some text to be prepended to the main body of text.
* @param t The text to prepend to main body which is displayed.
*/
- void setPreText(const QString &t);
+ void setPreText(const TQString &t);
/**
* Set some text to be appended to the main body of text.
* @param t The text to append to main body which is displayed.
*/
- void setPostText(const QString &t);
+ void setPostText(const TQString &t);
/**
* Set the sequence number to display.
*
* @param sn The sequence number to display.
*/
- void setSeqNum(const QString &sn);
+ void setSeqNum(const TQString &sn);
/**
* Return the sequence number.
*
* @return The sequence number.
*/
- QString getSeqNum() const;
+ TQString getSeqNum() const;
/**
* Set the operation to display.
*
* @param op The operation to display.
*/
- void setOperation(const QString &op);
+ void setOperation(const TQString &op);
/**
* Return the operation that is displayed.
*
* @return The operation that is displayed.
*
- QString getOperation() const;
+ TQString getOperation() const;
*/
/**
@@ -120,7 +120,7 @@ public:
*
* @return The main text currently being displayed by the widget.
*/
- QString getText() const;
+ TQString getText() const;
/**
* Use to get the pre-text which is prepended to the main body of
@@ -128,7 +128,7 @@ public:
*
* @return The pre-text currently displayed by the widget.
*/
- QString getPreText() const;
+ TQString getPreText() const;
/**
* Use to get the post-text which is appended to the main body of
@@ -136,7 +136,7 @@ public:
*
* @return The post-text currently displayed by the widget.
*/
- QString getPostText() const;
+ TQString getPostText() const;
/**
* Use to get the total text (prepended + main body + appended)
@@ -144,7 +144,7 @@ public:
*
* @return The text currently being displayed by the widget.
*/
- QString getDisplayText() const;
+ TQString getDisplayText() const;
/**
* Displays a dialog box to change the text.
@@ -204,12 +204,12 @@ public:
* @param text The string to analyze.
* @return True if the given text is valid.
*/
- static bool isTextValid(const QString &text);
+ static bool isTextValid(const TQString &text);
/**
* Overrides default method
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Handle the ListPopupMenu::mt_Rename case of the slotMenuSelection.
@@ -220,7 +220,7 @@ public:
/**
* Change Name
*/
- void changeName(const QString& newText);
+ void changeName(const TQString& newText);
/**
* Shows an operation dialog box.
@@ -238,12 +238,12 @@ public:
/**
* Creates the "floatingtext" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads the "floatingtext" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
public slots:
/**
@@ -265,7 +265,7 @@ protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
@@ -276,7 +276,7 @@ private:
/**
* Override default method
*/
- void resizeEvent(QResizeEvent* /*re*/);
+ void resizeEvent(TQResizeEvent* /*re*/);
/**
* The association or message widget we may be linked to.
@@ -286,12 +286,12 @@ private:
//////////////////// Data loaded/saved:
/// Prepended text (such as for scope of association Role or method)
- QString m_PreText;
+ TQString m_PreText;
/**
* Ending text (such as bracket on changability notation for
* association Role)
*/
- QString m_PostText;
+ TQString m_PostText;
/**
* The role the text widget will enact.
diff --git a/umbrello/umbrello/floatingtextwidgetcontroller.cpp b/umbrello/umbrello/floatingtextwidgetcontroller.cpp
index 4c6a4aa8..df315687 100644
--- a/umbrello/umbrello/floatingtextwidgetcontroller.cpp
+++ b/umbrello/umbrello/floatingtextwidgetcontroller.cpp
@@ -30,7 +30,7 @@ FloatingTextWidgetController::FloatingTextWidgetController(FloatingTextWidget *f
FloatingTextWidgetController::~FloatingTextWidgetController() {
}
-void FloatingTextWidgetController::saveWidgetValues(QMouseEvent *me) {
+void FloatingTextWidgetController::saveWidgetValues(TQMouseEvent *me) {
UMLWidgetController::saveWidgetValues(me);
m_unconstrainedPositionX = m_widget->getX();
@@ -39,7 +39,7 @@ void FloatingTextWidgetController::saveWidgetValues(QMouseEvent *me) {
m_movementDirectionY = 0;
}
-bool FloatingTextWidgetController::isInResizeArea(QMouseEvent* /*me*/) {
+bool FloatingTextWidgetController::isInResizeArea(TQMouseEvent* /*me*/) {
return false;
}
@@ -54,7 +54,7 @@ void FloatingTextWidgetController::moveWidgetBy(int diffX, int diffY) {
m_unconstrainedPositionX += diffX;
m_unconstrainedPositionY += diffY;
- QPoint constrainedPosition = constrainPosition(diffX, diffY);
+ TQPoint constrainedPosition = constrainPosition(diffX, diffY);
int newX = constrainedPosition.x();
int newY = constrainedPosition.y();
@@ -98,13 +98,13 @@ void FloatingTextWidgetController::moveWidgetBy(int diffX, int diffY) {
}
void FloatingTextWidgetController::constrainMovementForAllWidgets(int &diffX, int &diffY) {
- QPoint constrainedPosition = constrainPosition(diffX, diffY);
+ TQPoint constrainedPosition = constrainPosition(diffX, diffY);
diffX = constrainedPosition.x() - m_floatingTextWidget->getX();
diffY = constrainedPosition.y() - m_floatingTextWidget->getY();
}
-QPoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY) {
+TQPoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY) {
int newX = m_floatingTextWidget->getX() + diffX;
int newY = m_floatingTextWidget->getY() + diffY;
@@ -114,6 +114,6 @@ QPoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY) {
m_floatingTextWidget->m_Role);
}
- return QPoint(newX, newY);
+ return TQPoint(newX, newY);
}
diff --git a/umbrello/umbrello/floatingtextwidgetcontroller.h b/umbrello/umbrello/floatingtextwidgetcontroller.h
index f73b359a..bb40e778 100644
--- a/umbrello/umbrello/floatingtextwidgetcontroller.h
+++ b/umbrello/umbrello/floatingtextwidgetcontroller.h
@@ -58,9 +58,9 @@ protected:
* Calls parent method and then saves the value of m_unconstrainedPositionX/Y
* and m_movementDirectionX/Y.
*
- * @param me The QMouseEvent to get the offset from.
+ * @param me The TQMouseEvent to get the offset from.
*/
- virtual void saveWidgetValues(QMouseEvent *me);
+ virtual void saveWidgetValues(TQMouseEvent *me);
/**
* Overridden from UMLWidgetController.
@@ -70,7 +70,7 @@ protected:
* @param me The QMouseEVent to check.
* @return true if the mouse is in resize area, false otherwise.
*/
- virtual bool isInResizeArea(QMouseEvent *me);
+ virtual bool isInResizeArea(TQMouseEvent *me);
/**
* Overridden from UMLWidgetController.
@@ -117,9 +117,9 @@ private:
*
* @param diffX The difference between current X position and new X position.
* @param diffY The difference between current Y position and new Y position.
- * @return A QPoint with the constrained new position.
+ * @return A TQPoint with the constrained new position.
*/
- QPoint constrainPosition(int diffX, int diffY);
+ TQPoint constrainPosition(int diffX, int diffY);
/**
* The floating text widget which uses the controller.
diff --git a/umbrello/umbrello/folder.cpp b/umbrello/umbrello/folder.cpp
index 8317bab1..c3f97dc4 100644
--- a/umbrello/umbrello/folder.cpp
+++ b/umbrello/umbrello/folder.cpp
@@ -12,7 +12,7 @@
// own header
#include "folder.h"
// qt/kde includes
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -25,7 +25,7 @@
#include "object_factory.h"
#include "model_utils.h"
-UMLFolder::UMLFolder(const QString & name, Uml::IDType id)
+UMLFolder::UMLFolder(const TQString & name, Uml::IDType id)
: UMLPackage(name, id) {
init();
}
@@ -45,11 +45,11 @@ UMLObject* UMLFolder::clone() const {
return clone;
}
-void UMLFolder::setLocalName(const QString& localName) {
+void UMLFolder::setLocalName(const TQString& localName) {
m_localName = localName;
}
-QString UMLFolder::getLocalName() {
+TQString UMLFolder::getLocalName() {
return m_localName;
}
@@ -119,7 +119,7 @@ UMLView *UMLFolder::findView(Uml::IDType id) {
return v;
}
-UMLView *UMLFolder::findView(Uml::Diagram_Type type, const QString &name, bool searchAllScopes) {
+UMLView *UMLFolder::findView(Uml::Diagram_Type type, const TQString &name, bool searchAllScopes) {
UMLView *v = NULL;
for (UMLViewListIt vit(m_diagrams); (v = vit.current()) != NULL; ++vit) {
if (v->getType() == type && v->getName() == name)
@@ -166,16 +166,16 @@ void UMLFolder::removeAllViews() {
m_diagrams.clear();
}
-void UMLFolder::setFolderFile(const QString& fileName) {
+void UMLFolder::setFolderFile(const TQString& fileName) {
m_folderFile = fileName;
}
-QString UMLFolder::getFolderFile() {
+TQString UMLFolder::getFolderFile() {
return m_folderFile;
}
-void UMLFolder::saveContents(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
+void UMLFolder::saveContents(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
UMLObject *obj;
// Save contained objects if any.
for (UMLObjectListIt oit(m_objects); (obj = oit.current()) != NULL; ++oit)
@@ -186,30 +186,30 @@ void UMLFolder::saveContents(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(ownedElement);
// Save diagrams to `extension'.
if (m_diagrams.count()) {
- QDomElement diagramsElement = qDoc.createElement("diagrams");
+ TQDomElement diagramsElement = qDoc.createElement("diagrams");
UMLView *pView;
for (UMLViewListIt vit(m_diagrams); (pView = vit.current()) != NULL; ++vit) {
pView->saveToXMI(qDoc, diagramsElement);
}
- QDomElement extension = qDoc.createElement("XMI.extension");
+ TQDomElement extension = qDoc.createElement("XMI.extension");
extension.setAttribute("xmi.extender", "umbrello");
extension.appendChild( diagramsElement );
qElement.appendChild(extension);
}
}
-void UMLFolder::save(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLFolder::save(TQDomDocument& qDoc, TQDomElement& qElement) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
- QString elementName("UML:Package");
+ TQString elementName("UML:Package");
const Uml::Model_Type mt = umldoc->rootFolderType(this);
if (mt != Uml::N_MODELTYPES)
elementName = "UML:Model";
- QDomElement folderElement = UMLObject::save(elementName, qDoc);
+ TQDomElement folderElement = UMLObject::save(elementName, qDoc);
saveContents(qDoc, folderElement);
qElement.appendChild(folderElement);
}
-void UMLFolder::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLFolder::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
if (m_folderFile.isEmpty()) {
save(qDoc, qElement);
return;
@@ -217,30 +217,30 @@ void UMLFolder::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
// See if we can create the external file.
// If not then internalize the folder.
UMLDoc *umldoc = UMLApp::app()->getDocument();
- QString fileName = umldoc->URL().directory() + '/' + m_folderFile;
- QFile file(fileName);
+ TQString fileName = umldoc->URL().directory() + '/' + m_folderFile;
+ TQFile file(fileName);
if (!file.open(IO_WriteOnly)) {
kError() << "UMLFolder::saveToXMI(" << m_folderFile << "): "
<< "cannot create file, contents will be saved in main model file"
<< endl;
- m_folderFile = QString::null;
+ m_folderFile = TQString::null;
save(qDoc, qElement);
return;
}
// Okay, external file is writable. Wrap up main file.
- QDomElement folderElement = UMLObject::save("UML:Package", qDoc);
- QDomElement extension = qDoc.createElement("XMI.extension");
+ TQDomElement folderElement = UMLObject::save("UML:Package", qDoc);
+ TQDomElement extension = qDoc.createElement("XMI.extension");
extension.setAttribute("xmi.extender", "umbrello");
- QDomElement fileElement = qDoc.createElement("external_file");
+ TQDomElement fileElement = qDoc.createElement("external_file");
fileElement.setAttribute("name", m_folderFile);
extension.appendChild(fileElement);
folderElement.appendChild(extension);
qElement.appendChild(folderElement);
// Save folder to external file.
- QDomDocument folderDoc;
- QDomElement folderRoot;
- QDomProcessingInstruction xmlHeading =
+ TQDomDocument folderDoc;
+ TQDomElement folderRoot;
+ TQDomProcessingInstruction xmlHeading =
folderDoc.createProcessingInstruction("xml",
"version=\"1.0\" encoding=\"UTF-8\"");
folderDoc.appendChild(xmlHeading);
@@ -252,19 +252,19 @@ void UMLFolder::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
folderRoot.setAttribute("parent", m_pUMLPackage->getFullyQualifiedName("::", true));
saveContents(folderDoc, folderRoot);
folderDoc.appendChild(folderRoot);
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << folderDoc.toString();
file.close();
}
-bool UMLFolder::loadDiagramsFromXMI(QDomNode& diagrams) {
+bool UMLFolder::loadDiagramsFromXMI(TQDomNode& diagrams) {
const Settings::OptionState optionState = Settings::getOptionState();
UMLDoc *umldoc = UMLApp::app()->getDocument();
bool totalSuccess = true;
- for (QDomElement diagram = diagrams.toElement(); !diagram.isNull();
+ for (TQDomElement diagram = diagrams.toElement(); !diagram.isNull();
diagrams = diagrams.nextSibling(), diagram = diagrams.toElement()) {
- QString tag = diagram.tagName();
+ TQString tag = diagram.tagName();
if (tag != "diagram") {
kDebug() << "UMLFolder::loadDiagramsFromXMI: ignoring "
<< tag << " in <diagrams>" << endl;
@@ -283,8 +283,8 @@ bool UMLFolder::loadDiagramsFromXMI(QDomNode& diagrams) {
return totalSuccess;
}
-bool UMLFolder::loadFolderFile(const QString& path) {
- QFile file(path);
+bool UMLFolder::loadFolderFile(const TQString& path) {
+ TQFile file(path);
if (!file.exists()) {
KMessageBox::error(0, i18n("The folderfile %1 does not exist.").arg(path), i18n("Load Error"));
return false;
@@ -293,18 +293,18 @@ bool UMLFolder::loadFolderFile(const QString& path) {
KMessageBox::error(0, i18n("The folderfile %1 cannot be opened.").arg(path), i18n("Load Error"));
return false;
}
- QTextStream stream(&file);
- QString data = stream.read();
+ TQTextStream stream(&file);
+ TQString data = stream.read();
file.close();
- QDomDocument doc;
- QString error;
+ TQDomDocument doc;
+ TQString error;
int line;
if (!doc.setContent( data, false, &error, &line)) {
kError() << "UMLFolder::loadFolderFile: Can't set content:"
<< error << " line:" << line << endl;
return false;
}
- QDomNode rootNode = doc.firstChild();
+ TQDomNode rootNode = doc.firstChild();
while (rootNode.isComment() || rootNode.isProcessingInstruction()) {
rootNode = rootNode.nextSibling();
}
@@ -312,8 +312,8 @@ bool UMLFolder::loadFolderFile(const QString& path) {
kError() << "UMLFolder::loadFolderFile: Root node is Null" << endl;
return false;
}
- QDomElement element = rootNode.toElement();
- QString type = element.tagName();
+ TQDomElement element = rootNode.toElement();
+ TQString type = element.tagName();
if (type != "external_file") {
kError() << "UMLFolder::loadFolderFile: Root node has unknown type "
<< type << endl;
@@ -322,15 +322,15 @@ bool UMLFolder::loadFolderFile(const QString& path) {
return load(element);
}
-bool UMLFolder::load(QDomElement& element) {
+bool UMLFolder::load(TQDomElement& element) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
bool totalSuccess = true;
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (Uml::tagEq(type, "Namespace.ownedElement") ||
@@ -345,18 +345,18 @@ bool UMLFolder::load(QDomElement& element) {
}
continue;
} else if (type == "XMI.extension") {
- for (QDomNode xtnode = node.firstChild(); !xtnode.isNull();
+ for (TQDomNode xtnode = node.firstChild(); !xtnode.isNull();
xtnode = xtnode.nextSibling()) {
- QDomElement el = xtnode.toElement();
- const QString xtag = el.tagName();
+ TQDomElement el = xtnode.toElement();
+ const TQString xtag = el.tagName();
if (xtag == "diagrams") {
- QDomNode diagramNode = xtnode.firstChild();
+ TQDomNode diagramNode = xtnode.firstChild();
if (!loadDiagramsFromXMI(diagramNode))
totalSuccess = false;
} else if (xtag == "external_file") {
- const QString rootDir(umldoc->URL().directory());
- QString fileName = el.attribute("name", "");
- const QString path(rootDir + '/' + fileName);
+ const TQString rootDir(umldoc->URL().directory());
+ TQString fileName = el.attribute("name", "");
+ const TQString path(rootDir + '/' + fileName);
if (loadFolderFile(path))
m_folderFile = fileName;
} else {
@@ -371,7 +371,7 @@ bool UMLFolder::load(QDomElement& element) {
// it already exists.
UMLFolder *logicalView = umldoc->getRootFolder(Uml::mt_Logical);
if (this == logicalView && Uml::tagEq(type, "Package")) {
- QString thisName = tempElement.attribute("name", "");
+ TQString thisName = tempElement.attribute("name", "");
if (thisName == "Datatypes") {
UMLFolder *datatypeFolder = umldoc->getDatatypeFolder();
if (!datatypeFolder->loadFromXMI(tempElement))
@@ -381,7 +381,7 @@ bool UMLFolder::load(QDomElement& element) {
}
UMLObject *pObject = NULL;
// Avoid duplicate creation of forward declared object
- QString idStr = tempElement.attribute("xmi.id", "");
+ TQString idStr = tempElement.attribute("xmi.id", "");
if (!idStr.isEmpty()) {
Uml::IDType id = STR2ID(idStr);
pObject = umldoc->findObjectById(id);
@@ -391,7 +391,7 @@ bool UMLFolder::load(QDomElement& element) {
}
}
if (pObject == NULL) {
- QString stereoID = tempElement.attribute("stereotype", "");
+ TQString stereoID = tempElement.attribute("stereotype", "");
pObject = Object_Factory::makeObjectFromXMI(type, stereoID);
if (!pObject) {
kWarning() << "UMLFolder::load: "
diff --git a/umbrello/umbrello/folder.h b/umbrello/umbrello/folder.h
index 2e4d23f6..365795f0 100644
--- a/umbrello/umbrello/folder.h
+++ b/umbrello/umbrello/folder.h
@@ -41,7 +41,7 @@ public:
* @param id The unique id of the Folder. A new ID will be generated
* if this argument is left away.
*/
- explicit UMLFolder(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLFolder(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -64,13 +64,13 @@ public:
* UseCase, Component, Deployment, EntityRelationship,
* and the Datatypes folder inside the Logical View.)
*/
- void setLocalName(const QString& localName);
+ void setLocalName(const TQString& localName);
/**
* Return the localized name of this folder.
* Only useful for the predefined root folders.
*/
- QString getLocalName();
+ TQString getLocalName();
/**
* Add a view to the diagram list.
@@ -114,7 +114,7 @@ public:
* @param searchAllScopes Search in all subfolders (default: true.)
* @return Pointer to the view found, or NULL if not found.
*/
- UMLView * findView(Uml::Diagram_Type type, const QString &name, bool searchAllScopes = true);
+ UMLView * findView(Uml::Diagram_Type type, const TQString &name, bool searchAllScopes = true);
/**
* Set the options for the views in this folder.
@@ -129,19 +129,19 @@ public:
/**
* Set the folder file name for a separate submodel.
*/
- void setFolderFile(const QString& fileName);
+ void setFolderFile(const TQString& fileName);
/**
* Get the folder file name for a separate submodel.
*/
- QString getFolderFile();
+ TQString getFolderFile();
/**
* Creates a UML:Model or UML:Package element:
* UML:Model is created for the predefined fixed folders,
* UML:Package with stereotype "folder" is created for all else.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
@@ -149,7 +149,7 @@ protected:
* Can be used regardless of whether saving to the main model file
* or to an external folder file (see m_folderFile.)
*/
- void saveContents(QDomDocument& qDoc, QDomElement& qElement);
+ void saveContents(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Auxiliary to saveToXMI(): Creates a <UML:Model> element when saving
@@ -157,13 +157,13 @@ protected:
* user created folder. Invokes saveContents() with the newly created
* element.
*/
- void save(QDomDocument& qDoc, QDomElement& qElement);
+ void save(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Auxiliary to load():
* Load the diagrams from the "diagrams" in the <XMI.extension>
*/
- bool loadDiagramsFromXMI(QDomNode& diagrams);
+ bool loadDiagramsFromXMI(TQDomNode& diagrams);
/**
* Folders in the listview can be marked such that their contents
@@ -176,15 +176,15 @@ protected:
* plus file name.
* @return True for success.
*/
- bool loadFolderFile(const QString& path);
+ bool loadFolderFile(const TQString& path);
/**
* Loads the UML:Component element.
*/
- bool load(QDomElement & element);
+ bool load(TQDomElement & element);
private:
- QString m_localName; ///< i18n name, only used for predefined root folders
+ TQString m_localName; ///< i18n name, only used for predefined root folders
/**
* If m_folderFile is not empty then it contains a file name to which
* this folder is saved.
@@ -192,7 +192,7 @@ private:
* What is saved in the main model is not the folder contents but a
* reference to the folder file.
*/
- QString m_folderFile;
+ TQString m_folderFile;
UMLViewList m_diagrams;
};
diff --git a/umbrello/umbrello/forkjoinwidget.cpp b/umbrello/umbrello/forkjoinwidget.cpp
index 5a1ce3b8..a720a6cd 100644
--- a/umbrello/umbrello/forkjoinwidget.cpp
+++ b/umbrello/umbrello/forkjoinwidget.cpp
@@ -12,7 +12,7 @@
// own header
#include "forkjoinwidget.h"
//qt includes
-#include <qdom.h>
+#include <tqdom.h>
//kde includes
#include <kcursor.h>
#include <kdebug.h>
@@ -33,23 +33,23 @@ void ForkJoinWidget::init() {
ForkJoinWidget::~ForkJoinWidget() {
}
-QSize ForkJoinWidget::calculateSize() {
+TQSize ForkJoinWidget::calculateSize() {
if (m_drawVertical) {
- return QSize(4, 40);
+ return TQSize(4, 40);
} else {
- return QSize(40, 4);
+ return TQSize(40, 4);
}
}
-void ForkJoinWidget::draw(QPainter& p, int offsetX, int offsetY) {
- p.fillRect( offsetX, offsetY, width(), height(), QBrush( Qt::black ));
+void ForkJoinWidget::draw(TQPainter& p, int offsetX, int offsetY) {
+ p.fillRect( offsetX, offsetY, width(), height(), TQBrush( Qt::black ));
if (m_bSelected) {
drawSelected(&p, offsetX, offsetY);
}
}
-void ForkJoinWidget::drawSelected(QPainter *, int /*offsetX*/, int /*offsetY*/) {
+void ForkJoinWidget::drawSelected(TQPainter *, int /*offsetX*/, int /*offsetY*/) {
}
void ForkJoinWidget::constrain(int& width, int& height) {
@@ -94,18 +94,18 @@ bool ForkJoinWidget::getDrawVertical() const {
return m_drawVertical;
}
-void ForkJoinWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement fjElement = qDoc.createElement("forkjoin");
+void ForkJoinWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement fjElement = qDoc.createElement("forkjoin");
UMLWidget::saveToXMI(qDoc, fjElement);
fjElement.setAttribute("drawvertical", m_drawVertical);
qElement.appendChild(fjElement);
}
-bool ForkJoinWidget::loadFromXMI(QDomElement& qElement) {
+bool ForkJoinWidget::loadFromXMI(TQDomElement& qElement) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
- QString drawVertical = qElement.attribute("drawvertical", "0");
+ TQString drawVertical = qElement.attribute("drawvertical", "0");
setDrawVertical( (bool)drawVertical.toInt() );
return true;
}
diff --git a/umbrello/umbrello/forkjoinwidget.h b/umbrello/umbrello/forkjoinwidget.h
index bf8c47c8..8ee869ea 100644
--- a/umbrello/umbrello/forkjoinwidget.h
+++ b/umbrello/umbrello/forkjoinwidget.h
@@ -12,7 +12,7 @@
#ifndef FORKJOINWIDGET_H
#define FORKJOINWIDGET_H
//qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
//app includes
#include "boxwidget.h"
@@ -61,17 +61,17 @@ public:
/**
* Draws a slim solid black rectangle.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves the widget to the "forkjoinwidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads the widget from the "forkjoinwidget" XMI element.
*/
- bool loadFromXMI(QDomElement & qElement);
+ bool loadFromXMI(TQDomElement & qElement);
protected:
/**
@@ -79,12 +79,12 @@ protected:
* Although the ForkJoinWidget supports resizing, we suppress the
* resize corner because it is too large for this very slim widget.
*/
- void drawSelected(QPainter * p, int offsetX, int offsetY);
+ void drawSelected(TQPainter * p, int offsetX, int offsetY);
/**
* Overrides the function from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Reimplement method from UMLWidget.
diff --git a/umbrello/umbrello/hierarchicalcodeblock.cpp b/umbrello/umbrello/hierarchicalcodeblock.cpp
index 7c04a960..eff7f463 100644
--- a/umbrello/umbrello/hierarchicalcodeblock.cpp
+++ b/umbrello/umbrello/hierarchicalcodeblock.cpp
@@ -31,7 +31,7 @@
// Constructors/Destructors
//
-HierarchicalCodeBlock::HierarchicalCodeBlock ( CodeDocument * doc , const QString &start, const QString &endString, const QString &comment )
+HierarchicalCodeBlock::HierarchicalCodeBlock ( CodeDocument * doc , const TQString &start, const TQString &endString, const TQString &comment )
: CodeBlockWithComments (doc, start, comment), CodeGenObjectWithTextBlocks(doc)
{
setEndText(endString);
@@ -51,7 +51,7 @@ HierarchicalCodeBlock::~HierarchicalCodeBlock ( ) { }
* Set the value of m_endText
* @param new_var the new value of m_endText
*/
-void HierarchicalCodeBlock::setEndText ( const QString &new_var ) {
+void HierarchicalCodeBlock::setEndText ( const TQString &new_var ) {
m_endText = new_var;
}
@@ -59,16 +59,16 @@ void HierarchicalCodeBlock::setEndText ( const QString &new_var ) {
* Get the value of m_endText
* @return the value of m_endText
*/
-QString HierarchicalCodeBlock::getEndText ( ) {
+TQString HierarchicalCodeBlock::getEndText ( ) {
return m_endText;
}
-QString HierarchicalCodeBlock::getUniqueTag()
+TQString HierarchicalCodeBlock::getUniqueTag()
{
return getUniqueTag("hblock_tag");
}
-QString HierarchicalCodeBlock::getUniqueTag( const QString& prefix )
+TQString HierarchicalCodeBlock::getUniqueTag( const TQString& prefix )
{
return getParentDocument()->getUniqueTag(prefix);
}
@@ -113,7 +113,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
if(!newBlock || !existingBlock)
return false;
- QString tag = existingBlock->getTag();
+ TQString tag = existingBlock->getTag();
// FIX: just do a quick check if the parent DOCUMENT has this.
// IF it does, then the lack of an index will force us into
// a search of any child hierarchical codeblocks we may have
@@ -140,7 +140,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
// if we get here.. it was in this object so insert
// check for tag FIRST
- QString new_tag = newBlock->getTag();
+ TQString new_tag = newBlock->getTag();
// assign a tag if one doesn't already exist
if(new_tag.isEmpty())
@@ -184,7 +184,7 @@ bool HierarchicalCodeBlock::removeTextBlock ( TextBlock * remove_object ) {
}
// IF we get here, the text block was in THIS object (and not a child)..
- QString tag = remove_object->getTag();
+ TQString tag = remove_object->getTag();
if(!(tag.isEmpty()))
{
m_textBlockTagMap.erase(tag);
@@ -197,14 +197,14 @@ bool HierarchicalCodeBlock::removeTextBlock ( TextBlock * remove_object ) {
/**
* @param text
*/
-void HierarchicalCodeBlock::setStartText ( const QString &text ) {
+void HierarchicalCodeBlock::setStartText ( const TQString &text ) {
m_startText = text;
}
/**
* @return QString
*/
-QString HierarchicalCodeBlock::getStartText ( ) {
+TQString HierarchicalCodeBlock::getStartText ( ) {
return m_startText;
}
@@ -221,7 +221,7 @@ void HierarchicalCodeBlock::addCodeClassFieldMethods(CodeClassFieldList &list )
CodeAccessorMethod * method;
for (CodeAccessorMethodListIt it(list); (method = it.current()) != NULL; ++it)
{
- QString tag = method->getTag();
+ TQString tag = method->getTag();
if(tag.isEmpty())
{
tag = getUniqueTag();
@@ -239,15 +239,15 @@ void HierarchicalCodeBlock::addCodeClassFieldMethods(CodeClassFieldList &list )
/**
* Save the XMI representation of this object
*/
-void HierarchicalCodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "hierarchicalcodeblock" );
+void HierarchicalCodeBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "hierarchicalcodeblock" );
setAttributesOnNode(doc, blockElement);
root.appendChild( blockElement );
}
-void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement & elem ) {
+void HierarchicalCodeBlock::setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem ) {
// set super-class attributes
CodeBlockWithComments::setAttributesOnNode(doc, elem);
@@ -256,7 +256,7 @@ void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement
// set local class attributes
if(getContentType() != CodeBlock::AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
elem.setAttribute("startText",encodeText(getStartText(),endLine));
elem.setAttribute("endText",encodeText(getEndText(),endLine));
}
@@ -265,7 +265,7 @@ void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement
/**
* load params from the appropriate XMI element node.
*/
-void HierarchicalCodeBlock::loadFromXMI ( QDomElement & root ) {
+void HierarchicalCodeBlock::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
@@ -273,7 +273,7 @@ void HierarchicalCodeBlock::loadFromXMI ( QDomElement & root ) {
/** set the class attributes of this object from
* the passed element node.
*/
-void HierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
+void HierarchicalCodeBlock::setAttributesFromNode ( TQDomElement & root)
{
// set attributes from the XMI
@@ -281,7 +281,7 @@ void HierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
if(getContentType() != CodeBlock::AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
setStartText(decodeText(root.attribute("startText",""),endLine));
setEndText(decodeText(root.attribute("endText",""),endLine));
}
@@ -312,22 +312,22 @@ void HierarchicalCodeBlock::setAttributesFromObject (TextBlock * obj) {
/**
* @return QString
*/
-QString HierarchicalCodeBlock::toString ( ) {
+TQString HierarchicalCodeBlock::toString ( ) {
- QString string = QString();
+ TQString string = TQString();
if(getWriteOutText()) {
- QString indent = getIndentationString();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString startText = "";
- QString endText = "";
+ TQString indent = getIndentationString();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString startText = "";
+ TQString endText = "";
if (!getStartText().isEmpty())
startText = formatMultiLineText (getStartText(), indent, endLine);
if (!getEndText().isEmpty())
endText = formatMultiLineText (getEndText(), indent, endLine);
- QString body = childTextBlocksToString();
- QString comment = getComment()->toString();
+ TQString body = childTextBlocksToString();
+ TQString comment = getComment()->toString();
// tack in text, if there is something there..
if(!comment.isEmpty() && getComment()->getWriteOutText())
@@ -346,19 +346,19 @@ QString HierarchicalCodeBlock::toString ( ) {
return string;
}
-QString HierarchicalCodeBlock::childTextBlocksToString() {
+TQString HierarchicalCodeBlock::childTextBlocksToString() {
TextBlockList* list = getTextBlockList();
- QString retString = "";
+ TQString retString = "";
for(TextBlock *block = list->first() ; block; block=list->next())
{
- QString blockValue = block->toString();
+ TQString blockValue = block->toString();
if(!blockValue.isEmpty())
retString.append(blockValue);
}
return retString;
}
-TextBlock * HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag ( const QString &tag )
+TextBlock * HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag ( const TQString &tag )
{
ClassifierCodeDocument * cdoc = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());
diff --git a/umbrello/umbrello/hierarchicalcodeblock.h b/umbrello/umbrello/hierarchicalcodeblock.h
index 3c0dcbc1..ef145753 100644
--- a/umbrello/umbrello/hierarchicalcodeblock.h
+++ b/umbrello/umbrello/hierarchicalcodeblock.h
@@ -18,8 +18,8 @@
#ifndef HIERARCHICALCODEBLOCK_H
#define HIERARCHICALCODEBLOCK_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "codegenobjectwithtextblocks.h"
#include "codeblockwithcomments.h"
@@ -37,7 +37,7 @@ public:
/**
* Constructor
*/
- explicit HierarchicalCodeBlock ( CodeDocument * doc , const QString &startString = "", const QString &endString = "", const QString &comment = "");
+ explicit HierarchicalCodeBlock ( CodeDocument * doc , const TQString &startString = "", const TQString &endString = "", const TQString &comment = "");
/**
* Empty Destructor
@@ -54,13 +54,13 @@ public:
* Set the value of m_endText
* @param new_var the new value of m_endText
*/
- void setEndText ( const QString &new_var );
+ void setEndText ( const TQString &new_var );
/**
* Get the value of m_endText
* @return the value of m_endText
*/
- QString getEndText ( );
+ TQString getEndText ( );
/**
* Add a TextBlock object to the m_textblockVector List
@@ -82,31 +82,31 @@ public:
/**
* @param text
*/
- void setStartText ( const QString &text );
+ void setStartText ( const TQString &text );
/**
* @return QString
*/
- QString getStartText ( );
+ TQString getStartText ( );
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
// return a unique, and currently unallocated, text block tag for this hblock
- QString getUniqueTag();
- QString getUniqueTag( const QString& prefix );
+ TQString getUniqueTag();
+ TQString getUniqueTag( const TQString& prefix );
/**
* Utility method to add accessormethods in this object
@@ -128,26 +128,26 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & elem );
+ virtual void setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem );
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
virtual void setAttributesFromObject (TextBlock * obj);
// look for specific text blocks which belong to code classfields
- TextBlock * findCodeClassFieldTextBlockByTag ( const QString &tag );
+ TextBlock * findCodeClassFieldTextBlockByTag ( const TQString &tag );
private:
- QString m_startText;
- QString m_endText;
+ TQString m_startText;
+ TQString m_endText;
- QString childTextBlocksToString();
+ TQString childTextBlocksToString();
void initAttributes ( ) ;
};
diff --git a/umbrello/umbrello/import_rose.cpp b/umbrello/umbrello/import_rose.cpp
index aeaeb7fb..3968e72a 100644
--- a/umbrello/umbrello/import_rose.cpp
+++ b/umbrello/umbrello/import_rose.cpp
@@ -13,12 +13,12 @@
#include "import_rose.h"
// qt includes
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qmessagebox.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqmessagebox.h>
#include <klocale.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -29,7 +29,7 @@
namespace Import_Rose {
-typedef QPtrList<PetalNode> PetalNodeList;
+typedef TQPtrList<PetalNode> PetalNodeList;
uint nClosures; // Multiple closing parentheses may appear on a single
// line. The parsing is done line-by-line and using
@@ -41,35 +41,35 @@ uint nClosures; // Multiple closing parentheses may appear on a single
// have been seen.
uint linum; // line number
-QString g_methodName;
-void methodName(const QString& m) {
+TQString g_methodName;
+void methodName(const TQString& m) {
g_methodName = m;
}
/**
* Auxiliary function for diagnostics: Return current location.
*/
-QString loc() {
- return "Import_Rose::" + g_methodName + " line " + QString::number(linum) + ": ";
+TQString loc() {
+ return "Import_Rose::" + g_methodName + " line " + TQString::number(linum) + ": ";
}
/**
* Split a line into lexemes.
*/
-QStringList scan(const QString& lin) {
- QStringList result;
- QString line = lin.stripWhiteSpace();
+TQStringList scan(const TQString& lin) {
+ TQStringList result;
+ TQString line = lin.stripWhiteSpace();
if (line.isEmpty())
return result; // empty
- QString lexeme;
+ TQString lexeme;
const uint len = line.length();
bool inString = false;
for (uint i = 0; i < len; i++) {
- QChar c = line[i];
+ TQChar c = line[i];
if (c == '"') {
lexeme += c;
if (inString) {
result.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
inString = !inString;
} else if (inString ||
@@ -78,10 +78,10 @@ QStringList scan(const QString& lin) {
} else {
if (!lexeme.isEmpty()) {
result.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
if (! c.isSpace()) {
- result.append(QString(c));
+ result.append(TQString(c));
}
}
}
@@ -93,8 +93,8 @@ QStringList scan(const QString& lin) {
/**
* Emulate perl shift().
*/
-QString shift(QStringList& l) {
- QString first = l.first();
+TQString shift(TQStringList& l) {
+ TQString first = l.first();
l.pop_front();
return first;
}
@@ -102,7 +102,7 @@ QString shift(QStringList& l) {
/**
* Check for closing of one or more scopes.
*/
-bool checkClosing(QStringList& tokens) {
+bool checkClosing(TQStringList& tokens) {
if (tokens.count() == 0)
return false;
if (tokens.last() == ")") {
@@ -124,8 +124,8 @@ bool checkClosing(QStringList& tokens) {
* @return True if the given text is a natural or negative number
* or a quoted string.
*/
-bool isImmediateValue(QString s) {
- return s.contains(QRegExp("^[\\d\\-\"]"));
+bool isImmediateValue(TQString s) {
+ return s.contains(TQRegExp("^[\\d\\-\"]"));
}
/**
@@ -140,12 +140,12 @@ bool isImmediateValue(QString s) {
* or
* "\"SomeText\" 888"
*/
-QString extractImmediateValues(QStringList& l) {
+TQString extractImmediateValues(TQStringList& l) {
if (l.count() == 0)
- return QString();
+ return TQString();
if (l.first() == "(")
l.pop_front();
- QString result;
+ TQString result;
bool start = true;
while (l.count() && isImmediateValue(l.first())) {
if (start)
@@ -165,9 +165,9 @@ QString extractImmediateValues(QStringList& l) {
return result;
}
-QString collectVerbatimText(QTextStream& stream) {
- QString result;
- QString line;
+TQString collectVerbatimText(TQTextStream& stream) {
+ TQString result;
+ TQString line;
methodName("collectVerbatimText");
while (!(line = stream.readLine()).isNull()) {
linum++;
@@ -176,21 +176,21 @@ QString collectVerbatimText(QTextStream& stream) {
break;
if (line[0] != '|') {
kError() << loc() << "expecting '|' at start of verbatim text" << endl;
- return QString();
+ return TQString();
} else {
result += line.mid(1) + '\n';
}
}
if (line.isNull()) {
kError() << loc() << "premature EOF" << endl;
- return QString();
+ return TQString();
}
if (! line.isEmpty()) {
for (uint i = 0; i < line.length(); i++) {
- const QChar& clParenth = line[i];
+ const TQChar& clParenth = line[i];
if (clParenth != ')') {
kError() << loc() << "expected ')', found: " << clParenth << endl;
- return QString();
+ return TQString();
}
nClosures++;
}
@@ -218,19 +218,19 @@ QString collectVerbatimText(QTextStream& stream) {
* In this case the two lines are extracted without the leading '|'.
* The line ending '\n' of each line is preserved.
*/
-QString extractValue(QStringList& l, QTextStream& stream) {
+TQString extractValue(TQStringList& l, TQTextStream& stream) {
methodName("extractValue");
if (l.count() == 0)
- return QString();
+ return TQString();
if (l.first() == "(")
l.pop_front();
if (l.first() != "value")
- return QString();
+ return TQString();
l.pop_front(); // remove "value"
l.pop_front(); // remove the value type: could be e.g. "Text" or "cardinality"
- QString result;
+ TQString result;
if (l.count() == 0) { // expect verbatim text to follow on subsequent lines
- QString text = collectVerbatimText(stream);
+ TQString text = collectVerbatimText(stream);
nClosures--; // expect own closure
return text;
} else {
@@ -252,17 +252,17 @@ QString extractValue(QStringList& l, QTextStream& stream) {
* Read attributes of a node.
* @param initialArgs Tokens on the line of the opening "(" of the node
* but with leading whitespace and the opening "(" removed.
- * @param stream The QTextStream from which to read following lines.
+ * @param stream The TQTextStream from which to read following lines.
* @return Pointer to the created PetalNode or NULL on error.
*/
-PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
+PetalNode *readAttributes(TQStringList initialArgs, TQTextStream& stream) {
methodName("readAttributes");
if (initialArgs.count() == 0) {
kError() << loc() << "initialArgs is empty" << endl;
return NULL;
}
PetalNode::NodeType nt;
- QString type = shift(initialArgs);
+ TQString type = shift(initialArgs);
if (type == "object")
nt = PetalNode::nt_object;
else if (type == "list")
@@ -277,16 +277,16 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
if (seenClosing)
return node;
PetalNode::NameValueList attrs;
- QString line;
+ TQString line;
while (!(line = stream.readLine()).isNull()) {
linum++;
line = line.stripWhiteSpace();
if (line.isEmpty())
continue;
- QStringList tokens = scan(line);
- QString stringOrNodeOpener = shift(tokens);
- QString name;
- if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(QRegExp("^[A-Za-z]"))) {
+ TQStringList tokens = scan(line);
+ TQString stringOrNodeOpener = shift(tokens);
+ TQString name;
+ if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(TQRegExp("^[A-Za-z]"))) {
kError() << loc() << "unexpected line " << line << endl;
return NULL;
}
@@ -322,7 +322,7 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
continue;
}
if (stringOrNodeOpener == "(") {
- QString nxt = tokens.first();
+ TQString nxt = tokens.first();
if (isImmediateValue(nxt)) {
value.string = extractImmediateValues(tokens);
} else if (nxt == "value" || nxt.startsWith("\"")) {
@@ -357,25 +357,25 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
return node;
}
-bool loadFromMDL(QIODevice& file) {
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::Latin1);
- QString line;
+bool loadFromMDL(TQIODevice& file) {
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::Latin1);
+ TQString line;
PetalNode *root = NULL;
linum = 0;
while (!(line = stream.readLine()).isNull()) {
linum++;
- if (line.contains( QRegExp("^\\s*\\(object Petal") )) {
+ if (line.contains( TQRegExp("^\\s*\\(object Petal") )) {
while (!(line = stream.readLine()).isNull() && !line.contains(')')) {
linum++; // CHECK: do we need petal version info?
}
if (line.isNull())
break;
} else {
- QRegExp objectRx("^\\s*\\(object ");
+ TQRegExp objectRx("^\\s*\\(object ");
if (line.contains(objectRx)) {
nClosures = 0;
- QStringList initialArgs = scan(line);
+ TQStringList initialArgs = scan(line);
initialArgs.pop_front(); // remove opening parenthesis
root = readAttributes(initialArgs, stream);
}
diff --git a/umbrello/umbrello/import_rose.h b/umbrello/umbrello/import_rose.h
index b5090db3..6ab84da2 100644
--- a/umbrello/umbrello/import_rose.h
+++ b/umbrello/umbrello/import_rose.h
@@ -12,7 +12,7 @@
#ifndef IMPORT_ROSE__H
#define IMPORT_ROSE__H
-#include <qiodevice.h>
+#include <tqiodevice.h>
/**
* Rose model import
@@ -28,7 +28,7 @@ namespace Import_Rose {
*
* @return True for success, false in case of error.
*/
- bool loadFromMDL(QIODevice & file);
+ bool loadFromMDL(TQIODevice & file);
}
diff --git a/umbrello/umbrello/kplayerslideraction.cpp b/umbrello/umbrello/kplayerslideraction.cpp
index ae5c3f97..05ce0100 100644
--- a/umbrello/umbrello/kplayerslideraction.cpp
+++ b/umbrello/umbrello/kplayerslideraction.cpp
@@ -20,8 +20,8 @@
#include <kapplication.h>
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
@@ -29,7 +29,7 @@
#include "kplayerslideraction.h"
#include "kplayerslideraction.moc"
-void KPlayerPopupFrame::keyPressEvent (QKeyEvent* ev)
+void KPlayerPopupFrame::keyPressEvent (TQKeyEvent* ev)
{
switch ( ev -> key() )
{
@@ -42,21 +42,21 @@ void KPlayerPopupFrame::keyPressEvent (QKeyEvent* ev)
}
}
-/*void KPlayerPopupFrame::closeEvent (QCloseEvent* ev)
+/*void KPlayerPopupFrame::closeEvent (TQCloseEvent* ev)
{
- QFrame::closeEvent (ev);
+ TQFrame::closeEvent (ev);
}
-void KPlayerPopupFrame::mousePressEvent (QMouseEvent* ev)
+void KPlayerPopupFrame::mousePressEvent (TQMouseEvent* ev)
{
- QFrame::mousePressEvent (ev);
+ TQFrame::mousePressEvent (ev);
//if ( ! rect().contains (ev -> pos()) )
// m_outside_mouse_press = true;
}
-void KPlayerPopupFrame::mouseReleaseEvent (QMouseEvent* ev)
+void KPlayerPopupFrame::mouseReleaseEvent (TQMouseEvent* ev)
{
- QFrame::mouseReleaseEvent (ev);
+ TQFrame::mouseReleaseEvent (ev);
if ( m_outside_mouse_press )
{
m_outside_mouse_press = false;
@@ -65,19 +65,19 @@ void KPlayerPopupFrame::mouseReleaseEvent (QMouseEvent* ev)
}
}*/
-KPlayerPopupSliderAction::KPlayerPopupSliderAction (const QString& text,
- const QString& pix, const KShortcut& shortcut, const QObject* receiver,
- const char* slot, QObject* parent, const char* name)
+KPlayerPopupSliderAction::KPlayerPopupSliderAction (const TQString& text,
+ const TQString& pix, const KShortcut& shortcut, const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name)
: KAction (text, pix, shortcut, parent, name)
{
m_frame = new KPlayerPopupFrame;
- m_frame -> setFrameStyle (QFrame::PopupPanel | QFrame::Raised);
+ m_frame -> setFrameStyle (TQFrame::PopupPanel | TQFrame::Raised);
m_frame -> setLineWidth (2);
m_slider = new KPlayerSlider (Qt::Vertical, m_frame);
m_frame -> resize (36, m_slider -> sizeHint().height() + 4);
m_slider -> setGeometry (m_frame -> contentsRect());
//CHANGED kdDebug() << "Popup slider size " << m_slider -> width() << "x" << m_slider -> height() << "\n";
- connect (m_slider, SIGNAL (changed (int)), receiver, slot);
+ connect (m_slider, TQT_SIGNAL (changed (int)), receiver, slot);
}
KPlayerPopupSliderAction::~KPlayerPopupSliderAction()
@@ -86,7 +86,7 @@ KPlayerPopupSliderAction::~KPlayerPopupSliderAction()
m_frame = 0;
}
-/*int KPlayerPopupSliderAction::plug (QWidget* widget, int index)
+/*int KPlayerPopupSliderAction::plug (TQWidget* widget, int index)
{
Q_ASSERT (m_slider);
Q_ASSERT (widget);
@@ -98,11 +98,11 @@ KPlayerPopupSliderAction::~KPlayerPopupSliderAction()
return -1;
int retval = KAction::plug (widget, index);
// if ( retval >= 0 )
-// m_slider -> reparent (widget, QPoint());
+// m_slider -> reparent (widget, TQPoint());
return retval;
}
-void KPlayerPopupSliderAction::unplug (QWidget* widget)
+void KPlayerPopupSliderAction::unplug (TQWidget* widget)
{
Q_ASSERT (m_slider);
Q_ASSERT (widget);
@@ -110,19 +110,19 @@ void KPlayerPopupSliderAction::unplug (QWidget* widget)
Q_ASSERT (widget -> inherits ("KToolBar"));
if ( ! m_slider || ! widget || ! isPlugged() || ! widget -> inherits ("KToolBar") )
return;
-//m_slider -> reparent (0, QPoint());
+//m_slider -> reparent (0, TQPoint());
KAction::unplug (widget);
}*/
void KPlayerPopupSliderAction::slotActivated (void)
{
KAction::slotActivated();
- QWidget* button = 0;
+ TQWidget* button = 0;
if ( sender() )
{
//CHANGED kdDebug() << "Sender class name: " << sender() -> className() << "\n";
if ( sender() -> inherits ("KToolBarButton") )
- button = (QWidget*) sender();
+ button = (TQWidget*) sender();
else if ( sender() -> inherits ("KToolBar") )
{
KToolBar* toolbar = (KToolBar*) sender();
@@ -131,16 +131,16 @@ void KPlayerPopupSliderAction::slotActivated (void)
button = toolbar -> getButton (itemId (index));
}
}
- QPoint point;
+ TQPoint point;
if ( button )
- point = button -> mapToGlobal (QPoint (0, button -> height()));
+ point = button -> mapToGlobal (TQPoint (0, button -> height()));
else
{
- point = QCursor::pos() - QPoint (m_frame -> width() / 2, m_frame -> height() / 2);
- if ( point.x() + m_frame -> width() > QApplication::desktop() -> width() )
- point.setX (QApplication::desktop() -> width() - m_frame -> width());
- if ( point.y() + m_frame -> height() > QApplication::desktop() -> height() )
- point.setY (QApplication::desktop() -> height() - m_frame -> height());
+ point = TQCursor::pos() - TQPoint (m_frame -> width() / 2, m_frame -> height() / 2);
+ if ( point.x() + m_frame -> width() > TQApplication::desktop() -> width() )
+ point.setX (TQApplication::desktop() -> width() - m_frame -> width());
+ if ( point.y() + m_frame -> height() > TQApplication::desktop() -> height() )
+ point.setY (TQApplication::desktop() -> height() - m_frame -> height());
if ( point.x() < 0 )
point.setX (0);
if ( point.y() < 0 )
@@ -150,27 +150,27 @@ void KPlayerPopupSliderAction::slotActivated (void)
m_frame -> move (point);
/*if ( kapp && kapp -> activeWindow() )
{
- QMouseEvent me (QEvent::MouseButtonRelease, QPoint(0,0), QPoint(0,0), QMouseEvent::LeftButton, QMouseEvent::NoButton);
- QApplication::sendEvent (kapp -> activeWindow(), &me);
+ TQMouseEvent me (TQEvent::MouseButtonRelease, TQPoint(0,0), TQPoint(0,0), TQMouseEvent::LeftButton, TQMouseEvent::NoButton);
+ TQApplication::sendEvent (kapp -> activeWindow(), &me);
}*/
m_frame -> show();
m_slider -> setFocus();
}
-KPlayerSliderAction::KPlayerSliderAction (const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, KActionCollection* parent, const char* name)
+KPlayerSliderAction::KPlayerSliderAction (const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, KActionCollection* parent, const char* name)
: KWidgetAction (new KPlayerSlider (Qt::Horizontal, 0, name), text, cut, receiver, slot, parent, name)
//: KAction (text, 0, parent, name)
{
setAutoSized (true);
- connect (slider(), SIGNAL (changed (int)), receiver, slot);
+ connect (slider(), TQT_SIGNAL (changed (int)), receiver, slot);
}
KPlayerSliderAction::~KPlayerSliderAction()
{
}
-int KPlayerSliderAction::plug (QWidget* widget, int index)
+int KPlayerSliderAction::plug (TQWidget* widget, int index)
{
//Q_ASSERT (widget);
//Q_ASSERT (! isPlugged());
@@ -188,26 +188,26 @@ int KPlayerSliderAction::plug (QWidget* widget, int index)
KToolBar* toolbar = (KToolBar*) widget;
//int id = getToolButtonID();
//kdDebug() << "Orientation: " << toolbar -> orientation() << "\n";
- //m_slider -> reparent (toolbar, QPoint());
+ //m_slider -> reparent (toolbar, TQPoint());
//toolbar -> insertWidget (id, 0, m_slider, index);
//toolbar -> setItemAutoSized (id, true);
- //QWhatsThis::remove (m_slider);
+ //TQWhatsThis::remove (m_slider);
//if ( ! whatsThis().isEmpty() )
- // QWhatsThis::add (m_slider, whatsThis());
+ // TQWhatsThis::add (m_slider, whatsThis());
//if ( ! text().isEmpty() )
- // QToolTip::add (m_slider, text());
+ // TQToolTip::add (m_slider, text());
//addContainer (toolbar, id);
//setupToolbar (toolbar -> orientation(), toolbar);
orientationChanged (toolbar -> orientation());
- connect (toolbar, SIGNAL (orientationChanged (Orientation)), this, SLOT (orientationChanged (Orientation)));
- //connect (toolbar, SIGNAL (destroyed()), this, SLOT (toolbarDestroyed()));
+ connect (toolbar, TQT_SIGNAL (orientationChanged (Orientation)), this, TQT_SLOT (orientationChanged (Orientation)));
+ //connect (toolbar, TQT_SIGNAL (destroyed()), this, TQT_SLOT (toolbarDestroyed()));
//if ( parentCollection() )
// parentCollection() -> connectHighlight (toolbar, this);
//return containerCount() - 1;
return result;
}
-void KPlayerSliderAction::unplug (QWidget* widget)
+void KPlayerSliderAction::unplug (TQWidget* widget)
{
//Q_ASSERT (m_slider);
//Q_ASSERT (isPlugged());
@@ -216,9 +216,9 @@ void KPlayerSliderAction::unplug (QWidget* widget)
if ( ! slider() || ! isPlugged() || widget != slider() -> parent() )
return;
//KToolBar* toolbar = (KToolBar*) widget;
- disconnect (widget, SIGNAL (orientationChanged (Orientation)), this, SLOT (orientationChanged (Orientation)));
- //disconnect (toolbar, SIGNAL (destroyed()), this, SLOT (toolbarDestroyed()));
- //m_slider -> reparent (0, QPoint());
+ disconnect (widget, TQT_SIGNAL (orientationChanged (Orientation)), this, TQT_SLOT (orientationChanged (Orientation)));
+ //disconnect (toolbar, TQT_SIGNAL (destroyed()), this, TQT_SLOT (toolbarDestroyed()));
+ //m_slider -> reparent (0, TQPoint());
/*int index = findContainer (toolbar);
if ( index == -1 )
return;
@@ -261,16 +261,16 @@ void KPlayerSliderAction::orientationChanged (Qt::Orientation orientation)
/*void KPlayerSliderAction::toolbarDestroyed (void)
{
if ( m_slider )
- m_slider -> reparent (0, QPoint());
+ m_slider -> reparent (0, TQPoint());
}*/
-KPlayerSlider::KPlayerSlider (Qt::Orientation orientation, QWidget* parent, const char* name)
-//CHANGED : QSlider (orientation, parent, name)
- : QSlider (300, 2200, 400, 1000, orientation, parent, name)
+KPlayerSlider::KPlayerSlider (Qt::Orientation orientation, TQWidget* parent, const char* name)
+//CHANGED : TQSlider (orientation, parent, name)
+ : TQSlider (300, 2200, 400, 1000, orientation, parent, name)
{
m_changing_orientation = false;
- setTickmarks (QSlider::Both);
- connect (this, SIGNAL (valueChanged (int)), this, SLOT (sliderValueChanged (int)));
+ setTickmarks (TQSlider::Both);
+ connect (this, TQT_SIGNAL (valueChanged (int)), this, TQT_SLOT (sliderValueChanged (int)));
}
KPlayerSlider::~KPlayerSlider()
@@ -278,9 +278,9 @@ KPlayerSlider::~KPlayerSlider()
//CHANGED kdDebug() << "KPlayerSlider destroyed\n";
}
-QSize KPlayerSlider::sizeHint() const
+TQSize KPlayerSlider::sizeHint() const
{
- QSize hint = QSlider::sizeHint();
+ TQSize hint = TQSlider::sizeHint();
//CHANGED int length = kPlayerSettings() -> preferredSliderLength();
int length = 200;
if ( orientation() == Qt::Horizontal )
@@ -296,10 +296,10 @@ QSize KPlayerSlider::sizeHint() const
return hint;
}
-QSize KPlayerSlider::minimumSizeHint() const
+TQSize KPlayerSlider::minimumSizeHint() const
{
//kdDebug() << "KPlayerSlider minimum size hint\n";
- QSize hint = QSlider::minimumSizeHint();
+ TQSize hint = TQSlider::minimumSizeHint();
//CHANGED int length = kPlayerSettings() -> minimumSliderLength();
int length = 200;
if ( orientation() == Qt::Horizontal )
@@ -320,80 +320,80 @@ void KPlayerSlider::setOrientation (Qt::Orientation o)
if ( o == orientation() )
return;
m_changing_orientation = true;
- int minValue = QSlider::minValue();
- int maxValue = QSlider::maxValue();
- int value = QSlider::value();
- QSlider::setOrientation (o);
- QSlider::setMinValue (- maxValue);
- QSlider::setMaxValue (- minValue);
- QSlider::setValue (- value);
+ int minValue = TQSlider::minValue();
+ int maxValue = TQSlider::maxValue();
+ int value = TQSlider::value();
+ TQSlider::setOrientation (o);
+ TQSlider::setMinValue (- maxValue);
+ TQSlider::setMaxValue (- minValue);
+ TQSlider::setValue (- value);
m_changing_orientation = false;
}
int KPlayerSlider::minValue (void) const
{
if ( orientation() == Qt::Horizontal )
- return QSlider::minValue();
- return - QSlider::maxValue();
+ return TQSlider::minValue();
+ return - TQSlider::maxValue();
}
void KPlayerSlider::setMinValue (int minValue)
{
if ( orientation() == Qt::Horizontal )
- QSlider::setMinValue (minValue);
+ TQSlider::setMinValue (minValue);
else
- QSlider::setMaxValue (- minValue);
+ TQSlider::setMaxValue (- minValue);
}
int KPlayerSlider::maxValue (void) const
{
if ( orientation() == Qt::Horizontal )
- return QSlider::maxValue();
- return - QSlider::minValue();
+ return TQSlider::maxValue();
+ return - TQSlider::minValue();
}
void KPlayerSlider::setMaxValue (int maxValue)
{
if ( orientation() == Qt::Horizontal )
- QSlider::setMaxValue (maxValue);
+ TQSlider::setMaxValue (maxValue);
else
- QSlider::setMinValue (- maxValue);
+ TQSlider::setMinValue (- maxValue);
}
int KPlayerSlider::lineStep (void) const
{
- return QSlider::lineStep();
+ return TQSlider::lineStep();
}
void KPlayerSlider::setLineStep (int lineStep)
{
- QSlider::setLineStep (lineStep);
+ TQSlider::setLineStep (lineStep);
}
int KPlayerSlider::pageStep (void) const
{
- return QSlider::pageStep();
+ return TQSlider::pageStep();
}
void KPlayerSlider::setPageStep (int pageStep)
{
- QSlider::setPageStep (pageStep);
+ TQSlider::setPageStep (pageStep);
setTickInterval (pageStep);
}
int KPlayerSlider::value (void) const
{
if ( orientation() == Qt::Horizontal )
- return QSlider::value();
- return - QSlider::value();
+ return TQSlider::value();
+ return - TQSlider::value();
}
void KPlayerSlider::setValue (int value, int)
{
if ( orientation() == Qt::Horizontal )
- QSlider::setValue (value);
+ TQSlider::setValue (value);
else
- QSlider::setValue (- value);
+ TQSlider::setValue (- value);
}
void KPlayerSlider::setup (int minValue, int maxValue, int value, int pageStep, int lineStep)
diff --git a/umbrello/umbrello/kplayerslideraction.h b/umbrello/umbrello/kplayerslideraction.h
index e8bb6ff9..076ebf22 100644
--- a/umbrello/umbrello/kplayerslideraction.h
+++ b/umbrello/umbrello/kplayerslideraction.h
@@ -17,7 +17,7 @@
#define KPLAYERSLIDERACTION_H
#include <kaction.h>
-#include <qslider.h>
+#include <tqslider.h>
/**KPlayer's slider widget. Works around the Qt upside-down slider bug.
* Taken from kplayer CVS 2003-09-21 (kplayer > 0.3.1) by Jonathan Riddell
@@ -28,19 +28,19 @@ class KPlayerSlider : public QSlider
Q_OBJECT
public:
- /** The KPlayerSlider constructor. Parameters are passed on to QSlider.
+ /** The KPlayerSlider constructor. Parameters are passed on to TQSlider.
*/
- explicit KPlayerSlider (Qt::Orientation, QWidget* parent = 0, const char* name = 0);
+ explicit KPlayerSlider (Qt::Orientation, TQWidget* parent = 0, const char* name = 0);
/** The KPlayerSlider destructor. Does nothing.
*/
virtual ~KPlayerSlider();
/** The size hint.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/** The minimum size hint.
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/** The minimum value.
*/
@@ -69,7 +69,7 @@ public:
/** The current value.
*/
int value (void) const;
- /** Sets the current value. The extra parameter prevents overriding of the virtual QSlider::setValue.
+ /** Sets the current value. The extra parameter prevents overriding of the virtual TQSlider::setValue.
*/
void setValue (int, int = 0); // do not override the virtual setValue
@@ -86,7 +86,7 @@ signals:
void changed (int);
protected slots:
- /** Receives the valueChanged signal from QSlider.
+ /** Receives the valueChanged signal from TQSlider.
*/
void sliderValueChanged (int);
@@ -106,10 +106,10 @@ class KPlayerPopupFrame : public QFrame
Q_OBJECT
public:
- /** The KPlayerPopupFrame constructor. Parameters are passed on to QFrame.
+ /** The KPlayerPopupFrame constructor. Parameters are passed on to TQFrame.
*/
- KPlayerPopupFrame (QWidget* parent = 0, const char* name = 0)
- : QFrame (parent, name, Qt::WType_Popup) { }
+ KPlayerPopupFrame (TQWidget* parent = 0, const char* name = 0)
+ : TQFrame (parent, name, Qt::WType_Popup) { }
/** The KPlayerPopupFrame destructor. Does nothing.
*/
virtual ~KPlayerPopupFrame() { }
@@ -117,7 +117,7 @@ public:
protected:
/** Closes the popup frame when Alt, Tab, Esc, Enter or Return is pressed.
*/
- virtual void keyPressEvent (QKeyEvent*);
+ virtual void keyPressEvent (TQKeyEvent*);
};
/**Action representing a popup slider activated by a toolbar button.
@@ -130,8 +130,8 @@ class KPlayerPopupSliderAction : public KAction
public:
/** The KPlayerPopupSliderAction constructor. Parameters are passed on to KAction.
*/
- KPlayerPopupSliderAction (const QString& text, const QString& pix, const KShortcut& shortcut,
- const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0);
+ KPlayerPopupSliderAction (const TQString& text, const TQString& pix, const KShortcut& shortcut,
+ const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0);
/** The KPlayerPopupSliderAction destructor. Deletes the KPlayerPopupFrame.
*/
virtual ~KPlayerPopupSliderAction();
@@ -142,9 +142,9 @@ public:
{ return m_slider; }
/** Plugs the action into the toolbar. Reparents the slider into the toolbar. */
- //virtual int plug (QWidget*, int = -1);
+ //virtual int plug (TQWidget*, int = -1);
/** Unplugs the action from the toolbar. Reparents the slider out of the toolbar. */
- //virtual void unplug (QWidget*);
+ //virtual void unplug (TQWidget*);
protected slots:
/** Pops up the slider.
@@ -170,7 +170,7 @@ class KPlayerSliderAction : public KWidgetAction
public:
/** The KPlayerSliderAction constructor. Parameters are passed on to KAction.
*/
- KPlayerSliderAction (const QString& text, const KShortcut&, const QObject* receiver,
+ KPlayerSliderAction (const TQString& text, const KShortcut&, const TQObject* receiver,
const char* slot, KActionCollection* parent = 0, const char* name = 0);
/** The KPlayerSliderAction destructor. Does nothing.
*/
@@ -183,10 +183,10 @@ public:
/** Plugs the slider into the toolbar.
*/
- virtual int plug (QWidget* widget, int index = -1);
+ virtual int plug (TQWidget* widget, int index = -1);
/** Unplugs the slider from the toolbar.
*/
- virtual void unplug (QWidget* widget);
+ virtual void unplug (TQWidget* widget);
protected slots:
/** Changes the slider orientation when the toolbar orientation changes.
diff --git a/umbrello/umbrello/kstartuplogo.cpp b/umbrello/umbrello/kstartuplogo.cpp
index 5cefe463..7f768260 100644
--- a/umbrello/umbrello/kstartuplogo.cpp
+++ b/umbrello/umbrello/kstartuplogo.cpp
@@ -15,23 +15,23 @@
#include "kstartuplogo.h"
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-KStartupLogo::KStartupLogo(QWidget * parent, const char *name)
- : QWidget(parent,name, Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WDestructiveClose )
+KStartupLogo::KStartupLogo(TQWidget * parent, const char *name)
+ : TQWidget(parent,name, Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WDestructiveClose )
,m_bReadyToHide(false) {
//pm.load(locate("appdata", "pics/startlogo.png"));
KStandardDirs * dirs = KGlobal::dirs();
- QString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
+ TQString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
dataDir += "/umbrello/pics/";
- QPixmap pm(dataDir + "startlogo.png");
+ TQPixmap pm(dataDir + "startlogo.png");
setBackgroundPixmap(pm);
- setGeometry(QApplication::desktop()->width()/2-pm.width()/2,
- QApplication::desktop()->height()/2-pm.height()/2,
+ setGeometry(TQApplication::desktop()->width()/2-pm.width()/2,
+ TQApplication::desktop()->height()/2-pm.height()/2,
pm.width(),pm.height());
- timer = new QTimer(this);
- connect( timer, SIGNAL(timeout()), this, SLOT(timerDone()) );
+ timer = new TQTimer(this);
+ connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) );
timer->start(2000, true);
}
@@ -39,7 +39,7 @@ KStartupLogo::~KStartupLogo() {
delete timer;
}
-void KStartupLogo::mousePressEvent( QMouseEvent*) {
+void KStartupLogo::mousePressEvent( TQMouseEvent*) {
// for the haters of raising startlogos
if (m_bReadyToHide)
hide();
diff --git a/umbrello/umbrello/kstartuplogo.h b/umbrello/umbrello/kstartuplogo.h
index d8f4af7a..71181891 100644
--- a/umbrello/umbrello/kstartuplogo.h
+++ b/umbrello/umbrello/kstartuplogo.h
@@ -16,7 +16,7 @@
#ifndef KSTARTUPLOGO_H
#define KSTARTUPLOGO_H
-#include <qwidget.h>
+#include <tqwidget.h>
/**
@@ -24,17 +24,17 @@
* This class is mostly borrowed from another project, probably KMyMoney2.
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class KStartupLogo : public QWidget {
+class KStartupLogo : public TQWidget {
Q_OBJECT
public:
- KStartupLogo(QWidget *parent=0, const char *name=0);
+ KStartupLogo(TQWidget *parent=0, const char *name=0);
~KStartupLogo();
void setHideEnabled(bool bEnabled);
protected:
- virtual void mousePressEvent( QMouseEvent*);
+ virtual void mousePressEvent( TQMouseEvent*);
bool m_bReadyToHide;
- QTimer* timer;
+ TQTimer* timer;
public slots:
void timerDone();
diff --git a/umbrello/umbrello/linepath.cpp b/umbrello/umbrello/linepath.cpp
index 59cf105f..b79ed8ac 100644
--- a/umbrello/umbrello/linepath.cpp
+++ b/umbrello/umbrello/linepath.cpp
@@ -17,9 +17,9 @@
#include <cmath>
// qt includes
-#include <qcanvas.h>
-#include <qdatastream.h>
-#include <qdom.h>
+#include <tqcanvas.h>
+#include <tqdatastream.h>
+#include <tqdom.h>
// kde includes
#include <kdebug.h>
@@ -32,27 +32,27 @@
#include "umldoc.h"
#include "uml.h"
-LinePath::Circle::Circle(QCanvas * canvas, int radius /* = 0 */)
- : QCanvasEllipse(radius * 2, radius * 2, canvas) {
+LinePath::Circle::Circle(TQCanvas * canvas, int radius /* = 0 */)
+ : TQCanvasEllipse(radius * 2, radius * 2, canvas) {
}
void LinePath::Circle::setX(int x) {
- QCanvasItem::setX( (double) x );
+ TQCanvasItem::setX( (double) x );
}
void LinePath::Circle::setY(int y) {
- QCanvasItem::setY( (double) y );
+ TQCanvasItem::setY( (double) y );
}
void LinePath::Circle::setRadius(int radius) {
- QCanvasEllipse::setSize(radius * 2, radius * 2);
+ TQCanvasEllipse::setSize(radius * 2, radius * 2);
}
int LinePath::Circle::getRadius() const {
- return (QCanvasEllipse::height() / 2);
+ return (TQCanvasEllipse::height() / 2);
}
-void LinePath::Circle::drawShape(QPainter& p) {
+void LinePath::Circle::drawShape(TQPainter& p) {
int diameter = height();
int radius = diameter / 2;
p.drawEllipse( (int)x() - radius, (int)y() - radius, diameter, diameter);
@@ -85,24 +85,24 @@ void LinePath::setAssociation(AssociationWidget * association ) {
if( getAssocType() == Uml::at_Coll_Message )
setupParallelLine();
UMLView * view = (UMLView *)m_pAssociation -> parent();
- connect( view, SIGNAL( sigColorChanged( Uml::IDType ) ), this, SLOT( slotLineColorChanged( Uml::IDType ) ) );
- connect( view, SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, SLOT( slotLineWidthChanged( Uml::IDType ) ) );
+ connect( view, TQT_SIGNAL( sigColorChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineColorChanged( Uml::IDType ) ) );
+ connect( view, TQT_SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineWidthChanged( Uml::IDType ) ) );
}
-QPoint LinePath::getPoint( int pointIndex ) {
+TQPoint LinePath::getPoint( int pointIndex ) {
int count = m_LineList.count();
if( count == 0 || pointIndex > count || pointIndex < 0)
- return QPoint( -1, -1 );
+ return TQPoint( -1, -1 );
if( pointIndex == count ) {
- QCanvasLine * line = m_LineList.last();
+ TQCanvasLine * line = m_LineList.last();
return line -> endPoint();
}
- QCanvasLine * line = m_LineList.at( pointIndex );
+ TQCanvasLine * line = m_LineList.at( pointIndex );
return line -> startPoint();
}
-bool LinePath::setPoint( int pointIndex, const QPoint &point ) {
+bool LinePath::setPoint( int pointIndex, const TQPoint &point ) {
int count = m_LineList.count();
if( count == 0 || pointIndex > count || pointIndex < 0)
return false;
@@ -112,23 +112,23 @@ bool LinePath::setPoint( int pointIndex, const QPoint &point ) {
}
if( pointIndex == count) {
- QCanvasLine * line = m_LineList.last();
- QPoint p = line -> startPoint();
+ TQCanvasLine * line = m_LineList.last();
+ TQPoint p = line -> startPoint();
line -> setPoints( p.x(), p.y(), point.x(), point.y() );
moveSelected( pointIndex );
update();
return true;
}
if( pointIndex == 0 ) {
- QCanvasLine * line = m_LineList.first();
- QPoint p = line -> endPoint();
+ TQCanvasLine * line = m_LineList.first();
+ TQPoint p = line -> endPoint();
line -> setPoints( point.x(), point.y(), p.x(), p.y() );
moveSelected( pointIndex );
update();
return true;
}
- QCanvasLine * line = m_LineList.at( pointIndex );
- QPoint p = line -> endPoint();
+ TQCanvasLine * line = m_LineList.at( pointIndex );
+ TQPoint p = line -> endPoint();
line -> setPoints( point.x(), point.y(), p.x(), p.y() );
line = m_LineList.at( pointIndex - 1 );
p = line -> startPoint();
@@ -138,12 +138,12 @@ bool LinePath::setPoint( int pointIndex, const QPoint &point ) {
return true;
}
-bool LinePath::isPoint( int pointIndex, const QPoint &point, unsigned short delta) {
+bool LinePath::isPoint( int pointIndex, const TQPoint &point, unsigned short delta) {
int count = m_LineList.count();
if ( pointIndex >= count )
return false;
- QCanvasLine * line = m_LineList.at( pointIndex );
+ TQCanvasLine * line = m_LineList.at( pointIndex );
/* check if the given point is the start or end point of the line */
if ( (
@@ -161,18 +161,18 @@ bool LinePath::isPoint( int pointIndex, const QPoint &point, unsigned short delt
return false;
}
-bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
+bool LinePath::insertPoint( int pointIndex, const TQPoint &point ) {
int count = m_LineList.count();
if( count == 0 )
return false;
const bool bLoading = UMLApp::app()->getDocument()->loading();
if( count == 1 || pointIndex == 1) {
- QCanvasLine * first = m_LineList.first();
- QPoint sp = first -> startPoint();
- QPoint ep = first -> endPoint();
+ TQCanvasLine * first = m_LineList.first();
+ TQPoint sp = first -> startPoint();
+ TQPoint ep = first -> endPoint();
first -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
- QCanvasLine * line = new QCanvasLine( getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine( getCanvas() );
line -> setZ( -2 );
line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
line -> setPen( getPen() );
@@ -183,11 +183,11 @@ bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
return true;
}
if( count + 1 == pointIndex ) {
- QCanvasLine * before = m_LineList.last();
- QPoint sp = before -> startPoint();
- QPoint ep = before -> endPoint();
+ TQCanvasLine * before = m_LineList.last();
+ TQPoint sp = before -> startPoint();
+ TQPoint ep = before -> endPoint();
before -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
- QCanvasLine * line = new QCanvasLine( getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine( getCanvas() );
line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
line -> setZ( -2 );
line -> setPen( getPen() );
@@ -197,11 +197,11 @@ bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
setupSelected();
return true;
}
- QCanvasLine * before = m_LineList.at( pointIndex - 1 );
- QPoint sp = before -> startPoint();
- QPoint ep = before -> endPoint();
+ TQCanvasLine * before = m_LineList.at( pointIndex - 1 );
+ TQPoint sp = before -> startPoint();
+ TQPoint ep = before -> endPoint();
before -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
- QCanvasLine * line = new QCanvasLine(getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine(getCanvas() );
line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
line -> setZ( -2 );
line -> setPen( getPen() );
@@ -212,7 +212,7 @@ bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
return true;
}
-bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short delta )
+bool LinePath::removePoint( int pointIndex, const TQPoint &point, unsigned short delta )
{
/* get the number of line segments */
int count = m_LineList.count();
@@ -221,7 +221,7 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
/* we don't know if the user clicked on the start- or endpoint of a
* line segment */
- QCanvasLine * current_line = m_LineList.at( pointIndex );
+ TQCanvasLine * current_line = m_LineList.at( pointIndex );
if (abs( current_line -> endPoint().x() - point.x() ) <= delta
&&
abs( current_line -> endPoint().y() - point.y() ) <= delta)
@@ -233,9 +233,9 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
/* the next segment will get the starting point from the current one,
* which is going to be removed */
- QCanvasLine * next_line = m_LineList.at( pointIndex + 1 );
- QPoint startPoint = current_line -> startPoint();
- QPoint endPoint = next_line -> endPoint();
+ TQCanvasLine * next_line = m_LineList.at( pointIndex + 1 );
+ TQPoint startPoint = current_line -> startPoint();
+ TQPoint endPoint = next_line -> endPoint();
next_line -> setPoints(startPoint.x(), startPoint.y(),
endPoint.x(), endPoint.y());
@@ -251,9 +251,9 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
/* the previous segment will get the end point from the current one,
* which is going to be removed */
- QCanvasLine * previous_line = m_LineList.at( pointIndex - 1 );
- QPoint startPoint = previous_line -> startPoint();
- QPoint endPoint = current_line -> endPoint();
+ TQCanvasLine * previous_line = m_LineList.at( pointIndex - 1 );
+ TQPoint startPoint = previous_line -> startPoint();
+ TQPoint endPoint = current_line -> endPoint();
previous_line -> setPoints(startPoint.x(), startPoint.y(),
endPoint.x(), endPoint.y());
} else {
@@ -269,11 +269,11 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
return true;
}
-bool LinePath::setStartEndPoints( const QPoint &start, const QPoint &end ) {
+bool LinePath::setStartEndPoints( const TQPoint &start, const TQPoint &end ) {
int count = m_LineList.count();
if( count == 0 ) {
- QCanvasLine * line = new QCanvasLine(getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine(getCanvas() );
line -> setPoints( start.x(), start.y(), end.x(), end.y() );
line -> setZ( -2 );
line -> setPen( getPen() );
@@ -291,13 +291,13 @@ int LinePath::count() {
return m_LineList.count() + 1;
}
-int LinePath::onLinePath( const QPoint &position ) {
- QCanvasItemList list = getCanvas() -> collisions( position );
+int LinePath::onLinePath( const TQPoint &position ) {
+ TQCanvasItemList list = getCanvas() -> collisions( position );
int index = -1;
- QCanvasItemList::iterator end(list.end());
- for(QCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) {
- if( ( index = m_LineList.findRef( (QCanvasLine*)*item_it ) ) != -1 )
+ TQCanvasItemList::iterator end(list.end());
+ for(TQCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) {
+ if( ( index = m_LineList.findRef( (TQCanvasLine*)*item_it ) ) != -1 )
break;
}//end for
return index;
@@ -312,7 +312,7 @@ void LinePath::setSelected( bool select ) {
void LinePath::setAssocType( Uml::Association_Type type ) {
LineListIt it( m_LineList );
- QCanvasLine * line = 0;
+ TQCanvasLine * line = 0;
while( ( line = it.current() ) ) {
line -> setPen( getPen() );
++it;
@@ -351,36 +351,36 @@ void LinePath::slotLineColorChanged( Uml::IDType viewID ) {
}
-void LinePath::setLineColor( const QColor &color ) {
- QCanvasLine * line = 0;
+void LinePath::setLineColor( const TQColor &color ) {
+ TQCanvasLine * line = 0;
uint linewidth = 0;
LineListIt it( m_LineList );
while( ( line = it.current() ) ) {
linewidth = line->pen().width();
- line -> setPen( QPen( color, linewidth ) );
+ line -> setPen( TQPen( color, linewidth ) );
++it;
}
LineListIt hit( m_HeadList );
while( ( line = hit.current() ) ) {
linewidth = line->pen().width();
- line -> setPen( QPen( color, linewidth ) );
+ line -> setPen( TQPen( color, linewidth ) );
++hit;
}
LineListIt pit( m_ParallelList );
while( ( line = pit.current() ) ) {
linewidth = line->pen().width();
- line -> setPen( QPen( color, linewidth ) );
+ line -> setPen( TQPen( color, linewidth ) );
++pit;
}
if( getAssocType() == Uml::at_Aggregation )
- if (m_pClearPoly) m_pClearPoly -> setBrush( QBrush( Qt::white ) );
+ if (m_pClearPoly) m_pClearPoly -> setBrush( TQBrush( Qt::white ) );
else if( getAssocType() == Uml::at_Composition )
- if (m_pClearPoly) m_pClearPoly -> setBrush( QBrush( color ) );
+ if (m_pClearPoly) m_pClearPoly -> setBrush( TQBrush( color ) );
if( m_pCircle ) {
linewidth = m_pCircle->pen().width();
- m_pCircle->setPen( QPen(color, linewidth) );
+ m_pCircle->setPen( TQPen(color, linewidth) );
}
}
@@ -392,30 +392,30 @@ void LinePath::slotLineWidthChanged( Uml::IDType viewID ) {
}
void LinePath::setLineWidth( uint width ) {
- QCanvasLine * line = 0;
- QColor linecolor;
+ TQCanvasLine * line = 0;
+ TQColor linecolor;
LineListIt it( m_LineList );
while( ( line = it.current() ) ) {
linecolor = line->pen().color();
- line -> setPen( QPen( linecolor, width ) );
+ line -> setPen( TQPen( linecolor, width ) );
++it;
}
LineListIt hit( m_HeadList );
while( ( line = hit.current() ) ) {
linecolor = line->pen().color();
- line -> setPen( QPen( linecolor, width ) );
+ line -> setPen( TQPen( linecolor, width ) );
++hit;
}
LineListIt pit( m_ParallelList );
while( ( line = pit.current() ) ) {
linecolor = line->pen().color();
- line -> setPen( QPen( linecolor, width ) );
+ line -> setPen( TQPen( linecolor, width ) );
++pit;
}
if( m_pCircle ) {
linecolor = m_pCircle->pen().color();
- m_pCircle->setPen( QPen(linecolor, width) );
+ m_pCircle->setPen( TQPen(linecolor, width) );
}
}
@@ -427,11 +427,11 @@ void LinePath::moveSelected( int pointIndex ) {
}
if( (int)m_RectList.count() + 1 != lineCount )
setupSelected();
- QCanvasRectangle * rect = 0;
- QCanvasLine * line = 0;
+ TQCanvasRectangle * rect = 0;
+ TQCanvasLine * line = 0;
if( pointIndex == lineCount || lineCount == 1) {
line = m_LineList.last();
- QPoint p = line -> endPoint();
+ TQPoint p = line -> endPoint();
rect = m_RectList.last();
rect -> setX( p.x() );
rect -> setY( p.y() );
@@ -439,7 +439,7 @@ void LinePath::moveSelected( int pointIndex ) {
return;
}
line = m_LineList.at( pointIndex );
- QPoint p = line -> startPoint();
+ TQPoint p = line -> startPoint();
rect = m_RectList.at( pointIndex );
rect -> setX( p.x() );
rect -> setY( p.y() );
@@ -448,32 +448,32 @@ void LinePath::moveSelected( int pointIndex ) {
void LinePath::setupSelected() {
m_RectList.clear();
- QCanvasLine * line = 0;
+ TQCanvasLine * line = 0;
LineListIt it( m_LineList );
while( ( line = it.current() ) ) {
- QPoint sp = line -> startPoint();
- QCanvasRectangle *rect = Widget_Utils::decoratePoint(sp);
+ TQPoint sp = line -> startPoint();
+ TQCanvasRectangle *rect = Widget_Utils::decoratePoint(sp);
m_RectList.append( rect );
++it;
}
//special case for last point
line = m_LineList.last();
- QPoint p = line -> endPoint();
- QCanvasRectangle *rect = Widget_Utils::decoratePoint(p);
+ TQPoint p = line -> endPoint();
+ TQCanvasRectangle *rect = Widget_Utils::decoratePoint(p);
m_RectList.append( rect );
update();
}
-QPen LinePath::getPen() {
+TQPen LinePath::getPen() {
Uml::Association_Type type = getAssocType();
if( type == Uml::at_Dependency || type == Uml::at_Realization || type == Uml::at_Anchor )
- return QPen( getLineColor(), getLineWidth(), Qt::DashLine );
- return QPen( getLineColor(), getLineWidth() );
+ return TQPen( getLineColor(), getLineWidth(), Qt::DashLine );
+ return TQPen( getLineColor(), getLineWidth() );
}
void LinePath::calculateHead() {
uint size = m_LineList.count();
- QPoint farPoint;
+ TQPoint farPoint;
int halfLength = 10;
double arrowAngle = 0.2618; // 0.5 * atan(sqrt(3.0) / 3.0) = 0.2618
Uml::Association_Type at = getAssocType();
@@ -544,7 +544,7 @@ void LinePath::calculateHead() {
m_PointArray.setPoint( 2, m_ArrowPointB );
m_PointArray.setPoint( 3, m_EgdePoint );
} else {
- QPoint diamondFarPoint;
+ TQPoint diamondFarPoint;
diamondFarPoint.setX( (int)rint(xb + cosx * 2) );
diamondFarPoint.setY( (int)rint(yb + siny * 2) );
m_PointArray.setPoint(2, diamondFarPoint);
@@ -555,7 +555,7 @@ void LinePath::calculateHead() {
void LinePath::updateHead() {
int count = m_HeadList.count();
- QCanvasLine * line = 0;
+ TQCanvasLine * line = 0;
switch( getAssocType() ) {
case Uml::at_State:
@@ -639,9 +639,9 @@ void LinePath::updateHead() {
}
void LinePath::growList(LineList &list, int by) {
- QPen pen( getLineColor(), getLineWidth() );
+ TQPen pen( getLineColor(), getLineWidth() );
for (int i = 0; i < by; i++) {
- QCanvasLine * line = new QCanvasLine( getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine( getCanvas() );
line -> setZ( 0 );
line -> setPen( pen );
line -> setVisible( true );
@@ -651,7 +651,7 @@ void LinePath::growList(LineList &list, int by) {
void LinePath::createHeadLines() {
m_HeadList.clear();
- QCanvas * canvas = getCanvas();
+ TQCanvas * canvas = getCanvas();
switch( getAssocType() ) {
case Uml::at_Activity:
case Uml::at_State:
@@ -664,21 +664,21 @@ void LinePath::createHeadLines() {
case Uml::at_Generalization:
case Uml::at_Realization:
growList(m_HeadList, 3);
- m_pClearPoly = new QCanvasPolygon( canvas );
+ m_pClearPoly = new TQCanvasPolygon( canvas );
m_pClearPoly -> setVisible( true );
- m_pClearPoly -> setBrush( QBrush( Qt::white ) );
+ m_pClearPoly -> setBrush( TQBrush( Qt::white ) );
m_pClearPoly -> setZ( -1 );
break;
case Uml::at_Composition:
case Uml::at_Aggregation:
growList(m_HeadList, 4);
- m_pClearPoly = new QCanvasPolygon( canvas );
+ m_pClearPoly = new TQCanvasPolygon( canvas );
m_pClearPoly -> setVisible( true );
if( getAssocType() == Uml::at_Aggregation )
- m_pClearPoly -> setBrush( QBrush( Qt::white ) );
+ m_pClearPoly -> setBrush( TQBrush( Qt::white ) );
else
- m_pClearPoly -> setBrush( QBrush( getLineColor() ) );
+ m_pClearPoly -> setBrush( TQBrush( getLineColor() ) );
m_pClearPoly -> setZ( -1 );
break;
@@ -687,7 +687,7 @@ void LinePath::createHeadLines() {
if (!m_pCircle) {
m_pCircle = new Circle( canvas, 6 );
m_pCircle->show();
- m_pCircle->setPen( QPen( getLineColor(), getLineWidth() ) );
+ m_pCircle->setPen( TQPen( getLineColor(), getLineWidth() ) );
}
break;
default:
@@ -701,8 +701,8 @@ void LinePath::calculateParallelLine() {
double ATAN = atan(1.0);
int lineDist = 10;
//get 1/8(M) and 7/8(T) point
- QPoint a = getPoint( midCount - 1 );
- QPoint b = getPoint( midCount );
+ TQPoint a = getPoint( midCount - 1 );
+ TQPoint b = getPoint( midCount );
int mx = ( a.x() + b.x() ) / 2;
int my = ( a.y() + b.y() ) / 2;
int tx = ( mx + b.x() ) / 2;
@@ -717,7 +717,7 @@ void LinePath::calculateParallelLine() {
//find point from M to start line from.
double cosx = cos( angle ) * lineDist;
double siny = sin( angle ) * lineDist;
- QPoint pointM( mx + (int)cosx, my + (int)siny );
+ TQPoint pointM( mx + (int)cosx, my + (int)siny );
//find dist between P(xb, yb)
distX = ( tx - b.x() );
distX *= distX;
@@ -727,7 +727,7 @@ void LinePath::calculateParallelLine() {
//find point from T to end line
cosx = cos( angle ) * lineDist;
siny = sin( angle ) * lineDist;
- QPoint pointT( tx + (int)cosx, ty + (int)siny );
+ TQPoint pointT( tx + (int)cosx, ty + (int)siny );
m_ParallelLines[ 1 ] = pointM;
m_ParallelLines[ 0 ] = pointT;
@@ -737,11 +737,11 @@ void LinePath::calculateParallelLine() {
double arrowSlope = angle + ATAN;
cosx = ( cos( arrowSlope ) ) * arrowDist;
siny = ( sin( arrowSlope ) ) * arrowDist;
- m_ParallelLines[ 2 ] = QPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
+ m_ParallelLines[ 2 ] = TQPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
arrowSlope = angle - ATAN;
cosx = ( cos( arrowSlope ) ) * arrowDist;
siny = ( sin( arrowSlope ) ) * arrowDist;
- m_ParallelLines[ 3 ] = QPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
+ m_ParallelLines[ 3 ] = TQPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
}
void LinePath::setupParallelLine() {
@@ -753,9 +753,9 @@ void LinePath::setupParallelLine() {
void LinePath::updateParallelLine() {
if( !m_bParallelLineCreated )
return;
- QCanvasLine * line = 0;
- QPoint common = m_ParallelLines.at( 0 );
- QPoint p = m_ParallelLines.at( 1 );
+ TQCanvasLine * line = 0;
+ TQPoint common = m_ParallelLines.at( 0 );
+ TQPoint p = m_ParallelLines.at( 1 );
line = m_ParallelList.at( 0 );
line -> setPoints( common.x(), common.y(), p.x(), p.y() );
@@ -800,7 +800,7 @@ LinePath & LinePath::operator=( LinePath & rhs ) {
return *this;
}
-QCanvas * LinePath::getCanvas() {
+TQCanvas * LinePath::getCanvas() {
if( !m_pAssociation )
return 0;
const UMLView * view = m_pAssociation->getUMLView();
@@ -813,7 +813,7 @@ Uml::Association_Type LinePath::getAssocType() {
return Uml::at_Association;
}
-QColor LinePath::getLineColor() {
+TQColor LinePath::getLineColor() {
if( !m_pAssociation )
return Qt::black;
return m_pAssociation -> getLineColor();
@@ -849,8 +849,8 @@ void LinePath::cleanup() {
if( m_pAssociation ) {
UMLView * view = (UMLView *)m_pAssociation -> parent();
if(view) {
- disconnect( view, SIGNAL( sigColorChanged( Uml::IDType ) ), this, SLOT( slotLineColorChanged( Uml::IDType ) ) );
- disconnect( view, SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, SLOT( slotLineWidthChanged( Uml::IDType ) ) );
+ disconnect( view, TQT_SIGNAL( sigColorChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineColorChanged( Uml::IDType ) ) );
+ disconnect( view, TQT_SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineWidthChanged( Uml::IDType ) ) );
}
m_pAssociation = NULL;
}
@@ -869,26 +869,26 @@ bool LinePath::hasPoints () {
void LinePath::dumpPoints () {
int count = m_LineList.count();
for( int i = 1; i < count; i++ ) {
- QPoint point = getPoint( i );
+ TQPoint point = getPoint( i );
kDebug()<<" * point x:"<<point.x()<<" y:"<<point.y()<<endl;
}
}
-void LinePath::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
+void LinePath::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
int count = m_LineList.count();
- QPoint point = getPoint( 0 );
- QDomElement lineElement = qDoc.createElement( "linepath" );
- QDomElement startElement = qDoc.createElement( "startpoint" );
+ TQPoint point = getPoint( 0 );
+ TQDomElement lineElement = qDoc.createElement( "linepath" );
+ TQDomElement startElement = qDoc.createElement( "startpoint" );
startElement.setAttribute( "startx", point.x() );
startElement.setAttribute( "starty", point.y() );
lineElement.appendChild( startElement );
- QDomElement endElement = qDoc.createElement( "endpoint" );
+ TQDomElement endElement = qDoc.createElement( "endpoint" );
point = getPoint( count );
endElement.setAttribute( "endx", point.x() );
endElement.setAttribute( "endy", point.y() );
lineElement.appendChild( endElement );
for( int i = 1; i < count; i++ ) {
- QDomElement pointElement = qDoc.createElement( "point" );
+ TQDomElement pointElement = qDoc.createElement( "point" );
point = getPoint( i );
pointElement.setAttribute( "x", point.x() );
pointElement.setAttribute( "y", point.y() );
@@ -897,30 +897,30 @@ void LinePath::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( lineElement );
}
-bool LinePath::loadFromXMI( QDomElement & qElement ) {
- QDomNode node = qElement.firstChild();
- QDomElement startElement = node.toElement();
+bool LinePath::loadFromXMI( TQDomElement & qElement ) {
+ TQDomNode node = qElement.firstChild();
+ TQDomElement startElement = node.toElement();
if( startElement.isNull() || startElement.tagName() != "startpoint" )
return false;
- QString x = startElement.attribute( "startx", "0" );
+ TQString x = startElement.attribute( "startx", "0" );
int nX = x.toInt();
- QString y = startElement.attribute( "starty", "0" );
+ TQString y = startElement.attribute( "starty", "0" );
int nY = y.toInt();
- QPoint startPoint( nX, nY );
+ TQPoint startPoint( nX, nY );
node = startElement.nextSibling();
- QDomElement endElement = node.toElement();
+ TQDomElement endElement = node.toElement();
if( endElement.isNull() || endElement.tagName() != "endpoint" )
return false;
x = endElement.attribute( "endx", "0" );
nX = x.toInt();
y = endElement.attribute( "endy", "0" );
nY = y.toInt();
- QPoint endPoint( nX, nY );
+ TQPoint endPoint( nX, nY );
setStartEndPoints( startPoint, endPoint );
- QPoint point;
+ TQPoint point;
node = endElement.nextSibling();
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
int i = 1;
while( !element.isNull() ) {
if( element.tagName() == "point" ) {
@@ -942,11 +942,11 @@ void LinePath::activate() {
int count = m_LineList.count();
if (count == 0)
return;
- QCanvas * canvas = getCanvas();
+ TQCanvas * canvas = getCanvas();
if (canvas == NULL)
return;
for (int i = 0; i < count ; i++) {
- QCanvasLine *line = m_LineList.at(i);
+ TQCanvasLine *line = m_LineList.at(i);
line -> setCanvas( canvas );
line -> setPen( getPen() );
}
diff --git a/umbrello/umbrello/linepath.h b/umbrello/umbrello/linepath.h
index 434749e3..e2cf73db 100644
--- a/umbrello/umbrello/linepath.h
+++ b/umbrello/umbrello/linepath.h
@@ -11,12 +11,12 @@
#ifndef LINEPATH_H
#define LINEPATH_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qcanvas.h>
-#include <qpainter.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqcanvas.h>
+#include <tqpainter.h>
#include "umlnamespace.h"
/* how many pixels a user could click around a point */
@@ -31,18 +31,18 @@ class QDomDocument;
class QDomElement;
// typedefs
-typedef QPtrList<QCanvasLine> LineList;
-typedef QPtrListIterator<QCanvasLine> LineListIt;
+typedef TQPtrList<TQCanvasLine> LineList;
+typedef TQPtrListIterator<TQCanvasLine> LineListIt;
-typedef QPtrList<QCanvasRectangle> RectList;
-typedef QPtrListIterator<QCanvasRectangle> RectListIt;
+typedef TQPtrList<TQCanvasRectangle> RectList;
+typedef TQPtrListIterator<TQCanvasRectangle> RectListIt;
/**
*@author Paul Hensgen
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class LinePath : public QObject {
+class LinePath : public TQObject {
Q_OBJECT
public:
/**
@@ -83,35 +83,35 @@ public:
/**
* Returns the point at the point index.
*/
- QPoint getPoint( int pointIndex );
+ TQPoint getPoint( int pointIndex );
/**
* Sets the position of an already set point.
*/
- bool setPoint( int pointIndex, const QPoint &point );
+ bool setPoint( int pointIndex, const TQPoint &point );
/**
* Checks, if we are at an end of the segment or somewhere in the middle.
* We use the delta, because with the mouse it is hard to find the
* exactly point.
*/
- bool isPoint( int pointIndex, const QPoint &point, unsigned short delta = 0 );
+ bool isPoint( int pointIndex, const TQPoint &point, unsigned short delta = 0 );
/**
* Inserts a point at the given index.
*/
- bool insertPoint( int pointIndex, const QPoint &point );
+ bool insertPoint( int pointIndex, const TQPoint &point );
/**
* Removes the point on the line given by the index, at the coordinates
* given by point with a fuzzy of delta
*/
- bool removePoint( int pointIndex, const QPoint &point, unsigned short delta = 0 );
+ bool removePoint( int pointIndex, const TQPoint &point, unsigned short delta = 0 );
/**
* Sets the start and end points.
*/
- bool setStartEndPoints( const QPoint &start, const QPoint &end );
+ bool setStartEndPoints( const TQPoint &start, const TQPoint &end );
/**
* Returns the amount of POINTS on the line.
@@ -124,12 +124,12 @@ public:
* else returns the line segment the point is on.
* Use the value to insert points at the point position.
*/
- int onLinePath( const QPoint &position );
+ int onLinePath( const TQPoint &position );
/**
* Sets the canvas to be used.
*/
- void setCanvas( QCanvas * canvas );
+ void setCanvas( TQCanvas * canvas );
/**
* Sets the Association type.
@@ -159,9 +159,9 @@ public:
*/
void setSelected( bool select );
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
/**
* Activates the line list.
@@ -182,12 +182,12 @@ public:
/**
* Returns the type of pen to use depending on the type of Association.
*/
- QPen getPen();
+ TQPen getPen();
/**
* Sets the line color used by the line.
*/
- void setLineColor( const QColor &color );
+ void setLineColor( const TQColor &color );
/**
* Sets the line width used by the line.
*/
@@ -197,20 +197,20 @@ protected:
/**
* Draw a (hollow) circle.
- * We can't use QCanvasEllipse directly for this because it doesn't
- * use the pen, i.e. QCanvasEllipse only draws filled ellipses.
+ * We can't use TQCanvasEllipse directly for this because it doesn't
+ * use the pen, i.e. TQCanvasEllipse only draws filled ellipses.
*/
- class Circle : public QCanvasEllipse {
+ class Circle : public TQCanvasEllipse {
public:
- explicit Circle(QCanvas * canvas, int radius = 0);
+ explicit Circle(TQCanvas * canvas, int radius = 0);
void setRadius(int radius);
int getRadius() const;
void setX(int x);
void setY(int y);
/**
- * The beef: Override method from QCanvasEllipse.
+ * The beef: Override method from TQCanvasEllipse.
*/
- void drawShape(QPainter& p);
+ void drawShape(TQPainter& p);
};
/**
@@ -220,7 +220,7 @@ protected:
* This class doesn't hold this information but is a wrapper
* method to stop calls to undefined variable like m_pAssociation.
*/
- QCanvas * getCanvas();
+ TQCanvas * getCanvas();
/**
* Returns the Association type.
@@ -238,7 +238,7 @@ protected:
* This class doesn't hold this information but is a wrapper
* method to stop calls to undefined variable like m_pAssociation.
*/
- QColor getLineColor();
+ TQColor getLineColor();
/**
* Returns the Line Width to use.
* Returns 0 if association not set.
@@ -332,17 +332,17 @@ protected:
/**
* Contains calculated points used to draw the line head.
*/
- QPointArray m_PointArray;
+ TQPointArray m_PointArray;
/**
* Contains calculated points used to draw the line head.
*/
- QPoint m_ArrowPointA, m_ArrowPointB, m_MidPoint, m_EgdePoint;
+ TQPoint m_ArrowPointA, m_ArrowPointB, m_MidPoint, m_EgdePoint;
/**
* A polygon object to blank out any lines we don't want to see.
*/
- QCanvasPolygon * m_pClearPoly;
+ TQCanvasPolygon * m_pClearPoly;
/**
* The transparent circle required by containment associations.
@@ -353,7 +353,7 @@ protected:
* Contains the calculated points for the parallel line
* on a collaboration message to use.
*/
- QPointArray m_ParallelLines;
+ TQPointArray m_ParallelLines;
/**
* Region where the line docks
diff --git a/umbrello/umbrello/linkwidget.cpp b/umbrello/umbrello/linkwidget.cpp
index b1b176de..508de933 100644
--- a/umbrello/umbrello/linkwidget.cpp
+++ b/umbrello/umbrello/linkwidget.cpp
@@ -33,7 +33,7 @@ UMLClassifier *LinkWidget::getOperationOwner() {
return static_cast<UMLClassifier*>(op->parent());
}
-QString LinkWidget::getOperationText(UMLView *view /* = NULL */) {
+TQString LinkWidget::getOperationText(UMLView *view /* = NULL */) {
UMLOperation *op = getOperation();
if (op == NULL)
return getCustomOpText();
@@ -44,7 +44,7 @@ QString LinkWidget::getOperationText(UMLView *view /* = NULL */) {
sigType = Uml::st_SigNoVis;
else
sigType = Uml::st_NoSigNoVis;
- QString opText = op->toString(sigType);
+ TQString opText = op->toString(sigType);
return opText;
}
diff --git a/umbrello/umbrello/linkwidget.h b/umbrello/umbrello/linkwidget.h
index 0e85d615..310a5248 100644
--- a/umbrello/umbrello/linkwidget.h
+++ b/umbrello/umbrello/linkwidget.h
@@ -12,7 +12,7 @@
#ifndef LINKWIDGET_H
#define LINKWIDGET_H
-#include <qfont.h>
+#include <tqfont.h>
#include "umlnamespace.h"
@@ -45,7 +45,7 @@ public:
*
* @param font Font to be set.
*/
- virtual void lwSetFont(QFont font) = 0;
+ virtual void lwSetFont(TQFont font) = 0;
/**
* Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)
@@ -65,17 +65,17 @@ public:
/**
* Motivated by getOperationText()
*/
- virtual QString getCustomOpText() = 0;
+ virtual TQString getCustomOpText() = 0;
/**
* Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)
*/
- virtual void setCustomOpText(const QString &opText) = 0;
+ virtual void setCustomOpText(const TQString &opText) = 0;
/**
* Uses getOperation() if set, else calls getCustomOpText().
*/
- QString getOperationText(UMLView *view = NULL);
+ TQString getOperationText(UMLView *view = NULL);
/**
* Motivated by FloatingTextWidget::slotMenuSelection(mt_Reset_Label_Positions)
@@ -91,7 +91,7 @@ public:
/**
* Motivated by FloatingTextWidget::handleRename()
*/
- virtual void setText(FloatingTextWidget *ft, const QString &newText) = 0;
+ virtual void setText(FloatingTextWidget *ft, const TQString &newText) = 0;
/**
* Motivated by FloatingTextWidget::mouseDoubleClickEvent()
@@ -102,12 +102,12 @@ public:
/**
* Motivated by FloatingTextWidget::showOpDlg()
*/
- virtual UMLClassifier *getSeqNumAndOp(QString& seqNum, QString& op) = 0;
+ virtual UMLClassifier *getSeqNumAndOp(TQString& seqNum, TQString& op) = 0;
/**
* Motivated by FloatingTextWidget::showOpDlg()
*/
- virtual void setSeqNumAndOp(const QString &seqNum, const QString &op) = 0;
+ virtual void setSeqNumAndOp(const TQString &seqNum, const TQString &op) = 0;
/**
* Abstract operation implemented by inheriting classes.
diff --git a/umbrello/umbrello/listpopupmenu.cpp b/umbrello/umbrello/listpopupmenu.cpp
index 816d661b..d94f8c18 100644
--- a/umbrello/umbrello/listpopupmenu.cpp
+++ b/umbrello/umbrello/listpopupmenu.cpp
@@ -37,14 +37,14 @@
#include "objectwidget.h"
//ListPopupMenu for a UMLView (diagram)
-ListPopupMenu::ListPopupMenu(QWidget *parent, Menu_Type type, UMLView * view)
+ListPopupMenu::ListPopupMenu(TQWidget *parent, Menu_Type type, UMLView * view)
: KPopupMenu(parent) {
init();
setupMenu(type, view);
}
//ListPopupMenu for the tree list view
-ListPopupMenu::ListPopupMenu(QWidget *parent, Uml::ListView_Type type)
+ListPopupMenu::ListPopupMenu(TQWidget *parent, Uml::ListView_Type type)
: KPopupMenu(parent) {
init();
Menu_Type mt = mt_Undefined;
@@ -205,7 +205,7 @@ ListPopupMenu::ListPopupMenu(QWidget *parent, Uml::ListView_Type type)
}
//ListPopupMenu for a canvas widget
-ListPopupMenu::ListPopupMenu(QWidget * parent, UMLWidget * object,
+ListPopupMenu::ListPopupMenu(TQWidget * parent, UMLWidget * object,
bool multi, bool unique)
: KPopupMenu(parent)
{
@@ -249,11 +249,11 @@ ListPopupMenu::ListPopupMenu(QWidget * parent, UMLWidget * object,
}
if(m_pInsert)
- connect(m_pInsert, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pInsert, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pShow)
- connect(m_pShow, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pShow, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pColor)
- connect(m_pColor, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pColor, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
return;
}
@@ -437,11 +437,11 @@ ListPopupMenu::ListPopupMenu(QWidget * parent, UMLWidget * object,
}//end switch
if(m_pInsert)
- connect(m_pInsert, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pInsert, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pShow)
- connect(m_pShow, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pShow, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pColor)
- connect(m_pColor, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pColor, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
bool bCutState = UMLApp::app() -> getCutCopyState();
setItemEnabled( mt_Cut, bCutState );
@@ -621,7 +621,7 @@ void ListPopupMenu::insertContainerItems(bool folderAndDiagrams) {
insertFileNew();
}
-void ListPopupMenu::insertAssocItem(const QString &label, Menu_Type mt) {
+void ListPopupMenu::insertAssocItem(const TQString &label, Menu_Type mt) {
insertItem(label, mt);
insertStdItem(mt_Change_Font);
insertStdItem(mt_Reset_Label_Positions);
@@ -651,7 +651,7 @@ void ListPopupMenu::insertSubmodelAction() {
<< "current->getUMLObject (" << o->getName() << ") is not a Folder" << endl;
return;
}
- QString submodelFile = f->getFolderFile();
+ TQString submodelFile = f->getFolderFile();
if (submodelFile.isEmpty())
insertStdItem(mt_Externalize_Folder);
else
@@ -827,7 +827,7 @@ void ListPopupMenu::setupMenu(Menu_Type type, UMLView* view) {
m_pColor = 0;
KStandardDirs* dirs = KGlobal::dirs();
- QString dataDir = dirs->findResourceDir("data", "umbrello/pics/object.png");
+ TQString dataDir = dirs->findResourceDir("data", "umbrello/pics/object.png");
dataDir += "/umbrello/pics/";
m_pixmap[pm_Class] .load(dataDir+"class.png", "PNG");
m_pixmap[pm_Package] .load(dataDir+"package.png", "PNG");
@@ -1321,11 +1321,11 @@ void ListPopupMenu::setupMenu(Menu_Type type, UMLView* view) {
setItemEnabled( mt_Paste, UMLApp::app() -> getPasteState() );
}
if(m_pInsert)
- connect(m_pInsert, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pInsert, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pShow)
- connect(m_pShow, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pShow, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pColor)
- connect(m_pColor, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pColor, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
}
void ListPopupMenu::setupDiagramMenu(UMLView* view) {
diff --git a/umbrello/umbrello/listpopupmenu.h b/umbrello/umbrello/listpopupmenu.h
index 58d779ab..e7030090 100644
--- a/umbrello/umbrello/listpopupmenu.h
+++ b/umbrello/umbrello/listpopupmenu.h
@@ -191,7 +191,7 @@ public:
* @param type The type of menu to display.
* @param view The UMLView in which this ListPopupMenu is going to be displayed
*/
- explicit ListPopupMenu(QWidget* parent, Menu_Type type = mt_Undefined, UMLView* view = 0);
+ explicit ListPopupMenu(TQWidget* parent, Menu_Type type = mt_Undefined, UMLView* view = 0);
/**
* Constructs the popup menu for a list view item.
@@ -199,7 +199,7 @@ public:
* @param parent The parent to ListPopupMenu.
* @param type The type of menu to display.
*/
- ListPopupMenu(QWidget* parent, Uml::ListView_Type type);
+ ListPopupMenu(TQWidget* parent, Uml::ListView_Type type);
/**
* Constructs the popup menu for a canvas widget.
@@ -210,7 +210,7 @@ public:
* @param unique True if multiple selected items all have
* the same type (e.g. Class, Interface)
*/
- ListPopupMenu(QWidget* parent, UMLWidget* object, bool multi = false, bool unique = false);
+ ListPopupMenu(TQWidget* parent, UMLWidget* object, bool multi = false, bool unique = false);
/**
* Standard deconstructor.
@@ -273,7 +273,7 @@ private:
* @param label The menu text.
* @param mt The menu type.
*/
- void insertAssocItem(const QString &label, Menu_Type mt);
+ void insertAssocItem(const TQString &label, Menu_Type mt);
/**
* Inserts a menu item for externalization/de-externalization
@@ -320,7 +320,7 @@ private:
pm_Subsystem,
pm_NUMBER_OF_PIXMAPS
};
- QPixmap m_pixmap[pm_NUMBER_OF_PIXMAPS];
+ TQPixmap m_pixmap[pm_NUMBER_OF_PIXMAPS];
KPopupMenu * m_pInsert, * m_pShow, * m_pColor;
void setupColor(bool fc);
void setupColorSelection(bool fc);
diff --git a/umbrello/umbrello/main.cpp b/umbrello/umbrello/main.cpp
index faba82d3..5d104d4f 100644
--- a/umbrello/umbrello/main.cpp
+++ b/umbrello/umbrello/main.cpp
@@ -161,7 +161,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI) {
#endif
KWin::setState(startLogo->winId(), NET::KeepAbove);
startLogo->show();
- QApplication::flushX();
+ TQApplication::flushX();
}
return startLogo;
@@ -173,7 +173,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg) {
} else {
cfg->setGroup( "General Options" );
bool last = cfg->readBoolEntry( "loadlast", false );
- QString file = cfg->readPathEntry( "lastFile" );
+ TQString file = cfg->readPathEntry( "lastFile" );
if( last && !file.isEmpty() ) {
UMLApp::app()->openDocumentFile( KURL( file ) );
} else {
@@ -183,7 +183,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg) {
}
void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt) {
- QString extension(exportOpt.last());
+ TQString extension(exportOpt.last());
kDebug() << "extension: " << extension << endl;
// export to the specified directory, or the directory where the file is saved
diff --git a/umbrello/umbrello/messagewidget.cpp b/umbrello/umbrello/messagewidget.cpp
index 3cefc99d..1139b58c 100644
--- a/umbrello/umbrello/messagewidget.cpp
+++ b/umbrello/umbrello/messagewidget.cpp
@@ -13,7 +13,7 @@
#include "messagewidget.h"
//qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
//kde includes
#include <kdebug.h>
#include <kcursor.h>
@@ -78,7 +78,7 @@ void MessageWidget::updateResizability() {
UMLWidget::m_bResizable = false;
}
-void MessageWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::draw(TQPainter& p, int offsetX, int offsetY) {
if(!m_pOw[Uml::A] || !m_pOw[Uml::B]) {
return;
}
@@ -94,18 +94,18 @@ void MessageWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-void MessageWidget::drawSolidArrowhead(QPainter& p, int x, int y, Qt::ArrowType direction) {
+void MessageWidget::drawSolidArrowhead(TQPainter& p, int x, int y, Qt::ArrowType direction) {
int arrowheadExtentX = 4;
if (direction == Qt::RightArrow) {
arrowheadExtentX = -arrowheadExtentX;
}
- QPointArray points;
+ TQPointArray points;
points.putPoints(0, 3, x, y, x + arrowheadExtentX, y - 3, x + arrowheadExtentX, y + 3);
- p.setBrush( QBrush(p.pen().color()) );
+ p.setBrush( TQBrush(p.pen().color()) );
p.drawPolygon(points);
}
-void MessageWidget::drawArrow(QPainter& p, int x, int y, int w,
+void MessageWidget::drawArrow(TQPainter& p, int x, int y, int w,
Qt::ArrowType direction, bool useDottedLine /* = false */) {
int arrowheadStartX = x;
int arrowheadExtentX = 4;
@@ -119,14 +119,14 @@ void MessageWidget::drawArrow(QPainter& p, int x, int y, int w,
p.drawLine(arrowheadStartX, y, arrowheadStartX + arrowheadExtentX, y + 3);
// draw arrow line
if (useDottedLine) {
- QPen pen = p.pen();
+ TQPen pen = p.pen();
pen.setStyle(Qt::DotLine);
p.setPen(pen);
}
p.drawLine(x, y, x + w, y);
}
-void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::drawSynchronous(TQPainter& p, int offsetX, int offsetY) {
int x1 = m_pOw[Uml::A]->getX();
int x2 = m_pOw[Uml::B]->getX();
int w = getWidth() - 1;
@@ -135,7 +135,7 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
bool messageOverlaps = m_pOw[Uml::A] -> messageOverlap( getY(), this );
if(m_pOw[Uml::A] == m_pOw[Uml::B]) {
- p.fillRect( offsetX, offsetY, 17, h, QBrush(Qt::white) ); //box
+ p.fillRect( offsetX, offsetY, 17, h, TQBrush(Qt::white) ); //box
p.drawRect(offsetX, offsetY, 17, h); //box
offsetX += 17;
w -= 17;
@@ -154,9 +154,9 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
offsetX += 8;
w -= 8;
}
- QPen pen = p.pen();
+ TQPen pen = p.pen();
int startX = offsetX + w - 16;
- p.fillRect(startX, offsetY, 17, h, QBrush(Qt::white)); //box
+ p.fillRect(startX, offsetY, 17, h, TQBrush(Qt::white)); //box
p.drawRect(startX, offsetY, 17, h); //box
p.drawLine(offsetX, offsetY + 4, startX, offsetY + 4); //arrow line
drawSolidArrowhead(p, startX - 1, offsetY + 4, Qt::RightArrow);
@@ -168,8 +168,8 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
if (messageOverlaps) {
w -=8;
}
- QPen pen = p.pen();
- p.fillRect( offsetX, offsetY, 17, h, QBrush(Qt::white) ); //box
+ TQPen pen = p.pen();
+ p.fillRect( offsetX, offsetY, 17, h, TQBrush(Qt::white) ); //box
p.drawRect(offsetX, offsetY, 17, h); //box
p.drawLine(offsetX + 18, offsetY + 4, offsetX + w, offsetY + 4); //arrow line
drawSolidArrowhead(p, offsetX + 17, offsetY + 4, Qt::LeftArrow);
@@ -181,7 +181,7 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
}
}
-void MessageWidget::drawAsynchronous(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::drawAsynchronous(TQPainter& p, int offsetX, int offsetY) {
int x1 = m_pOw[Uml::A]->getX();
int x2 = m_pOw[Uml::B]->getX();
int w = getWidth() - 1;
@@ -224,7 +224,7 @@ void MessageWidget::drawAsynchronous(QPainter& p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-void MessageWidget::drawCreation(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::drawCreation(TQPainter& p, int offsetX, int offsetY) {
int x1 = m_pOw[Uml::A]->getX();
int x2 = m_pOw[Uml::B]->getX();
int w = getWidth() - 1;
@@ -253,7 +253,7 @@ void MessageWidget::drawCreation(QPainter& p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-int MessageWidget::onWidget(const QPoint & p) {
+int MessageWidget::onWidget(const TQPoint & p) {
if (m_sequenceMessageType != Uml::sequence_message_synchronous) {
return UMLWidget::onWidget(p);
}
@@ -331,7 +331,7 @@ void MessageWidget::setLinkAndTextPos() {
setTextPosition();
}
-void MessageWidget::moveEvent(QMoveEvent* /*m*/) {
+void MessageWidget::moveEvent(TQMoveEvent* /*m*/) {
//kDebug() << "MessageWidget::moveEvent: m_pFText is " << m_pFText << endl;
if (!m_pFText) {
return;
@@ -346,7 +346,7 @@ void MessageWidget::moveEvent(QMoveEvent* /*m*/) {
emit sigMessageMoved();
}
-void MessageWidget::resizeEvent(QResizeEvent* /*re*/) {
+void MessageWidget::resizeEvent(TQResizeEvent* /*re*/) {
}
void MessageWidget::calculateWidget() {
@@ -447,7 +447,7 @@ bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) {
if (op) {
// If the UMLOperation is set, m_CustomOp isn't used anyway.
// Just setting it empty for the sake of sanity.
- m_CustomOp = QString::null;
+ m_CustomOp = TQString::null;
}
}
@@ -463,14 +463,14 @@ bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) {
setLinkAndTextPos();
m_pFText -> setText("");
m_pFText->setActivated();
- QString messageText = m_pFText->getText();
+ TQString messageText = m_pFText->getText();
m_pFText->setVisible( messageText.length() > 1 );
- connect(m_pOw[Uml::A], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
- connect(m_pOw[Uml::B], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
+ connect(m_pOw[Uml::A], TQT_SIGNAL(sigWidgetMoved(Uml::IDType)), this, TQT_SLOT(slotWidgetMoved(Uml::IDType)));
+ connect(m_pOw[Uml::B], TQT_SIGNAL(sigWidgetMoved(Uml::IDType)), this, TQT_SLOT(slotWidgetMoved(Uml::IDType)));
- connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::A], SLOT(slotMessageMoved()) );
- connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::B], SLOT(slotMessageMoved()) );
+ connect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::A], TQT_SLOT(slotMessageMoved()) );
+ connect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::B], TQT_SLOT(slotMessageMoved()) );
m_pOw[Uml::A] -> messageAdded(this);
m_pOw[Uml::B] -> messageAdded(this);
calculateDimensions();
@@ -482,30 +482,30 @@ bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) {
void MessageWidget::setMessageText(FloatingTextWidget *ft) {
if (ft == NULL)
return;
- QString displayText = m_SequenceNumber + ": " + getOperationText(m_pView);
+ TQString displayText = m_SequenceNumber + ": " + getOperationText(m_pView);
ft->setText(displayText);
setTextPosition();
}
-void MessageWidget::setText(FloatingTextWidget *ft, const QString &newText) {
+void MessageWidget::setText(FloatingTextWidget *ft, const TQString &newText) {
ft->setText(newText);
UMLApp::app()->getDocument()->setModified(true);
}
-void MessageWidget::setSeqNumAndOp(const QString &seqNum, const QString &op) {
+void MessageWidget::setSeqNumAndOp(const TQString &seqNum, const TQString &op) {
setSequenceNumber( seqNum );
m_CustomOp = op; ///FIXME m_pOperation
}
-void MessageWidget::setSequenceNumber( const QString &sequenceNumber ) {
+void MessageWidget::setSequenceNumber( const TQString &sequenceNumber ) {
m_SequenceNumber = sequenceNumber;
}
-QString MessageWidget::getSequenceNumber() const {
+TQString MessageWidget::getSequenceNumber() const {
return m_SequenceNumber;
}
-void MessageWidget::lwSetFont (QFont font) {
+void MessageWidget::lwSetFont (TQFont font) {
UMLWidget::setFont( font );
}
@@ -523,22 +523,22 @@ UMLOperation *MessageWidget::getOperation() {
void MessageWidget::setOperation(UMLOperation *op) {
if (m_pObject && m_pFText)
- disconnect(m_pObject, SIGNAL(modified()), m_pFText, SLOT(setMessageText()));
+ disconnect(m_pObject, TQT_SIGNAL(modified()), m_pFText, TQT_SLOT(setMessageText()));
m_pObject = op;
if (m_pObject && m_pFText)
- connect(m_pObject, SIGNAL(modified()), m_pFText, SLOT(setMessageText()));
+ connect(m_pObject, TQT_SIGNAL(modified()), m_pFText, TQT_SLOT(setMessageText()));
}
-QString MessageWidget::getCustomOpText() {
+TQString MessageWidget::getCustomOpText() {
return m_CustomOp;
}
-void MessageWidget::setCustomOpText(const QString &opText) {
+void MessageWidget::setCustomOpText(const TQString &opText) {
m_CustomOp = opText;
m_pFText->setMessageText();
}
-UMLClassifier * MessageWidget::getSeqNumAndOp(QString& seqNum, QString& op) {
+UMLClassifier * MessageWidget::getSeqNumAndOp(TQString& seqNum, TQString& op) {
seqNum = m_SequenceNumber;
UMLOperation *pOperation = getOperation();
if (pOperation != NULL) {
@@ -661,11 +661,11 @@ void MessageWidget::calculateDimensionsCreation() {
void MessageWidget::cleanup() {
if (m_pOw[Uml::A]) {
- disconnect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::A], SLOT(slotMessageMoved()) );
+ disconnect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::A], TQT_SLOT(slotMessageMoved()) );
m_pOw[Uml::A]->messageRemoved(this);
}
if (m_pOw[Uml::B]) {
- disconnect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::B], SLOT(slotMessageMoved()) );
+ disconnect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::B], TQT_SLOT(slotMessageMoved()) );
m_pOw[Uml::B]->messageRemoved(this);
}
@@ -727,8 +727,8 @@ ObjectWidget* MessageWidget::getWidget(Uml::Role_Type role) {
return m_pOw[role];
}
-void MessageWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement messageElement = qDoc.createElement( "messagewidget" );
+void MessageWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement messageElement = qDoc.createElement( "messagewidget" );
UMLWidget::saveToXMI( qDoc, messageElement );
messageElement.setAttribute( "widgetaid", ID2STR(m_pOw[Uml::A]->getLocalID()) );
messageElement.setAttribute( "widgetbid", ID2STR(m_pOw[Uml::B]->getLocalID()) );
@@ -749,16 +749,16 @@ void MessageWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( messageElement );
}
-bool MessageWidget::loadFromXMI(QDomElement& qElement) {
+bool MessageWidget::loadFromXMI(TQDomElement& qElement) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
- QString textid = qElement.attribute( "textid", "-1" );
- QString widgetaid = qElement.attribute( "widgetaid", "-1" );
- QString widgetbid = qElement.attribute( "widgetbid", "-1" );
+ TQString textid = qElement.attribute( "textid", "-1" );
+ TQString widgetaid = qElement.attribute( "widgetaid", "-1" );
+ TQString widgetbid = qElement.attribute( "widgetbid", "-1" );
m_CustomOp = qElement.attribute( "operation", "" );
m_SequenceNumber = qElement.attribute( "seqnum", "" );
- QString sequenceMessageType = qElement.attribute( "sequencemessagetype", "1001" );
+ TQString sequenceMessageType = qElement.attribute( "sequencemessagetype", "1001" );
m_sequenceMessageType = (Uml::Sequence_Message_Type)sequenceMessageType.toInt();
m_widgetAId = STR2ID(widgetaid);
@@ -770,10 +770,10 @@ bool MessageWidget::loadFromXMI(QDomElement& qElement) {
tr = Uml::tr_Seq_Message_Self;
//now load child elements
- QDomNode node = qElement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tag == "floatingtext") {
m_pFText = new FloatingTextWidget( m_pView, tr, getOperationText(m_pView), m_textId );
if( ! m_pFText->loadFromXMI(element) ) {
diff --git a/umbrello/umbrello/messagewidget.h b/umbrello/umbrello/messagewidget.h
index 66f2f639..29383405 100644
--- a/umbrello/umbrello/messagewidget.h
+++ b/umbrello/umbrello/messagewidget.h
@@ -78,14 +78,14 @@ public:
virtual ~MessageWidget();
/**
- * Write property of QString m_SequenceNumber.
+ * Write property of TQString m_SequenceNumber.
*/
- void setSequenceNumber( const QString &sequenceNumber );
+ void setSequenceNumber( const TQString &sequenceNumber );
/**
- * Read property of QString m_SequenceNumber.
+ * Read property of TQString m_SequenceNumber.
*/
- QString getSequenceNumber() const;
+ TQString getSequenceNumber() const;
/**
* Returns whether the message is synchronous or asynchronous
@@ -139,7 +139,7 @@ public:
* Implements operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void lwSetFont (QFont font);
+ void lwSetFont (TQFont font);
/**
* Overrides operation from LinkWidget.
@@ -164,13 +164,13 @@ public:
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- QString getCustomOpText();
+ TQString getCustomOpText();
/**
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void setCustomOpText(const QString &opText);
+ void setCustomOpText(const TQString &opText);
/**
* Overrides operation from LinkWidget.
@@ -187,7 +187,7 @@ public:
* @param ft The text widget which to update.
* @param newText The new text to set.
*/
- void setText(FloatingTextWidget *ft, const QString &newText);
+ void setText(FloatingTextWidget *ft, const TQString &newText);
/**
* Overrides operation from LinkWidget.
@@ -196,7 +196,7 @@ public:
* @param seqNum The new sequence number string to set.
* @param op The new operation string to set.
*/
- void setSeqNumAndOp(const QString &seqNum, const QString &op);
+ void setSeqNumAndOp(const TQString &seqNum, const TQString &op);
/**
* Overrides operation from LinkWidget.
@@ -205,7 +205,7 @@ public:
* @param seqNum Return this MessageWidget's sequence number string.
* @param op Return this MessageWidget's operation string.
*/
- UMLClassifier * getSeqNumAndOp(QString& seqNum, QString& op);
+ UMLClassifier * getSeqNumAndOp(TQString& seqNum, TQString& op);
/**
* Calculate the geometry of the widget.
@@ -244,26 +244,26 @@ public:
/**
* Calls drawSynchronous() or drawAsynchronous()
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Draws the calling arrow with filled in arrowhead, the
* timeline box and the returning arrow with a dashed line and
* stick arrowhead.
*/
- void drawSynchronous(QPainter& p, int offsetX, int offsetY);
+ void drawSynchronous(TQPainter& p, int offsetX, int offsetY);
/**
* Draws a solid arrow line and a stick arrow head.
*/
- void drawAsynchronous(QPainter& p, int offsetX, int offsetY);
+ void drawAsynchronous(TQPainter& p, int offsetX, int offsetY);
/**
* Draws a solid arrow line and a stick arrow head to the
* edge of the target object widget instead of to the
* sequence line.
*/
- void drawCreation(QPainter& p, int offsetX, int offsetY);
+ void drawCreation(TQPainter& p, int offsetX, int offsetY);
/**
* Sets the text position relative to the sequence message.
@@ -319,17 +319,17 @@ public:
* between call line and return line does not count, i.e. if
* the point is located in that space the function returns 0.
*/
- int onWidget(const QPoint & p);
+ int onWidget(const TQPoint & p);
/**
* Saves to the "messagewidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads from the "messagewidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
protected:
/**
@@ -350,14 +350,14 @@ protected:
* like so: --->
* The direction can be either Qt::LeftArrow or Qt::RightArrow.
*/
- static void drawArrow( QPainter& p, int x, int y, int w,
+ static void drawArrow( TQPainter& p, int x, int y, int w,
Qt::ArrowType direction, bool useDottedLine = false );
/**
* Draw a solid (triangular) arrowhead pointing in the given direction.
* The direction can be either Qt::LeftArrow or Qt::RightArrow.
*/
- static void drawSolidArrowhead(QPainter& p, int x, int y, Qt::ArrowType direction);
+ static void drawSolidArrowhead(TQPainter& p, int x, int y, Qt::ArrowType direction);
/**
* Update the UMLWidget::m_bResizable flag according to the
@@ -366,16 +366,16 @@ protected:
void updateResizability();
// Data loaded/saved
- QString m_SequenceNumber;
- QString m_CustomOp;
+ TQString m_SequenceNumber;
+ TQString m_CustomOp;
/**
* Whether the message is synchronous or asynchronous
*/
Uml::Sequence_Message_Type m_sequenceMessageType;
private:
- void moveEvent(QMoveEvent */*m*/);
- void resizeEvent(QResizeEvent */*re*/);
+ void moveEvent(TQMoveEvent */*m*/);
+ void resizeEvent(TQResizeEvent */*re*/);
ObjectWidget * m_pOw[2];
FloatingTextWidget * m_pFText;
diff --git a/umbrello/umbrello/messagewidgetcontroller.cpp b/umbrello/umbrello/messagewidgetcontroller.cpp
index 8ffac822..dfe6a804 100644
--- a/umbrello/umbrello/messagewidgetcontroller.cpp
+++ b/umbrello/umbrello/messagewidgetcontroller.cpp
@@ -31,13 +31,13 @@ MessageWidgetController::MessageWidgetController(MessageWidget* messageWidget):
MessageWidgetController::~MessageWidgetController() {
}
-void MessageWidgetController::saveWidgetValues(QMouseEvent *me) {
+void MessageWidgetController::saveWidgetValues(TQMouseEvent *me) {
UMLWidgetController::saveWidgetValues(me);
m_unconstrainedPositionY = m_widget->getY();
}
-QCursor MessageWidgetController::getResizeCursor() {
+TQCursor MessageWidgetController::getResizeCursor() {
return KCursor::sizeVerCursor();
}
@@ -73,7 +73,7 @@ void MessageWidgetController::constrainMovementForAllWidgets(int &diffX, int &di
diffY = constrainPositionY(diffY) - m_widget->getY();
}
-void MessageWidgetController::doMouseDoubleClick(QMouseEvent *me) {
+void MessageWidgetController::doMouseDoubleClick(TQMouseEvent *me) {
if (m_messageWidget->m_pFText != NULL) {
m_messageWidget->m_pFText->slotMenuSelection(ListPopupMenu::mt_Select_Operation);
}
diff --git a/umbrello/umbrello/messagewidgetcontroller.h b/umbrello/umbrello/messagewidgetcontroller.h
index 921fd2bf..a691f465 100644
--- a/umbrello/umbrello/messagewidgetcontroller.h
+++ b/umbrello/umbrello/messagewidgetcontroller.h
@@ -66,9 +66,9 @@ protected:
* Saves the values of the widget needed for move/resize.
* Calls parent method and then saves the value of m_unconstrainedPositionY
*
- * @param me The QMouseEvent to get the offset from.
+ * @param me The TQMouseEvent to get the offset from.
*/
- virtual void saveWidgetValues(QMouseEvent *me);
+ virtual void saveWidgetValues(TQMouseEvent *me);
/**
* Overriden from UMLWidgetController.
@@ -77,7 +77,7 @@ protected:
*
* @return The cursor to be shown when resizing the widget.
*/
- virtual QCursor getResizeCursor();
+ virtual TQCursor getResizeCursor();
/**
* Overriden from UMLWidgetController.
@@ -122,9 +122,9 @@ protected:
* Executes the action for double click in the widget.
* Shows the dialog to select the operation of the message.
*
- * @param me The QMouseEvent which triggered the double click event.
+ * @param me The TQMouseEvent which triggered the double click event.
*/
- virtual void doMouseDoubleClick(QMouseEvent *me);
+ virtual void doMouseDoubleClick(TQMouseEvent *me);
private:
diff --git a/umbrello/umbrello/messagewidgetlist.h b/umbrello/umbrello/messagewidgetlist.h
index 559a4cf7..e171384b 100644
--- a/umbrello/umbrello/messagewidgetlist.h
+++ b/umbrello/umbrello/messagewidgetlist.h
@@ -12,11 +12,11 @@
#ifndef MESSAGEWIDGETLIST_H
#define MESSAGEWIDGETLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class MessageWidget;
-typedef QPtrList<MessageWidget> MessageWidgetList;
-typedef QPtrListIterator<MessageWidget> MessageWidgetListIt;
+typedef TQPtrList<MessageWidget> MessageWidgetList;
+typedef TQPtrListIterator<MessageWidget> MessageWidgetListIt;
#endif
diff --git a/umbrello/umbrello/model_utils.cpp b/umbrello/umbrello/model_utils.cpp
index 89e1cf33..f120a80c 100644
--- a/umbrello/umbrello/model_utils.cpp
+++ b/umbrello/umbrello/model_utils.cpp
@@ -13,8 +13,8 @@
#include "model_utils.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <klocale.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -101,12 +101,12 @@ UMLObject * findObjectInList(Uml::IDType id, const UMLObjectList& inList) {
}
UMLObject* findUMLObject(const UMLObjectList& inList,
- const QString& inName,
+ const TQString& inName,
Uml::Object_Type type /* = ot_UMLObject */,
UMLObject *currentObj /* = NULL */) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
- QString name = inName;
- QStringList components;
+ TQString name = inName;
+ TQStringList components;
#ifdef TRY_BUGFIX_120682
// If we have a pointer or a reference in cpp we need to remove
// the asterisks and ampersands in order to find the appropriate object
@@ -117,11 +117,11 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
name.remove("&");
}
#endif
- QString nameWithoutFirstPrefix;
+ TQString nameWithoutFirstPrefix;
if (name.contains("::"))
- components = QStringList::split("::", name);
+ components = TQStringList::split("::", name);
else if (name.contains("."))
- components = QStringList::split(".", name);
+ components = TQStringList::split(".", name);
if (components.size() > 1) {
name = components.front();
components.pop_front();
@@ -235,8 +235,8 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
return NULL;
}
-QString uniqObjectName(Uml::Object_Type type, UMLPackage *parentPkg, QString prefix) {
- QString currentName = prefix;
+TQString uniqObjectName(Uml::Object_Type type, UMLPackage *parentPkg, TQString prefix) {
+ TQString currentName = prefix;
if (currentName.isEmpty()) {
if(type == Uml::ot_Class)
currentName = i18n("new_class");
@@ -270,14 +270,14 @@ QString uniqObjectName(Uml::Object_Type type, UMLPackage *parentPkg, QString pre
}
}
UMLDoc *doc = UMLApp::app()->getDocument();
- QString name = currentName;
+ TQString name = currentName;
for (int number = 1; !doc->isUnique(name, parentPkg); number++) {
- name = currentName + '_' + QString::number(number);
+ name = currentName + '_' + TQString::number(number);
}
return name;
}
-bool isCommonXMIAttribute( const QString &tag ) {
+bool isCommonXMIAttribute( const TQString &tag ) {
bool retval = (Uml::tagEq(tag, "name") ||
Uml::tagEq(tag, "visibility") ||
Uml::tagEq(tag, "isRoot") ||
@@ -296,14 +296,14 @@ bool isCommonXMIAttribute( const QString &tag ) {
return retval;
}
-bool isCommonDataType(QString type) {
+bool isCommonDataType(TQString type) {
CodeGenerator *gen = UMLApp::app()->getGenerator();
if (gen == NULL)
return false;
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
- QStringList dataTypes = gen->defaultDatatypes();
- QStringList::Iterator end(dataTypes.end());
- for (QStringList::Iterator it = dataTypes.begin(); it != end; ++it) {
+ TQStringList dataTypes = gen->defaultDatatypes();
+ TQStringList::Iterator end(dataTypes.end());
+ for (TQStringList::Iterator it = dataTypes.begin(); it != end; ++it) {
if (caseSensitive) {
if (type == *it)
return true;
@@ -389,12 +389,12 @@ Uml::Model_Type guessContainer(UMLObject *o) {
return mt;
}
-int stringToDirection(QString input, Uml::Parameter_Direction & result) {
- QRegExp dirx("^(in|out|inout)");
+int stringToDirection(TQString input, Uml::Parameter_Direction & result) {
+ TQRegExp dirx("^(in|out|inout)");
int pos = dirx.search(input);
if (pos == -1)
return 0;
- const QString& dirStr = dirx.capturedTexts().first();
+ const TQString& dirStr = dirx.capturedTexts().first();
uint dirLen = dirStr.length();
if (input.length() > dirLen && !input[dirLen].isSpace())
return 0; // no match after all.
@@ -407,7 +407,7 @@ int stringToDirection(QString input, Uml::Parameter_Direction & result) {
return dirLen;
}
-Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningScope) {
+Parse_Status parseTemplate(TQString t, NameAndType& nmTp, UMLClassifier *owningScope) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
@@ -415,7 +415,7 @@ Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningSc
if (t.isEmpty())
return PS_Empty;
- QStringList nameAndType = QStringList::split( QRegExp("\\s*:\\s*"), t);
+ TQStringList nameAndType = TQStringList::split( TQRegExp("\\s*:\\s*"), t);
if (nameAndType.count() == 2) {
UMLObject *pType = NULL;
if (nameAndType[1] != "class") {
@@ -430,7 +430,7 @@ Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningSc
return PS_OK;
}
-Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningScope,
+Parse_Status parseAttribute(TQString a, NameAndType& nmTp, UMLClassifier *owningScope,
Uml::Visibility *vis /* = 0 */) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
@@ -443,15 +443,15 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
nmTp = NameAndType(a, NULL);
return PS_OK;
}
- QString name = a.left(colonPos).stripWhiteSpace();
+ TQString name = a.left(colonPos).stripWhiteSpace();
if (vis) {
- QRegExp mnemonicVis("^([\\+\\#\\-\\~] *)");
+ TQRegExp mnemonicVis("^([\\+\\#\\-\\~] *)");
int pos = mnemonicVis.search(name);
if (pos == -1) {
*vis = Uml::Visibility::Private; // default value
} else {
- QString caption = mnemonicVis.cap(1);
- QString strVis = caption.left(1);
+ TQString caption = mnemonicVis.cap(1);
+ TQString strVis = caption.left(1);
if (strVis == "+")
*vis = Uml::Visibility::Public;
else if (strVis == "#")
@@ -479,14 +479,14 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
nmTp = NameAndType(name, NULL, pd);
return PS_OK;
}
- QStringList typeAndInitialValue = QStringList::split( QRegExp("\\s*=\\s*"), a );
- const QString &type = typeAndInitialValue[0];
+ TQStringList typeAndInitialValue = TQStringList::split( TQRegExp("\\s*=\\s*"), a );
+ const TQString &type = typeAndInitialValue[0];
UMLObject *pType = pDoc->findUMLObject(type, Uml::ot_UMLObject, owningScope);
if (pType == NULL) {
nmTp = NameAndType(name, NULL, pd);
return PS_Unknown_ArgType;
}
- QString initialValue;
+ TQString initialValue;
if (typeAndInitialValue.count() == 2) {
initialValue = typeAndInitialValue[1];
}
@@ -494,33 +494,33 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
return PS_OK;
}
-Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owningScope) {
+Parse_Status parseOperation(TQString m, OpDescriptor& desc, UMLClassifier *owningScope) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
m = m.simplifyWhiteSpace();
if (m.isEmpty())
return PS_Empty;
- if (m.contains(QRegExp("operator *()"))) {
+ if (m.contains(TQRegExp("operator *()"))) {
// C++ special case: two sets of parentheses
desc.m_name = "operator()";
- m.remove(QRegExp("operator *()"));
+ m.remove(TQRegExp("operator *()"));
} else {
/**
* The search pattern includes everything up to the opening parenthesis
* because UML also permits non programming-language oriented designs
* using narrative names, for example "check water temperature".
*/
- QRegExp beginningUpToOpenParenth( "^([^\\(]+)" );
+ TQRegExp beginningUpToOpenParenth( "^([^\\(]+)" );
int pos = beginningUpToOpenParenth.search(m);
if (pos == -1)
return PS_Illegal_MethodName;
desc.m_name = beginningUpToOpenParenth.cap(1);
}
desc.m_pReturnType = NULL;
- QRegExp pat = QRegExp("\\) *:(.*)$");
+ TQRegExp pat = TQRegExp("\\) *:(.*)$");
int pos = pat.search(m);
if (pos != -1) { // return type is optional
- QString retType = pat.cap(1);
+ TQString retType = pat.cap(1);
retType = retType.stripWhiteSpace();
if (retType != "void") {
UMLObject *pRetType = owningScope->findTemplate(retType);
@@ -533,18 +533,18 @@ Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owning
}
}
// Remove possible empty parentheses ()
- m.remove( QRegExp("\\s*\\(\\s*\\)") );
+ m.remove( TQRegExp("\\s*\\(\\s*\\)") );
desc.m_args.clear();
- pat = QRegExp( "\\((.*)\\)" );
+ pat = TQRegExp( "\\((.*)\\)" );
pos = pat.search(m);
if (pos == -1) // argument list is optional
return PS_OK;
- QString arglist = pat.cap(1);
+ TQString arglist = pat.cap(1);
arglist = arglist.stripWhiteSpace();
if (arglist.isEmpty())
return PS_OK;
- QStringList args = QStringList::split( QRegExp("\\s*,\\s*"), arglist);
- for (QStringList::Iterator lit = args.begin(); lit != args.end(); ++lit) {
+ TQStringList args = TQStringList::split( TQRegExp("\\s*,\\s*"), arglist);
+ for (TQStringList::Iterator lit = args.begin(); lit != args.end(); ++lit) {
NameAndType nmTp;
Parse_Status ps = parseAttribute(*lit, nmTp, owningScope);
if (ps)
@@ -554,8 +554,8 @@ Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owning
return PS_OK;
}
-QString psText(Parse_Status value) {
- const QString text[] = {
+TQString psText(Parse_Status value) {
+ const TQString text[] = {
i18n("OK"), i18n("Empty"), i18n("Malformed argument"),
i18n("Unknown argument type"), i18n("Illegal method name"),
i18n("Unknown return type"), i18n("Unspecified error")
@@ -563,7 +563,7 @@ QString psText(Parse_Status value) {
return text[(unsigned) value];
}
-QString progLangToString(Uml::Programming_Language pl) {
+TQString progLangToString(Uml::Programming_Language pl) {
switch (pl) {
case Uml::pl_ActionScript:
return "ActionScript";
@@ -602,10 +602,10 @@ QString progLangToString(Uml::Programming_Language pl) {
default:
break;
}
- return QString::null;
+ return TQString::null;
}
-Uml::Programming_Language stringToProgLang(QString str) {
+Uml::Programming_Language stringToProgLang(TQString str) {
if (str == "ActionScript")
return Uml::pl_ActionScript;
if (str == "Ada")
diff --git a/umbrello/umbrello/model_utils.h b/umbrello/umbrello/model_utils.h
index 3fa19afb..9e1468c0 100644
--- a/umbrello/umbrello/model_utils.h
+++ b/umbrello/umbrello/model_utils.h
@@ -12,8 +12,8 @@
#ifndef MODEL_UTILS_H
#define MODEL_UTILS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "umlnamespace.h"
#include "umlobjectlist.h"
@@ -66,7 +66,7 @@ UMLObject * findObjectInList(Uml::IDType id, const UMLObjectList& inList);
* @return Pointer to the UMLObject found, or NULL if not found.
*/
UMLObject* findUMLObject( const UMLObjectList& inList,
- const QString& name,
+ const TQString& name,
Uml::Object_Type type = Uml::ot_UMLObject,
UMLObject *currentObj = NULL);
@@ -80,9 +80,9 @@ UMLObject* findUMLObject( const UMLObjectList& inList,
* If no prefix is given then a type related
* prefix will be chosen internally.
*/
-QString uniqObjectName(Uml::Object_Type type,
+TQString uniqObjectName(Uml::Object_Type type,
UMLPackage *parentPkg,
- QString prefix = QString::null);
+ TQString prefix = TQString::null);
/**
* Return true if the given tag is a one of the common XMI
@@ -90,14 +90,14 @@ QString uniqObjectName(Uml::Object_Type type,
* "name" | "visibility" | "isRoot" | "isLeaf" | "isAbstract" |
* "isActive" | "ownerScope"
*/
-bool isCommonXMIAttribute(const QString &tag);
+bool isCommonXMIAttribute(const TQString &tag);
/**
* Return true if the given type is common among the majority
* of programming languages, such as "bool" or "boolean".
* TODO: Make this depend on the active programming language.
*/
-bool isCommonDataType(QString type);
+bool isCommonDataType(TQString type);
/**
* Return true if the given object type is a classifier list item type.
@@ -221,17 +221,17 @@ Uml::Model_Type guessContainer(UMLObject *o);
* @return Length of the string matched, excluding the optional
* whitespace.
*/
-int stringToDirection(QString input, Uml::Parameter_Direction & result);
+int stringToDirection(TQString input, Uml::Parameter_Direction & result);
/**
* Return string corresponding to the given Uml::Programming_Language.
*/
-QString progLangToString(Uml::Programming_Language pl);
+TQString progLangToString(Uml::Programming_Language pl);
/**
* Return Uml::Programming_Language corresponding to the given string.
*/
-Uml::Programming_Language stringToProgLang(QString str);
+Uml::Programming_Language stringToProgLang(TQString str);
/**
* Return type of parseOperation()
@@ -245,15 +245,15 @@ enum Parse_Status {
* Data structure filled by parseAttribute()
*/
struct NameAndType {
- QString m_name;
+ TQString m_name;
UMLObject *m_type;
Uml::Parameter_Direction m_direction;
- QString m_initialValue;
+ TQString m_initialValue;
NameAndType() : m_type(0), m_direction(Uml::pd_In) {
}
- NameAndType(QString name, UMLObject *type,
+ NameAndType(TQString name, UMLObject *type,
Uml::Parameter_Direction direction = Uml::pd_In,
- QString initialValue = QString::null)
+ TQString initialValue = TQString::null)
: m_name(name), m_type(type),
m_direction(direction), m_initialValue(initialValue) {
}
@@ -262,14 +262,14 @@ struct NameAndType {
/**
* Auxiliary type for OpDescriptor
*/
-typedef QValueList<NameAndType> NameAndType_List;
-typedef QValueListIterator<NameAndType> NameAndType_ListIt;
+typedef TQValueList<NameAndType> NameAndType_List;
+typedef TQValueListIterator<NameAndType> NameAndType_ListIt;
/**
* Data structure filled by parseOperation()
*/
struct OpDescriptor {
- QString m_name;
+ TQString m_name;
NameAndType_List m_args;
UMLObject *m_pReturnType;
};
@@ -284,7 +284,7 @@ struct OpDescriptor {
* @param owningScope Pointer to the owning scope of the template param.
* @return Error status of the parse, PS_OK for success.
*/
-Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningScope);
+Parse_Status parseTemplate(TQString t, NameAndType& nmTp, UMLClassifier *owningScope);
/**
* Parses an attribute given in UML syntax.
@@ -303,7 +303,7 @@ Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningSc
*
* @return Error status of the parse, PS_OK for success.
*/
-Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningScope,
+Parse_Status parseAttribute(TQString a, NameAndType& nmTp, UMLClassifier *owningScope,
Uml::Visibility *vis = 0);
/**
@@ -316,12 +316,12 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
* @param owningScope Pointer to the owning scope of the operation.
* @return Error status of the parse, PS_OK for success.
*/
-Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owningScope);
+Parse_Status parseOperation(TQString m, OpDescriptor& desc, UMLClassifier *owningScope);
/**
* Returns the Parse_Status as a text.
*/
-QString psText(Parse_Status value);
+TQString psText(Parse_Status value);
}
diff --git a/umbrello/umbrello/node.cpp b/umbrello/umbrello/node.cpp
index 0070f481..f035f32a 100644
--- a/umbrello/umbrello/node.cpp
+++ b/umbrello/umbrello/node.cpp
@@ -13,7 +13,7 @@
#include <kdebug.h>
#include <klocale.h>
-UMLNode::UMLNode(const QString & name, Uml::IDType id)
+UMLNode::UMLNode(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -31,12 +31,12 @@ UMLObject* UMLNode::clone() const {
return clone;
}
-void UMLNode::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement nodeElement = UMLObject::save("UML:Node", qDoc);
+void UMLNode::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement nodeElement = UMLObject::save("UML:Node", qDoc);
qElement.appendChild(nodeElement);
}
-bool UMLNode::load(QDomElement& ) {
+bool UMLNode::load(TQDomElement& ) {
return true;
}
diff --git a/umbrello/umbrello/node.h b/umbrello/umbrello/node.h
index 057ea219..6d9df54e 100644
--- a/umbrello/umbrello/node.h
+++ b/umbrello/umbrello/node.h
@@ -34,7 +34,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLNode(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLNode(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -54,13 +54,13 @@ public:
/**
* Creates the <UML:Node> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads the <UML:Node> XMI element (empty.)
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
};
diff --git a/umbrello/umbrello/nodewidget.cpp b/umbrello/umbrello/nodewidget.cpp
index 2bd78a93..8214b7b6 100644
--- a/umbrello/umbrello/nodewidget.cpp
+++ b/umbrello/umbrello/nodewidget.cpp
@@ -13,7 +13,7 @@
#include "nodewidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -33,7 +33,7 @@ NodeWidget::NodeWidget(UMLView * view, UMLNode *n )
NodeWidget::~NodeWidget() {}
-void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void NodeWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
p.setBrush( UMLWidget::getFillColour() );
@@ -47,13 +47,13 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int bodyOffsetY = offsetY + hDepth;
const int bodyWidth = w - wDepth;
const int bodyHeight = h - hDepth;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
+ TQString name = getName();
- QPointArray pointArray(5);
+ TQPointArray pointArray(5);
pointArray.setPoint(0, offsetX, bodyOffsetY);
pointArray.setPoint(1, offsetX + wDepth, offsetY);
pointArray.setPoint(2, offsetX + w - 1, offsetY);
@@ -63,12 +63,12 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.drawRect(offsetX, bodyOffsetY, bodyWidth, bodyHeight);
p.drawLine(offsetX + w - 1, offsetY, offsetX + bodyWidth - 2, bodyOffsetY + 1);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
if (m_pObject) {
- QString stereotype = m_pObject->getStereotype();
+ TQString stereotype = m_pObject->getStereotype();
if (!stereotype.isEmpty()) {
p.drawText(offsetX, bodyOffsetY + (bodyHeight/2) - fontHeight,
bodyWidth, fontHeight, Qt::AlignCenter, m_pObject->getStereotype(true));
@@ -95,16 +95,16 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize NodeWidget::calculateSize() {
+TQSize NodeWidget::calculateSize() {
if (m_pObject == NULL) {
kDebug() << "NodeWidget::calculateSize: m_pObject is NULL" << endl;
return UMLWidget::calculateSize();
}
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
- QString name = m_pObject->getName();
+ TQString name = m_pObject->getName();
if ( UMLWidget::getIsInstance() ) {
name = UMLWidget::getInstanceName() + " : " + name;
}
@@ -121,11 +121,11 @@ QSize NodeWidget::calculateSize() {
int height = (2*fontHeight) + DEPTH;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void NodeWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("nodewidget");
+void NodeWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("nodewidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/nodewidget.h b/umbrello/umbrello/nodewidget.h
index 90d28f63..c06ea759 100644
--- a/umbrello/umbrello/nodewidget.h
+++ b/umbrello/umbrello/nodewidget.h
@@ -44,19 +44,19 @@ public:
/**
* Overrides standard method.
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "nodewidget" XMI element.
* Note: For loading we use the method inherited from UMLWidget.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
static const int DEPTH = 30; ///< pixels on Z axis
};
diff --git a/umbrello/umbrello/notewidget.cpp b/umbrello/umbrello/notewidget.cpp
index 0cc7d079..9badeef5 100644
--- a/umbrello/umbrello/notewidget.cpp
+++ b/umbrello/umbrello/notewidget.cpp
@@ -12,10 +12,10 @@
// own header
#include "notewidget.h"
//qt includes
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qtextedit.h>
-#include <qframe.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqtextedit.h>
+#include <tqframe.h>
// kde includes
#include <kdebug.h>
#include <kcolordialog.h>
@@ -38,15 +38,15 @@ NoteWidget::NoteWidget(UMLView * view, Uml::IDType id)
#ifdef NOTEWIDGET_EMBED_EDITOR
// NB: This code is currently deactivated because
// Zoom does not yet work with the embedded text editor.
- m_pEditor = new QTextEdit(view);
- m_pEditor->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
- m_pEditor->setHScrollBarMode(QScrollView::AlwaysOff);
- m_pEditor->setVScrollBarMode(QScrollView::AlwaysOff);
+ m_pEditor = new TQTextEdit(view);
+ m_pEditor->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain);
+ m_pEditor->setHScrollBarMode(TQScrollView::AlwaysOff);
+ m_pEditor->setVScrollBarMode(TQScrollView::AlwaysOff);
m_pEditor->setTextFormat(Qt::RichText);
m_pEditor->setShown(true);
setEditorGeometry();
- connect(m_pView, SIGNAL(contentsMoving(int, int)),
- this, SLOT(slotViewScrolled(int, int)));
+ connect(m_pView, TQT_SIGNAL(contentsMoving(int, int)),
+ this, TQT_SLOT(slotViewScrolled(int, int)));
#endif
}
@@ -69,7 +69,7 @@ void NoteWidget::setDiagramLink(Uml::IDType viewID) {
<< "): no view found for this ID." << endl;
return;
}
- QString linkText("Diagram: " + view->getName());
+ TQString linkText("Diagram: " + view->getName());
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setUnderline(true);
m_pEditor->insert(linkText);
@@ -89,7 +89,7 @@ void NoteWidget::slotViewScrolled(int x, int y) {
setEditorGeometry(x, y);
}
-void NoteWidget::setFont(QFont font) {
+void NoteWidget::setFont(TQFont font) {
UMLWidget::setFont(font);
#ifdef NOTEWIDGET_EMBED_EDITOR
m_pEditor->setFont(font);
@@ -98,7 +98,7 @@ void NoteWidget::setFont(QFont font) {
void NoteWidget::setEditorGeometry(int dx /*=0*/, int dy /*=0*/) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
- const QRect editorGeometry( UMLWidget::getX() - dx + 6,
+ const TQRect editorGeometry( UMLWidget::getX() - dx + 6,
UMLWidget::getY() - dy + 10,
UMLWidget::getWidth() - 16,
UMLWidget::getHeight() - 16);
@@ -119,7 +119,7 @@ void NoteWidget::setY( int y ) {
setEditorGeometry();
}
-QString NoteWidget::getDoc() const {
+TQString NoteWidget::getDoc() const {
#if defined (NOTEWIDGET_EMBED_EDITOR)
return m_pEditor->text();
#else
@@ -127,7 +127,7 @@ QString NoteWidget::getDoc() const {
#endif
}
-void NoteWidget::setDoc(const QString &newText) {
+void NoteWidget::setDoc(const TQString &newText) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setText(newText);
#else
@@ -135,12 +135,12 @@ void NoteWidget::setDoc(const QString &newText) {
#endif
}
-void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void NoteWidget::draw(TQPainter & p, int offsetX, int offsetY) {
int margin = 10;
int w = width()-1;
int h= height()-1;
- QPointArray poly(6);
+ TQPointArray poly(6);
poly.setPoint(0, offsetX, offsetY);
poly.setPoint(1, offsetX, offsetY + h);
poly.setPoint(2, offsetX + w, offsetY + h);
@@ -149,7 +149,7 @@ void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
poly.setPoint(5, offsetX, offsetY);
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
- QBrush brush( UMLWidget::getFillColour() );
+ TQBrush brush( UMLWidget::getFillColour() );
p.setBrush(brush);
p.drawPolygon(poly);
#if defined (NOTEWIDGET_EMBED_EDITOR)
@@ -166,8 +166,8 @@ void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
drawText(&p, offsetX, offsetY);
}
-QSize NoteWidget::calculateSize() {
- return QSize(50, 50);
+TQSize NoteWidget::calculateSize() {
+ return TQSize(50, 50);
}
void NoteWidget::slotMenuSelection(int sel) {
@@ -197,7 +197,7 @@ void NoteWidget::slotMenuSelection(int sel) {
}
}
-void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offsetY /*=0*/) {
+void NoteWidget::drawText(TQPainter * p /*=NULL*/, int offsetX /*=0*/, int offsetY /*=0*/) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setText( getDoc() );
m_pEditor->setShown(true);
@@ -213,23 +213,23 @@ void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offset
start new line on \n character
*/
p->setPen( Qt::black );
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
p->setFont( font );
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- QString text = getDoc();
+ TQString text = getDoc();
if( text.length() == 0 )
return;
- QString word = "";
- QString fullLine = "";
- QString testCombineLine = "";
+ TQString word = "";
+ TQString fullLine = "";
+ TQString testCombineLine = "";
const int margin = fm.width( "W" );
int textY = fontHeight / 2;
int textX = margin;
const int width = this -> width() - margin * 2;
const int height = this -> height() - fontHeight;
- QChar returnChar('\n');
- QChar c;
+ TQChar returnChar('\n');
+ TQChar c;
for (uint i = 0; i <= text.length(); i++) {
if (i < text.length()) {
c = text[i];
@@ -291,8 +291,8 @@ void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offset
#endif
}
-void NoteWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement noteElement = qDoc.createElement( "notewidget" );
+void NoteWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement noteElement = qDoc.createElement( "notewidget" );
UMLWidget::saveToXMI( qDoc, noteElement );
noteElement.setAttribute( "text", getDoc() );
if (m_DiagramLink != Uml::id_None)
@@ -300,12 +300,12 @@ void NoteWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( noteElement );
}
-bool NoteWidget::loadFromXMI( QDomElement & qElement ) {
+bool NoteWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
setZ( 20 ); //make sure always on top.
setDoc( qElement.attribute("text", "") );
- QString diagramlink = qElement.attribute("diagramlink", "");
+ TQString diagramlink = qElement.attribute("diagramlink", "");
if (!diagramlink.isEmpty())
m_DiagramLink = STR2ID(diagramlink);
return true;
diff --git a/umbrello/umbrello/notewidget.h b/umbrello/umbrello/notewidget.h
index 298839cb..0f3b2ba5 100644
--- a/umbrello/umbrello/notewidget.h
+++ b/umbrello/umbrello/notewidget.h
@@ -55,21 +55,21 @@ public:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Returns the text in the box.
*
* @return The text in the box.
*/
- QString getDoc() const;
+ TQString getDoc() const;
/**
* Sets the note documentation.
*
* @param newText The text to set the documentation to.
*/
- void setDoc(const QString &newText);
+ void setDoc(const TQString &newText);
/**
* Set the ID of the diagram hyperlinked to this note.
@@ -90,12 +90,12 @@ public:
/**
* Override default method.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Override method from UMLWidget.
*/
- void setFont(QFont font);
+ void setFont(TQFont font);
/**
* Override method from UMLWidget.
@@ -110,12 +110,12 @@ public:
/**
* Saves to the "notewidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads a "notewidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
public slots:
void slotMenuSelection(int sel);
@@ -128,7 +128,7 @@ protected:
/**
* Draws the text. Auxiliary to draw().
*/
- void drawText(QPainter * p = NULL, int offsetX = 0, int offsetY = 0);
+ void drawText(TQPainter * p = NULL, int offsetX = 0, int offsetY = 0);
private:
/**
* Initializes key variables for the class.
@@ -137,9 +137,9 @@ private:
void setEditorGeometry(int dx = 0, int dy = 0);
#if defined (NOTEWIDGET_EMBED_EDITOR)
- QTextEdit *m_pEditor;
+ TQTextEdit *m_pEditor;
#else
- QString m_Text;
+ TQString m_Text;
#endif
};
diff --git a/umbrello/umbrello/notewidgetcontroller.cpp b/umbrello/umbrello/notewidgetcontroller.cpp
index e61a7d76..2ef8758d 100644
--- a/umbrello/umbrello/notewidgetcontroller.cpp
+++ b/umbrello/umbrello/notewidgetcontroller.cpp
@@ -24,12 +24,12 @@ NoteWidgetController::NoteWidgetController(NoteWidget *noteWidget):
NoteWidgetController::~NoteWidgetController() {
}
-void NoteWidgetController::mouseMoveEvent(QMouseEvent *me) {
+void NoteWidgetController::mouseMoveEvent(TQMouseEvent *me) {
UMLWidgetController::mouseMoveEvent(me);
m_noteWidget->setEditorGeometry();
}
-void NoteWidgetController::mouseReleaseEvent(QMouseEvent *me) {
+void NoteWidgetController::mouseReleaseEvent(TQMouseEvent *me) {
UMLWidgetController::mouseReleaseEvent(me);
//TODO why is it needed? drawText is already called in draw,
//and draw is (well, I think that is) called when the canvas rectangle is resized
@@ -38,7 +38,7 @@ void NoteWidgetController::mouseReleaseEvent(QMouseEvent *me) {
}
}
-void NoteWidgetController::doMouseDoubleClick(QMouseEvent *me) {
+void NoteWidgetController::doMouseDoubleClick(TQMouseEvent *me) {
//TODO Copied from old code. What it does?
if (m_noteWidget->m_DiagramLink == Uml::id_None) {
m_noteWidget->slotMenuSelection(ListPopupMenu::mt_Rename);
diff --git a/umbrello/umbrello/notewidgetcontroller.h b/umbrello/umbrello/notewidgetcontroller.h
index f3295ce7..081556ed 100644
--- a/umbrello/umbrello/notewidgetcontroller.h
+++ b/umbrello/umbrello/notewidgetcontroller.h
@@ -46,18 +46,18 @@ public:
* Handles a mouse move event.
* Executes base code and then sets the geometry of the editor.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseMoveEvent(QMouseEvent* me);
+ virtual void mouseMoveEvent(TQMouseEvent* me);
/**
* Overriden from UMLWidgetController.
* Handles a mouse release event.
* Executes base code and then draws the text in the note.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseReleaseEvent(QMouseEvent * me);
+ virtual void mouseReleaseEvent(TQMouseEvent * me);
protected:
@@ -66,9 +66,9 @@ protected:
* Executes the action for double click in the widget.
* Shows the dialog to change the text of the note.
*
- * @param me The QMouseEvent which triggered the double click event.
+ * @param me The TQMouseEvent which triggered the double click event.
*/
- virtual void doMouseDoubleClick(QMouseEvent *me);
+ virtual void doMouseDoubleClick(TQMouseEvent *me);
private:
diff --git a/umbrello/umbrello/object_factory.cpp b/umbrello/umbrello/object_factory.cpp
index f6fcbe41..7b8d16b2 100644
--- a/umbrello/umbrello/object_factory.cpp
+++ b/umbrello/umbrello/object_factory.cpp
@@ -13,8 +13,8 @@
#include "object_factory.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -59,7 +59,7 @@ bool assignUniqueIdOnCreation() {
return (g_predefinedId == Uml::id_None);
}
-UMLObject* createNewUMLObject(Uml::Object_Type type, const QString &name,
+UMLObject* createNewUMLObject(Uml::Object_Type type, const TQString &name,
UMLPackage *parentPkg) {
if (parentPkg == NULL) {
kError() << "Object_Factory::createNewUMLObject(" << name
@@ -122,7 +122,7 @@ UMLObject* createNewUMLObject(Uml::Object_Type type, const QString &name,
return o;
}
-UMLObject* createUMLObject(Uml::Object_Type type, const QString &n,
+UMLObject* createUMLObject(Uml::Object_Type type, const TQString &n,
UMLPackage *parentPkg /* = NULL */,
bool solicitNewName /* = true */) {
UMLDoc *doc = UMLApp::app()->getDocument();
@@ -147,10 +147,10 @@ UMLObject* createUMLObject(Uml::Object_Type type, const QString &n,
}
}
bool ok = false;
- QString name = Model_Utils::uniqObjectName(type, parentPkg, n);
+ TQString name = Model_Utils::uniqObjectName(type, parentPkg, n);
bool bValidNameEntered = false;
do {
- name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), name, &ok, (QWidget*)UMLApp::app());
+ name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), name, &ok, (TQWidget*)UMLApp::app());
if (!ok) {
return 0;
}
@@ -176,7 +176,7 @@ UMLObject* createUMLObject(Uml::Object_Type type, const QString &n,
return o;
}
-UMLAttribute *createAttribute(UMLObject *parent, const QString& name, UMLObject *type) {
+UMLAttribute *createAttribute(UMLObject *parent, const TQString& name, UMLObject *type) {
UMLAttribute *attr = new UMLAttribute(parent);
attr->setName(name);
attr->setType(type);
@@ -185,7 +185,7 @@ UMLAttribute *createAttribute(UMLObject *parent, const QString& name, UMLObject
return attr;
}
-UMLOperation *createOperation(UMLClassifier *parent, const QString& name) {
+UMLOperation *createOperation(UMLClassifier *parent, const TQString& name) {
UMLOperation *op = new UMLOperation(parent, name, g_predefinedId);
return op;
}
@@ -225,8 +225,8 @@ UMLClassifierListItem* createChildObject(UMLClassifier* parent, Uml::Object_Type
return static_cast<UMLClassifierListItem*>(returnObject);
}
-UMLObject* makeObjectFromXMI(const QString& xmiTag,
- const QString& stereoID /* = QString::null */) {
+UMLObject* makeObjectFromXMI(const TQString& xmiTag,
+ const TQString& stereoID /* = TQString::null */) {
UMLObject* pObject = 0;
if (Uml::tagEq(xmiTag, "UseCase")) {
pObject = new UMLUseCase();
diff --git a/umbrello/umbrello/object_factory.h b/umbrello/umbrello/object_factory.h
index c7bf71d9..a4007bf6 100644
--- a/umbrello/umbrello/object_factory.h
+++ b/umbrello/umbrello/object_factory.h
@@ -12,7 +12,7 @@
#ifndef OBJECT_FACTORY__H
#define OBJECT_FACTORY__H
-#include <qstring.h>
+#include <tqstring.h>
#include "umlnamespace.h"
class UMLObject;
@@ -39,7 +39,7 @@ namespace Object_Factory {
* The default is to ask for the new name.
*/
UMLObject* createUMLObject(Uml::Object_Type type,
- const QString &n = QString::null,
+ const TQString &n = TQString::null,
UMLPackage *parentPkg = 0,
bool solicitNewName = true);
@@ -53,10 +53,10 @@ UMLObject* createUMLObject(Uml::Object_Type type,
*/
UMLClassifierListItem* createChildObject(UMLClassifier *parent, Uml::Object_Type type);
-UMLAttribute *createAttribute(UMLObject *parent, const QString& name,
+UMLAttribute *createAttribute(UMLObject *parent, const TQString& name,
UMLObject *type = 0);
-UMLOperation *createOperation(UMLClassifier *parent, const QString& name);
+UMLOperation *createOperation(UMLClassifier *parent, const TQString& name);
/**
* Control whether the createUMLObject() solicits a new unique ID for the
@@ -76,8 +76,8 @@ bool assignUniqueIdOnCreation();
* Make a new UMLObject according to the given XMI tag.
* Used by loadFromXMI and clipboard paste.
*/
-UMLObject* makeObjectFromXMI(const QString& xmiTag,
- const QString& stereoID = QString::null);
+UMLObject* makeObjectFromXMI(const TQString& xmiTag,
+ const TQString& stereoID = TQString::null);
}
diff --git a/umbrello/umbrello/objectwidget.cpp b/umbrello/umbrello/objectwidget.cpp
index 35e7bdde..6ae111f0 100644
--- a/umbrello/umbrello/objectwidget.cpp
+++ b/umbrello/umbrello/objectwidget.cpp
@@ -13,9 +13,9 @@
#include "objectwidget.h"
// system includes
-#include <qpainter.h>
-#include <qvalidator.h>
-#include <qevent.h>
+#include <tqpainter.h>
+#include <tqvalidator.h>
+#include <tqevent.h>
#include <klocale.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -68,7 +68,7 @@ void ObjectWidget::init() {
ObjectWidget::~ObjectWidget() {}
-void ObjectWidget::draw(QPainter & p , int offsetX, int offsetY) {
+void ObjectWidget::draw(TQPainter & p , int offsetX, int offsetY) {
if ( m_bDrawAsActor )
drawActor( p, offsetX, offsetY );
else
@@ -80,12 +80,12 @@ void ObjectWidget::draw(QPainter & p , int offsetX, int offsetY) {
}
void ObjectWidget::slotMenuSelection(int sel) {
- QString name = "";
+ TQString name = "";
switch(sel) {
case ListPopupMenu::mt_Rename_Object:
{
bool ok;
- QRegExpValidator* validator = new QRegExpValidator(QRegExp(".*"), 0);
+ TQRegExpValidator* validator = new TQRegExpValidator(TQRegExp(".*"), 0);
name = KInputDialog::getText
(i18n("Rename Object"),
i18n("Enter object name:"),
@@ -125,11 +125,11 @@ void ObjectWidget::slotMenuSelection(int sel) {
}
}
-QSize ObjectWidget::calculateSize() {
+TQSize ObjectWidget::calculateSize() {
int width, height;
- const QFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
+ const TQFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
const int fontHeight = fm.lineSpacing();
- const QString t = m_InstanceName + " : " + m_pObject->getName();
+ const TQString t = m_InstanceName + " : " + m_pObject->getName();
const int textWidth = fm.width(t);
if ( m_bDrawAsActor ) {
width = textWidth > A_WIDTH?textWidth:A_WIDTH;
@@ -145,7 +145,7 @@ QSize ObjectWidget::calculateSize() {
}
}//end else drawasactor
- return QSize(width, height);
+ return TQSize(width, height);
}
void ObjectWidget::setDrawAsActor( bool drawAsActor ) {
@@ -181,7 +181,7 @@ void ObjectWidget::setY( int y ) {
moveEvent(0);
}
-void ObjectWidget::moveEvent(QMoveEvent */*m*/) {
+void ObjectWidget::moveEvent(TQMoveEvent */*m*/) {
emit sigWidgetMoved( m_nLocalID );
if (m_pLine) {
const int x = getX(); // for debugging: gdb has a problem evaluating getX() etc
@@ -197,7 +197,7 @@ void ObjectWidget::slotColorChanged(Uml::IDType /*viewID*/) {
UMLWidget::setLineColor( m_pView->getLineColor() );
if( m_pLine)
- m_pLine -> setPen( QPen( UMLWidget::getLineColor(), UMLWidget::getLineWidth(), Qt::DashLine ) );
+ m_pLine -> setPen( TQPen( UMLWidget::getLineColor(), UMLWidget::getLineWidth(), Qt::DashLine ) );
}
void ObjectWidget::cleanup() {
@@ -212,7 +212,7 @@ void ObjectWidget::cleanup() {
void ObjectWidget::showProperties() {
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ClassPropDlg *dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this);
+ ClassPropDlg *dlg = new ClassPropDlg((TQWidget*)UMLApp::app(), this);
if (dlg->exec()) {
docwindow->showDocumentation(this, true);
UMLApp::app()->getDocument()->setModified(true);
@@ -220,10 +220,10 @@ void ObjectWidget::showProperties() {
dlg->close(true);//wipe from memory
}
-void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
+void ObjectWidget::drawObject(TQPainter & p, int offsetX, int offsetY) {
- QFont oldFont = p.font();
- QFont font = UMLWidget::getFont();
+ TQFont oldFont = p.font();
+ TQFont font = UMLWidget::getFont();
font.setUnderline( true );
p.setFont( font );
@@ -235,7 +235,7 @@ void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QString t = m_InstanceName + " : " + m_pObject -> getName();
+ const TQString t = m_InstanceName + " : " + m_pObject -> getName();
int multiInstOfst = 0;
if ( m_bMultipleInstance ) {
p.drawRect(offsetX + 10, offsetY + 10, w - 10, h - 10);
@@ -243,7 +243,7 @@ void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
multiInstOfst = 10;
}
p.drawRect(offsetX, offsetY, w - multiInstOfst, h - multiInstOfst);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
p.drawText(offsetX + O_MARGIN, offsetY + O_MARGIN,
w - O_MARGIN * 2 - multiInstOfst, h - O_MARGIN * 2 - multiInstOfst,
Qt::AlignCenter, t);
@@ -251,8 +251,8 @@ void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
p.setFont( oldFont );
}
-void ObjectWidget::drawActor(QPainter & p, int offsetX, int offsetY) {
- const QFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
+void ObjectWidget::drawActor(TQPainter & p, int offsetX, int offsetY) {
+ const TQFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
@@ -274,8 +274,8 @@ void ObjectWidget::drawActor(QPainter & p, int offsetX, int offsetY) {
p.drawLine(middleX - A_WIDTH / 2, offsetY + thirdH + thirdH / 2,
middleX + A_WIDTH / 2, offsetY + thirdH + thirdH / 2);//arms
//draw text
- p.setPen(QPen(Qt::black));
- QString t = m_InstanceName + " : " + m_pObject -> getName();
+ p.setPen(TQPen(Qt::black));
+ TQString t = m_InstanceName + " : " + m_pObject -> getName();
p.drawText(offsetX + A_MARGIN, offsetY + textStartY,
w - A_MARGIN * 2, fontHeight, Qt::AlignCenter, t);
}
@@ -372,8 +372,8 @@ SeqLineWidget *ObjectWidget::getSeqLine() {
return m_pLine;
}
-void ObjectWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement objectElement = qDoc.createElement( "objectwidget" );
+void ObjectWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement objectElement = qDoc.createElement( "objectwidget" );
UMLWidget::saveToXMI( qDoc, objectElement );
objectElement.setAttribute( "instancename", m_InstanceName );
objectElement.setAttribute( "drawasactor", m_bDrawAsActor );
@@ -383,14 +383,14 @@ void ObjectWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( objectElement );
}
-bool ObjectWidget::loadFromXMI( QDomElement & qElement ) {
+bool ObjectWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
m_InstanceName = qElement.attribute( "instancename", "" );
- QString draw = qElement.attribute( "drawasactor", "0" );
- QString multi = qElement.attribute( "multipleinstance", "0" );
- QString localid = qElement.attribute( "localid", "0" );
- QString decon = qElement.attribute( "decon", "0" );
+ TQString draw = qElement.attribute( "drawasactor", "0" );
+ TQString multi = qElement.attribute( "multipleinstance", "0" );
+ TQString localid = qElement.attribute( "localid", "0" );
+ TQString decon = qElement.attribute( "decon", "0" );
m_bDrawAsActor = (bool)draw.toInt();
m_bMultipleInstance = (bool)multi.toInt();
diff --git a/umbrello/umbrello/objectwidget.h b/umbrello/umbrello/objectwidget.h
index bbf63053..837c6ff1 100644
--- a/umbrello/umbrello/objectwidget.h
+++ b/umbrello/umbrello/objectwidget.h
@@ -81,7 +81,7 @@ public:
*
* @return The instance name.
*/
- QString getInstanceName() const {
+ TQString getInstanceName() const {
return m_InstanceName;
}
@@ -90,7 +90,7 @@ public:
*
* @param name The name to set the instance name to.
*/
- void setInstanceName(const QString &name) {
+ void setInstanceName(const TQString &name) {
m_InstanceName = name;
}
@@ -127,12 +127,12 @@ public:
/**
* Override default method.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Overrides the standard operation.
*/
- virtual void moveEvent(QMoveEvent */*m*/);
+ virtual void moveEvent(TQMoveEvent */*m*/);
/**
* Used to cleanup any other widget it may need to delete.
@@ -232,12 +232,12 @@ public:
/**
* Saves to the "objectwidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads from a "objectwidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
public slots:
/**
@@ -263,17 +263,17 @@ protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Draw the object as an actor.
*/
- void drawActor(QPainter & p, int offsetX, int offsetY);
+ void drawActor(TQPainter & p, int offsetX, int offsetY);
/**
* Draw the object as an object (default).
*/
- void drawObject(QPainter & p, int offsetX, int offsetY);
+ void drawObject(TQPainter & p, int offsetX, int offsetY);
/**
* Move the object up on a sequence diagram.
@@ -290,7 +290,7 @@ protected:
/**
* Instance name of object.
*/
- QString m_InstanceName;
+ TQString m_InstanceName;
/**
* Local ID used on views. Needed as a it can represent a class
diff --git a/umbrello/umbrello/objectwidgetcontroller.cpp b/umbrello/umbrello/objectwidgetcontroller.cpp
index 1594b3fa..f921b627 100644
--- a/umbrello/umbrello/objectwidgetcontroller.cpp
+++ b/umbrello/umbrello/objectwidgetcontroller.cpp
@@ -27,7 +27,7 @@ ObjectWidgetController::ObjectWidgetController(ObjectWidget* objectWidget):
ObjectWidgetController::~ObjectWidgetController() {
}
-QCursor ObjectWidgetController::getResizeCursor() {
+TQCursor ObjectWidgetController::getResizeCursor() {
return KCursor::sizeHorCursor();
}
diff --git a/umbrello/umbrello/objectwidgetcontroller.h b/umbrello/umbrello/objectwidgetcontroller.h
index 1d8d699a..b72cc0e2 100644
--- a/umbrello/umbrello/objectwidgetcontroller.h
+++ b/umbrello/umbrello/objectwidgetcontroller.h
@@ -54,7 +54,7 @@ protected:
*
* @return The cursor to be shown when resizing the widget.
*/
- virtual QCursor getResizeCursor();
+ virtual TQCursor getResizeCursor();
/**
* Overriden from UMLWidgetController.
diff --git a/umbrello/umbrello/operation.cpp b/umbrello/umbrello/operation.cpp
index 1052c469..dce9b41e 100644
--- a/umbrello/umbrello/operation.cpp
+++ b/umbrello/umbrello/operation.cpp
@@ -13,7 +13,7 @@
#include "operation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -25,7 +25,7 @@
#include "uniqueid.h"
#include "dialogs/umloperationdialog.h"
-UMLOperation::UMLOperation(const UMLClassifier *parent, const QString& name,
+UMLOperation::UMLOperation(const UMLClassifier *parent, const TQString& name,
Uml::IDType id, Uml::Visibility s, UMLObject *rt)
: UMLClassifierListItem(parent, name, id)
{
@@ -63,7 +63,7 @@ void UMLOperation::moveParmLeft(UMLAttribute * a) {
}
kDebug() << "UMLOperation::moveParmLeft(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm left " << a->getName() << endl;
@@ -83,7 +83,7 @@ void UMLOperation::moveParmRight(UMLAttribute * a) {
}
kDebug() << "UMLOperation::moveParmRight(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm right " << a->getName() << endl;
@@ -104,7 +104,7 @@ void UMLOperation::removeParm(UMLAttribute * a, bool emitModifiedSignal /* =true
}
kDebug() << "UMLOperation::removeParm(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
if(!m_List.remove(a))
kDebug() << "Error removing parm " << a->getName() << endl;
@@ -112,7 +112,7 @@ void UMLOperation::removeParm(UMLAttribute * a, bool emitModifiedSignal /* =true
emit modified();
}
-UMLAttribute* UMLOperation::findParm(const QString &name) {
+UMLAttribute* UMLOperation::findParm(const TQString &name) {
UMLAttribute * obj=0;
for (obj = m_List.first(); obj; obj = m_List.next()) {
if (obj->getName() == name)
@@ -121,8 +121,8 @@ UMLAttribute* UMLOperation::findParm(const QString &name) {
return 0;
}
-QString UMLOperation::toString(Uml::Signature_Type sig) {
- QString s = "";
+TQString UMLOperation::toString(Uml::Signature_Type sig) {
+ TQString s = "";
if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig)
s = m_Vis.toString(true) + ' ';
@@ -151,7 +151,7 @@ QString UMLOperation::toString(Uml::Signature_Type sig) {
s.append("()");
}
UMLClassifier *ownParent = static_cast<UMLClassifier*>(parent());
- QString returnType;
+ TQString returnType;
UMLClassifier *retType = UMLClassifierListItem::getType();
if (retType) {
UMLPackage *retVisibility = retType->getUMLPackage();
@@ -178,14 +178,14 @@ void UMLOperation::addParm(UMLAttribute *parameter, int position) {
else
m_List.append( parameter );
UMLObject::emitModified();
- connect(parameter,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(parameter,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
}
-QString UMLOperation::getUniqueParameterName() {
- QString currentName = i18n("new_parameter");
- QString name = currentName;
+TQString UMLOperation::getUniqueParameterName() {
+ TQString currentName = i18n("new_parameter");
+ TQString name = currentName;
for (int number = 1; findParm(name); number++) {
- name = currentName + '_' + QString::number(number);
+ name = currentName + '_' + TQString::number(number);
}
return name;
}
@@ -239,13 +239,13 @@ bool UMLOperation::resolveRef() {
bool UMLOperation::isConstructorOperation() {
// if an operation has the stereotype constructor
// return true
- QString strConstructor ("constructor");
+ TQString strConstructor ("constructor");
if (getStereotype() == strConstructor)
return true;
UMLClassifier * c = static_cast<UMLClassifier*>(this->parent());
- QString cName = c->getName();
- QString opName = getName();
+ TQString cName = c->getName();
+ TQString opName = getName();
// It's a constructor operation if the operation name
// matches that of the parent classifier.
return (cName == opName);
@@ -256,14 +256,14 @@ bool UMLOperation::isDestructorOperation() {
return true;
UMLClassifier * c = static_cast<UMLClassifier*>(this->parent());
- QString cName = c->getName();
- QString opName = getName();
+ TQString cName = c->getName();
+ TQString opName = getName();
// Special support for C++ syntax:
// It's a destructor operation if the operation name begins
// with "~" followed by the name of the parent classifier.
if (! opName.startsWith("~"))
return false;
- opName.remove( QRegExp("^~\\s*") );
+ opName.remove( TQRegExp("^~\\s*") );
return (cName == opName);
}
@@ -279,17 +279,17 @@ bool UMLOperation::getConst() const {
return m_bConst;
}
-bool UMLOperation::showPropertiesDialog(QWidget* parent) {
+bool UMLOperation::showPropertiesDialog(TQWidget* parent) {
UMLOperationDialog dialog(parent, this);
return dialog.exec();
}
-void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
+void UMLOperation::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
operationElement.setAttribute( "isQuery", m_bConst ? "true" : "false" );
- QDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
+ TQDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
if (m_pSecondary) {
- QDomElement retElement = qDoc.createElement("UML:Parameter");
+ TQDomElement retElement = qDoc.createElement("UML:Parameter");
if (m_returnId == Uml::id_None) {
kDebug() << "UMLOperation::saveToXMI(" << m_Name
<< "): m_returnId is not set, setting it now." << endl;
@@ -306,7 +306,7 @@ void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
//save each attribute here, type different
UMLAttribute* pAtt = 0;
for( pAtt = m_List.first(); pAtt != 0; pAtt = m_List.next() ) {
- QDomElement attElement = pAtt->UMLObject::save("UML:Parameter", qDoc);
+ TQDomElement attElement = pAtt->UMLObject::save("UML:Parameter", qDoc);
UMLClassifier *attrType = pAtt->getType();
if (attrType) {
attElement.setAttribute( "type", ID2STR(attrType->getID()) );
@@ -329,32 +329,32 @@ void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( operationElement );
}
-bool UMLOperation::load( QDomElement & element ) {
+bool UMLOperation::load( TQDomElement & element ) {
m_SecondaryId = element.attribute( "type", "" );
- QString isQuery = element.attribute( "isQuery", "" );
+ TQString isQuery = element.attribute( "isQuery", "" );
if (!isQuery.isEmpty()) {
// We need this extra test for isEmpty() because load() might have been
// called again by the processing for BehavioralFeature.parameter (see below)
m_bConst = (isQuery == "true");
}
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
if (node.isComment())
node = node.nextSibling();
- QDomElement attElement = node.toElement();
+ TQDomElement attElement = node.toElement();
while( !attElement.isNull() ) {
- QString tag = attElement.tagName();
+ TQString tag = attElement.tagName();
if (Uml::tagEq(tag, "BehavioralFeature.parameter")) {
if (! load(attElement))
return false;
} else if (Uml::tagEq(tag, "Parameter")) {
- QString kind = attElement.attribute("kind", "");
+ TQString kind = attElement.attribute("kind", "");
if (kind.isEmpty()) {
// Perhaps the kind is stored in a child node:
- for (QDomNode n = attElement.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for (TQDomNode n = attElement.firstChild(); !n.isNull(); n = n.nextSibling()) {
if (n.isComment())
continue;
- QDomElement tempElement = n.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = n.toElement();
+ TQString tag = tempElement.tagName();
if (!Uml::tagEq(tag, "kind"))
continue;
kind = tempElement.attribute( "xmi.value", "" );
@@ -367,20 +367,20 @@ bool UMLOperation::load( QDomElement & element ) {
}
}
if (kind == "return") {
- QString returnId = attElement.attribute("xmi.id", "");
+ TQString returnId = attElement.attribute("xmi.id", "");
if (!returnId.isEmpty())
m_returnId = STR2ID(returnId);
m_SecondaryId = attElement.attribute( "type", "" );
if (m_SecondaryId.isEmpty()) {
// Perhaps the type is stored in a child node:
- QDomNode node = attElement.firstChild();
+ TQDomNode node = attElement.firstChild();
while (!node.isNull()) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (!Uml::tagEq(tag, "type")) {
node = node.nextSibling();
continue;
@@ -389,8 +389,8 @@ bool UMLOperation::load( QDomElement & element ) {
if (m_SecondaryId.isEmpty())
m_SecondaryId = tempElement.attribute( "xmi.idref", "" );
if (m_SecondaryId.isEmpty()) {
- QDomNode inner = node.firstChild();
- QDomElement tmpElem = inner.toElement();
+ TQDomNode inner = node.firstChild();
+ TQDomElement tmpElem = inner.toElement();
m_SecondaryId = tmpElem.attribute( "xmi.id", "" );
if (m_SecondaryId.isEmpty())
m_SecondaryId = tmpElem.attribute( "xmi.idref", "" );
diff --git a/umbrello/umbrello/operation.h b/umbrello/umbrello/operation.h
index eb94576e..4ceef15a 100644
--- a/umbrello/umbrello/operation.h
+++ b/umbrello/umbrello/operation.h
@@ -37,7 +37,7 @@ public:
* @param s The visibility of the operation.
* @param rt The return type of the operation.
*/
- UMLOperation(const UMLClassifier * parent, const QString& name,
+ UMLOperation(const UMLClassifier * parent, const TQString& name,
Uml::IDType id = Uml::id_None,
Uml::Visibility s = Uml::Visibility::Public,
UMLObject *rt = 0);
@@ -120,7 +120,7 @@ public:
* @param name The parameter name to search for.
* @return The found parameter, 0 if not found.
*/
- UMLAttribute * findParm(const QString &name);
+ UMLAttribute * findParm(const TQString &name);
/**
* Returns a string representation of the operation.
@@ -128,7 +128,7 @@ public:
* @param sig What type of operation string to show.
* @return The string representation of the operation.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Add a parameter to the operation.
@@ -151,12 +151,12 @@ public:
/**
* Returns an unused parameter name for a new parameter.
*/
- QString getUniqueParameterName();
+ TQString getUniqueParameterName();
/**
* Display the properties configuration dialog for the template.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
/**
* Returns whether this operation is a constructor.
@@ -192,13 +192,13 @@ public:
/**
* Saves to the <UML:Operation> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads a <UML:Operation> XMI element.
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
Uml::IDType m_returnId; ///< Holds the xmi.id of the <UML:Parameter kind="return">
diff --git a/umbrello/umbrello/optionstate.h b/umbrello/umbrello/optionstate.h
index b8429f62..e5f3b850 100644
--- a/umbrello/umbrello/optionstate.h
+++ b/umbrello/umbrello/optionstate.h
@@ -37,20 +37,20 @@ struct GeneralState {
bool autosave;
int time; //old autosave time, kept for compatibility
int autosavetime;
- QString autosavesuffix; ///< Text input field for suffix of autosave
+ TQString autosavesuffix; ///< Text input field for suffix of autosave
bool logo;
bool tip;
bool loadlast;
Uml::Diagram_Type diagram;
- QString lastFile;
+ TQString lastFile;
};
struct UIState {
bool useFillColor;
- QColor fillColor;
- QColor lineColor;
+ TQColor fillColor;
+ TQColor lineColor;
uint lineWidth;
- QFont font;
+ TQFont font;
};
struct ClassState {
diff --git a/umbrello/umbrello/ownedcodeblock.cpp b/umbrello/umbrello/ownedcodeblock.cpp
index 99b3c865..f80fd315 100644
--- a/umbrello/umbrello/ownedcodeblock.cpp
+++ b/umbrello/umbrello/ownedcodeblock.cpp
@@ -35,7 +35,7 @@
//
OwnedCodeBlock::OwnedCodeBlock ( UMLObject * parent )
- : QObject ( (QObject*)parent, "anOwnedCodeBlock" )
+ : TQObject ( (TQObject*)parent, "anOwnedCodeBlock" )
{
initFields(parent);
}
@@ -81,7 +81,7 @@ void OwnedCodeBlock::setAttributesFromObject (TextBlock * obj) {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void OwnedCodeBlock::setAttributesOnNode(QDomDocument& /*doc*/, QDomElement& elem) {
+void OwnedCodeBlock::setAttributesOnNode(TQDomDocument& /*doc*/, TQDomElement& elem) {
// set local class attributes
// setting ID's takes special treatment
@@ -108,10 +108,10 @@ void OwnedCodeBlock::setAttributesOnNode(QDomDocument& /*doc*/, QDomElement& ele
/** set the class attributes of this object from
* the passed element node.
*/
-void OwnedCodeBlock::setAttributesFromNode ( QDomElement & elem) {
+void OwnedCodeBlock::setAttributesFromNode ( TQDomElement & elem) {
// set local attributes, parent object first
- QString idStr = elem.attribute("parent_id","-1");
+ TQString idStr = elem.attribute("parent_id","-1");
Uml::IDType id = STR2ID(idStr);
// always disconnect from current parent
@@ -168,7 +168,7 @@ void OwnedCodeBlock::initFields(UMLObject * parent )
// this code block and the parent UMLObject..when the parent
// signals a change has been made, we automatically update
// ourselves
- connect(m_parentObject, SIGNAL(modified()), this, SLOT(syncToParent()));
+ connect(m_parentObject, TQT_SIGNAL(modified()), this, TQT_SLOT(syncToParent()));
}
/**
diff --git a/umbrello/umbrello/ownedcodeblock.h b/umbrello/umbrello/ownedcodeblock.h
index b089e50e..0a71f50c 100644
--- a/umbrello/umbrello/ownedcodeblock.h
+++ b/umbrello/umbrello/ownedcodeblock.h
@@ -17,9 +17,9 @@
#ifndef OWNEDCODEBLOCK_H
#define OWNEDCODEBLOCK_H
-#include <qdom.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqobject.h>
class TextBlock;
class CodeDocument;
@@ -69,12 +69,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
diff --git a/umbrello/umbrello/ownedhierarchicalcodeblock.cpp b/umbrello/umbrello/ownedhierarchicalcodeblock.cpp
index bb2b38ad..078a02b7 100644
--- a/umbrello/umbrello/ownedhierarchicalcodeblock.cpp
+++ b/umbrello/umbrello/ownedhierarchicalcodeblock.cpp
@@ -31,7 +31,7 @@
// Constructors/Destructors
//
-OwnedHierarchicalCodeBlock::OwnedHierarchicalCodeBlock ( UMLObject *parent, CodeDocument * doc, const QString &start, const QString &end, const QString &comment)
+OwnedHierarchicalCodeBlock::OwnedHierarchicalCodeBlock ( UMLObject *parent, CodeDocument * doc, const TQString &start, const TQString &end, const TQString &comment)
: HierarchicalCodeBlock ( doc, start, end, comment), OwnedCodeBlock(parent)
{
@@ -61,7 +61,7 @@ void OwnedHierarchicalCodeBlock::setAttributesFromObject (TextBlock * obj) {
OwnedCodeBlock::setAttributesFromObject(obj);
}
-void OwnedHierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement & elem ) {
+void OwnedHierarchicalCodeBlock::setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem ) {
// set super-class attributes
HierarchicalCodeBlock::setAttributesOnNode(doc, elem);
@@ -86,7 +86,7 @@ void OwnedHierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomEl
/** set the class attributes of this object from
* the passed element node.
*/
-void OwnedHierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
+void OwnedHierarchicalCodeBlock::setAttributesFromNode ( TQDomElement & root)
{
// set attributes from the XMI
diff --git a/umbrello/umbrello/ownedhierarchicalcodeblock.h b/umbrello/umbrello/ownedhierarchicalcodeblock.h
index af5ade94..04717381 100644
--- a/umbrello/umbrello/ownedhierarchicalcodeblock.h
+++ b/umbrello/umbrello/ownedhierarchicalcodeblock.h
@@ -35,10 +35,10 @@ public:
// Constructors/Destructors
//
- /** constructor with QString so we can create & populate it in
+ /** constructor with TQString so we can create & populate it in
* one step.
*/
- OwnedHierarchicalCodeBlock ( UMLObject * parent, CodeDocument * parentDoc, const QString &start="", const QString &end="", const QString &comment="" );
+ OwnedHierarchicalCodeBlock ( UMLObject * parent, CodeDocument * parentDoc, const TQString &start="", const TQString &end="", const TQString &comment="" );
/**
* Empty Destructor
@@ -55,12 +55,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root ) = 0;
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root ) = 0;
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root ) = 0;
+ virtual void loadFromXMI ( TQDomElement & root ) = 0;
protected:
@@ -73,12 +73,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
diff --git a/umbrello/umbrello/package.cpp b/umbrello/umbrello/package.cpp
index 54dc18a5..04e8c14d 100644
--- a/umbrello/umbrello/package.cpp
+++ b/umbrello/umbrello/package.cpp
@@ -28,7 +28,7 @@
using namespace Uml;
-UMLPackage::UMLPackage(const QString & name, Uml::IDType id)
+UMLPackage::UMLPackage(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -154,7 +154,7 @@ UMLObjectList UMLPackage::containedObjects() {
return m_objects;
}
-UMLObject * UMLPackage::findObject(const QString &name) {
+UMLObject * UMLPackage::findObject(const TQString &name) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
for (UMLObjectListIt oit(m_objects); oit.current(); ++oit) {
UMLObject *obj = oit.current();
@@ -246,9 +246,9 @@ bool UMLPackage::resolveRef() {
return overallSuccess;
}
-void UMLPackage::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement packageElement = UMLObject::save("UML:Package", qDoc);
- QDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
+void UMLPackage::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement packageElement = UMLObject::save("UML:Package", qDoc);
+ TQDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
UMLObject *obj;
// save classifiers etc.
for (UMLObjectListIt oit(m_objects); (obj = oit.current()) != NULL; ++oit)
@@ -261,13 +261,13 @@ void UMLPackage::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(packageElement);
}
-bool UMLPackage::load(QDomElement& element) {
- for (QDomNode node = element.firstChild(); !node.isNull();
+bool UMLPackage::load(TQDomElement& element) {
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (tagEq(type, "Namespace.ownedElement") ||
diff --git a/umbrello/umbrello/package.h b/umbrello/umbrello/package.h
index b7d51000..65b0cb5c 100644
--- a/umbrello/umbrello/package.h
+++ b/umbrello/umbrello/package.h
@@ -40,7 +40,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLPackage(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLPackage(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -112,7 +112,7 @@ public:
* @param name The name to seek.
* @return Pointer to the UMLObject found or NULL if not found.
*/
- UMLObject * findObject(const QString &name);
+ UMLObject * findObject(const TQString &name);
/**
* Find the object of the given ID in the list of contained objects.
@@ -178,14 +178,14 @@ public:
/**
* Creates the <UML:Package> XMI element.
*/
- virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ virtual void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Loads the <UML:Package> XMI element.
* Auxiliary to UMLObject::loadFromXMI.
*/
- virtual bool load(QDomElement& element);
+ virtual bool load(TQDomElement& element);
/**
* References to the objects contained in this package.
diff --git a/umbrello/umbrello/packagewidget.cpp b/umbrello/umbrello/packagewidget.cpp
index 002f723e..c4289b74 100644
--- a/umbrello/umbrello/packagewidget.cpp
+++ b/umbrello/umbrello/packagewidget.cpp
@@ -13,7 +13,7 @@
#include "packagewidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -47,7 +47,7 @@ void PackageWidget::init() {
PackageWidget::~PackageWidget() {}
-void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void PackageWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
@@ -56,13 +56,13 @@ void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
int w = width();
int h = height();
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
//FIXME italic is true when a package is first created until you click elsewhere, not sure why
font.setItalic(false);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
+ TQString name = getName();
p.drawRect(offsetX, offsetY, 50, fontHeight);
if (m_pObject->getStereotype() == "subsystem") {
@@ -76,12 +76,12 @@ void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
p.drawRect(offsetX, offsetY + fontHeight - 1, w, h - fontHeight);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
if (m_pObject != NULL) {
- QString stereotype = m_pObject->getStereotype();
+ TQString stereotype = m_pObject->getStereotype();
if (!stereotype.isEmpty()) {
p.drawText(offsetX, offsetY + fontHeight + PACKAGE_MARGIN,
w, fontHeight, Qt::AlignCenter, m_pObject->getStereotype(true));
@@ -97,12 +97,12 @@ void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize PackageWidget::calculateSize() {
+TQSize PackageWidget::calculateSize() {
if ( !m_pObject ) {
return UMLWidget::calculateSize();
}
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
int lines = 1;
@@ -122,11 +122,11 @@ QSize PackageWidget::calculateSize() {
int height = (lines*fontHeight) + fontHeight + (PACKAGE_MARGIN * 2);
- return QSize(width, height);
+ return TQSize(width, height);
}
-void PackageWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("packagewidget");
+void PackageWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("packagewidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/packagewidget.h b/umbrello/umbrello/packagewidget.h
index 5acb63d1..3cff4ed6 100644
--- a/umbrello/umbrello/packagewidget.h
+++ b/umbrello/umbrello/packagewidget.h
@@ -46,18 +46,18 @@ public:
/**
* Overrides standard method.
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "packagewidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
diff --git a/umbrello/umbrello/petalnode.cpp b/umbrello/umbrello/petalnode.cpp
index 9d9aa0ad..e64d88cf 100644
--- a/umbrello/umbrello/petalnode.cpp
+++ b/umbrello/umbrello/petalnode.cpp
@@ -23,13 +23,13 @@ PetalNode::NodeType PetalNode::type() const {
return m_type;
}
-QStringList PetalNode::initialArgs() const {
+TQStringList PetalNode::initialArgs() const {
return m_initialArgs;
}
-QString PetalNode::name() const {
+TQString PetalNode::name() const {
if (m_initialArgs.count() == 0)
- return QString();
+ return TQString();
return m_initialArgs.first();
}
@@ -43,7 +43,7 @@ void PetalNode::setType(PetalNode::NodeType t) {
}
*/
-void PetalNode::setInitialArgs(const QStringList& args) {
+void PetalNode::setInitialArgs(const TQStringList& args) {
m_initialArgs = args;
}
@@ -51,7 +51,7 @@ void PetalNode::setAttributes(PetalNode::NameValueList vl) {
m_attributes = vl;
}
-PetalNode::StringOrNode PetalNode::findAttribute(const QString& name) const {
+PetalNode::StringOrNode PetalNode::findAttribute(const TQString& name) const {
for (uint i = 0; i < m_attributes.count(); i++) {
if (m_attributes[i].first == name)
return m_attributes[i].second;
diff --git a/umbrello/umbrello/petalnode.h b/umbrello/umbrello/petalnode.h
index 705de417..c9f52bde 100644
--- a/umbrello/umbrello/petalnode.h
+++ b/umbrello/umbrello/petalnode.h
@@ -12,10 +12,10 @@
#ifndef PETALNODE__H
#define PETALNODE__H
-#include <qstring.h>
-#include <qpair.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
/**
* Rose petal node - parse tree for model import
@@ -46,14 +46,14 @@ public:
* (Perhaps this should be a union but that is ugly.)
*/
struct StringOrNode {
- QString string;
+ TQString string;
PetalNode *node;
StringOrNode() { node = 0; }
virtual ~StringOrNode() { }
bool isEmpty() { return (string.isEmpty() && node == 0); }
};
- typedef QPair<QString, StringOrNode> NameValue;
- typedef QValueList<NameValue> NameValueList;
+ typedef QPair<TQString, StringOrNode> NameValue;
+ typedef TQValueList<NameValue> NameValueList;
enum NodeType { nt_object, nt_list };
@@ -62,12 +62,12 @@ public:
// getters
NodeType type() const;
- QStringList initialArgs() const; // name and other initial args
- QString name() const; // convenience function: equal to initialArgs().first()
+ TQStringList initialArgs() const; // name and other initial args
+ TQString name() const; // convenience function: equal to initialArgs().first()
NameValueList attributes() const;
// setters
//void setType(NodeType nt); see constructor
- void setInitialArgs(const QStringList& args);
+ void setInitialArgs(const TQStringList& args);
void setAttributes(NameValueList vl);
// utilities
/**
@@ -75,10 +75,10 @@ public:
* @return The value of the attribute. StringOrNode::isEmpty() returns true
* if the name could not be found.
*/
- StringOrNode findAttribute(const QString& name) const;
+ StringOrNode findAttribute(const TQString& name) const;
private:
NodeType m_type;
- QStringList m_initialArgs;
+ TQStringList m_initialArgs;
NameValueList m_attributes;
};
diff --git a/umbrello/umbrello/petaltree2uml.cpp b/umbrello/umbrello/petaltree2uml.cpp
index 41563785..c8cccdc2 100644
--- a/umbrello/umbrello/petaltree2uml.cpp
+++ b/umbrello/umbrello/petaltree2uml.cpp
@@ -12,7 +12,7 @@
// own header
#include "petaltree2uml.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "petalnode.h"
@@ -38,12 +38,12 @@ namespace Import_Rose {
* Return the given string without surrounding quotation marks.
* Also remove a possible prefix "Logical View::", it is not modeled in Umbrello.
*/
-QString clean(const QString& s) {
+TQString clean(const TQString& s) {
if (s.isNull())
- return QString();
- QString str = s;
+ return TQString();
+ TQString str = s;
str.remove("\"");
- str.remove(QRegExp("^Logical View::"));
+ str.remove(TQRegExp("^Logical View::"));
return str;
}
@@ -51,7 +51,7 @@ QString clean(const QString& s) {
* Extract the quid attribute from a petal node and return it as a Uml::IDType.
*/
Uml::IDType quid(const PetalNode *node) {
- QString quidStr = node->findAttribute("quid").string;
+ TQString quidStr = node->findAttribute("quid").string;
if (quidStr.isEmpty())
return Uml::id_None;
quidStr.remove("\"");
@@ -61,10 +61,10 @@ Uml::IDType quid(const PetalNode *node) {
/**
* Extract the quidu attribute from a petal node.
*/
-QString quidu(const PetalNode *node) {
- QString quiduStr = node->findAttribute("quidu").string;
+TQString quidu(const PetalNode *node) {
+ TQString quiduStr = node->findAttribute("quidu").string;
if (quiduStr.isEmpty())
- return QString();
+ return TQString();
quiduStr.remove("\"");
return quiduStr;
}
@@ -74,10 +74,10 @@ QString quidu(const PetalNode *node) {
* If the given name consists only of letters, digits, underscores, and
* scope separators, then return Uml::ot_Class, else return Uml::ot_Datatype.
*/
-Uml::Object_Type typeToCreate(const QString& name) {
- QString n = name;
- n.remove(QRegExp("^.*::")); // don't consider the scope prefix, it may contain spaces
- Uml::Object_Type t = (n.contains(QRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class);
+Uml::Object_Type typeToCreate(const TQString& name) {
+ TQString n = name;
+ n.remove(TQRegExp("^.*::")); // don't consider the scope prefix, it may contain spaces
+ Uml::Object_Type t = (n.contains(TQRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class);
return t;
}
@@ -88,7 +88,7 @@ Uml::Object_Type typeToCreate(const QString& name) {
* @param to Pointer to UMLObject in which to set the Uml::Visibility
*/
void transferVisibility(const PetalNode *from, UMLObject *to) {
- QString vis = from->findAttribute("exportControl").string;
+ TQString vis = from->findAttribute("exportControl").string;
if (!vis.isEmpty()) {
Uml::Visibility v = Uml::Visibility::fromString(clean(vis.lower()));
to->setVisibility(v);
@@ -119,7 +119,7 @@ public:
virtual UMLObject *createListItem() = 0;
virtual void setTypeReferences(UMLObject *item,
- const QString& quid, const QString& type) {
+ const TQString& quid, const TQString& type) {
if (!quid.isEmpty()) {
item->setSecondaryId(quid);
}
@@ -148,7 +148,7 @@ public:
* - invoke insertAtParent() with the new classifier list item as the argument
* This is the user entry point.
*/
- void read(const PetalNode *node, const QString& name) {
+ void read(const PetalNode *node, const TQString& name) {
PetalNode *attributes = node->findAttribute(m_attributeTag).node;
if (attributes == NULL) {
#ifdef VERBOSE_DEBUGGING
@@ -160,7 +160,7 @@ public:
PetalNode::NameValueList attributeList = attributes->attributes();
for (uint i = 0; i < attributeList.count(); i++) {
PetalNode *attNode = attributeList[i].second.node;
- QStringList initialArgs = attNode->initialArgs();
+ TQStringList initialArgs = attNode->initialArgs();
if (attNode->name() != m_elementName) {
kDebug() << "read(" << name << "): expecting " << m_elementName
<< ", " << "found " << initialArgs[0] << endl;
@@ -170,18 +170,18 @@ public:
if (initialArgs.count() > 1)
item->setName(clean(initialArgs[1]));
item->setID(quid(attNode));
- QString quidref = quidu(attNode);
- QString type = clean(attNode->findAttribute(m_itemTypeDesignator).string);
+ TQString quidref = quidu(attNode);
+ TQString type = clean(attNode->findAttribute(m_itemTypeDesignator).string);
setTypeReferences(item, quidref, type);
transferVisibility(attNode, item);
- QString doc = attNode->findAttribute("documentation").string;
+ TQString doc = attNode->findAttribute("documentation").string;
if (! doc.isEmpty())
item->setDoc(doc);
insertAtParent(attNode, item);
}
}
protected:
- const QString m_attributeTag, m_elementName, m_itemTypeDesignator;
+ const TQString m_attributeTag, m_elementName, m_itemTypeDesignator;
};
class AttributesReader : public ClassifierListReader {
@@ -253,7 +253,7 @@ public:
* UMLAssociation itself but for its role B object.
*/
void setTypeReferences(UMLObject *item,
- const QString& quid, const QString& type) {
+ const TQString& quid, const TQString& type) {
UMLAssociation *assoc = static_cast<UMLAssociation*>(item);
if (!quid.isEmpty()) {
assoc->getUMLRole(Uml::B)->setSecondaryId(quid);
@@ -286,7 +286,7 @@ public:
* UMLAssociation itself but for its role B object.
*/
void setTypeReferences(UMLObject *item,
- const QString& quid, const QString& type) {
+ const TQString& quid, const TQString& type) {
UMLAssociation *assoc = static_cast<UMLAssociation*>(item);
if (!quid.isEmpty()) {
assoc->getUMLRole(Uml::B)->setSecondaryId(quid);
@@ -313,11 +313,11 @@ protected:
* @param parentPkg Pointer to the current parent UMLPackage.
* @return True if the node actually contained a controlled unit.
*/
-bool handleControlledUnit(PetalNode *node, const QString& name, Uml::IDType id, UMLPackage *parentPkg) {
+bool handleControlledUnit(PetalNode *node, const TQString& name, Uml::IDType id, UMLPackage *parentPkg) {
if (node->findAttribute("is_unit").string != "TRUE")
return false;
bool is_loaded = (node->findAttribute("is_loaded").string != "FALSE");
- QString file_name = node->findAttribute("file_name").string;
+ TQString file_name = node->findAttribute("file_name").string;
if (file_name.isEmpty()) {
kError() << "handleControlledUnit(" << name
<< "): attribute file_name not found (?)" << endl;
@@ -340,9 +340,9 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg = NULL) {
kError() << "umbrellify: node is NULL" << endl;
return false;
}
- QStringList args = node->initialArgs();
- QString objType = args[0];
- QString name = clean(args[1]);
+ TQStringList args = node->initialArgs();
+ TQString objType = args[0];
+ TQString name = clean(args[1]);
Uml::IDType id = quid(node);
if (objType == "Class_Category") {
@@ -365,7 +365,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg = NULL) {
o->setID(id);
UMLClassifier *c = static_cast<UMLClassifier*>(o);
// set stereotype
- QString stereotype = clean(node->findAttribute("stereotype").string);
+ TQString stereotype = clean(node->findAttribute("stereotype").string);
if (!stereotype.isEmpty()) {
if (stereotype.lower() == "interface")
c->setBaseType(Uml::ot_Interface);
@@ -407,42 +407,42 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg = NULL) {
// index 0 corresponds to Umbrello roleB
// index 1 corresponds to Umbrello roleA
UMLRole *role = assoc->getUMLRole((Uml::Role_Type) !i);
- QStringList initialArgs = roleNode->initialArgs();
+ TQStringList initialArgs = roleNode->initialArgs();
if (initialArgs.count() > 1) {
- QString roleName = clean(initialArgs[1]);
+ TQString roleName = clean(initialArgs[1]);
if (! roleName.startsWith("$UNNAMED"))
role->setName(roleName);
}
role->setID(quid(roleNode));
- QString quidref = quidu(roleNode);
- QString type = clean(roleNode->findAttribute("supplier").string);
+ TQString quidref = quidu(roleNode);
+ TQString type = clean(roleNode->findAttribute("supplier").string);
if (!quidref.isEmpty()) {
role->setSecondaryId(quidref);
}
if (!type.isEmpty()) {
role->setSecondaryFallback(type);
}
- QString label = clean(roleNode->findAttribute("label").string);
+ TQString label = clean(roleNode->findAttribute("label").string);
if (!label.isEmpty()) {
role->setName(label);
}
- QString client_cardinality = clean(roleNode->findAttribute("client_cardinality").string);
+ TQString client_cardinality = clean(roleNode->findAttribute("client_cardinality").string);
if (!client_cardinality.isEmpty()) {
role->setMultiplicity(client_cardinality);
}
- QString is_navigable = clean(roleNode->findAttribute("is_navigable").string);
+ TQString is_navigable = clean(roleNode->findAttribute("is_navigable").string);
if (is_navigable == "FALSE") {
assoc->setAssocType(Uml::at_Association);
}
- QString is_aggregate = clean(roleNode->findAttribute("is_aggregate").string);
+ TQString is_aggregate = clean(roleNode->findAttribute("is_aggregate").string);
if (is_aggregate == "TRUE") {
assoc->setAssocType(Uml::at_Aggregation);
}
- QString containment = clean(roleNode->findAttribute("Containment").string);
+ TQString containment = clean(roleNode->findAttribute("Containment").string);
if (containment == "By Value") {
assoc->setAssocType(Uml::at_Composition);
}
- QString doc = roleNode->findAttribute("documentation").string;
+ TQString doc = roleNode->findAttribute("documentation").string;
if (! doc.isEmpty())
role->setDoc(doc);
}
@@ -488,14 +488,14 @@ Uml::ListView_Type folderType(UMLListViewItem *parent) {
* Given a PetalNode for which the mapping to Umbrello is not yet
* implemented umbrellify() is a no-op but also returns true.
*/
-bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *parent) {
+bool umbrellify(PetalNode *node, const TQString& modelsName, UMLListViewItem *parent) {
if (node == NULL) {
kError() << "umbrellify(" << modelsName << "): node is NULL" << endl;
return false;
}
- QStringList args = node->initialArgs();
- QString objType = args[0];
- QString name = clean(args[1]);
+ TQStringList args = node->initialArgs();
+ TQString objType = args[0];
+ TQString name = clean(args[1]);
Uml::IDType id = quid(node);
UMLObject *obj = NULL;
UMLListViewItem *item = NULL;
@@ -504,7 +504,7 @@ bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *par
Uml::ListView_Type lvType = folderType(parent);
item = new UMLListViewItem( parent, name, lvType, id );
} else if (objType == "Class") {
- QString stereotype = clean(node->findAttribute("stereotype").string);
+ TQString stereotype = clean(node->findAttribute("stereotype").string);
if (stereotype == "Actor") {
UMLActor *act = new UMLActor(name, id);
item = new UMLListViewItem(parent, name, Uml::lvt_Actor, act);
@@ -540,7 +540,7 @@ bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *par
}
}
if (obj) {
- QString doc = node->findAttribute("documentation").string;
+ TQString doc = node->findAttribute("documentation").string;
if (! doc.isEmpty())
obj->setDoc(doc);
UMLDoc *theDocument = UMLApp::app()->getDocument();
@@ -552,8 +552,8 @@ bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *par
/**
* Auxiliary function for UseCase/Component/Deployment view import
*/
-bool importView(PetalNode *root, const QString& rootName,
- const QString& modelsName, UMLListViewItem *lvParent) {
+bool importView(PetalNode *root, const TQString& rootName,
+ const TQString& modelsName, UMLListViewItem *lvParent) {
PetalNode *viewRoot = root->findAttribute(rootName).node;
if (viewRoot == NULL) {
kDebug() << "importView: cannot find " << rootName << endl;
diff --git a/umbrello/umbrello/plugin.cpp b/umbrello/umbrello/plugin.cpp
index 1447afcd..8a751374 100644
--- a/umbrello/umbrello/plugin.cpp
+++ b/umbrello/umbrello/plugin.cpp
@@ -28,10 +28,10 @@
using namespace Umbrello;
-Plugin::Plugin(QObject *parent,
+Plugin::Plugin(TQObject *parent,
const char *name,
- const QStringList & /* args */) :
- QObject(parent, name),
+ const TQStringList & /* args */) :
+ TQObject(parent, name),
Configurable(),
_ref(0),
_instanceName(name),
@@ -55,7 +55,7 @@ Plugin::unload()
_ref--;
if(_ref == 0) {
// save the name
- QString pluginName = _instanceName;
+ TQString pluginName = _instanceName;
// shutdown and delete
shutdown();
@@ -150,7 +150,7 @@ Plugin::configure()
loadPlugins(conf, "Load");
// only load GUI plugins if this is not a terminal app
- if(KApplication::kApplication()->type() != QApplication::Tty) {
+ if(KApplication::kApplication()->type() != TQApplication::Tty) {
loadPlugins(conf, "LoadGUI");
}
}
@@ -161,7 +161,7 @@ Plugin::configure()
QString
Plugin::category()
{
- return QString("miscellaneous");
+ return TQString("miscellaneous");
}
#include "plugin.moc"
diff --git a/umbrello/umbrello/plugin.h b/umbrello/umbrello/plugin.h
index 8d1eacc8..c7fc7638 100644
--- a/umbrello/umbrello/plugin.h
+++ b/umbrello/umbrello/plugin.h
@@ -20,7 +20,7 @@
#define UMBRELLO_PLUGIN_H
// Qt includes
-#include <qobject.h>
+#include <tqobject.h>
// KDE includes
#include <kgenericfactory.h>
@@ -85,7 +85,7 @@ class PluginLoader;
* is constructed.
*/
class Plugin :
- public QObject,
+ public TQObject,
public Configurable
{
Q_OBJECT
@@ -95,13 +95,13 @@ public:
virtual ~Plugin();
/** Return the instance name of the plugin */
- QCString instanceName() const;
+ TQCString instanceName() const;
/** Return the configuration record for the plugin */
KConfig *config();
/** Return the category descriptor string */
- virtual QString category();
+ virtual TQString category();
/**
* Unload the plugin. This method actually only decrements
@@ -112,7 +112,7 @@ public:
protected:
/** Construct a plugin */
- Plugin(QObject *parent, const char *name, const QStringList &args);
+ Plugin(TQObject *parent, const char *name, const TQStringList &args);
/** Can be reimplemented to define plugin specific startup behavior */
virtual bool onInit();
@@ -155,7 +155,7 @@ private:
protected:
uint _ref; ///< Reference counter
- QCString _instanceName; ///< Instance name of the plugin
+ TQCString _instanceName; ///< Instance name of the plugin
KConfig *_config; ///< Configuration record
};
}
diff --git a/umbrello/umbrello/pluginloader.cpp b/umbrello/umbrello/pluginloader.cpp
index db79bca1..583b3858 100644
--- a/umbrello/umbrello/pluginloader.cpp
+++ b/umbrello/umbrello/pluginloader.cpp
@@ -17,7 +17,7 @@
#include "pluginloader.h"
// Qt includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <kdebug.h>
@@ -53,7 +53,7 @@ PluginLoader::instance()
}
Plugin *
-PluginLoader::loadPlugin(const QString &name)
+PluginLoader::loadPlugin(const TQString &name)
{
KLibrary *lib = NULL;
KLibFactory *factory = NULL;
@@ -87,7 +87,7 @@ PluginLoader::loadPlugin(const QString &name)
// use the factory to create the plugin
if(success) {
- plugin = dynamic_cast<Plugin *>(factory->create((QObject*)0, name.latin1()));
+ plugin = dynamic_cast<Plugin *>(factory->create((TQObject*)0, name.latin1()));
if(!plugin) {
kdError() << "failed to create a plugin object for " << name << endl;
success = false;
@@ -117,14 +117,14 @@ PluginLoader::loadPlugin(const QString &name)
// reference to it
if(success) {
plugin->ref();
- connect(plugin, SIGNAL(destroyed(QObject *)), SLOT(slotDestroyed(QObject *)));
+ connect(plugin, TQT_SIGNAL(destroyed(TQObject *)), TQT_SLOT(slotDestroyed(TQObject *)));
}
return plugin;
}
Plugin *
-PluginLoader::findPlugin(const QString &name)
+PluginLoader::findPlugin(const TQString &name)
{
Plugin *ret = NULL;
PluginMap::iterator it = _plugins.find(name);
@@ -135,7 +135,7 @@ PluginLoader::findPlugin(const QString &name)
}
void
-PluginLoader::unloadPlugin(const QString &name)
+PluginLoader::unloadPlugin(const TQString &name)
{
KLibLoader::self()->unloadLibrary(name.latin1());
}
@@ -153,7 +153,7 @@ PluginLoader::categories() const
}
void
-PluginLoader::slotDestroyed(QObject *obj)
+PluginLoader::slotDestroyed(TQObject *obj)
{
Plugin *plugin = static_cast<Plugin *>(obj);
diff --git a/umbrello/umbrello/pluginloader.h b/umbrello/umbrello/pluginloader.h
index 64ebed6f..ec422501 100644
--- a/umbrello/umbrello/pluginloader.h
+++ b/umbrello/umbrello/pluginloader.h
@@ -20,9 +20,9 @@
#define UMBRELLO_PLUGINLOADER_H
// Qt includes
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
// forward declarations
class QString;
@@ -48,7 +48,7 @@ class Plugin;
*
* On the subject of unloading, we actually have very little to do.
* The unload method on a plugin is simply a reference decrementer.
- * When it reaches 0, the object destroys itself. Being a QObject,
+ * When it reaches 0, the object destroys itself. Being a TQObject,
* it will emit the destroyed signal just before deletion, allowing
* the plugin loader to respond to the event and remove the plugin
* from its mapping.
@@ -73,13 +73,13 @@ public:
/** Just a container of plugins */
- typedef QValueList<Plugin *> PluginList;
+ typedef TQValueList<Plugin *> PluginList;
/** The containment type for mapping plugins */
- typedef QMap<QString, Plugin *> PluginMap;
+ typedef TQMap<TQString, Plugin *> PluginMap;
/** Container of plugin categories */
- typedef QMap<QString, PluginList> CategoryMap;
+ typedef TQMap<TQString, PluginList> CategoryMap;
/** Singleton accessor */
static PluginLoader *instance();
@@ -88,10 +88,10 @@ public:
* Load a plugin. Test to see if the plugin already exists. If it
* does, just add a reference to it and continue on.
*/
- Plugin *loadPlugin(const QString &name);
+ Plugin *loadPlugin(const TQString &name);
/** Find a plugin */
- Plugin *findPlugin(const QString &name);
+ Plugin *findPlugin(const TQString &name);
/**
* Unload a plugin. Never use this method. It is only used by the deref
@@ -99,7 +99,7 @@ public:
* library. In fact, there is actually no corresponding plugin to unload,
* we just unload the library.
*/
- void unloadPlugin(const QString &name);
+ void unloadPlugin(const TQString &name);
/**
* Get a reference to the plugin mapping. This method wraps everything
@@ -117,7 +117,7 @@ private slots:
* when they are finally deleted. The plugin loader uses this signal
* to remove the plugin from the plugin map.
*/
- void slotDestroyed(QObject *obj);
+ void slotDestroyed(TQObject *obj);
private:
/** Private constructor - This must be created through the instance method */
diff --git a/umbrello/umbrello/refactoring/refactoringassistant.cpp b/umbrello/umbrello/refactoring/refactoringassistant.cpp
index 0cbcf6aa..193f9545 100644
--- a/umbrello/umbrello/refactoring/refactoringassistant.cpp
+++ b/umbrello/umbrello/refactoring/refactoringassistant.cpp
@@ -22,8 +22,8 @@
#include "../dialogs/umlattributedialog.h"
#include "../object_factory.h"
-#include <qpoint.h>
-#include <qpopupmenu.h>
+#include <tqpoint.h>
+#include <tqpopupmenu.h>
#include <typeinfo>
#include <kstandarddirs.h>
@@ -35,7 +35,7 @@
using std::type_info;
-RefactoringAssistant::RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj, QWidget *parent, const char *name ):
+RefactoringAssistant::RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj, TQWidget *parent, const char *name ):
KListView( parent, name ), m_doc( doc )
{
loadPixmaps();
@@ -54,11 +54,11 @@ RefactoringAssistant::RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj, QWi
addColumn("Name ");
- m_menu = new QPopupMenu(this);
+ m_menu = new TQPopupMenu(this);
- connect(this,SIGNAL(doubleClicked(QListViewItem*)),this,SLOT(itemExecuted(QListViewItem*)));
- connect(this,SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this,SLOT(showContextMenu(KListView*,QListViewItem*,const QPoint&)));
+ connect(this,TQT_SIGNAL(doubleClicked(TQListViewItem*)),this,TQT_SLOT(itemExecuted(TQListViewItem*)));
+ connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this,TQT_SLOT(showContextMenu(KListView*,TQListViewItem*,const TQPoint&)));
resize(300,400);
@@ -82,19 +82,19 @@ void RefactoringAssistant::refactor( UMLClassifier *obj )
}
addClassifier( obj, 0, true, true, true );
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
item->setOpen(true);
for( item = item->firstChild(); item ; item = item->nextSibling() )
item->setOpen(true);
}
-UMLObject* RefactoringAssistant::findUMLObject( const QListViewItem *item )
+UMLObject* RefactoringAssistant::findUMLObject( const TQListViewItem *item )
{
- QListViewItem *i = const_cast<QListViewItem*>(item);
+ TQListViewItem *i = const_cast<TQListViewItem*>(item);
if( m_umlObjectMap.find(i) == m_umlObjectMap.end() )
{
- kWarning()<<"RefactoringAssistant::findUMLObject( QListViewItem *item )"
+ kWarning()<<"RefactoringAssistant::findUMLObject( TQListViewItem *item )"
<<"item with text "<<item->text(0)<<"not found in uml map!"<<endl;
return 0L;
}
@@ -102,7 +102,7 @@ UMLObject* RefactoringAssistant::findUMLObject( const QListViewItem *item )
}
-QListViewItem* RefactoringAssistant::findListViewItem( const UMLObject *obj )
+TQListViewItem* RefactoringAssistant::findListViewItem( const UMLObject *obj )
{
UMLObjectMap::iterator end(m_umlObjectMap.end());
for( UMLObjectMap::iterator it(m_umlObjectMap.begin()) ; it != end ; ++it )
@@ -115,13 +115,13 @@ QListViewItem* RefactoringAssistant::findListViewItem( const UMLObject *obj )
}
-void RefactoringAssistant::itemExecuted( QListViewItem *item )
+void RefactoringAssistant::itemExecuted( TQListViewItem *item )
{
UMLObject *o = findUMLObject( item );
if(o) editProperties( );
}
-void RefactoringAssistant::setVisibilityIcon( QListViewItem *item , const UMLObject *obj )
+void RefactoringAssistant::setVisibilityIcon( TQListViewItem *item , const UMLObject *obj )
{
switch(obj->getVisibility())
{
@@ -145,7 +145,7 @@ void RefactoringAssistant::umlObjectModified( const UMLObject *obj )
{
if( !obj )
obj = dynamic_cast<const UMLObject*>(sender());
- QListViewItem *item = findListViewItem( obj );
+ TQListViewItem *item = findListViewItem( obj );
if( !item )
return;
item->setText( 0, obj->getName() );
@@ -166,18 +166,18 @@ void RefactoringAssistant::operationAdded( UMLClassifierListItem *o )
<< ") - Parent of operation is not a classifier!" << endl;
return;
}
- QListViewItem *item = findListViewItem( c );
+ TQListViewItem *item = findListViewItem( c );
if( !item )
{
return;
}
- for( QListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
+ for( TQListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
{
if( folder->text(1) == "operations" )
{
item = new KListViewItem( folder, op->getName() );
m_umlObjectMap[item] = op;
- connect( op, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ connect( op, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
setVisibilityIcon( item, op );
break;
}
@@ -187,12 +187,12 @@ void RefactoringAssistant::operationAdded( UMLClassifierListItem *o )
void RefactoringAssistant::operationRemoved( UMLClassifierListItem *o )
{
UMLOperation *op = static_cast<UMLOperation*>(o);
- QListViewItem *item = findListViewItem( op );
+ TQListViewItem *item = findListViewItem( op );
if( !item )
{
return;
}
- disconnect( op, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ disconnect( op, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
m_umlObjectMap.erase(item);
delete item;
}
@@ -208,18 +208,18 @@ void RefactoringAssistant::attributeAdded( UMLClassifierListItem *a )
<< ") - Parent is not a class!" << endl;
return;
}
- QListViewItem *item = findListViewItem( c );
+ TQListViewItem *item = findListViewItem( c );
if( !item )
{
return;
}
- for( QListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
+ for( TQListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
{
if( folder->text(1) == "attributes" )
{
item = new KListViewItem( folder, att->getName() );
m_umlObjectMap[item] = att;
- connect( att, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ connect( att, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
setVisibilityIcon( item, att );
break;
}
@@ -229,19 +229,19 @@ void RefactoringAssistant::attributeAdded( UMLClassifierListItem *a )
void RefactoringAssistant::attributeRemoved( UMLClassifierListItem *a )
{
UMLAttribute *att = static_cast<UMLAttribute*>(a);
- QListViewItem *item = findListViewItem( att );
+ TQListViewItem *item = findListViewItem( att );
if( !item )
{
return;
}
- disconnect( att, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ disconnect( att, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
m_umlObjectMap.erase(item);
delete item;
}
void RefactoringAssistant::editProperties( )
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if( item )
{
UMLObject *o = findUMLObject( item );
@@ -277,7 +277,7 @@ void RefactoringAssistant::editProperties( UMLObject *obj )
delete dia;
}
-void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, const QPoint &p)
+void RefactoringAssistant::showContextMenu(KListView* ,TQListViewItem *item, const TQPoint &p)
{
m_menu->clear();
UMLObject *obj = findUMLObject( item );
@@ -286,17 +286,17 @@ void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, cons
Uml::Object_Type t = obj->getBaseType();
if (t == Uml::ot_Class)
{
- m_menu->insertItem(i18n("Add Base Class"),this,SLOT(addBaseClassifier()));
- m_menu->insertItem(i18n("Add Derived Class"),this,SLOT(addDerivedClassifier()));
- // m_menu->insertItem(i18n("Add Interface Implementation"),this,SLOT(addInterfaceImplementation()));
- m_menu->insertItem(i18n("Add Operation"),this,SLOT(createOperation()));
- m_menu->insertItem(i18n("Add Attribute"),this,SLOT(createAttribute()));
+ m_menu->insertItem(i18n("Add Base Class"),this,TQT_SLOT(addBaseClassifier()));
+ m_menu->insertItem(i18n("Add Derived Class"),this,TQT_SLOT(addDerivedClassifier()));
+ // m_menu->insertItem(i18n("Add Interface Implementation"),this,TQT_SLOT(addInterfaceImplementation()));
+ m_menu->insertItem(i18n("Add Operation"),this,TQT_SLOT(createOperation()));
+ m_menu->insertItem(i18n("Add Attribute"),this,TQT_SLOT(createAttribute()));
}
else if (t == Uml::ot_Interface)
{
- m_menu->insertItem(i18n("Add Base Interface"),this,SLOT(addSuperClassifier()));
- m_menu->insertItem(i18n("Add Derived Interface"),this,SLOT(addDerivedClassifier()));
- m_menu->insertItem(i18n("Add Operation"),this,SLOT(createOperation()));
+ m_menu->insertItem(i18n("Add Base Interface"),this,TQT_SLOT(addSuperClassifier()));
+ m_menu->insertItem(i18n("Add Derived Interface"),this,TQT_SLOT(addDerivedClassifier()));
+ m_menu->insertItem(i18n("Add Operation"),this,TQT_SLOT(createOperation()));
}
// else
// {
@@ -304,17 +304,17 @@ void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, cons
// return;
// }
m_menu->insertSeparator();
- m_menu->insertItem(i18n("Properties"),this,SLOT(editProperties()));
+ m_menu->insertItem(i18n("Properties"),this,TQT_SLOT(editProperties()));
}
else
{//menu for other ViewItems
if( item->text(1) == "operations" )
{
- m_menu->insertItem(i18n("Add Operation"),this,SLOT(createOperation()));
+ m_menu->insertItem(i18n("Add Operation"),this,TQT_SLOT(createOperation()));
}
else if( item->text(1) == "attributes" )
{
- m_menu->insertItem(i18n("Add Attribute"),this,SLOT(createAttribute()));
+ m_menu->insertItem(i18n("Add Attribute"),this,TQT_SLOT(createAttribute()));
}
else
{
@@ -328,7 +328,7 @@ void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, cons
void RefactoringAssistant::addBaseClassifier()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::addBaseClassifier() "
@@ -351,7 +351,7 @@ void RefactoringAssistant::addBaseClassifier()
m_doc->createUMLAssociation( obj, super, Uml::at_Generalization );
////////////////////// Manually add the classifier to the assitant - would be nicer to do it with
///////////////////// a signal, like operations and attributes
- QListViewItem *baseFolder = item->firstChild();
+ TQListViewItem *baseFolder = item->firstChild();
while( baseFolder->text(0) != i18n("Base Classifiers") )
baseFolder = baseFolder->nextSibling();
if(!baseFolder)
@@ -369,7 +369,7 @@ void RefactoringAssistant::addBaseClassifier()
void RefactoringAssistant::addDerivedClassifier()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::addDerivedClassifier() "
@@ -393,7 +393,7 @@ void RefactoringAssistant::addDerivedClassifier()
////////////////////// Manually add the classifier to the assitant - would be nicer to do it with
///////////////////// a signal, like operations and attributes
- QListViewItem *derivedFolder = item->firstChild();
+ TQListViewItem *derivedFolder = item->firstChild();
while( derivedFolder->text(0) != i18n("Derived Classifiers") )
derivedFolder = derivedFolder->nextSibling();
if(!derivedFolder)
@@ -414,7 +414,7 @@ void RefactoringAssistant::addInterfaceImplementation()
kWarning()<<"RefactoringAssistant::addInterfaceImplementation()"
<<"not implemented... finish addSuperClassifier() first!!"<<endl;
return;
- // QListViewItem *item = selectedListViewItem( );
+ // TQListViewItem *item = selectedListViewItem( );
// UMLObject *obj = findUMLObject( item );
// if( !dynamic_cast<UMLClassifier*>(obj) )
// return;
@@ -427,7 +427,7 @@ void RefactoringAssistant::addInterfaceImplementation()
void RefactoringAssistant::createOperation()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::createOperation() "
@@ -442,7 +442,7 @@ void RefactoringAssistant::createOperation()
void RefactoringAssistant::createAttribute()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::createAttribute() "
@@ -456,9 +456,9 @@ void RefactoringAssistant::createAttribute()
}
-void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewItem *parent, bool addSuper, bool addSub, bool recurse)
+void RefactoringAssistant::addClassifier( UMLClassifier *classifier, TQListViewItem *parent, bool addSuper, bool addSub, bool recurse)
{
- QListViewItem *classifierItem, *item;
+ TQListViewItem *classifierItem, *item;
if( parent )
{
classifierItem = parent;
@@ -469,17 +469,17 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
m_umlObjectMap[classifierItem] = classifier;
}
- connect( classifier, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ connect( classifier, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
UMLClassifier *klass = dynamic_cast<UMLClassifier*>(classifier);
if( klass )
{// only Classes have attributes...
- connect( classifier, SIGNAL(attributeAdded(UMLClassifierListItem*)),
- this, SLOT(attributeAdded(UMLClassifierListItem*)));
- connect( classifier, SIGNAL(attributeRemoved(UMLClassifierListItem*)),
- this, SLOT(attributeRemoved(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(attributeAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(attributeAdded(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(attributeRemoved(UMLClassifierListItem*)));
- QListViewItem *attsFolder = new KListViewItem( classifierItem, i18n("Attributes"), "attributes" );
+ TQListViewItem *attsFolder = new KListViewItem( classifierItem, i18n("Attributes"), "attributes" );
attsFolder->setPixmap(0,SmallIcon("folder_green_open"));
attsFolder->setExpandable( true );
UMLAttributeList atts = klass->getAttributeList();
@@ -491,12 +491,12 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
}
// add operations
- connect( classifier, SIGNAL(operationAdded(UMLClassifierListItem*)),
- this, SLOT(operationAdded(UMLClassifierListItem*)));
- connect( classifier, SIGNAL(operationRemoved(UMLClassifierListItem*)),
- this, SLOT(operationRemoved(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(operationAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(operationAdded(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(operationRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(operationRemoved(UMLClassifierListItem*)));
- QListViewItem *opsFolder = new KListViewItem( classifierItem, i18n("Operations"), "operations" );
+ TQListViewItem *opsFolder = new KListViewItem( classifierItem, i18n("Operations"), "operations" );
opsFolder->setPixmap(0,SmallIcon("folder_blue_open"));
opsFolder->setExpandable( true );
UMLOperationList ops(classifier->getOpList());
@@ -508,7 +508,7 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
//if add parents
if(addSuper)
{
- QListViewItem *superFolder = new KListViewItem( classifierItem, i18n("Base Classifiers") );
+ TQListViewItem *superFolder = new KListViewItem( classifierItem, i18n("Base Classifiers") );
superFolder->setExpandable( true );
UMLClassifierList super = classifier->findSuperClassConcepts();
for( UMLClassifier *cl = super.first(); cl ; cl = super.next() )
@@ -527,7 +527,7 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
if(addSub)
{
//add derived classifiers
- QListViewItem *derivedFolder = new KListViewItem( classifierItem, i18n("Derived Classifiers") );
+ TQListViewItem *derivedFolder = new KListViewItem( classifierItem, i18n("Derived Classifiers") );
derivedFolder->setExpandable( true );
UMLClassifierList derived = classifier->findSubClassConcepts();
for( UMLClassifier *d = derived.first(); d ; d = derived.next() )
@@ -546,7 +546,7 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
}
-bool RefactoringAssistant::acceptDrag(QDropEvent *event) const
+bool RefactoringAssistant::acceptDrag(TQDropEvent *event) const
{
//first check if we can accept drops at all, and if the operation
// is a move within the list itself
@@ -558,7 +558,7 @@ bool RefactoringAssistant::acceptDrag(QDropEvent *event) const
RefactoringAssistant *me = const_cast<RefactoringAssistant*>(this);
//ok, check if the move is valid
- QListViewItem *movingItem = 0, *afterme = 0, *parentItem = 0;
+ TQListViewItem *movingItem = 0, *afterme = 0, *parentItem = 0;
me->findDrop(event->pos(), parentItem, afterme);
for( movingItem = firstChild(); movingItem != 0; movingItem = movingItem->itemBelow() )
{
@@ -613,12 +613,12 @@ bool RefactoringAssistant::acceptDrag(QDropEvent *event) const
}
-void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListViewItem* afterme)
+void RefactoringAssistant::movableDropEvent (TQListViewItem* parentItem, TQListViewItem* afterme)
{
//when dropping on a class, we have to put the item in the appropriate folder!
UMLObject *movingObject;
UMLClassifier *newClassifier;
- QListViewItem *movingItem;
+ TQListViewItem *movingItem;
for( movingItem = firstChild(); movingItem != 0; movingItem = movingItem->itemBelow() )
{
@@ -650,9 +650,9 @@ void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListVie
UMLOperation *op = static_cast<UMLOperation*>(movingObject);
if(newClassifier->checkOperationSignature(op->getName(), op->getParmList()))
{
- QString msg = QString(i18n("An operation with that signature already exists in %1.\n")).arg(newClassifier->getName())
+ TQString msg = TQString(i18n("An operation with that signature already exists in %1.\n")).arg(newClassifier->getName())
+
- QString(i18n("Choose a different name or parameter list." ));
+ TQString(i18n("Choose a different name or parameter list." ));
KMessageBox::error(this, msg, i18n("Operation Name Invalid"), false);
return;
}
@@ -666,9 +666,9 @@ void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListVie
// UMLAttribute *att = static_cast<UMLAttribute*>(movingObject);
// if(!newClassifier->checkAttributeSignature(att))
// {
- // QString msg = QString(i18n("An attribute with that signature already exists in %1.\n")).arg(newClassifier->getName())
+ // TQString msg = TQString(i18n("An attribute with that signature already exists in %1.\n")).arg(newClassifier->getName())
// +
- // QString(i18n("Choose a different name or parameter list." ));
+ // TQString(i18n("Choose a different name or parameter list." ));
// KMessageBox::error(this, msg, i18n("Operation Name Invalid"), false);
// return;
// }
@@ -682,7 +682,7 @@ void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListVie
void RefactoringAssistant::loadPixmaps()
{
KStandardDirs *dirs = KGlobal::dirs();
- QString dataDir = dirs -> findResourceDir( "data", "umbrello/pics/object.png" );
+ TQString dataDir = dirs -> findResourceDir( "data", "umbrello/pics/object.png" );
dataDir += "/umbrello/pics/";
m_pixmaps.Public.load( dataDir + "CVpublic_var.png" );
diff --git a/umbrello/umbrello/refactoring/refactoringassistant.h b/umbrello/umbrello/refactoring/refactoringassistant.h
index 5d8bd79f..306d19ed 100644
--- a/umbrello/umbrello/refactoring/refactoringassistant.h
+++ b/umbrello/umbrello/refactoring/refactoringassistant.h
@@ -16,7 +16,7 @@
#include <klistview.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <map>
@@ -32,9 +32,9 @@ class RefactoringAssistant : public KListView
{
Q_OBJECT
public:
- typedef std::map<QListViewItem*, UMLObject*> UMLObjectMap;
+ typedef std::map<TQListViewItem*, UMLObject*> UMLObjectMap;
- explicit RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj = 0, QWidget *parent = 0, const char *name = 0 );
+ explicit RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj = 0, TQWidget *parent = 0, const char *name = 0 );
virtual ~RefactoringAssistant();
void refactor( UMLClassifier *obj );
@@ -56,11 +56,11 @@ public slots:
void attributeAdded( UMLClassifierListItem *a );
void attributeRemoved( UMLClassifierListItem *a );
- void itemExecuted( QListViewItem *item );
- void showContextMenu( KListView*, QListViewItem*, const QPoint&);
+ void itemExecuted( TQListViewItem *item );
+ void showContextMenu( KListView*, TQListViewItem*, const TQPoint&);
protected:
- struct { QPixmap Public,
+ struct { TQPixmap Public,
Protected,
Private,
Implementation,
@@ -68,17 +68,17 @@ protected:
Subclass;
} m_pixmaps;
- UMLObject* findUMLObject( const QListViewItem* );
- QListViewItem* findListViewItem( const UMLObject *obj );
+ UMLObject* findUMLObject( const TQListViewItem* );
+ TQListViewItem* findListViewItem( const UMLObject *obj );
void editProperties( UMLObject *obj );
- void addClassifier( UMLClassifier *classifier, QListViewItem *parent = 0, bool addSuper = true, bool addSub = true, bool recurse = false );
+ void addClassifier( UMLClassifier *classifier, TQListViewItem *parent = 0, bool addSuper = true, bool addSub = true, bool recurse = false );
void loadPixmaps();
- virtual bool acceptDrag(QDropEvent *event) const;
- virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
- void setVisibilityIcon( QListViewItem *item , const UMLObject *obj );
+ virtual bool acceptDrag(TQDropEvent *event) const;
+ virtual void movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme);
+ void setVisibilityIcon( TQListViewItem *item , const UMLObject *obj );
UMLClassifier *m_umlObject;
UMLDoc *m_doc;
- QPopupMenu *m_menu;
+ TQPopupMenu *m_menu;
UMLObjectMap m_umlObjectMap;
diff --git a/umbrello/umbrello/seqlinewidget.cpp b/umbrello/umbrello/seqlinewidget.cpp
index a4be0216..6d52834f 100644
--- a/umbrello/umbrello/seqlinewidget.cpp
+++ b/umbrello/umbrello/seqlinewidget.cpp
@@ -23,10 +23,10 @@
// class members
int const SeqLineWidget::m_nMouseDownEpsilonX = 20;
-SeqLineWidget::SeqLineWidget( UMLView * pView, ObjectWidget * pObject ) : QCanvasLine( pView -> canvas() ) {
+SeqLineWidget::SeqLineWidget( UMLView * pView, ObjectWidget * pObject ) : TQCanvasLine( pView -> canvas() ) {
m_pView = pView;
m_pObject = pObject;
- setPen( QPen( m_pObject->getLineColor(), 0, Qt::DashLine ) );
+ setPen( TQPen( m_pObject->getLineColor(), 0, Qt::DashLine ) );
setZ( 0 );
setVisible( true );
m_DestructionBox.line1 = 0;
@@ -36,10 +36,10 @@ SeqLineWidget::SeqLineWidget( UMLView * pView, ObjectWidget * pObject ) : QCanva
SeqLineWidget::~SeqLineWidget() {}
-int SeqLineWidget::onWidget( const QPoint & p ) {
+int SeqLineWidget::onWidget( const TQPoint & p ) {
int nOnWidget = 0;
- QPoint sp = startPoint();
- QPoint ep = endPoint();
+ TQPoint sp = startPoint();
+ TQPoint ep = endPoint();
//see if on widget ( for message creation )
if( sp.x() - m_nMouseDownEpsilonX < p.x()
&& ep.x() + m_nMouseDownEpsilonX > p.x()
@@ -57,7 +57,7 @@ void SeqLineWidget::cleanup() {
void SeqLineWidget::setStartPoint( int startX, int startY ) {
int endX = startX;
int endY = startY + m_nLengthY;
- QCanvasLine::setPoints( startX, startY, endX, endY );
+ TQCanvasLine::setPoints( startX, startY, endX, endY );
moveDestructionBox();
}
@@ -75,22 +75,22 @@ void SeqLineWidget::setupDestructionBox() {
if( !m_pObject->getShowDestruction() ) {
return;
}
- QRect rect;
+ TQRect rect;
rect.setX( m_pObject->getX() + m_pObject->getWidth() / 2 - 10 );
rect.setY( m_pObject->getY() + m_pObject->getHeight() + m_nLengthY );
rect.setWidth( 14 );
rect.setHeight( 14 );
- m_DestructionBox.line1 = new QCanvasLine( m_pView->canvas() );
+ m_DestructionBox.line1 = new TQCanvasLine( m_pView->canvas() );
m_DestructionBox.setLine1Points(rect);
m_DestructionBox.line1->setVisible( true );
- m_DestructionBox.line1->setPen( QPen(m_pObject->getLineColor(), 2) );
+ m_DestructionBox.line1->setPen( TQPen(m_pObject->getLineColor(), 2) );
m_DestructionBox.line1->setZ( 3 );
- m_DestructionBox.line2 = new QCanvasLine( m_pView -> canvas() );
+ m_DestructionBox.line2 = new TQCanvasLine( m_pView -> canvas() );
m_DestructionBox.setLine2Points(rect);
m_DestructionBox.line2->setVisible( true );
- m_DestructionBox.line2->setPen( QPen(m_pObject->getLineColor(), 2) );
+ m_DestructionBox.line2->setPen( TQPen(m_pObject->getLineColor(), 2) );
m_DestructionBox.line2->setZ( 3 );
}
@@ -98,7 +98,7 @@ void SeqLineWidget::moveDestructionBox() {
if( !m_DestructionBox.line1 ) {
return;
}
- QRect rect;
+ TQRect rect;
rect.setX( m_pObject->getX() + m_pObject->getWidth() / 2 - 7 );
rect.setY( m_pObject->getY() + m_pObject->getHeight() + m_nLengthY - 7 );
rect.setWidth( 14 );
@@ -108,7 +108,7 @@ void SeqLineWidget::moveDestructionBox() {
}
void SeqLineWidget::setEndOfLine(int yPosition) {
- QPoint sp = startPoint();
+ TQPoint sp = startPoint();
int newY = yPosition;
m_nLengthY = yPosition - m_pObject->getY() - m_pObject->getHeight();
// normally the managing Objectwidget is responsible for the call of this function
diff --git a/umbrello/umbrello/seqlinewidget.h b/umbrello/umbrello/seqlinewidget.h
index 1978fafd..71ee9d73 100644
--- a/umbrello/umbrello/seqlinewidget.h
+++ b/umbrello/umbrello/seqlinewidget.h
@@ -12,7 +12,7 @@
#ifndef SEQLINEWIDGET_H
#define SEQLINEWIDGET_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
class UMLView;
class ObjectWidget;
@@ -22,7 +22,7 @@ class ObjectWidget;
* @author Paul Hensgen
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class SeqLineWidget : public QCanvasLine {
+class SeqLineWidget : public TQCanvasLine {
public:
/**
* Constructor.
@@ -41,7 +41,7 @@ public:
* @param p The point to investigate.
* @return Non-zero if point is on this sequence line.
*/
- int onWidget(const QPoint & p);
+ int onWidget(const TQPoint & p);
/**
* Clean up anything before deletion.
@@ -109,13 +109,13 @@ protected:
/// The destruction box.
struct DestructionBox {
- QCanvasLine * line1;
- QCanvasLine * line2;
- void setLine1Points(QRect rect) {
+ TQCanvasLine * line1;
+ TQCanvasLine * line2;
+ void setLine1Points(TQRect rect) {
line1->setPoints( rect.x(), rect.y(),
rect.x() + rect.width(), rect.y() + rect.height() );
}
- void setLine2Points(QRect rect) {
+ void setLine2Points(TQRect rect) {
line2->setPoints( rect.x(), rect.y() + rect.height(),
rect.x() + rect.width(), rect.y() );
}
diff --git a/umbrello/umbrello/statewidget.cpp b/umbrello/umbrello/statewidget.cpp
index 9d104234..871ab316 100644
--- a/umbrello/umbrello/statewidget.cpp
+++ b/umbrello/umbrello/statewidget.cpp
@@ -13,7 +13,7 @@
#include "statewidget.h"
// qt includes
-#include <qevent.h>
+#include <tqevent.h>
// kde includes
#include <klocale.h>
@@ -39,7 +39,7 @@ StateWidget::StateWidget(UMLView * view, StateType stateType, Uml::IDType id)
StateWidget::~StateWidget() {}
-void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void StateWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
const int w = width();
const int h = height();
@@ -49,14 +49,14 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
if(UMLWidget::getUseFillColour())
p.setBrush(UMLWidget::getFillColour());
{
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
int textStartY = (h / 2) - (fontHeight / 2);
const int count = m_Activities.count();
if( count == 0 ) {
p.drawRoundRect(offsetX, offsetY, w, h, (h*40)/w, (w*40)/h);
p.setPen(Qt::black);
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold( false );
p.setFont( font );
p.drawText(offsetX + STATE_MARGIN, offsetY + textStartY,
@@ -67,7 +67,7 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.drawRoundRect(offsetX, offsetY, w, h, (h*40)/w, (w*40)/h);
textStartY = offsetY + STATE_MARGIN;
p.setPen(Qt::black);
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold( true );
p.setFont( font );
p.drawText(offsetX + STATE_MARGIN, textStartY, w - STATE_MARGIN * 2,
@@ -77,8 +77,8 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
int linePosY = textStartY + fontHeight;
- QStringList::Iterator end(m_Activities.end());
- for( QStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
+ TQStringList::Iterator end(m_Activities.end());
+ for( TQStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
textStartY += fontHeight;
p.drawLine( offsetX, linePosY, offsetX + w - 1, linePosY );
p.setPen(Qt::black);
@@ -110,10 +110,10 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-QSize StateWidget::calculateSize() {
+TQSize StateWidget::calculateSize() {
int width = 10, height = 10;
if ( m_StateType == Normal ) {
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
int textWidth = fm.width(getName());
const int count = m_Activities.count();
@@ -121,8 +121,8 @@ QSize StateWidget::calculateSize() {
if( count > 0 ) {
height = fontHeight * ( count + 1);
- QStringList::Iterator end(m_Activities.end());
- for( QStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
+ TQStringList::Iterator end(m_Activities.end());
+ for( TQStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
int w = fm.width( *it );
if( w > textWidth )
textWidth = w;
@@ -134,16 +134,16 @@ QSize StateWidget::calculateSize() {
height += STATE_MARGIN * 2;
}
- return QSize(width, height);
+ return TQSize(width, height);
}
-void StateWidget::setName(const QString &strName) {
+void StateWidget::setName(const TQString &strName) {
m_Text = strName;
updateComponentSize();
adjustAssocs( getX(), getY() );
}
-QString StateWidget::getName() const {
+TQString StateWidget::getName() const {
return m_Text;
}
@@ -158,7 +158,7 @@ void StateWidget::setStateType( StateType stateType ) {
void StateWidget::slotMenuSelection(int sel) {
bool done = false;
bool ok = false;
- QString name = getName();
+ TQString name = getName();
switch( sel ) {
case ListPopupMenu::mt_Rename:
@@ -184,13 +184,13 @@ void StateWidget::slotMenuSelection(int sel) {
UMLWidget::slotMenuSelection( sel );
}
-bool StateWidget::addActivity( const QString &activity ) {
+bool StateWidget::addActivity( const TQString &activity ) {
m_Activities.append( activity );
updateComponentSize();
return true;
}
-bool StateWidget::removeActivity( const QString &activity ) {
+bool StateWidget::removeActivity( const TQString &activity ) {
int index = - 1;
if( ( index = m_Activities.findIndex( activity ) ) == -1 )
return false;
@@ -199,16 +199,16 @@ bool StateWidget::removeActivity( const QString &activity ) {
return true;
}
-void StateWidget::setActivities( QStringList & list ) {
+void StateWidget::setActivities( TQStringList & list ) {
m_Activities = list;
updateComponentSize();
}
-QStringList & StateWidget::getActivityList() {
+TQStringList & StateWidget::getActivityList() {
return m_Activities;
}
-bool StateWidget::renameActivity( const QString &activity, const QString &newName ) {
+bool StateWidget::renameActivity( const TQString &activity, const TQString &newName ) {
int index = - 1;
if( ( index = m_Activities.findIndex( activity ) ) == -1 )
return false;
@@ -247,18 +247,18 @@ bool StateWidget::isState(WorkToolBar::ToolBar_Buttons tbb, StateType& resultTyp
return status;
}
-void StateWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement stateElement = qDoc.createElement( "statewidget" );
+void StateWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement stateElement = qDoc.createElement( "statewidget" );
UMLWidget::saveToXMI( qDoc, stateElement );
stateElement.setAttribute( "statename", m_Text );
stateElement.setAttribute( "documentation", m_Doc );
stateElement.setAttribute( "statetype", m_StateType );
//save states activities
- QDomElement activitiesElement = qDoc.createElement( "Activities" );
+ TQDomElement activitiesElement = qDoc.createElement( "Activities" );
- QStringList::Iterator end(m_Activities.end());
- for( QStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
- QDomElement tempElement = qDoc.createElement( "Activity" );
+ TQStringList::Iterator end(m_Activities.end());
+ for( TQStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
+ TQDomElement tempElement = qDoc.createElement( "Activity" );
tempElement.setAttribute( "name", *it );
activitiesElement.appendChild( tempElement );
}//end for
@@ -266,22 +266,22 @@ void StateWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( stateElement );
}
-bool StateWidget::loadFromXMI( QDomElement & qElement ) {
+bool StateWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
m_Text = qElement.attribute( "statename", "" );
m_Doc = qElement.attribute( "documentation", "" );
- QString type = qElement.attribute( "statetype", "1" );
+ TQString type = qElement.attribute( "statetype", "1" );
m_StateType = (StateType)type.toInt();
//load states activities
- QDomNode node = qElement.firstChild();
- QDomElement tempElement = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement tempElement = node.toElement();
if( !tempElement.isNull() && tempElement.tagName() == "Activities" ) {
- QDomNode node = tempElement.firstChild();
- QDomElement activityElement = node.toElement();
+ TQDomNode node = tempElement.firstChild();
+ TQDomElement activityElement = node.toElement();
while( !activityElement.isNull() ) {
if( activityElement.tagName() == "Activity" ) {
- QString name = activityElement.attribute( "name", "" );
+ TQString name = activityElement.attribute( "name", "" );
if( !name.isEmpty() )
m_Activities.append( name );
}//end if
diff --git a/umbrello/umbrello/statewidget.h b/umbrello/umbrello/statewidget.h
index d214980b..e1611c18 100644
--- a/umbrello/umbrello/statewidget.h
+++ b/umbrello/umbrello/statewidget.h
@@ -11,8 +11,8 @@
#ifndef STATEWIDGET_H
#define STATEWIDGET_H
-#include <qpainter.h>
-#include <qstringlist.h>
+#include <tqpainter.h>
+#include <tqstringlist.h>
#include "umlwidget.h"
#include "worktoolbar.h"
@@ -64,17 +64,17 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Sets the name of the State.
*/
- virtual void setName(const QString &strName);
+ virtual void setName(const TQString &strName);
/**
* Returns the name of the State.
*/
- virtual QString getName() const;
+ virtual TQString getName() const;
/**
* Returns the type of state.
@@ -89,27 +89,27 @@ public:
/**
* Adds the given activity to the state.
*/
- bool addActivity( const QString &activity );
+ bool addActivity( const TQString &activity );
/**
* Removes the given activity from the state.
*/
- bool removeActivity( const QString &activity );
+ bool removeActivity( const TQString &activity );
/**
* Renames the given activity.
*/
- bool renameActivity( const QString &activity, const QString &newName );
+ bool renameActivity( const TQString &activity, const TQString &newName );
/**
* Sets the states activities to the ones given.
*/
- void setActivities( QStringList & list );
+ void setActivities( TQStringList & list );
/**
* Returns the list of activities.
*/
- QStringList & getActivityList();
+ TQStringList & getActivityList();
/**
* Show a properties dialog for a StateWidget.
@@ -129,18 +129,18 @@ public:
/**
* Creates the "statewidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads a "statewidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Type of state.
@@ -150,7 +150,7 @@ protected:
/**
* List of activities for the state.
*/
- QStringList m_Activities;
+ TQStringList m_Activities;
public slots:
diff --git a/umbrello/umbrello/stereotype.cpp b/umbrello/umbrello/stereotype.cpp
index 5cd68f11..c3b912f4 100644
--- a/umbrello/umbrello/stereotype.cpp
+++ b/umbrello/umbrello/stereotype.cpp
@@ -21,7 +21,7 @@
#include "umldoc.h"
#include "uml.h"
-UMLStereotype::UMLStereotype(const QString &name, Uml::IDType id /* = Uml::id_None */)
+UMLStereotype::UMLStereotype(const TQString &name, Uml::IDType id /* = Uml::id_None */)
: UMLObject( name, id ) {
m_BaseType = Uml::ot_Stereotype;
UMLStereotype * existing = UMLApp::app()->getDocument()->findStereotype(name);
@@ -65,15 +65,15 @@ UMLObject* UMLStereotype::clone() const
}
-void UMLStereotype::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLStereotype::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
//FIXME: uml13.dtd compliance
- QDomElement stereotypeElement = UMLObject::save("UML:Stereotype", qDoc);
+ TQDomElement stereotypeElement = UMLObject::save("UML:Stereotype", qDoc);
qElement.appendChild( stereotypeElement );
}
-bool UMLStereotype::showPropertiesDialog(QWidget* parent) {
+bool UMLStereotype::showPropertiesDialog(TQWidget* parent) {
bool ok;
- QString name = KInputDialog::getText(i18n("Stereotype"), i18n("Enter name:"), getName(),&ok, parent);
+ TQString name = KInputDialog::getText(i18n("Stereotype"), i18n("Enter name:"), getName(),&ok, parent);
if (ok) {
setName(name);
}
diff --git a/umbrello/umbrello/stereotype.h b/umbrello/umbrello/stereotype.h
index a836952f..a727fed8 100644
--- a/umbrello/umbrello/stereotype.h
+++ b/umbrello/umbrello/stereotype.h
@@ -33,7 +33,7 @@ public:
* @param name The name of this UMLStereotype.
* @param id The unique id given to this UMLStereotype.
*/
- explicit UMLStereotype(const QString &name, Uml::IDType id = Uml::id_None);
+ explicit UMLStereotype(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Sets up a stereotype.
@@ -79,13 +79,13 @@ public:
/**
* Saves to the <UML:StereoType> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Display the properties configuration dialog for the stereotype
* (just a line edit).
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
protected:
/**
diff --git a/umbrello/umbrello/template.cpp b/umbrello/umbrello/template.cpp
index 12d08fab..f02f4426 100644
--- a/umbrello/umbrello/template.cpp
+++ b/umbrello/umbrello/template.cpp
@@ -13,7 +13,7 @@
#include "template.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
@@ -21,8 +21,8 @@
#include "umldoc.h"
#include "dialogs/umltemplatedialog.h"
-UMLTemplate::UMLTemplate(const UMLObject *parent, const QString& name,
- Uml::IDType id, const QString& type)
+UMLTemplate::UMLTemplate(const UMLObject *parent, const TQString& name,
+ Uml::IDType id, const TQString& type)
: UMLClassifierListItem( parent, name, id ) {
setTypeName( type );
m_BaseType = Uml::ot_Template;
@@ -35,7 +35,7 @@ UMLTemplate::UMLTemplate(const UMLObject *parent)
UMLTemplate::~UMLTemplate() {}
-QString UMLTemplate::toString(Uml::Signature_Type /*sig = st_NoSig*/) {
+TQString UMLTemplate::toString(Uml::Signature_Type /*sig = st_NoSig*/) {
if (m_pSecondary == NULL || m_pSecondary->getName() == "class") {
return getName();
} else {
@@ -43,7 +43,7 @@ QString UMLTemplate::toString(Uml::Signature_Type /*sig = st_NoSig*/) {
}
}
-QString UMLTemplate::getTypeName() {
+TQString UMLTemplate::getTypeName() {
if (m_pSecondary == NULL)
return "class";
return m_pSecondary->getName();
@@ -76,20 +76,20 @@ UMLObject* UMLTemplate::clone() const
}
-void UMLTemplate::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLTemplate::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
//FIXME: uml13.dtd compliance
- QDomElement attributeElement = UMLObject::save("UML:TemplateParameter", qDoc);
+ TQDomElement attributeElement = UMLObject::save("UML:TemplateParameter", qDoc);
if (m_pSecondary)
attributeElement.setAttribute("type", ID2STR(m_pSecondary->getID()));
qElement.appendChild(attributeElement);
}
-bool UMLTemplate::load(QDomElement& element) {
+bool UMLTemplate::load(TQDomElement& element) {
m_SecondaryId = element.attribute("type", "");
return true;
}
-bool UMLTemplate::showPropertiesDialog(QWidget* parent) {
+bool UMLTemplate::showPropertiesDialog(TQWidget* parent) {
UMLTemplateDialog dialog(parent, this);
return dialog.exec();
}
diff --git a/umbrello/umbrello/template.h b/umbrello/umbrello/template.h
index 1109411a..6b471207 100644
--- a/umbrello/umbrello/template.h
+++ b/umbrello/umbrello/template.h
@@ -35,8 +35,8 @@ public:
* @param id The unique id given to this UMLTemplate.
* @param type The type of this UMLTemplate.
*/
- UMLTemplate(const UMLObject *parent, const QString& name,
- Uml::IDType id = Uml::id_None, const QString& type = "class");
+ UMLTemplate(const UMLObject *parent, const TQString& name,
+ Uml::IDType id = Uml::id_None, const TQString& type = "class");
/**
* Sets up a template.
@@ -72,7 +72,7 @@ public:
* @param sig Currently unused.
* @return Returns a string representation of the UMLTemplate.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Overrides method from UMLClassifierListItem.
@@ -82,25 +82,25 @@ public:
*
* @return The type name of the UMLClassifierListItem.
*/
- virtual QString getTypeName();
+ virtual TQString getTypeName();
/**
* Display the properties configuration dialog for the template.
*
* @return Success status.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
/**
* Writes the <UML:TemplateParameter> XMI element.
*/
- void saveToXMI(QDomDocument & qDoc, QDomElement & qElement);
+ void saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement);
protected:
/**
* Loads the <UML:TemplateParameter> XMI element.
*/
- bool load(QDomElement & element);
+ bool load(TQDomElement & element);
};
diff --git a/umbrello/umbrello/textblock.cpp b/umbrello/umbrello/textblock.cpp
index e9779875..f3ea35fe 100644
--- a/umbrello/umbrello/textblock.cpp
+++ b/umbrello/umbrello/textblock.cpp
@@ -19,7 +19,7 @@
#include "textblock.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "codedocument.h"
@@ -30,8 +30,8 @@
// Constructors/Destructors
//
-TextBlock::TextBlock ( CodeDocument * parent, const QString & text )
- : QObject ( (QObject *)parent, "textBlock")
+TextBlock::TextBlock ( CodeDocument * parent, const TQString & text )
+ : TQObject ( (TQObject *)parent, "textBlock")
{
initFields(parent);
setText(text);
@@ -73,7 +73,7 @@ CodeDocument * TextBlock::getParentDocument ( ) {
* The actual text of this code block.
* @param new_var the new value of m_text
*/
-void TextBlock::setText ( const QString &new_var ) {
+void TextBlock::setText ( const TQString &new_var ) {
m_text = new_var;
}
@@ -81,7 +81,7 @@ void TextBlock::setText ( const QString &new_var ) {
* Add text to this object.
*
*/
-void TextBlock::appendText ( const QString &new_text ) {
+void TextBlock::appendText ( const TQString &new_text ) {
m_text = m_text + new_text;
}
@@ -90,7 +90,7 @@ void TextBlock::appendText ( const QString &new_text ) {
* The actual text of this code block.
* @return the value of m_text
*/
-QString TextBlock::getText ( ) const {
+TQString TextBlock::getText ( ) const {
return m_text;
}
@@ -99,7 +99,7 @@ QString TextBlock::getText ( ) const {
* may be used to find this text block in the code document
* to which it belongs.
*/
-QString TextBlock::getTag( ) const {
+TQString TextBlock::getTag( ) const {
return m_tag;
}
@@ -108,7 +108,7 @@ QString TextBlock::getTag( ) const {
* may be used to find this text block in the code document
* to which it belongs.
*/
-void TextBlock::setTag ( const QString &value ) {
+void TextBlock::setTag ( const TQString &value ) {
m_tag = value;
}
@@ -144,21 +144,21 @@ int TextBlock::getIndentationLevel ( ) {
return m_indentationLevel;
}
-QString TextBlock::getNewLineEndingChars ( ) {
+TQString TextBlock::getNewLineEndingChars ( ) {
CodeGenerationPolicy * policy = UMLApp::app()->getCommonPolicy();
return policy->getNewLineEndingChars();
}
-QString TextBlock::getIndentation() {
+TQString TextBlock::getIndentation() {
CodeGenerationPolicy * policy = UMLApp::app()->getCommonPolicy();
return policy->getIndentation();
}
-QString TextBlock::getIndentationString ( int level ) {
+TQString TextBlock::getIndentationString ( int level ) {
if (!level)
level = m_indentationLevel;
- QString indentAmount = getIndentation();
- QString indentation = "";
+ TQString indentAmount = getIndentation();
+ TQString indentation = "";
for(int i=0; i<level; i++)
indentation.append(indentAmount);
return indentation;
@@ -177,20 +177,20 @@ QString TextBlock::getIndentationString ( int level ) {
int TextBlock::firstEditableLine() { return 0; }
int TextBlock::lastEditableLine() { return 0; }
-QString TextBlock::getNewEditorLine ( int amount ) {
+TQString TextBlock::getNewEditorLine ( int amount ) {
return getIndentationString(amount);
}
// will remove indenation from this text block.
-QString TextBlock::unformatText ( const QString & text, const QString & indent )
+TQString TextBlock::unformatText ( const TQString & text, const TQString & indent )
{
- QString output = text;
- QString myIndent = indent;
+ TQString output = text;
+ TQString myIndent = indent;
if(myIndent.isEmpty())
myIndent = getIndentationString();
if(!output.isEmpty())
- output.remove(QRegExp('^'+myIndent));
+ output.remove(TQRegExp('^'+myIndent));
return output;
}
@@ -200,22 +200,22 @@ void TextBlock::release () {
//this->deleteLater();
}
-QString TextBlock::formatMultiLineText ( const QString &work, const QString &linePrefix,
- const QString& breakStr, bool addBreak, bool lastLineHasBreak ) {
- QString output = "";
- QString text = work;
- QString endLine = getNewLineEndingChars();
- int matches = text.contains(QRegExp(breakStr));
+TQString TextBlock::formatMultiLineText ( const TQString &work, const TQString &linePrefix,
+ const TQString& breakStr, bool addBreak, bool lastLineHasBreak ) {
+ TQString output = "";
+ TQString text = work;
+ TQString endLine = getNewLineEndingChars();
+ int matches = text.contains(TQRegExp(breakStr));
if(matches)
{
// check that last part of string matches, if not, then
// we have to tack on extra match
- if(!text.contains(QRegExp(breakStr+"\\$")))
+ if(!text.contains(TQRegExp(breakStr+"\\$")))
matches++;
for(int i=0; i < matches; i++)
{
- QString line = text.section(QRegExp(breakStr),i,i);
+ TQString line = text.section(TQRegExp(breakStr),i,i);
output += linePrefix + line;
if((i != matches-1) || lastLineHasBreak)
output += endLine; // add break to line
@@ -229,10 +229,10 @@ QString TextBlock::formatMultiLineText ( const QString &work, const QString &lin
return output;
}
-void TextBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void TextBlock::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
if (&doc != 0 ) {
@@ -240,7 +240,7 @@ void TextBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockEle
// only write these if different from defaults
if(getIndentationLevel())
- blockElement.setAttribute("indentLevel",QString::number(getIndentationLevel()));
+ blockElement.setAttribute("indentLevel",TQString::number(getIndentationLevel()));
if(!m_text.isEmpty())
blockElement.setAttribute("text",encodeText(m_text,endLine));
if(!getWriteOutText())
@@ -263,9 +263,9 @@ void TextBlock::setAttributesFromObject(TextBlock * obj)
}
-void TextBlock::setAttributesFromNode (QDomElement & root ) {
+void TextBlock::setAttributesFromNode (TQDomElement & root ) {
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
setIndentationLevel(root.attribute("indentLevel","0").toInt());
setTag(root.attribute("tag",""));
@@ -278,31 +278,31 @@ void TextBlock::setAttributesFromNode (QDomElement & root ) {
// encode text for XML storage
// we simply convert all types of newLines to the "\n" or &#010;
// entity.
-QString TextBlock::encodeText(const QString& text, const QString &endLine) {
- QString encoded = text;
- encoded.replace(QRegExp(endLine),"&#010;");
+TQString TextBlock::encodeText(const TQString& text, const TQString &endLine) {
+ TQString encoded = text;
+ encoded.replace(TQRegExp(endLine),"&#010;");
return encoded;
}
// encode text for XML storage
// we simply convert all types of newLines to the "\n" or &#010;
// entity.
-QString TextBlock::decodeText(const QString& text, const QString &endLine) {
- QString decoded = text;
- decoded.replace(QRegExp("&#010;"),endLine);
+TQString TextBlock::decodeText(const TQString& text, const TQString &endLine) {
+ TQString decoded = text;
+ decoded.replace(TQRegExp("&#010;"),endLine);
return decoded;
}
/**
* @return QString
*/
-QString TextBlock::toString ( )
+TQString TextBlock::toString ( )
{
// simple output method
if(m_writeOutText && !m_text.isEmpty())
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
return formatMultiLineText(m_text, getIndentationString(), endLine);
} else
return "";
diff --git a/umbrello/umbrello/textblock.h b/umbrello/umbrello/textblock.h
index 16dcd910..8a3ac9fd 100644
--- a/umbrello/umbrello/textblock.h
+++ b/umbrello/umbrello/textblock.h
@@ -19,8 +19,8 @@
#ifndef TEXTBLOCK_H
#define TEXTBLOCK_H
-#include <qdom.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqobject.h>
class CodeDocument;
@@ -29,7 +29,7 @@ class CodeDocument;
* The fundemental unit of text within an output file containing code.
*/
-class TextBlock : virtual public QObject {
+class TextBlock : virtual public TQObject {
friend class CodeGenObjectWithTextBlocks;
friend class ClassifierCodeDocument;
Q_OBJECT
@@ -41,7 +41,7 @@ public:
/**
* Constructors
*/
- explicit TextBlock ( CodeDocument * parent, const QString & text = "");
+ explicit TextBlock ( CodeDocument * parent, const TQString & text = "");
// destructor
~TextBlock ( );
@@ -57,34 +57,34 @@ public:
* The actual text of this code block.
* @param new_var the new value of m_text
*/
- void setText ( const QString &new_var );
+ void setText ( const TQString &new_var );
/**
* Add text to this object.
*
*/
- void appendText ( const QString &new_text );
+ void appendText ( const TQString &new_text );
/**
* Get the value of m_text
* The actual text of this code block.
* @return the value of m_text
*/
- QString getText ( ) const;
+ TQString getText ( ) const;
/**
* Get the tag of this text block. This tag
* may be used to find this text block in the code document
* to which it belongs.
*/
- QString getTag( ) const;
+ TQString getTag( ) const;
/**
* Set the tag of this text block. This tag
* may be used to find this text block in the code document
* to which it belongs.
*/
- void setTag( const QString &value );
+ void setTag( const TQString &value );
/**
* Get the value of m_parentDoc
@@ -120,53 +120,53 @@ public:
/** Get the actual amount of indentation for a given level of indentation.
*/
- QString getIndentationString ( int level = 0);
+ TQString getIndentationString ( int level = 0);
/** Get how much a single "level" of indentation will actually indent.
*/
- QString getIndentation();
+ TQString getIndentation();
- QString getNewLineEndingChars ( );
+ TQString getNewLineEndingChars ( );
/** Format a long text string to be more readable.
*/
// should be static
- QString formatMultiLineText ( const QString &text, const QString &linePrefix,
- const QString& breakStr,
+ TQString formatMultiLineText ( const TQString &text, const TQString &linePrefix,
+ const TQString& breakStr,
bool alwaysAddBreak = true, bool lastLineHasBreak = true);
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
* If an indentation isnt specified, then the current indentation is used.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "");
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "");
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/** encode text for XML storage
* we simply convert all types of newLines to the "\n" or &#010;
* entity.
*/
- static QString encodeText(const QString& text , const QString &endChars);
+ static TQString encodeText(const TQString& text , const TQString &endChars);
/** decode text from XML storage
* We simply convert all newLine entity &#010; to chosen line ending.
*/
- static QString decodeText(const QString& text, const QString &endChars);
+ static TQString decodeText(const TQString& text, const TQString &endChars);
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root ) = 0;
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root ) = 0;
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root ) = 0;
+ virtual void loadFromXMI ( TQDomElement & root ) = 0;
/** Determine if its OK to delete this textblock from the document.
* Used by the text editor to know if deletion could cause a crash of
@@ -184,7 +184,7 @@ public:
* If the indentation amount is '0' the current indentationString will
* be used.
*/
- virtual QString getNewEditorLine( int indentAmount = 0 );
+ virtual TQString getNewEditorLine( int indentAmount = 0 );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
@@ -213,20 +213,20 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
bool m_canDelete;
private:
// The actual text of this code block.
- QString m_text;
- QString m_tag;
+ TQString m_text;
+ TQString m_tag;
// Whether or not to include the text of this TextBlock into a file.
bool m_writeOutText;
diff --git a/umbrello/umbrello/textblocklist.h b/umbrello/umbrello/textblocklist.h
index 48048b8b..bb1b7416 100644
--- a/umbrello/umbrello/textblocklist.h
+++ b/umbrello/umbrello/textblocklist.h
@@ -12,12 +12,12 @@
#ifndef _TEXTBLOCKLIST_H
#define _TEXTBLOCKLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class TextBlock;
-typedef QPtrList<TextBlock> TextBlockList;
-typedef QPtrListIterator<TextBlock> TextBlockListIt;
+typedef TQPtrList<TextBlock> TextBlockList;
+typedef TQPtrListIterator<TextBlock> TextBlockListIt;
#endif
diff --git a/umbrello/umbrello/toolbarstate.cpp b/umbrello/umbrello/toolbarstate.cpp
index 339214a8..bf0ae9f0 100644
--- a/umbrello/umbrello/toolbarstate.cpp
+++ b/umbrello/umbrello/toolbarstate.cpp
@@ -13,7 +13,7 @@
#include "toolbarstate.h"
// qt includes
-#include <qwmatrix.h> // need for inverseWorldMatrix.map
+#include <tqwmatrix.h> // need for inverseWorldMatrix.map
// app includes
#include "associationwidget.h"
@@ -32,21 +32,21 @@ void ToolBarState::init() {
m_currentWidget = 0;
m_currentAssociation = 0;
- connect(m_pUMLView, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- this, SLOT(slotAssociationRemoved(AssociationWidget*)));
- connect(m_pUMLView, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- this, SLOT(slotWidgetRemoved(UMLWidget*)));
+ connect(m_pUMLView, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ this, TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ connect(m_pUMLView, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ this, TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
}
void ToolBarState::cleanBeforeChange() {
- disconnect(m_pUMLView, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- this, SLOT(slotAssociationRemoved(AssociationWidget*)));
- disconnect(m_pUMLView, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- this, SLOT(slotWidgetRemoved(UMLWidget*)));
+ disconnect(m_pUMLView, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ this, TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ disconnect(m_pUMLView, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ this, TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
}
-void ToolBarState::mousePress(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseButtonPress);
+void ToolBarState::mousePress(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseButtonPress);
m_pUMLView->viewport()->setMouseTracking(true);
@@ -71,8 +71,8 @@ void ToolBarState::mousePress(QMouseEvent* ome) {
}
}
-void ToolBarState::mouseRelease(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseButtonRelease);
+void ToolBarState::mouseRelease(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseButtonRelease);
// Set the position of the mouse
// TODO, should only be available in this state?
@@ -95,8 +95,8 @@ void ToolBarState::mouseRelease(QMouseEvent* ome) {
changeTool();
}
-void ToolBarState::mouseDoubleClick(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseButtonDblClick);
+void ToolBarState::mouseDoubleClick(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseButtonDblClick);
UMLWidget* currentWidget = m_pUMLView->getWidgetAt(m_pMouseEvent->pos());
AssociationWidget* currentAssociation = getAssociationAt(m_pMouseEvent->pos());
@@ -113,8 +113,8 @@ void ToolBarState::mouseDoubleClick(QMouseEvent* ome) {
}
}
-void ToolBarState::mouseMove(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseMove);
+void ToolBarState::mouseMove(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseMove);
if (getCurrentWidget()) {
mouseMoveWidget();
@@ -153,7 +153,7 @@ void ToolBarState::slotWidgetRemoved(UMLWidget* widget) {
}
}
-ToolBarState::ToolBarState(UMLView *umlView) : QObject(umlView), m_pUMLView(umlView) {
+ToolBarState::ToolBarState(UMLView *umlView) : TQObject(umlView), m_pUMLView(umlView) {
m_pMouseEvent = NULL;
init();
}
@@ -226,14 +226,14 @@ void ToolBarState::changeTool() {
}
}
-void ToolBarState::setMouseEvent(QMouseEvent* ome, const QEvent::Type &type) {
+void ToolBarState::setMouseEvent(TQMouseEvent* ome, const TQEvent::Type &type) {
if (m_pMouseEvent) delete m_pMouseEvent;
- m_pMouseEvent = new QMouseEvent(type, m_pUMLView->inverseWorldMatrix().map(ome->pos()),
+ m_pMouseEvent = new TQMouseEvent(type, m_pUMLView->inverseWorldMatrix().map(ome->pos()),
ome->button(),ome->state());
}
-MessageWidget* ToolBarState::getMessageAt(const QPoint& pos) {
+MessageWidget* ToolBarState::getMessageAt(const TQPoint& pos) {
MessageWidget* message = 0;
for (MessageWidgetListIt it(m_pUMLView->getMessageList());
(message = it.current()) != 0; ++it) {
@@ -245,7 +245,7 @@ MessageWidget* ToolBarState::getMessageAt(const QPoint& pos) {
return message;
}
-AssociationWidget* ToolBarState::getAssociationAt(const QPoint& pos) {
+AssociationWidget* ToolBarState::getAssociationAt(const TQPoint& pos) {
AssociationWidget* association = 0;
for (AssociationWidgetListIt it(m_pUMLView->getAssociationList());
(association = it.current()) != 0; ++it) {
diff --git a/umbrello/umbrello/toolbarstate.h b/umbrello/umbrello/toolbarstate.h
index e005c021..4027ce6b 100644
--- a/umbrello/umbrello/toolbarstate.h
+++ b/umbrello/umbrello/toolbarstate.h
@@ -12,8 +12,8 @@
#ifndef TOOLBARSTATE_H
#define TOOLBARSTATE_H
-#include <qevent.h>
-#include <qobject.h>
+#include <tqevent.h>
+#include <tqobject.h>
class QEvent;
class QMouseEvent;
@@ -68,7 +68,7 @@ class UMLWidget;
* @todo Handle, for example, left press, right press, left release, right
* release and other similar strange combinations?
*/
-class ToolBarState: public QObject {
+class ToolBarState: public TQObject {
Q_OBJECT
public:
@@ -102,7 +102,7 @@ public:
* @param ome The received event.
* @see setCurrentElement()
*/
- virtual void mousePress(QMouseEvent *ome);
+ virtual void mousePress(TQMouseEvent *ome);
/**
* Handler for mouse release events.
@@ -113,7 +113,7 @@ public:
*
* @param ome The received event.
*/
- virtual void mouseRelease(QMouseEvent* ome);
+ virtual void mouseRelease(TQMouseEvent* ome);
/**
* Handler for mouse double click events.
@@ -123,7 +123,7 @@ public:
*
* @param ome The received event.
*/
- virtual void mouseDoubleClick(QMouseEvent* ome);
+ virtual void mouseDoubleClick(TQMouseEvent* ome);
/**
* Handler for mouse double click events.
@@ -138,7 +138,7 @@ public:
*
* @param ome The received event.
*/
- virtual void mouseMove(QMouseEvent* ome);
+ virtual void mouseMove(TQMouseEvent* ome);
public slots:
@@ -162,7 +162,7 @@ protected:
/**
* Creates a new ToolBarState.
- * UMLView is set as parent of this QObject, and name is left empty.
+ * UMLView is set as parent of this TQObject, and name is left empty.
* Protected to avoid classes other than derived to create objects of this
* class.
*
@@ -313,7 +313,7 @@ protected:
* @param ome The mouse event to transform.
* @param type The type of the event.
*/
- void setMouseEvent(QMouseEvent* ome, const QEvent::Type &type);
+ void setMouseEvent(TQMouseEvent* ome, const TQEvent::Type &type);
/**
* Returns the AssociationWidget at the specified position, or null if there is none.
@@ -323,7 +323,7 @@ protected:
* @return The AssociationWidget at the specified position, or null if there is none.
* @todo Better handling for associations at the same point
*/
- AssociationWidget* getAssociationAt(const QPoint& pos);
+ AssociationWidget* getAssociationAt(const TQPoint& pos);
/**
* Returns the MessageWidget at the specified position, or null if there is none.
@@ -334,7 +334,7 @@ protected:
* @return The MessageWidget at the specified position, or null if there is none.
* @todo Better handling for messages at the same point
*/
- MessageWidget* getMessageAt(const QPoint& pos);
+ MessageWidget* getMessageAt(const TQPoint& pos);
/**
* The UMLView.
@@ -346,7 +346,7 @@ protected:
* This event is the equivalent of the received event after transforming it
* using the inverse world matrix in the UMLView.
*/
- QMouseEvent* m_pMouseEvent;
+ TQMouseEvent* m_pMouseEvent;
private:
diff --git a/umbrello/umbrello/toolbarstatearrow.cpp b/umbrello/umbrello/toolbarstatearrow.cpp
index d8205350..ad24d753 100644
--- a/umbrello/umbrello/toolbarstatearrow.cpp
+++ b/umbrello/umbrello/toolbarstatearrow.cpp
@@ -54,10 +54,10 @@ void ToolBarStateArrow::mousePressEmpty() {
m_startPosition = m_pMouseEvent->pos();
for (int i = 0; i < 4; i++) {
- QCanvasLine* line = new QCanvasLine(m_pUMLView->canvas());
+ TQCanvasLine* line = new TQCanvasLine(m_pUMLView->canvas());
line->setPoints(m_pMouseEvent->x(), m_pMouseEvent->y(),
m_pMouseEvent->x(), m_pMouseEvent->y());
- line->setPen(QPen(QColor("grey"), 0, Qt::DotLine));
+ line->setPen(TQPen(TQColor("grey"), 0, Qt::DotLine));
line->setVisible(true);
line->setZ(100);
m_selectionRect.append(line);
@@ -99,7 +99,7 @@ void ToolBarStateArrow::mouseMoveWidget() {
void ToolBarStateArrow::mouseMoveEmpty() {
if (m_selectionRect.count() == 4) {
- QCanvasLine* line = m_selectionRect.at(0);
+ TQCanvasLine* line = m_selectionRect.at(0);
line->setPoints(m_startPosition.x(), m_startPosition.y(),
m_pMouseEvent->x(), m_startPosition.y());
diff --git a/umbrello/umbrello/toolbarstatearrow.h b/umbrello/umbrello/toolbarstatearrow.h
index a2fab59f..ca57492f 100644
--- a/umbrello/umbrello/toolbarstatearrow.h
+++ b/umbrello/umbrello/toolbarstatearrow.h
@@ -146,12 +146,12 @@ protected:
/**
* The selection rectangle that contains the four lines of its borders.
*/
- QPtrList<QCanvasLine> m_selectionRect;
+ TQPtrList<TQCanvasLine> m_selectionRect;
/**
* The start position of the selection rectangle.
*/
- QPoint m_startPosition;
+ TQPoint m_startPosition;
};
diff --git a/umbrello/umbrello/toolbarstateassociation.cpp b/umbrello/umbrello/toolbarstateassociation.cpp
index d36647dd..64d2fbfe 100644
--- a/umbrello/umbrello/toolbarstateassociation.cpp
+++ b/umbrello/umbrello/toolbarstateassociation.cpp
@@ -54,11 +54,11 @@ void ToolBarStateAssociation::cleanBeforeChange() {
cleanAssociation();
}
-void ToolBarStateAssociation::mouseMove(QMouseEvent* ome) {
+void ToolBarStateAssociation::mouseMove(TQMouseEvent* ome) {
ToolBarStatePool::mouseMove(ome);
if (m_associationLine) {
- QPoint sp = m_associationLine->startPoint();
+ TQPoint sp = m_associationLine->startPoint();
m_associationLine->setPoints(sp.x(), sp.y(), m_pMouseEvent->x(), m_pMouseEvent->y());
}
}
@@ -120,7 +120,7 @@ void ToolBarStateAssociation::setFirstWidget() {
return;
}
//set up position
- QPoint pos;
+ TQPoint pos;
pos.setX(widget->getX() + (widget->getWidth() / 2));
pos.setY(widget->getY() + (widget->getHeight() / 2));
//TODO why is this needed?
@@ -128,9 +128,9 @@ void ToolBarStateAssociation::setFirstWidget() {
m_firstWidget = widget;
- m_associationLine = new QCanvasLine(m_pUMLView->canvas());
+ m_associationLine = new TQCanvasLine(m_pUMLView->canvas());
m_associationLine->setPoints(pos.x(), pos.y(), pos.x(), pos.y());
- m_associationLine->setPen(QPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
+ m_associationLine->setPen(TQPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
m_associationLine->setVisible(true);
diff --git a/umbrello/umbrello/toolbarstateassociation.h b/umbrello/umbrello/toolbarstateassociation.h
index 1d6c5174..a983806e 100644
--- a/umbrello/umbrello/toolbarstateassociation.h
+++ b/umbrello/umbrello/toolbarstateassociation.h
@@ -68,7 +68,7 @@ public:
* It executes the base method and then updates the position of the
* association line, if any.
*/
- virtual void mouseMove(QMouseEvent* ome);
+ virtual void mouseMove(TQMouseEvent* ome);
public slots:
@@ -161,7 +161,7 @@ private:
* The association line shown while the first widget is selected and the
* second one wasn't selected yet.
*/
- QCanvasLine* m_associationLine;
+ TQCanvasLine* m_associationLine;
};
diff --git a/umbrello/umbrello/toolbarstatemessages.cpp b/umbrello/umbrello/toolbarstatemessages.cpp
index 36ffb005..cd0fac78 100644
--- a/umbrello/umbrello/toolbarstatemessages.cpp
+++ b/umbrello/umbrello/toolbarstatemessages.cpp
@@ -44,11 +44,11 @@ void ToolBarStateMessages::cleanBeforeChange() {
cleanMessage();
}
-void ToolBarStateMessages::mouseMove(QMouseEvent* ome) {
+void ToolBarStateMessages::mouseMove(TQMouseEvent* ome) {
ToolBarStatePool::mouseMove(ome);
if (m_messageLine) {
- QPoint sp = m_messageLine->startPoint();
+ TQPoint sp = m_messageLine->startPoint();
m_messageLine->setPoints(sp.x(), sp.y(), m_pMouseEvent->x(), m_pMouseEvent->y());
}
}
@@ -114,9 +114,9 @@ void ToolBarStateMessages::mouseReleaseEmpty() {
void ToolBarStateMessages::setFirstWidget(ObjectWidget* firstObject) {
m_firstObject = firstObject;
- m_messageLine = new QCanvasLine(m_pUMLView->canvas());
+ m_messageLine = new TQCanvasLine(m_pUMLView->canvas());
m_messageLine->setPoints(m_pMouseEvent->x(), m_pMouseEvent->y(), m_pMouseEvent->x(), m_pMouseEvent->y());
- m_messageLine->setPen(QPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
+ m_messageLine->setPen(TQPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
m_messageLine->setVisible(true);
diff --git a/umbrello/umbrello/toolbarstatemessages.h b/umbrello/umbrello/toolbarstatemessages.h
index f6b2cb79..c4cccc6c 100644
--- a/umbrello/umbrello/toolbarstatemessages.h
+++ b/umbrello/umbrello/toolbarstatemessages.h
@@ -13,7 +13,7 @@
#define TOOLBARSTATEMESSAGES_H
#include "toolbarstatepool.h"
-#include <qpoint.h>
+#include <tqpoint.h>
class QCanvasLine;
class ObjectWidget;
@@ -79,7 +79,7 @@ public:
* It executes the base method and then updates the position of the
* message line, if any.
*/
- virtual void mouseMove(QMouseEvent* ome);
+ virtual void mouseMove(TQMouseEvent* ome);
public slots:
@@ -174,7 +174,7 @@ protected:
* The message line shown while the first widget is selected and the
* second one wasn't selected yet.
*/
- QCanvasLine* m_messageLine;
+ TQCanvasLine* m_messageLine;
/**
* If there is a current widget, it is true if the press event happened on
diff --git a/umbrello/umbrello/uml.cpp b/umbrello/umbrello/uml.cpp
index 11a5b32a..e6a87cfd 100644
--- a/umbrello/umbrello/uml.cpp
+++ b/umbrello/umbrello/uml.cpp
@@ -13,13 +13,13 @@
#include "uml.h"
// qt includes
-#include <qclipboard.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
-#include <qwidgetstack.h>
-#include <qslider.h>
-#include <qregexp.h>
-#include <qtoolbutton.h>
+#include <tqclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
+#include <tqwidgetstack.h>
+#include <tqslider.h>
+#include <tqregexp.h>
+#include <tqtoolbutton.h>
// kde includes
#include <kaction.h>
@@ -78,7 +78,7 @@
#include "docgenerators/docbookgenerator.h"
#include "docgenerators/xhtmlgenerator.h"
-UMLApp::UMLApp(QWidget* , const char* name):KDockMainWindow(0, name) {
+UMLApp::UMLApp(TQWidget* , const char* name):KDockMainWindow(0, name) {
s_instance = this;
m_pDocWindow = 0;
m_config = kapp->config();
@@ -114,28 +114,28 @@ UMLApp::UMLApp(QWidget* , const char* name):KDockMainWindow(0, name) {
editRedo->setEnabled(false);
//get a reference to the Code->Active Language and to the Diagram->Zoom menu
- QPopupMenu* menu = findMenu( menuBar(), QString("code") );
- m_langSelect = findMenu( menu, QString("active_lang_menu") );
+ TQPopupMenu* menu = findMenu( menuBar(), TQString("code") );
+ m_langSelect = findMenu( menu, TQString("active_lang_menu") );
//in case langSelect hasn't been initialized we create the Popup menu.
//it will be hidden, but at least we wont crash if someone takes the entry away from the ui.rc file
if (m_langSelect == NULL) {
- m_langSelect = new QPopupMenu(this);
+ m_langSelect = new TQPopupMenu(this);
}
- menu = findMenu( menuBar(), QString("views") );
- m_zoomSelect = findMenu( menu, QString("zoom_menu") );
+ menu = findMenu( menuBar(), TQString("views") );
+ m_zoomSelect = findMenu( menu, TQString("zoom_menu") );
//in case zoomSelect hasn't been initialized we create the Popup menu.
//it will be hidden, but at least we wont crash if some one takes the entry away from the ui.rc file
if (m_zoomSelect == NULL) {
- m_zoomSelect = new QPopupMenu(this);
+ m_zoomSelect = new TQPopupMenu(this);
}
//connect zoomSelect menu
m_zoomSelect->setCheckable(true);
- connect(m_zoomSelect,SIGNAL(aboutToShow()),this,SLOT(setupZoomMenu()));
- connect(m_zoomSelect,SIGNAL(activated(int)),this,SLOT(setZoom(int)));
+ connect(m_zoomSelect,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupZoomMenu()));
+ connect(m_zoomSelect,TQT_SIGNAL(activated(int)),this,TQT_SLOT(setZoom(int)));
m_refactoringAssist = 0L;
@@ -160,43 +160,43 @@ UMLApp* UMLApp::app()
}
void UMLApp::initActions() {
- fileNew = KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection());
- fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
- fileOpenRecent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
- fileSave = KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
- fileSaveAs = KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection());
- fileClose = KStdAction::close(this, SLOT(slotFileClose()), actionCollection());
- filePrint = KStdAction::print(this, SLOT(slotFilePrint()), actionCollection());
- fileQuit = KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
- editUndo = KStdAction::undo(this, SLOT(slotEditUndo()), actionCollection());
- editRedo = KStdAction::redo(this, SLOT(slotEditRedo()), actionCollection());
- editCut = KStdAction::cut(this, SLOT(slotEditCut()), actionCollection());
- editCopy = KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection());
- editPaste = KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection());
+ fileNew = KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection());
+ fileOpen = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection());
+ fileOpenRecent = KStdAction::openRecent(this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
+ fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection());
+ fileSaveAs = KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection());
+ fileClose = KStdAction::close(this, TQT_SLOT(slotFileClose()), actionCollection());
+ filePrint = KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection());
+ fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
+ editUndo = KStdAction::undo(this, TQT_SLOT(slotEditUndo()), actionCollection());
+ editRedo = KStdAction::redo(this, TQT_SLOT(slotEditRedo()), actionCollection());
+ editCut = KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection());
+ editCopy = KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection());
+ editPaste = KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- selectAll = KStdAction::selectAll(this, SLOT( slotSelectAll() ), actionCollection());
+ selectAll = KStdAction::selectAll(this, TQT_SLOT( slotSelectAll() ), actionCollection());
fileExportDocbook = new KAction(i18n("&Export model to DocBook"), 0,
- this, SLOT( slotFileExportDocbook() ),
+ this, TQT_SLOT( slotFileExportDocbook() ),
actionCollection(), "file_export_docbook");
fileExportXhtml = new KAction(i18n("&Export model to XHTML"), 0,
- this, SLOT( slotFileExportXhtml() ),
+ this, TQT_SLOT( slotFileExportXhtml() ),
actionCollection(), "file_export_xhtml");
- classWizard = new KAction(i18n("&New Class Wizard..."),0,this,SLOT(slotClassWizard()),
+ classWizard = new KAction(i18n("&New Class Wizard..."),0,this,TQT_SLOT(slotClassWizard()),
actionCollection(),"class_wizard");
new KAction(i18n("&Add Default Datatypes for Active Language"), 0, this,
- SLOT(slotAddDefaultDatatypes()), actionCollection(), "create_default_datatypes");
+ TQT_SLOT(slotAddDefaultDatatypes()), actionCollection(), "create_default_datatypes");
- preferences = KStdAction::preferences(this, SLOT( slotPrefs() ), actionCollection());
+ preferences = KStdAction::preferences(this, TQT_SLOT( slotPrefs() ), actionCollection());
- genWizard = new KAction(i18n("&Code Generation Wizard..."),0,this,SLOT(generationWizard()),
+ genWizard = new KAction(i18n("&Code Generation Wizard..."),0,this,TQT_SLOT(generationWizard()),
actionCollection(),"generation_wizard");
- genAll = new KAction(i18n("&Generate All Code"),0,this,SLOT(generateAllCode()),
+ genAll = new KAction(i18n("&Generate All Code"),0,this,TQT_SLOT(generateAllCode()),
actionCollection(),"generate_all");
importClasses = new KAction(i18n("&Import Classes..."), SmallIconSet("source_cpp"), 0,
- this,SLOT(slotImportClasses()), actionCollection(),"import_class");
+ this,TQT_SLOT(slotImportClasses()), actionCollection(),"import_class");
fileNew->setToolTip(i18n("Creates a new document"));
fileOpen->setToolTip(i18n("Opens an existing document"));
@@ -216,62 +216,62 @@ void UMLApp::initActions() {
deleteSelectedWidget = new KAction( i18n("Delete &Selected"),
SmallIconSet("editdelete"),
KShortcut(Qt::Key_Delete), this,
- SLOT( slotDeleteSelectedWidget() ), actionCollection(),
+ TQT_SLOT( slotDeleteSelectedWidget() ), actionCollection(),
"delete_selected" );
// The different views
newDiagram = new KActionMenu(0, SmallIconSet("filenew"), actionCollection(), "new_view");
classDiagram = new KAction( i18n( "&Class Diagram..." ), SmallIconSet("umbrello_diagram_class"), 0,
- this, SLOT( slotClassDiagram() ), actionCollection(), "new_class_diagram" );
+ this, TQT_SLOT( slotClassDiagram() ), actionCollection(), "new_class_diagram" );
#if defined (HAVE_DOT)
- autolayout = new KAction(i18n("&Autolayout..."),0,0,this,SLOT(slotAutolayout()),
+ autolayout = new KAction(i18n("&Autolayout..."),0,0,this,TQT_SLOT(slotAutolayout()),
actionCollection(),"autolayout");
#endif
sequenceDiagram= new KAction( i18n( "&Sequence Diagram..." ), SmallIconSet("umbrello_diagram_sequence"), 0,
- this, SLOT( slotSequenceDiagram() ), actionCollection(), "new_sequence_diagram" );
+ this, TQT_SLOT( slotSequenceDiagram() ), actionCollection(), "new_sequence_diagram" );
collaborationDiagram = new KAction( i18n( "C&ollaboration Diagram..." ), SmallIconSet("umbrello_diagram_collaboration"), 0,
- this, SLOT( slotCollaborationDiagram() ), actionCollection(), "new_collaboration_diagram" );
+ this, TQT_SLOT( slotCollaborationDiagram() ), actionCollection(), "new_collaboration_diagram" );
useCaseDiagram= new KAction( i18n( "&Use Case Diagram..." ), SmallIconSet("umbrello_diagram_usecase"), 0,
- this, SLOT( slotUseCaseDiagram() ), actionCollection(), "new_use_case_diagram" );
+ this, TQT_SLOT( slotUseCaseDiagram() ), actionCollection(), "new_use_case_diagram" );
stateDiagram= new KAction( i18n( "S&tate Diagram..." ), SmallIconSet("umbrello_diagram_state"), 0,
- this, SLOT( slotStateDiagram() ), actionCollection(), "new_state_diagram" );
+ this, TQT_SLOT( slotStateDiagram() ), actionCollection(), "new_state_diagram" );
activityDiagram= new KAction( i18n( "&Activity Diagram..." ), SmallIconSet("umbrello_diagram_activity"), 0,
- this, SLOT( slotActivityDiagram() ), actionCollection(), "new_activity_diagram" );
+ this, TQT_SLOT( slotActivityDiagram() ), actionCollection(), "new_activity_diagram" );
componentDiagram = new KAction( i18n("Co&mponent Diagram..."), SmallIconSet("umbrello_diagram_component"), 0,
- this, SLOT( slotComponentDiagram() ), actionCollection(),
+ this, TQT_SLOT( slotComponentDiagram() ), actionCollection(),
"new_component_diagram" );
deploymentDiagram = new KAction( i18n("&Deployment Diagram..."), SmallIconSet("umbrello_diagram_deployment"), 0,
- this, SLOT( slotDeploymentDiagram() ), actionCollection(),
+ this, TQT_SLOT( slotDeploymentDiagram() ), actionCollection(),
"new_deployment_diagram" );
entityRelationshipDiagram = new KAction( i18n("&Entity Relationship Diagram..."), SmallIconSet("umbrello_diagram_entityrelationship"), 0,
- this, SLOT( slotEntityRelationshipDiagram() ), actionCollection(),
+ this, TQT_SLOT( slotEntityRelationshipDiagram() ), actionCollection(),
"new_entityrelationship_diagram" );
viewClearDiagram = new KAction(i18n("&Clear Diagram"), SmallIconSet("editclear"), 0,
- this, SLOT( slotCurrentViewClearDiagram() ), actionCollection(), "view_clear_diagram");
+ this, TQT_SLOT( slotCurrentViewClearDiagram() ), actionCollection(), "view_clear_diagram");
viewSnapToGrid = new KToggleAction(i18n("&Snap to Grid"), 0,
- this, SLOT( slotCurrentViewToggleSnapToGrid() ), actionCollection(), "view_snap_to_grid");
+ this, TQT_SLOT( slotCurrentViewToggleSnapToGrid() ), actionCollection(), "view_snap_to_grid");
viewShowGrid = new KToggleAction(i18n("S&how Grid"), 0,
- this, SLOT( slotCurrentViewToggleShowGrid() ), actionCollection(), "view_show_grid");
+ this, TQT_SLOT( slotCurrentViewToggleShowGrid() ), actionCollection(), "view_show_grid");
#if (KDE_VERSION_MINOR>=3) && (KDE_VERSION_MAJOR>=3)
viewShowGrid->setCheckedState(i18n("&Hide Grid"));
#endif
deleteDiagram = new KAction(i18n("&Delete"), SmallIconSet("editdelete"), 0,
- this, SLOT( slotDeleteDiagram() ), actionCollection(), "view_delete");
+ this, TQT_SLOT( slotDeleteDiagram() ), actionCollection(), "view_delete");
viewExportImage = new KAction(i18n("&Export as Picture..."), SmallIconSet("image"), 0,
- this, SLOT( slotCurrentViewExportImage() ), actionCollection(), "view_export_image");
+ this, TQT_SLOT( slotCurrentViewExportImage() ), actionCollection(), "view_export_image");
viewExportImageAll = new KAction(i18n("Export &All Diagrams as Pictures..."), SmallIconSet("image"), 0,
- this, SLOT( slotAllViewsExportImage() ), actionCollection(), "view_export_image_all");
+ this, TQT_SLOT( slotAllViewsExportImage() ), actionCollection(), "view_export_image_all");
viewProperties = new KAction(i18n("&Properties"), SmallIconSet("info"), 0,
- this, SLOT( slotCurrentViewProperties() ), actionCollection(), "view_properties");
+ this, TQT_SLOT( slotCurrentViewProperties() ), actionCollection(), "view_properties");
viewSnapToGrid->setChecked(false);
viewShowGrid->setChecked(false);
@@ -284,35 +284,35 @@ void UMLApp::initActions() {
viewProperties->setEnabled(false);
zoomAction = new KPlayerPopupSliderAction(i18n("&Zoom Slider"), "viewmag", Key_F9,
- this, SLOT(slotZoomSliderMoved(int)),
+ this, TQT_SLOT(slotZoomSliderMoved(int)),
actionCollection(), "popup_zoom");
zoom100Action = new KAction(i18n( "Z&oom to 100%" ), "viewmag1", 0,
- this, SLOT( slotZoom100() ), actionCollection(),
+ this, TQT_SLOT( slotZoom100() ), actionCollection(),
"zoom100");
- KStdAction::tipOfDay( this, SLOT( tipOfTheDay() ), actionCollection() );
+ KStdAction::tipOfDay( this, TQT_SLOT( tipOfTheDay() ), actionCollection() );
- QString moveTabLeftString = i18n("&Move Tab Left");
- QString moveTabRightString = i18n("&Move Tab Right");
- moveTabLeft = new KAction(QApplication::reverseLayout() ? moveTabRightString : moveTabLeftString,
- QApplication::reverseLayout() ? "forward" : "back",
- QApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Right : Qt::CTRL+Qt::SHIFT+Qt::Key_Left,
- this, SLOT(slotMoveTabLeft()), actionCollection(),
+ TQString moveTabLeftString = i18n("&Move Tab Left");
+ TQString moveTabRightString = i18n("&Move Tab Right");
+ moveTabLeft = new KAction(TQApplication::reverseLayout() ? moveTabRightString : moveTabLeftString,
+ TQApplication::reverseLayout() ? "forward" : "back",
+ TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Right : Qt::CTRL+Qt::SHIFT+Qt::Key_Left,
+ this, TQT_SLOT(slotMoveTabLeft()), actionCollection(),
"move_tab_left");
- moveTabRight = new KAction(QApplication::reverseLayout() ? moveTabLeftString : moveTabRightString,
- QApplication::reverseLayout() ? "back" : "forward",
- QApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Left : Qt::CTRL+Qt::SHIFT+Qt::Key_Right,
- this, SLOT(slotMoveTabRight()), actionCollection(),
+ moveTabRight = new KAction(TQApplication::reverseLayout() ? moveTabLeftString : moveTabRightString,
+ TQApplication::reverseLayout() ? "back" : "forward",
+ TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Left : Qt::CTRL+Qt::SHIFT+Qt::Key_Right,
+ this, TQT_SLOT(slotMoveTabRight()), actionCollection(),
"move_tab_right");
- QString selectTabLeftString = i18n("Select Diagram on Left");
- QString selectTabRightString = i18n("Select Diagram on Right");
- changeTabLeft = new KAction(QApplication::reverseLayout() ? selectTabRightString : selectTabLeftString,
- QApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Right : Qt::SHIFT+Qt::Key_Left,
- this, SLOT(slotChangeTabLeft()), actionCollection(), "previous_tab");
- changeTabRight = new KAction(QApplication::reverseLayout() ? selectTabLeftString : selectTabRightString,
- QApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Left : Qt::SHIFT+Qt::Key_Right,
- this, SLOT(slotChangeTabRight()), actionCollection(), "next_tab");
+ TQString selectTabLeftString = i18n("Select Diagram on Left");
+ TQString selectTabRightString = i18n("Select Diagram on Right");
+ changeTabLeft = new KAction(TQApplication::reverseLayout() ? selectTabRightString : selectTabLeftString,
+ TQApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Right : Qt::SHIFT+Qt::Key_Left,
+ this, TQT_SLOT(slotChangeTabLeft()), actionCollection(), "previous_tab");
+ changeTabRight = new KAction(TQApplication::reverseLayout() ? selectTabLeftString : selectTabRightString,
+ TQApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Left : Qt::SHIFT+Qt::Key_Right,
+ this, TQT_SLOT(slotChangeTabRight()), actionCollection(), "next_tab");
initStatusBar(); //call this here because the statusBar is shown/hidden by setupGUI()
@@ -323,7 +323,7 @@ void UMLApp::initActions() {
#else
createGUI();
#endif
- QPopupMenu* menu = findMenu( menuBar(), QString("settings") );
+ TQPopupMenu* menu = findMenu( menuBar(), TQString("settings") );
menu->insertItem(i18n("&Windows"), dockHideShowMenu(), -1, 0);
}
@@ -367,7 +367,7 @@ void UMLApp::setupZoomMenu() {
break;
default:
m_zoomSelect->insertSeparator();
- m_zoomSelect->insertItem(QString::number(zoom)+" %",zoom);
+ m_zoomSelect->insertItem(TQString::number(zoom)+" %",zoom);
}
m_zoomSelect->setItemChecked(zoom, true);
}
@@ -376,7 +376,7 @@ void UMLApp::initStatusBar() {
m_statusLabel = new KStatusBarLabel( i18n("Ready."), 0, statusBar() );
m_statusLabel->setFixedHeight( m_statusLabel->sizeHint().height() );
- m_statusLabel->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
+ m_statusLabel->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain );
m_statusLabel->setMargin( 0 );
m_statusLabel->setLineWidth(0);
@@ -384,7 +384,7 @@ void UMLApp::initStatusBar() {
m_statusLabel->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
- connect(m_doc, SIGNAL( sigWriteToStatusBar(const QString &) ), this, SLOT( slotStatusMsg(const QString &) ));
+ connect(m_doc, TQT_SIGNAL( sigWriteToStatusBar(const TQString &) ), this, TQT_SLOT( slotStatusMsg(const TQString &) ));
}
void UMLApp::initView() {
@@ -417,27 +417,27 @@ void UMLApp::initView() {
m_newSessionButton->setAutoRaise(true);
m_diagramMenu = new KPopupMenu(m_newSessionButton);
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Class), i18n("Class Diagram..."), this, SLOT(slotClassDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Sequence), i18n("Sequence Diagram..."), this, SLOT(slotSequenceDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Collaboration), i18n("Collaboration Diagram..."), this, SLOT(slotCollaborationDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_UseCase), i18n("Use Case Diagram..."), this, SLOT(slotUseCaseDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_State), i18n("State Diagram..."), this, SLOT(slotStateDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Activity), i18n("Activity Diagram..."), this, SLOT(slotActivityDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Component), i18n("Component Diagram..."), this, SLOT(slotComponentDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Deployment), i18n("Deployment Diagram..."), this, SLOT(slotDeploymentDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_EntityRelationship), i18n("Entity Relationship Diagram..."), this, SLOT(slotEntityRelationshipDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Class), i18n("Class Diagram..."), this, TQT_SLOT(slotClassDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Sequence), i18n("Sequence Diagram..."), this, TQT_SLOT(slotSequenceDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Collaboration), i18n("Collaboration Diagram..."), this, TQT_SLOT(slotCollaborationDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_UseCase), i18n("Use Case Diagram..."), this, TQT_SLOT(slotUseCaseDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_State), i18n("State Diagram..."), this, TQT_SLOT(slotStateDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Activity), i18n("Activity Diagram..."), this, TQT_SLOT(slotActivityDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Component), i18n("Component Diagram..."), this, TQT_SLOT(slotComponentDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Deployment), i18n("Deployment Diagram..."), this, TQT_SLOT(slotDeploymentDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_EntityRelationship), i18n("Entity Relationship Diagram..."), this, TQT_SLOT(slotEntityRelationshipDiagram()) );
m_newSessionButton->setPopup(m_diagramMenu);
//FIXME why doesn't this work?
//m_newSessionButton->setPopup(newDiagram->popupMenu());
//m_closeDiagramButton = new KToolBarButton("tab_remove", 0, m_tabWidget);
- m_closeDiagramButton = new QToolButton(m_tabWidget);
+ m_closeDiagramButton = new TQToolButton(m_tabWidget);
m_closeDiagramButton->setIconSet( SmallIcon("tab_remove") );
m_closeDiagramButton->adjustSize();
- connect(m_closeDiagramButton, SIGNAL(clicked()), SLOT(slotDeleteDiagram()));
- connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), SLOT(slotTabChanged(QWidget*)));
- connect(m_tabWidget, SIGNAL(contextMenu(QWidget*,const QPoint&)), m_doc, SLOT(slotDiagramPopupMenu(QWidget*,const QPoint&)));
+ connect(m_closeDiagramButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDeleteDiagram()));
+ connect(m_tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(slotTabChanged(TQWidget*)));
+ connect(m_tabWidget, TQT_SIGNAL(contextMenu(TQWidget*,const TQPoint&)), m_doc, TQT_SLOT(slotDiagramPopupMenu(TQWidget*,const TQPoint&)));
m_tabWidget->setCornerWidget( m_newSessionButton, TopLeft );
m_tabWidget->setCornerWidget( m_closeDiagramButton, TopRight );
m_newSessionButton->installEventFilter(this);
@@ -447,7 +447,7 @@ void UMLApp::initView() {
else
{
m_tabWidget = NULL;
- m_viewStack = new QWidgetStack(m_mainDock, "viewstack");
+ m_viewStack = new TQWidgetStack(m_mainDock, "viewstack");
m_mainDock->setWidget(m_viewStack);
}
m_mainDock->setDockSite(KDockWidget::DockCorner);
@@ -583,7 +583,7 @@ void UMLApp::readOptions() {
fileOpenRecent->loadEntries(m_config,"Recent Files");
m_config->setGroup("General Options");
setImageMimeType(m_config->readEntry("imageMimeType","image/png"));
- QSize tmpQSize(630,460);
+ TQSize tmpQSize(630,460);
resize( m_config->readSizeEntry("Geometry", & tmpQSize) );
}
@@ -595,8 +595,8 @@ void UMLApp::saveProperties(KConfig *_config) {
KURL url=m_doc->URL();
_config->writePathEntry("filename", url.url());
_config->writeEntry("modified", m_doc->isModified());
- QString tempname = kapp->tempSaveName(url.url());
- QString tempurl= KURL::encode_string(tempname);
+ TQString tempname = kapp->tempSaveName(url.url());
+ TQString tempurl= KURL::encode_string(tempname);
KURL _url(tempurl);
m_doc->saveDocument(_url);
@@ -604,12 +604,12 @@ void UMLApp::saveProperties(KConfig *_config) {
}
void UMLApp::readProperties(KConfig* _config) {
- QString filename = _config->readPathEntry("filename");
+ TQString filename = _config->readPathEntry("filename");
KURL url(filename);
bool modified = _config->readBoolEntry("modified", false);
if(modified) {
bool canRecover;
- QString tempname = kapp->checkRecoverFile(filename, canRecover);
+ TQString tempname = kapp->checkRecoverFile(filename, canRecover);
KURL _url(tempname);
@@ -618,7 +618,7 @@ void UMLApp::readProperties(KConfig* _config) {
m_doc->setModified();
enablePrint(true);
setCaption(_url.fileName(),true);
- QFile::remove
+ TQFile::remove
(tempname);
} else {
enablePrint(false);
@@ -727,16 +727,16 @@ bool UMLApp::slotFileSaveAs()
slotStatusMsg(i18n("Saving file with a new filename..."));
bool cont = true;
KURL url;
- QString ext;
+ TQString ext;
while(cont) {
url=KFileDialog::getSaveURL(":save-umbrello-file", i18n("*.xmi|XMI File\n*.xmi.tgz|Gzip Compressed XMI File\n*.xmi.tar.bz2|Bzip2 Compressed XMI File\n*|All Files"), this, i18n("Save As"));
if(url.isEmpty())
cont = false;
else {
- QDir d = url.path(-1);
+ TQDir d = url.path(-1);
- if(QFile::exists(d.path())) {
+ if(TQFile::exists(d.path())) {
int want_save = KMessageBox::warningContinueCancel(this, i18n("The file %1 exists.\nDo you wish to overwrite it?").arg(url.path()), i18n("Warning"), i18n("Overwrite"));
if(want_save == KMessageBox::Continue)
cont = false;
@@ -775,7 +775,7 @@ void UMLApp::slotFilePrint()
printer.setFullPage(true);
DiagramPrintPage * selectPage = new DiagramPrintPage(0, m_doc);
printer.addDialogPage(selectPage);
- QString msg;
+ TQString msg;
if (printer.setup(this, i18n("Print %1").arg(m_doc->URL().prettyURL()))) {
m_doc -> print(&printer);
@@ -806,7 +806,7 @@ void UMLApp::slotFileExportXhtml()
}
m_xhtmlGenerator = new XhtmlGenerator();
m_xhtmlGenerator->generateXhtmlForProject();
- connect(m_xhtmlGenerator,SIGNAL(finished()),this,SLOT(slotXhtmlDocGenerationFinished()));
+ connect(m_xhtmlGenerator,TQT_SIGNAL(finished()),this,TQT_SLOT(slotXhtmlDocGenerationFinished()));
}
void UMLApp::slotEditUndo() {
@@ -842,7 +842,7 @@ void UMLApp::slotEditCopy() {
void UMLApp::slotEditPaste() {
slotStatusMsg(i18n("Inserting clipboard contents..."));
- QMimeSource* data = QApplication::clipboard()->data();
+ TQMimeSource* data = TQApplication::clipboard()->data();
UMLClipboard clipboard;
setCursor(KCursor::waitCursor());
if(!clipboard.paste(data)) {
@@ -889,7 +889,7 @@ void UMLApp::slotViewStatusBar() {
// #endif
-void UMLApp::slotStatusMsg(const QString &text) {
+void UMLApp::slotStatusMsg(const TQString &text) {
///////////////////////////////////////////////////////////////////
// change status message permanently
statusBar()->clear();
@@ -977,24 +977,24 @@ void UMLApp::enableRedo(bool enable) {
/** initialize the QT's global clipboard support for the application */
void UMLApp::initClip() {
- QClipboard* clip = QApplication::clipboard();
- connect(clip, SIGNAL(dataChanged()), this, SLOT(slotClipDataChanged()));
+ QClipboard* clip = TQApplication::clipboard();
+ connect(clip, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipDataChanged()));
// Don't poll the X11 clipboard every second. This is a little expensive and resulted
// in very annoying umbrello slowdowns / hangs. Qt will notify us about clipboard
// changes anyway (see dataChanged() signal above), albeit only when a Qt application
// changes the clipboard. Work is in progress to make this work with other toolkits
// as well. (pfeiffer)
- // m_clipTimer = new QTimer(this, "timer");
+ // m_clipTimer = new TQTimer(this, "timer");
// m_clipTimer->start(1000, false);
- // connect(m_clipTimer, SIGNAL(timeout()), this, SLOT(slotClipDataChanged()));
+ // connect(m_clipTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClipDataChanged()));
- m_copyTimer = new QTimer(this, "copytimer");
+ m_copyTimer = new TQTimer(this, "copytimer");
m_copyTimer->start(500, false);
- connect(m_copyTimer, SIGNAL(timeout()), this, SLOT(slotCopyChanged()));
+ connect(m_copyTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCopyChanged()));
}
-bool UMLApp::canDecode(const QMimeSource* mimeSource) {
+bool UMLApp::canDecode(const TQMimeSource* mimeSource) {
const char* f;
for (int i=0; (f=mimeSource->format(i)); i++) {
if ( !qstrnicmp(f,"application/x-uml-clip", 22) ) {
@@ -1007,7 +1007,7 @@ bool UMLApp::canDecode(const QMimeSource* mimeSource) {
}
void UMLApp::slotClipDataChanged() {
- QMimeSource * data = QApplication::clipboard()->data();
+ TQMimeSource * data = TQApplication::clipboard()->data();
//Pass the MimeSource to the Doc
editPaste->setEnabled( data && canDecode(data) );
@@ -1030,9 +1030,9 @@ void UMLApp::slotPrefs() {
optionState.generalState.tip = m_config->readBoolEntry( "RunOnStart", true );
m_dlg = new SettingsDlg(this, &optionState);
- connect(m_dlg, SIGNAL( applyClicked() ), this, SLOT( slotApplyPrefs() ) );
+ connect(m_dlg, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApplyPrefs() ) );
- if ( m_dlg->exec() == QDialog::Accepted && m_dlg->getChangesApplied() ) {
+ if ( m_dlg->exec() == TQDialog::Accepted && m_dlg->getChangesApplied() ) {
slotApplyPrefs();
}
@@ -1048,7 +1048,7 @@ void UMLApp::slotApplyPrefs() {
m_config -> writeEntry( "RunOnStart", optionState.generalState.tip );
m_doc -> settingsChanged( optionState );
- const QString plStr = m_dlg->getCodeGenerationLanguage();
+ const TQString plStr = m_dlg->getCodeGenerationLanguage();
Uml::Programming_Language pl = Model_Utils::stringToProgLang(plStr);
setGenerator(pl);
}
@@ -1072,12 +1072,12 @@ bool UMLApp::getCutCopyState() {
bool UMLApp::editCutCopy( bool bFromView ) {
UMLClipboard clipboard;
- QMimeSource * clipdata = 0;
+ TQMimeSource * clipdata = 0;
if ((clipdata = clipboard.copy(bFromView)) != 0) {
- QClipboard* clip = QApplication::clipboard();
+ QClipboard* clip = TQApplication::clipboard();
clip->setData(clipdata);//the global clipboard takes ownership of the clipdata memory
- connect(clip, SIGNAL(dataChanged()), this, SLOT(slotClipDataChanged()));
+ connect(clip, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipDataChanged()));
return true;
}
return false;
@@ -1121,13 +1121,13 @@ void UMLApp::readOptionState() {
m_config -> setGroup( "UI Options" );
optionState.uiState.useFillColor = m_config -> readBoolEntry( "useFillColor", true );
- QColor defaultYellow = QColor( 255, 255, 192 );
- QColor red ( Qt::red );
+ TQColor defaultYellow = TQColor( 255, 255, 192 );
+ TQColor red ( Qt::red );
optionState.uiState.fillColor = m_config -> readColorEntry( "fillColor", &defaultYellow );
optionState.uiState.lineColor = m_config -> readColorEntry( "lineColor", &red );
optionState.uiState.lineWidth = m_config -> readNumEntry( "lineWidth", 0 );
- QFont font = ((QWidget *) this)->font() ;
+ TQFont font = ((TQWidget *) this)->font() ;
optionState.uiState.font = m_config -> readFontEntry("font", &font );
m_config -> setGroup( "Class Options" );
@@ -1144,10 +1144,10 @@ void UMLApp::readOptionState() {
m_config -> setGroup( "Code Viewer Options" );
- QColor defaultWhite = QColor( "white" );
- QColor defaultBlack = QColor( "black" );
- QColor defaultPink = QColor( "pink" );
- QColor defaultGrey = QColor( "grey" );
+ TQColor defaultWhite = TQColor( "white" );
+ TQColor defaultBlack = TQColor( "black" );
+ TQColor defaultPink = TQColor( "pink" );
+ TQColor defaultGrey = TQColor( "grey" );
optionState.codeViewerState.height = m_config -> readNumEntry( "height", 40 );
optionState.codeViewerState.width = m_config -> readNumEntry( "width", 80 );
@@ -1273,7 +1273,7 @@ void UMLApp::setActiveLanguage(int menuId) {
}
}
-void UMLApp::setActiveLanguage( const QString &activeLanguage ) {
+void UMLApp::setActiveLanguage( const TQString &activeLanguage ) {
for(unsigned int j=0; j < m_langSelect->count(); j++) {
int id = m_langSelect->idAt(j);
@@ -1302,7 +1302,7 @@ bool UMLApp::activeLanguageIsCaseSensitive() {
m_activeLanguage != Uml::pl_SQL);
}
-QString UMLApp::activeLanguageScopeSeparator() {
+TQString UMLApp::activeLanguageScopeSeparator() {
Uml::Programming_Language pl = getActiveLanguage();
if (pl == Uml::pl_Ada ||
pl == Uml::pl_CSharp ||
@@ -1355,13 +1355,13 @@ void UMLApp::setDiagramMenuItemsState(bool bState) {
}
void UMLApp::slotUpdateViews() {
- QPopupMenu* menu = findMenu( menuBar(), QString("views") );
+ TQPopupMenu* menu = findMenu( menuBar(), TQString("views") );
if (!menu) {
kWarning() << "view menu not found" << endl;
return;
}
- menu = findMenu( menu, QString("show_view") );
+ menu = findMenu( menu, TQString("show_view") );
if (!menu) {
kWarning() << "show menu not found" << endl;
return;
@@ -1371,7 +1371,7 @@ void UMLApp::slotUpdateViews() {
UMLViewList views = getDocument()->getViewIterator();
for(UMLView *view = views.first(); view; view = views.next()) {
- menu->insertItem( view->getName(), view, SLOT( slotShowView() ) );
+ menu->insertItem( view->getName(), view, TQT_SLOT( slotShowView() ) );
view->fileLoaded();
}
}
@@ -1381,7 +1381,7 @@ void UMLApp::slotImportClasses() {
// File selection is separated from invocation of ClassImport::import()
// because the user might decide to choose a language different from
// the active language (by using the "All Files" option).
- QString preselectedExtension;
+ TQString preselectedExtension;
const Uml::Programming_Language pl = m_codegen->getLanguage();
if (pl == Uml::pl_IDL) {
preselectedExtension = i18n("*.idl|IDL Files (*.idl)");
@@ -1397,9 +1397,9 @@ void UMLApp::slotImportClasses() {
preselectedExtension = i18n("*.h *.hh *.hpp *.hxx *.H|Header Files (*.h *.hh *.hpp *.hxx *.H)");
}
preselectedExtension.append("\n*|" + i18n("All Files"));
- QStringList fileList = KFileDialog::getOpenFileNames(":import-classes", preselectedExtension,
+ TQStringList fileList = KFileDialog::getOpenFileNames(":import-classes", preselectedExtension,
this, i18n("Select Code to Import") );
- const QString& firstFile = fileList.first();
+ const TQString& firstFile = fileList.first();
ClassImport *classImporter = ClassImport::createImporterByFileExt(firstFile);
classImporter->importFiles(fileList);
delete classImporter;
@@ -1423,10 +1423,10 @@ void UMLApp::slotAddDefaultDatatypes() {
void UMLApp::slotCurrentViewChanged() {
UMLView *view = getCurrentView();
if (view) {
- connect(view, SIGNAL( sigShowGridToggled(bool) ),
- this, SLOT( slotShowGridToggled(bool) ) );
- connect(view, SIGNAL( sigSnapToGridToggled(bool) ),
- this, SLOT( slotSnapToGridToggled(bool) ) );
+ connect(view, TQT_SIGNAL( sigShowGridToggled(bool) ),
+ this, TQT_SLOT( slotShowGridToggled(bool) ) );
+ connect(view, TQT_SIGNAL( sigSnapToGridToggled(bool) ),
+ this, TQT_SLOT( slotSnapToGridToggled(bool) ) );
}
}
void UMLApp::slotSnapToGridToggled(bool gridOn) {
@@ -1455,7 +1455,7 @@ void UMLApp::slotDeleteDiagram() {
Uml::Programming_Language UMLApp::getDefaultLanguage() {
m_config->setGroup("Code Generation");
- QString activeLanguage = m_config->readEntry("activeLanguage", "C++");
+ TQString activeLanguage = m_config->readEntry("activeLanguage", "C++");
return Model_Utils::stringToProgLang(activeLanguage);
}
@@ -1475,8 +1475,8 @@ void UMLApp::updateLangSelectMenu(Uml::Programming_Language activeLanguage) {
m_langSelect->clear();
m_langSelect->setCheckable(true);
for (int i = 0; i < Uml::pl_Reserved; i++) {
- QString language = Model_Utils::progLangToString((Uml::Programming_Language) i);
- int id = m_langSelect->insertItem(language,this,SLOT(setActiveLanguage(int)));
+ TQString language = Model_Utils::progLangToString((Uml::Programming_Language) i);
+ int id = m_langSelect->insertItem(language,this,TQT_SLOT(setActiveLanguage(int)));
const bool isActiveLanguage = (activeLanguage == i);
m_langSelect->setItemChecked(id, isActiveLanguage);
}
@@ -1484,10 +1484,10 @@ void UMLApp::updateLangSelectMenu(Uml::Programming_Language activeLanguage) {
void UMLApp::tipOfTheDay()
{
- KTipDialog::showTip(this ,QString::null, true);
+ KTipDialog::showTip(this ,TQString::null, true);
}
-void UMLApp::keyPressEvent(QKeyEvent *e) {
+void UMLApp::keyPressEvent(TQKeyEvent *e) {
switch(e->key()) {
case Qt::Key_Shift:
//toolsbar->setOldTool();
@@ -1500,7 +1500,7 @@ void UMLApp::keyPressEvent(QKeyEvent *e) {
}
-void UMLApp::customEvent(QCustomEvent* e) {
+void UMLApp::customEvent(TQCustomEvent* e) {
if (e->type() == CmdLineExportAllViewsEvent::getType()) {
CmdLineExportAllViewsEvent* exportAllViewsEvent = static_cast<CmdLineExportAllViewsEvent*>(e);
exportAllViewsEvent->exportAllViews();
@@ -1508,7 +1508,7 @@ void UMLApp::customEvent(QCustomEvent* e) {
}
//TODO Move this to UMLWidgetController?
-void UMLApp::handleCursorKeyReleaseEvent(QKeyEvent* e) {
+void UMLApp::handleCursorKeyReleaseEvent(TQKeyEvent* e) {
// in case we have selected something in the diagram, move it by one pixel
// to the direction pointed by the cursor key
if (m_view == NULL || !m_view->getSelectCount() || e->state() != Qt::AltButton) {
@@ -1544,7 +1544,7 @@ void UMLApp::handleCursorKeyReleaseEvent(QKeyEvent* e) {
e->accept();
}
-void UMLApp::keyReleaseEvent(QKeyEvent *e) {
+void UMLApp::keyReleaseEvent(TQKeyEvent *e) {
switch(e->key()) {
case Qt::Key_Backspace:
if (!m_pDocWindow->isTyping())
@@ -1579,7 +1579,7 @@ void UMLApp::newDocument() {
slotUpdateViews();
}
-QWidget* UMLApp::getMainViewWidget() {
+TQWidget* UMLApp::getMainViewWidget() {
Settings::OptionState& optionState = Settings::getOptionState();
if (optionState.generalState.tabdiagrams)
return m_tabWidget;
@@ -1609,16 +1609,16 @@ UMLView* UMLApp::getCurrentView() {
return m_view;
}
-QPopupMenu* UMLApp::findMenu(QMenuData* menu, const QString &name) {
+TQPopupMenu* UMLApp::findMenu(TQMenuData* menu, const TQString &name) {
if (menu) {
int menuCount = menu->count();
for (int i=0; i<menuCount; i++) {
int idAt = menu->idAt(i);
- QPopupMenu* popupMenu = menu->findItem(idAt)->popup();
+ TQPopupMenu* popupMenu = menu->findItem(idAt)->popup();
if (popupMenu) {
- QString menuName = popupMenu->name();
+ TQString menuName = popupMenu->name();
if( menuName == name) {
return popupMenu;
}
@@ -1628,7 +1628,7 @@ QPopupMenu* UMLApp::findMenu(QMenuData* menu, const QString &name) {
return 0;
}
-void UMLApp::slotTabChanged(QWidget* view) {
+void UMLApp::slotTabChanged(TQWidget* view) {
UMLView* umlview = ( UMLView* )view;
m_doc->changeCurrentView( umlview->getID() );
}
@@ -1682,7 +1682,7 @@ void UMLApp::slotMoveTabRight() {
void UMLApp::slotAutolayout(){
#ifdef HAVE_DOT
/*
- QDialog* d = new AutolayoutDlg(getCurrentView());
+ TQDialog* d = new AutolayoutDlg(getCurrentView());
d->show();
*/
#endif
@@ -1698,7 +1698,7 @@ KTabWidget* UMLApp::tabWidget() {
return m_tabWidget;
}
-QString UMLApp::getStatusBarMsg() {
+TQString UMLApp::getStatusBarMsg() {
return m_statusLabel->text();
}
diff --git a/umbrello/umbrello/uml.h b/umbrello/umbrello/uml.h
index ee669d88..621389c0 100644
--- a/umbrello/umbrello/uml.h
+++ b/umbrello/umbrello/uml.h
@@ -18,8 +18,8 @@
#include "umlnamespace.h"
-#include <qmap.h>
-#include <qdict.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include <kdockwidget.h>
#include <kdeversion.h>
@@ -81,7 +81,7 @@ public:
/**
* Constructor. Calls all init functions to create the application.
*/
- UMLApp(QWidget* parent=0, const char* name=0);
+ UMLApp(TQWidget* parent=0, const char* name=0);
/**
* Standard deconstructor.
@@ -249,7 +249,7 @@ public:
* Returns the widget used as the parent for UMLViews.
* @return The main view widget.
*/
- QWidget* getMainViewWidget();
+ TQWidget* getMainViewWidget();
/**
* Puts this view to the top of the viewStack, i.e. makes it
@@ -273,7 +273,7 @@ public:
*
* @param mimeType The MIME type to set as the default.
*/
- void setImageMimeType(QString const & mimeType){m_imageMimeType=mimeType;};
+ void setImageMimeType(TQString const & mimeType){m_imageMimeType=mimeType;};
/**
* Gets the default mime type for all diagrams that are exported as
@@ -281,7 +281,7 @@ public:
*
* @return The default MIME type for images.
*/
- QString const & getImageMimeType()const{return m_imageMimeType;};
+ TQString const & getImageMimeType()const{return m_imageMimeType;};
/**
* Carries out the cut/copy command with different action performed
@@ -304,7 +304,7 @@ public:
*
* @return The text in the status bar.
*/
- QString getStatusBarMsg();
+ TQString getStatusBarMsg();
/**
* Returns the default code generation policy.
@@ -322,20 +322,20 @@ public:
CodeGenPolicyExt *getPolicyExt();
protected:
- virtual void keyPressEvent(QKeyEvent* e);
- virtual void keyReleaseEvent(QKeyEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
+ virtual void keyReleaseEvent(TQKeyEvent* e);
/**
* Event handler to receive custom events.
* It handles events such as exporting all views from command line (in
* that case, it executes the exportAllViews method in the event).
*/
- virtual void customEvent(QCustomEvent* e);
+ virtual void customEvent(TQCustomEvent* e);
/**
* Helper method for handling cursor key release events (refactoring).
*/
- void handleCursorKeyReleaseEvent(QKeyEvent* e);
+ void handleCursorKeyReleaseEvent(TQKeyEvent* e);
/**
* Save general Options like all bar positions and status
@@ -541,7 +541,7 @@ public slots:
* permanently, used to indicate current actions.
* @param text The text that is displayed in the statusbar
*/
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
/**
* Create this view.
@@ -631,7 +631,7 @@ public slots:
*
* @param activeLanguage The name of the language to set
*/
- void setActiveLanguage( const QString &activeLanguage );
+ void setActiveLanguage( const TQString &activeLanguage );
/**
* Get the language for import and code generation.
@@ -646,7 +646,7 @@ public slots:
/**
* Return the target language depedent scope separator.
*/
- QString activeLanguageScopeSeparator();
+ TQString activeLanguageScopeSeparator();
/**
* Return the default code generation language as configured by KConfig.
@@ -770,15 +770,15 @@ public slots:
/**
* Searches for a menu with the given name
*
- * @param menu The QPopupMenu or QMenuBar to search through.
+ * @param menu The TQPopupMenu or TQMenuBar to search through.
* @param name The name of the menu to search for (name, not text)
*/
- QPopupMenu* findMenu(QMenuData* menu, const QString &name);
+ TQPopupMenu* findMenu(TQMenuData* menu, const TQString &name);
/**
* called when the tab has changed
*/
- void slotTabChanged(QWidget* view);
+ void slotTabChanged(TQWidget* view);
/**
* make the tab on the left of the current one the active one
@@ -814,12 +814,12 @@ private:
/**
* For selecting the active language.
*/
- QPopupMenu *m_langSelect;
+ TQPopupMenu *m_langSelect;
/**
* Popup menu for zoom selection.
*/
- QPopupMenu *m_zoomSelect;
+ TQPopupMenu *m_zoomSelect;
/**
* Active language.
@@ -840,7 +840,7 @@ private:
/**
* Returns whether we can decode the given mimesource
*/
- static bool canDecode(const QMimeSource* mimeSource);
+ static bool canDecode(const TQMimeSource* mimeSource);
/**
* Reads from the config file the options state.
@@ -967,12 +967,12 @@ private:
KAction* moveTabRight;
KToolBarButton* m_newSessionButton;
KPopupMenu* m_diagramMenu;
- QToolButton* m_closeDiagramButton;
+ TQToolButton* m_closeDiagramButton;
KToggleAction* viewToolBar;
KToggleAction* viewStatusBar;
WorkToolBar* toolsbar;
- QTimer* m_clipTimer;
- QTimer* m_copyTimer;
+ TQTimer* m_clipTimer;
+ TQTimer* m_copyTimer;
AlignToolBar* m_alignToolBar;
KStatusBarLabel* m_statusLabel;
@@ -986,7 +986,7 @@ private:
* Shows, and is parent of, all the UMLViews (diagrams)
* if tabbed diagrams are not enabled.
*/
- QWidgetStack* m_viewStack;
+ TQWidgetStack* m_viewStack;
/**
* Shows, and is parent of, all the UMLViews (diagrams)
@@ -997,7 +997,7 @@ private:
/**
* Default mime type to use for image export.
*/
- QString m_imageMimeType;
+ TQString m_imageMimeType;
/**
* the global UML settings dialog
diff --git a/umbrello/umbrello/umlassociationlist.h b/umbrello/umbrello/umlassociationlist.h
index 55810c7d..ab250a90 100644
--- a/umbrello/umbrello/umlassociationlist.h
+++ b/umbrello/umbrello/umlassociationlist.h
@@ -12,12 +12,12 @@
#ifndef UMLASSOCIATIONLIST_H
#define UMLASSOCIATIONLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLAssociation;
-typedef QPtrList<UMLAssociation> UMLAssociationList;
-typedef QPtrListIterator<UMLAssociation> UMLAssociationListIt;
+typedef TQPtrList<UMLAssociation> UMLAssociationList;
+typedef TQPtrListIterator<UMLAssociation> UMLAssociationListIt;
#endif
diff --git a/umbrello/umbrello/umlattributelist.h b/umbrello/umbrello/umlattributelist.h
index 6dd25db2..67ca21ad 100644
--- a/umbrello/umbrello/umlattributelist.h
+++ b/umbrello/umbrello/umlattributelist.h
@@ -12,18 +12,18 @@
#ifndef UMLATTRIBUTELIST_H
#define UMLATTRIBUTELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "attribute.h"
-//typedef QPtrList<UMLAttribute> UMLAttributeList;
-typedef QPtrListIterator<UMLAttribute> UMLAttributeListIt;
+//typedef TQPtrList<UMLAttribute> UMLAttributeList;
+typedef TQPtrListIterator<UMLAttribute> UMLAttributeListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLAttribute>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLAttribute>
* base class.
*/
-class UMLAttributeList : public QPtrList<UMLAttribute>
+class UMLAttributeList : public TQPtrList<UMLAttribute>
{
public:
diff --git a/umbrello/umbrello/umlcanvasobject.cpp b/umbrello/umbrello/umlcanvasobject.cpp
index 4b002228..800336e3 100644
--- a/umbrello/umbrello/umlcanvasobject.cpp
+++ b/umbrello/umbrello/umlcanvasobject.cpp
@@ -27,7 +27,7 @@
#include "stereotype.h"
#include "clipboard/idchangelog.h"
-UMLCanvasObject::UMLCanvasObject(const QString & name, Uml::IDType id)
+UMLCanvasObject::UMLCanvasObject(const TQString & name, Uml::IDType id)
: UMLObject(name, id)
{
init();
@@ -138,9 +138,9 @@ void UMLCanvasObject::removeAllChildObjects() {
m_List.setAutoDelete(false);
}
-QString UMLCanvasObject::uniqChildName( const Uml::Object_Type type,
- const QString &prefix /* = QString() */ ) {
- QString currentName = prefix;
+TQString UMLCanvasObject::uniqChildName( const Uml::Object_Type type,
+ const TQString &prefix /* = TQString() */ ) {
+ TQString currentName = prefix;
if (currentName.isEmpty()) {
switch (type) {
case Uml::ot_Association:
@@ -167,14 +167,14 @@ QString UMLCanvasObject::uniqChildName( const Uml::Object_Type type,
}
}
- QString name = currentName;
+ TQString name = currentName;
for (int number = 1; findChildObject(name); ++number) {
- name = currentName + '_' + QString::number(number);
+ name = currentName + '_' + TQString::number(number);
}
return name;
}
-UMLObject * UMLCanvasObject::findChildObject(const QString &n, Uml::Object_Type t) {
+UMLObject * UMLCanvasObject::findChildObject(const TQString &n, Uml::Object_Type t) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
UMLObject *obj;
for (UMLObjectListIt oit(m_List); (obj = oit.current()) != NULL; ++oit) {
diff --git a/umbrello/umbrello/umlcanvasobject.h b/umbrello/umbrello/umlcanvasobject.h
index 626b9fe9..8f7ccb8e 100644
--- a/umbrello/umbrello/umlcanvasobject.h
+++ b/umbrello/umbrello/umlcanvasobject.h
@@ -42,7 +42,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLCanvasObject(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLCanvasObject(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -168,7 +168,7 @@ public:
* any object type will match.
* @return Pointer to the object found; NULL if none found.
*/
- virtual UMLObject *findChildObject(const QString &n, Uml::Object_Type t = Uml::ot_UMLObject);
+ virtual UMLObject *findChildObject(const TQString &n, Uml::Object_Type t = Uml::ot_UMLObject);
/**
* Find an association.
@@ -190,8 +190,8 @@ public:
* internally based on the object type.
* @return Unique name string for the Object_Type given.
*/
- virtual QString uniqChildName(const Uml::Object_Type type,
- const QString &prefix = QString());
+ virtual TQString uniqChildName(const Uml::Object_Type type,
+ const TQString &prefix = TQString());
virtual void removeAllChildObjects();
diff --git a/umbrello/umbrello/umlclassifierlist.h b/umbrello/umbrello/umlclassifierlist.h
index 45bd2b62..97d2a880 100644
--- a/umbrello/umbrello/umlclassifierlist.h
+++ b/umbrello/umbrello/umlclassifierlist.h
@@ -12,12 +12,12 @@
#ifndef UMLCLASSIFIERLIST_H
#define UMLCLASSIFIERLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLClassifier;
-typedef QPtrList<UMLClassifier> UMLClassifierList;
-typedef QPtrListIterator<UMLClassifier> UMLClassifierListIt;
+typedef TQPtrList<UMLClassifier> UMLClassifierList;
+typedef TQPtrListIterator<UMLClassifier> UMLClassifierListIt;
#endif
diff --git a/umbrello/umbrello/umlclassifierlistitemlist.h b/umbrello/umbrello/umlclassifierlistitemlist.h
index 675e8d5c..950fb722 100644
--- a/umbrello/umbrello/umlclassifierlistitemlist.h
+++ b/umbrello/umbrello/umlclassifierlistitemlist.h
@@ -12,19 +12,19 @@
#ifndef UMLCLASSIFIERLISTITEMLIST_H
#define UMLCLASSIFIERLISTITEMLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLClassifierListItem;
-//typedef QPtrList<UMLClassifierListItem> UMLClassifierListItemList;
-typedef QPtrListIterator<UMLClassifierListItem> UMLClassifierListItemListIt;
+//typedef TQPtrList<UMLClassifierListItem> UMLClassifierListItemList;
+typedef TQPtrListIterator<UMLClassifierListItem> UMLClassifierListItemListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLClassifierListItem>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLClassifierListItem>
* base class.
*/
-class UMLClassifierListItemList : public QPtrList<UMLClassifierListItem>
+class UMLClassifierListItemList : public TQPtrList<UMLClassifierListItem>
{
public:
diff --git a/umbrello/umbrello/umldoc.cpp b/umbrello/umbrello/umldoc.cpp
index 9783cfbd..4862193a 100644
--- a/umbrello/umbrello/umldoc.cpp
+++ b/umbrello/umbrello/umldoc.cpp
@@ -13,13 +13,13 @@
#include "umldoc.h"
// qt includes
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qbuffer.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqbuffer.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
// kde includes
#include <kapplication.h>
@@ -95,14 +95,14 @@ UMLDoc::UMLDoc() {
void UMLDoc::init() {
// Initialize predefined folders.
- const QString nativeRootName[Uml::N_MODELTYPES] = {
+ const TQString nativeRootName[Uml::N_MODELTYPES] = {
"Logical View",
"Use Case View",
"Component View",
"Deployment View",
"Entity Relationship Model"
};
- const QString localizedRootName[Uml::N_MODELTYPES] = {
+ const TQString localizedRootName[Uml::N_MODELTYPES] = {
i18n("Logical View"),
i18n("Use Case View"),
i18n("Component View"),
@@ -120,10 +120,10 @@ void UMLDoc::init() {
// Connect signals.
UMLApp * pApp = UMLApp::app();
- connect(this, SIGNAL(sigDiagramCreated(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
- connect(this, SIGNAL(sigDiagramRemoved(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
- connect(this, SIGNAL(sigDiagramRenamed(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
- connect(this, SIGNAL( sigCurrentViewChanged() ), pApp, SLOT( slotCurrentViewChanged() ) );
+ connect(this, TQT_SIGNAL(sigDiagramCreated(Uml::IDType)), pApp, TQT_SLOT(slotUpdateViews()));
+ connect(this, TQT_SIGNAL(sigDiagramRemoved(Uml::IDType)), pApp, TQT_SLOT(slotUpdateViews()));
+ connect(this, TQT_SIGNAL(sigDiagramRenamed(Uml::IDType)), pApp, TQT_SLOT(slotUpdateViews()));
+ connect(this, TQT_SIGNAL( sigCurrentViewChanged() ), pApp, TQT_SLOT( slotCurrentViewChanged() ) );
}
UMLDoc::~UMLDoc() {
@@ -145,7 +145,7 @@ void UMLDoc::addView(UMLView *view) {
UMLApp * pApp = UMLApp::app();
if ( pApp->getListView() )
- connect(this, SIGNAL(sigObjectRemoved(UMLObject *)), view, SLOT(slotObjectRemoved(UMLObject *)));
+ connect(this, TQT_SIGNAL(sigObjectRemoved(UMLObject *)), view, TQT_SLOT(slotObjectRemoved(UMLObject *)));
pApp->setCurrentView(view);
if ( ! m_bLoading ) {
@@ -176,7 +176,7 @@ void UMLDoc::removeView(UMLView *view , bool enforceCurrentView ) {
return;
}
if ( UMLApp::app()->getListView() ) {
- disconnect(this,SIGNAL(sigObjectRemoved(UMLObject *)), view,SLOT(slotObjectRemoved(UMLObject *)));
+ disconnect(this,TQT_SIGNAL(sigObjectRemoved(UMLObject *)), view,TQT_SLOT(slotObjectRemoved(UMLObject *)));
}
view->hide();
//remove all widgets before deleting view
@@ -341,16 +341,16 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
}
m_doc_url = url;
- QDir d = url.path(1);
+ TQDir d = url.path(1);
closeDocument();
// IMPORTANT: set m_bLoading to true
// _AFTER_ the call of UMLDoc::closeDocument()
// as it sets m_bLoading to false afer it was temporarily
// changed to true to block recording of changes in redo-buffer
m_bLoading = true;
- QString tmpfile;
+ TQString tmpfile;
KIO::NetAccess::download( url, tmpfile, UMLApp::app() );
- QFile file( tmpfile );
+ TQFile file( tmpfile );
if ( !file.exists() ) {
KMessageBox::error(0, i18n("The file %1 does not exist.").arg(d.path()), i18n("Load Error"));
m_doc_url.setFileName(i18n("Untitled"));
@@ -363,12 +363,12 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
bool status = false;
// check if the xmi file is a compressed archive like tar.bzip2 or tar.gz
- QString filetype = m_doc_url.fileName(true);
- QString mimetype = "";
- if (filetype.find(QRegExp("\\.tgz$")) != -1)
+ TQString filetype = m_doc_url.fileName(true);
+ TQString mimetype = "";
+ if (filetype.find(TQRegExp("\\.tgz$")) != -1)
{
mimetype = "application/x-gzip";
- } else if (filetype.find(QRegExp("\\.tar.bz2$")) != -1) {
+ } else if (filetype.find(TQRegExp("\\.tar.bz2$")) != -1) {
mimetype = "application/x-bzip2";
}
@@ -386,11 +386,11 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
// get the root directory and all entries in
const KArchiveDirectory * rootDir = archive.directory();
- QStringList entries = rootDir->entries();
- QString entryMimeType;
+ TQStringList entries = rootDir->entries();
+ TQString entryMimeType;
bool foundXMI = false;
- QStringList::Iterator it;
- QStringList::Iterator end(entries.end());
+ TQStringList::Iterator it;
+ TQStringList::Iterator end(entries.end());
// now go through all entries till we find an xmi file
for (it = entries.begin(); it != end; ++it)
@@ -442,7 +442,7 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
fileEntry->copyTo(tmp_dir.name());
// now open the extracted file for reading
- QFile xmi_file(tmp_dir.name() + *it);
+ TQFile xmi_file(tmp_dir.name() + *it);
if( !xmi_file.open( IO_ReadOnly ) )
{
KMessageBox::error(0, i18n("There was a problem loading the extracted file: %1").arg(d.path()), i18n("Load Error"));
@@ -505,15 +505,15 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
bool UMLDoc::saveDocument(const KURL& url, const char * /* format */) {
m_doc_url = url;
- QDir d = m_doc_url.path(1);
- QFile file;
+ TQDir d = m_doc_url.path(1);
+ TQFile file;
bool uploaded = true;
// first, we have to find out which format to use
- QString strFileName = url.path(-1);
- QFileInfo fileInfo(strFileName);
- QString fileExt = fileInfo.extension();
- QString fileFormat = "xmi";
+ TQString strFileName = url.path(-1);
+ TQFileInfo fileInfo(strFileName);
+ TQString fileExt = fileInfo.extension();
+ TQString fileFormat = "xmi";
if (fileExt == "xmi" || fileExt == "bak.xmi")
{
fileFormat = "xmi";
@@ -569,12 +569,12 @@ bool UMLDoc::saveDocument(const KURL& url, const char * /* format */) {
file.close(); // ...and close it
// now add this file to the archive, but without the extension
- QString tmpQString = url.fileName();
+ TQString tmpQString = url.fileName();
if (fileFormat == "tgz")
{
- tmpQString.replace(QRegExp("\\.tgz$"), "");
+ tmpQString.replace(TQRegExp("\\.tgz$"), "");
} else {
- tmpQString.replace(QRegExp("\\.tar\\.bz2$"), "");
+ tmpQString.replace(TQRegExp("\\.tar\\.bz2$"), "");
}
archive->addLocalFile(tmp_xmi_file.name(), tmpQString);
archive->close();
@@ -649,7 +649,7 @@ void UMLDoc::setupSignals() {
WorkToolBar *tb = UMLApp::app() -> getWorkToolBar();
- connect(this, SIGNAL(sigDiagramChanged(Uml::Diagram_Type)), tb, SLOT(slotCheckToolBar(Uml::Diagram_Type)));
+ connect(this, TQT_SIGNAL(sigDiagramChanged(Uml::Diagram_Type)), tb, TQT_SLOT(slotCheckToolBar(Uml::Diagram_Type)));
//new signals below
return;
@@ -665,7 +665,7 @@ UMLView * UMLDoc::findView(Uml::IDType id) {
return v;
}
-UMLView * UMLDoc::findView(Uml::Diagram_Type type, const QString &name,
+UMLView * UMLDoc::findView(Uml::Diagram_Type type, const TQString &name,
bool searchAllScopes /* =false */) {
Uml::Model_Type mt = Model_Utils::convert_DT_MT(type);
return m_root[mt]->findView(type, name, searchAllScopes);
@@ -692,7 +692,7 @@ UMLStereotype * UMLDoc::findStereotypeById(Uml::IDType id) {
return NULL;
}
-UMLObject* UMLDoc::findUMLObject(const QString &name,
+UMLObject* UMLDoc::findUMLObject(const TQString &name,
Uml::Object_Type type /* = ot_UMLObject */,
UMLObject *currentObj /* = NULL */) {
UMLObject *o = m_datatypeRoot->findObject(name);
@@ -710,7 +710,7 @@ UMLObject* UMLDoc::findUMLObject(const QString &name,
return NULL;
}
-UMLClassifier* UMLDoc::findUMLClassifier(const QString &name) {
+UMLClassifier* UMLDoc::findUMLClassifier(const TQString &name) {
//this is used only by code generator so we don't need to look at Datatypes
UMLObject * obj = findUMLObject(name);
return dynamic_cast<UMLClassifier*>(obj);
@@ -749,7 +749,7 @@ void UMLDoc::removeStereotype(const UMLStereotype *s) {
m_stereoList.remove(s);
}
-void UMLDoc::writeToStatusBar(const QString &text) {
+void UMLDoc::writeToStatusBar(const TQString &text) {
emit sigWriteToStatusBar(text);
}
@@ -765,7 +765,7 @@ void UMLDoc::slotRemoveUMLObject(UMLObject* object) {
pkg->removeObject(object);
}
-bool UMLDoc::isUnique(const QString &name)
+bool UMLDoc::isUnique(const TQString &name)
{
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem *currentItem = (UMLListViewItem*)listView->currentItem();
@@ -801,7 +801,7 @@ bool UMLDoc::isUnique(const QString &name)
return true;
}
-bool UMLDoc::isUnique(const QString &name, UMLPackage *package)
+bool UMLDoc::isUnique(const TQString &name, UMLPackage *package)
{
// if a package, then only do check in that
if (package)
@@ -820,7 +820,7 @@ bool UMLDoc::isUnique(const QString &name, UMLPackage *package)
return true;
}
-UMLStereotype* UMLDoc::findStereotype(const QString &name) {
+UMLStereotype* UMLDoc::findStereotype(const TQString &name) {
UMLStereotype *s;
for (UMLStereotypeListIt it(m_stereoList); (s = it.current()) != NULL; ++it) {
if (s->getName() == name)
@@ -829,7 +829,7 @@ UMLStereotype* UMLDoc::findStereotype(const QString &name) {
return NULL;
}
-UMLStereotype* UMLDoc::findOrCreateStereotype(const QString &name) {
+UMLStereotype* UMLDoc::findOrCreateStereotype(const TQString &name) {
UMLStereotype *s = findStereotype(name);
if (s != NULL) {
return s;
@@ -928,8 +928,8 @@ void UMLDoc::addAssociation(UMLAssociation *Assoc)
setModified(true);
}
-QString UMLDoc::uniqViewName(const Uml::Diagram_Type type) {
- QString dname;
+TQString UMLDoc::uniqViewName(const Uml::Diagram_Type type) {
+ TQString dname;
if(type == dt_UseCase)
dname = i18n("use case diagram");
else if(type == dt_Class)
@@ -951,9 +951,9 @@ QString UMLDoc::uniqViewName(const Uml::Diagram_Type type) {
else {
kWarning() << "uniqViewName() called with unknown diagram type" << endl;
}
- QString name = dname;
+ TQString name = dname;
for (int number = 0; findView(type, name, true); ++number,
- name = dname + '_' + QString::number(number))
+ name = dname + '_' + TQString::number(number))
;
return name;
}
@@ -968,12 +968,12 @@ void UMLDoc::setLoading(bool state /* = true */) {
UMLView* UMLDoc::createDiagram(UMLFolder *folder, Uml::Diagram_Type type, bool askForName /*= true */) {
bool ok = true;
- QString name,
+ TQString name,
dname = uniqViewName(type);
while(true) {
if (askForName) {
- name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), dname, &ok, (QWidget*)UMLApp::app());
+ name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), dname, &ok, (TQWidget*)UMLApp::app());
} else {
name = dname;
}
@@ -1007,9 +1007,9 @@ void UMLDoc::renameDiagram(Uml::IDType id) {
UMLView *temp = findView(id);
Diagram_Type type = temp->getType();
- QString oldName= temp->getName();
+ TQString oldName= temp->getName();
while(true) {
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (QWidget*)UMLApp::app());
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (TQWidget*)UMLApp::app());
if(!ok)
break;
@@ -1028,9 +1028,9 @@ void UMLDoc::renameDiagram(Uml::IDType id) {
void UMLDoc::renameUMLObject(UMLObject *o) {
bool ok = false;
- QString oldName= o->getName();
+ TQString oldName= o->getName();
while(true) {
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (QWidget*)UMLApp::app());
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (TQWidget*)UMLApp::app());
if(!ok)
break;
if(name.length() == 0)
@@ -1054,9 +1054,9 @@ void UMLDoc::renameChildUMLObject(UMLObject *o) {
return;
}
- QString oldName= o->getName();
+ TQString oldName= o->getName();
while(true) {
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (QWidget*)UMLApp::app());
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (TQWidget*)UMLApp::app());
if(!ok)
break;
if(name.length() == 0)
@@ -1192,11 +1192,11 @@ void UMLDoc::signalUMLObjectCreated(UMLObject * o) {
*/
}
-void UMLDoc::setName(const QString& name) {
+void UMLDoc::setName(const TQString& name) {
m_Name = name;
}
-QString UMLDoc::getName() const {
+TQString UMLDoc::getName() const {
return m_Name;
}
@@ -1204,23 +1204,23 @@ Uml::IDType UMLDoc::getModelID() const {
return m_modelID;
}
-void UMLDoc::saveToXMI(QIODevice& file) {
- QDomDocument doc;
+void UMLDoc::saveToXMI(TQIODevice& file) {
+ TQDomDocument doc;
- QDomProcessingInstruction xmlHeading =
+ TQDomProcessingInstruction xmlHeading =
doc.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"");
doc.appendChild(xmlHeading);
- QDomElement root = doc.createElement( "XMI" );
+ TQDomElement root = doc.createElement( "XMI" );
root.setAttribute( "xmi.version", "1.2" );
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
root.setAttribute( "timestamp", now.toString(Qt::ISODate));
root.setAttribute( "verified", "false");
root.setAttribute( "xmlns:UML", "http://schema.omg.org/spec/UML/1.3");
doc.appendChild( root );
- QDomElement header = doc.createElement( "XMI.header" );
- QDomElement meta = doc.createElement( "XMI.metamodel" );
+ TQDomElement header = doc.createElement( "XMI.header" );
+ TQDomElement meta = doc.createElement( "XMI.metamodel" );
meta.setAttribute( "xmi.name", "UML" );
meta.setAttribute( "xmi.version", "1.3" );
meta.setAttribute( "href", "UML.xml" );
@@ -1230,10 +1230,10 @@ void UMLDoc::saveToXMI(QIODevice& file) {
* bugs.kde.org/56184 comment by M. Alanen 2004-12-19:
* " XMI.model requires xmi.version. (or leave the whole XMI.model out,
* it's not required) "
- QDomElement model = doc.createElement( "XMI.model" );
- QFile* qfile = dynamic_cast<QFile*>(&file);
+ TQDomElement model = doc.createElement( "XMI.model" );
+ TQFile* qfile = dynamic_cast<TQFile*>(&file);
if (qfile) {
- QString modelName = qfile->name();
+ TQString modelName = qfile->name();
modelName = modelName.section('/', -1 );
modelName = modelName.section('.', 0, 0);
model.setAttribute( "xmi.name", modelName );
@@ -1241,28 +1241,28 @@ void UMLDoc::saveToXMI(QIODevice& file) {
}
*/
- QDomElement documentation = doc.createElement( "XMI.documentation" );
+ TQDomElement documentation = doc.createElement( "XMI.documentation" );
// If we consider it useful we might add user and contact details
- // QDomElement owner = doc.createElement( "XMI.owner" );
+ // TQDomElement owner = doc.createElement( "XMI.owner" );
// owner.appendChild( doc.createTextNode( "Jens Kruger" ) ); // Add a User
// documentation.appendChild( owner );
- // QDomElement contact = doc.createElement( "XMI.contact" );
+ // TQDomElement contact = doc.createElement( "XMI.contact" );
// contact.appendChild( doc.createTextNode( "je.krueger@web.de" ) ); // add a contact
// documentation.appendChild( contact );
- QDomElement exporter = doc.createElement( "XMI.exporter" );
+ TQDomElement exporter = doc.createElement( "XMI.exporter" );
exporter.appendChild( doc.createTextNode( "umbrello uml modeller http://uml.sf.net" ) );
documentation.appendChild( exporter );
- QDomElement exporterVersion = doc.createElement( "XMI.exporterVersion" );
+ TQDomElement exporterVersion = doc.createElement( "XMI.exporterVersion" );
exporterVersion.appendChild( doc.createTextNode( XMI_FILE_VERSION ) );
documentation.appendChild( exporterVersion );
// all files are now saved with correct Unicode encoding, we add this
// information to the header, so that the file will be loaded correctly
- QDomElement exporterEncoding = doc.createElement( "XMI.exporterEncoding" );
+ TQDomElement exporterEncoding = doc.createElement( "XMI.exporterEncoding" );
exporterEncoding.appendChild( doc.createTextNode( "UnicodeUTF8" ) );
documentation.appendChild( exporterEncoding );
@@ -1275,11 +1275,11 @@ void UMLDoc::saveToXMI(QIODevice& file) {
header.appendChild( meta );
root.appendChild( header );
- QDomElement content = doc.createElement( "XMI.content" );
+ TQDomElement content = doc.createElement( "XMI.content" );
- QDomElement contentNS = doc.createElement( "UML:Namespace.contents" );
+ TQDomElement contentNS = doc.createElement( "UML:Namespace.contents" );
- QDomElement objectsElement = doc.createElement( "UML:Model" );
+ TQDomElement objectsElement = doc.createElement( "UML:Model" );
objectsElement.setAttribute( "xmi.id", ID2STR(m_modelID) );
objectsElement.setAttribute( "name", m_Name );
objectsElement.setAttribute( "isSpecification", "false" );
@@ -1287,16 +1287,16 @@ void UMLDoc::saveToXMI(QIODevice& file) {
objectsElement.setAttribute( "isRoot", "false" );
objectsElement.setAttribute( "isLeaf", "false" );
- QDomElement ownedNS = doc.createElement( "UML:Namespace.ownedElement" );
+ TQDomElement ownedNS = doc.createElement( "UML:Namespace.ownedElement" );
// Save stereotypes and toplevel datatypes first so that upon loading
// they are known first.
// There is a bug causing duplication of the same stereotype in m_stereoList.
// As a workaround, we use a string list to memorize which stereotype has been saved.
- QStringList stereoNames;
- QValueList<Uml::IDType> stereoIDs;
+ TQStringList stereoNames;
+ TQValueList<Uml::IDType> stereoIDs;
for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) {
- QString stName = s->getName();
+ TQString stName = s->getName();
Uml::IDType stID = s->getID();
if (!stereoNames.contains(stName) && !stereoIDs.contains(stID)) {
s->saveToXMI(doc, ownedNS);
@@ -1318,10 +1318,10 @@ void UMLDoc::saveToXMI(QIODevice& file) {
root.appendChild( content );
// Save the XMI extensions: docsettings, diagrams, listview, and codegeneration.
- QDomElement extensions = doc.createElement( "XMI.extensions" );
+ TQDomElement extensions = doc.createElement( "XMI.extensions" );
extensions.setAttribute( "xmi.extender", "umbrello" );
- QDomElement docElement = doc.createElement( "docsettings" );
+ TQDomElement docElement = doc.createElement( "docsettings" );
Uml::IDType viewID = Uml::id_None;
UMLView *currentView = UMLApp::app()->getCurrentView();
if (currentView)
@@ -1337,26 +1337,26 @@ void UMLDoc::saveToXMI(QIODevice& file) {
// save code generator
CodeGenerator *codegen = UMLApp::app()->getGenerator();
if (codegen) {
- QDomElement codeGenElement = doc.createElement( "codegeneration" );
+ TQDomElement codeGenElement = doc.createElement( "codegeneration" );
codegen->saveToXMI( doc, codeGenElement );
extensions.appendChild( codeGenElement );
}
root.appendChild( extensions );
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << doc.toString();
}
-short UMLDoc::getEncoding(QIODevice & file)
+short UMLDoc::getEncoding(TQIODevice & file)
{
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString data = stream.read();
- QString error;
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString data = stream.read();
+ TQString error;
int line;
- QDomDocument doc;
+ TQDomDocument doc;
if( !doc.setContent( data, false, &error, &line ) )
{
kWarning()<<"Can't set content: "<<error<<" Line: "<<line<<endl;
@@ -1365,12 +1365,12 @@ short UMLDoc::getEncoding(QIODevice & file)
// we start at the beginning and go to the point in the header where we can
// find out if the file was saved using Unicode
- QDomNode node = doc.firstChild();
+ TQDomNode node = doc.firstChild();
while (node.isComment() || node.isProcessingInstruction())
{
node = node.nextSibling();
}
- QDomElement root = node.toElement();
+ TQDomElement root = node.toElement();
if( root.isNull() )
{
return ENC_UNKNOWN;
@@ -1385,15 +1385,15 @@ short UMLDoc::getEncoding(QIODevice & file)
if ( node.isNull() )
return ENC_UNKNOWN;
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
// check header
if( element.isNull() || element.tagName() != "XMI.header" )
return ENC_UNKNOWN;
- QDomNode headerNode = node.firstChild();
+ TQDomNode headerNode = node.firstChild();
while ( !headerNode.isNull() )
{
- QDomElement headerElement = headerNode.toElement();
+ TQDomElement headerElement = headerNode.toElement();
// the information if Unicode was used is now stored in the
// XMI.documentation section of the header
if (headerElement.isNull() ||
@@ -1401,10 +1401,10 @@ short UMLDoc::getEncoding(QIODevice & file)
headerNode = headerNode.nextSibling();
continue;
}
- QDomNode docuNode = headerNode.firstChild();
+ TQDomNode docuNode = headerNode.firstChild();
while ( !docuNode.isNull() )
{
- QDomElement docuElement = docuNode.toElement();
+ TQDomElement docuElement = docuNode.toElement();
// a tag XMI.exporterEncoding was added since version 1.2 to
// mark a file as saved with Unicode
if (! docuElement.isNull() &&
@@ -1412,7 +1412,7 @@ short UMLDoc::getEncoding(QIODevice & file)
{
// at the moment this if isn't really necessary, but maybe
// later we will have other encoding standards
- if (docuElement.text() == QString("UnicodeUTF8"))
+ if (docuElement.text() == TQString("UnicodeUTF8"))
{
return ENC_UNICODE; // stop here
}
@@ -1424,7 +1424,7 @@ short UMLDoc::getEncoding(QIODevice & file)
return ENC_OLD_ENC;
}
-bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
+bool UMLDoc::loadFromXMI( TQIODevice & file, short encode )
{
// old Umbrello versions (version < 1.2) didn't save the XMI in Unicode
// this wasn't correct, because non Latin1 chars where lost
@@ -1436,30 +1436,30 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
return false;
file.reset();
}
- QTextStream stream( &file );
+ TQTextStream stream( &file );
if (encode == ENC_UNICODE)
{
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
}
- QString data = stream.read();
+ TQString data = stream.read();
kapp->processEvents(); // give UI events a chance
- QString error;
+ TQString error;
int line;
- QDomDocument doc;
+ TQDomDocument doc;
if( !doc.setContent( data, false, &error, &line ) ) {
kWarning()<<"Can't set content:"<<error<<" Line:"<<line<<endl;
return false;
}
kapp->processEvents(); // give UI events a chance
- QDomNode node = doc.firstChild();
+ TQDomNode node = doc.firstChild();
//Before Umbrello 1.1-rc1 we didn't add a <?xml heading
//so we allow the option of this being missing
while (node.isComment() || node.isProcessingInstruction()) {
node = node.nextSibling();
}
- QDomElement root = node.toElement();
+ TQDomElement root = node.toElement();
if( root.isNull() ) {
return false;
}
@@ -1472,22 +1472,22 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
for (node = node.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if (element.isNull()) {
kDebug() << "loadFromXMI: skip empty elem" << endl;
continue;
}
bool recognized = false;
- QString outerTag = element.tagName();
+ TQString outerTag = element.tagName();
//check header
if (outerTag == "XMI.header") {
- QDomNode headerNode = node.firstChild();
+ TQDomNode headerNode = node.firstChild();
if ( !validateXMIHeader(headerNode) ) {
return false;
}
recognized = true;
} else if (outerTag == "XMI.extensions") {
- QDomNode extensionsNode = node.firstChild();
+ TQDomNode extensionsNode = node.firstChild();
while (! extensionsNode.isNull()) {
loadExtensionsFromXMI(extensionsNode);
extensionsNode = extensionsNode.nextSibling();
@@ -1502,12 +1502,12 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
}
bool seen_UMLObjects = false;
//process content
- for (QDomNode child = node.firstChild(); !child.isNull();
+ for (TQDomNode child = node.firstChild(); !child.isNull();
child = child.nextSibling()) {
if (child.isComment())
continue;
element = child.toElement();
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tag == "umlobjects" // for bkwd compat.
|| tagEq(tag, "Subsystem")
|| tagEq(tag, "Model") ) {
@@ -1524,7 +1524,7 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
tagEq(tag, "Interface")) {
// These tests are only for foreign XMI files that
// are missing the <Model> tag (e.g. NSUML)
- QDomElement parentElem = node.toElement();
+ TQDomElement parentElem = node.toElement();
if( !loadUMLObjectsFromXMI( parentElem ) ) {
kWarning() << "failed load on model objects" << endl;
return false;
@@ -1542,7 +1542,7 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
if (tag != "documentation") {
continue;
}
- QString modelElement = element.attribute("modelElement", "");
+ TQString modelElement = element.attribute("modelElement", "");
if (modelElement.isEmpty()) {
kDebug() << "skipping TaggedValue(documentation) because "
<< "modelElement.isEmpty()" << endl;
@@ -1554,7 +1554,7 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
<< " for modelElement " << modelElement << endl;
continue;
}
- QString value = element.attribute("value", "");
+ TQString value = element.attribute("value", "");
if (! value.isEmpty())
o->setDoc(value);
} else {
@@ -1609,8 +1609,8 @@ void UMLDoc::resolveTypes() {
kapp->processEvents(); // give UI events a chance
}
-bool UMLDoc::validateXMIHeader(QDomNode& headerNode) {
- QDomElement headerElement = headerNode.toElement();
+bool UMLDoc::validateXMIHeader(TQDomNode& headerNode) {
+ TQDomElement headerElement = headerNode.toElement();
while ( !headerNode.isNull() ) {
/* //Seems older Umbrello files used a different metamodel, so don't validate it for now
if( !headerElement.isNull() && headerElement.tagName() == "XMI.metamodel" ) {
@@ -1626,7 +1626,7 @@ bool UMLDoc::validateXMIHeader(QDomNode& headerNode) {
return true;
}
-bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
+bool UMLDoc::loadUMLObjectsFromXMI(TQDomElement& element) {
/* FIXME need a way to make status bar actually reflect
how much of the file has been loaded rather than just
counting to 10 (an arbitrary number)
@@ -1637,15 +1637,15 @@ bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
*/
emit sigWriteToStatusBar( i18n("Loading UML elements...") );
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (tagEq(type, "Model")) {
bool foundUmbrelloRootFolder = false;
- QString name = tempElement.attribute("name");
+ TQString name = tempElement.attribute("name");
for (int i = 0; i < Uml::N_MODELTYPES; i++) {
if (name == m_root[i]->getName()) {
m_pCurrentRoot = m_root[i];
@@ -1674,7 +1674,7 @@ bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (! tempElement.hasAttribute("xmi.id")) {
- QString idref = tempElement.attribute("xmi.idref", "");
+ TQString idref = tempElement.attribute("xmi.idref", "");
if (! idref.isEmpty()) {
kDebug() << "resolution of xmi.idref " << idref
<< " is not yet implemented" << endl;
@@ -1684,7 +1684,7 @@ bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
}
continue;
}
- QString stID = tempElement.attribute("stereotype", "");
+ TQString stID = tempElement.attribute("stereotype", "");
UMLObject *pObject = Object_Factory::makeObjectFromXMI(type, stID);
if( !pObject ) {
kWarning() << "Unknown type of umlobject to create: " << type << endl;
@@ -1750,14 +1750,14 @@ void UMLDoc::setMainViewID(Uml::IDType viewID) {
m_nViewID = viewID;
}
-void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
- QDomElement element = node.toElement();
- QString tag = element.tagName();
+void UMLDoc::loadExtensionsFromXMI(TQDomNode& node) {
+ TQDomElement element = node.toElement();
+ TQString tag = element.tagName();
if (tag == "docsettings") {
- QString viewID = element.attribute( "viewid", "-1" );
+ TQString viewID = element.attribute( "viewid", "-1" );
m_Doc = element.attribute( "documentation", "" );
- QString uniqueid = element.attribute( "uniqueid", "0" );
+ TQString uniqueid = element.attribute( "uniqueid", "0" );
m_nViewID = STR2ID(viewID);
UniqueID::set(STR2ID(uniqueid));
@@ -1766,7 +1766,7 @@ void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
} else if (tag == "diagrams" || tag == "UISModelElement") {
// For backward compatibility only:
// Since version 1.5.5 diagrams are saved as part of the UMLFolder.
- QDomNode diagramNode = node.firstChild();
+ TQDomNode diagramNode = node.firstChild();
if (tag == "UISModelElement") { // Unisys.IntegratePlus.2
element = diagramNode.toElement();
tag = element.tagName();
@@ -1789,11 +1789,11 @@ void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
}
} else if (tag == "codegeneration") {
- QDomNode cgnode = node.firstChild();
- QDomElement cgelement = cgnode.toElement();
+ TQDomNode cgnode = node.firstChild();
+ TQDomElement cgelement = cgnode.toElement();
while( !cgelement.isNull() ) {
- QString nodeName = cgelement.tagName();
- QString lang = cgelement.attribute("language","UNKNOWN");
+ TQString nodeName = cgelement.tagName();
+ TQString lang = cgelement.attribute("language","UNKNOWN");
Uml::Programming_Language pl = Model_Utils::stringToProgLang(lang);
CodeGenerator *g = UMLApp::app()->setGenerator(pl);
g->loadFromXMI(cgelement);
@@ -1807,19 +1807,19 @@ void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
// For backward compatibility only:
// Since version 1.5.5 diagrams are saved as part of the UMLFolder.
-bool UMLDoc::loadDiagramsFromXMI( QDomNode & node ) {
+bool UMLDoc::loadDiagramsFromXMI( TQDomNode & node ) {
emit sigWriteToStatusBar( i18n("Loading diagrams...") );
emit sigResetStatusbarProgress();
emit sigSetStatusbarProgress( 0 );
emit sigSetStatusbarProgressSteps( 10 ); //FIX ME
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( element.isNull() )
return true;//return ok as it means there is no umlobjects
const Settings::OptionState state = Settings::getOptionState();
UMLView * pView = 0;
int count = 0;
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tag == "diagram" || tag == "UISDiagram") {
pView = new UMLView(NULL);
// IMPORTANT: Set OptionState of new UMLView _BEFORE_
@@ -1910,13 +1910,13 @@ UMLAssociationList UMLDoc::getAssociations() {
void UMLDoc::print(KPrinter * pPrinter) {
UMLView * printView = 0;
- int count = QString(pPrinter -> option("kde-uml-count")).toInt();
- QPainter painter(pPrinter);
+ int count = TQString(pPrinter -> option("kde-uml-count")).toInt();
+ TQPainter painter(pPrinter);
for(int i = 0;i < count;i++) {
if(i>0)
pPrinter -> newPage();
- QString diagram = i18n("kde-uml-Diagram") + QString("%1").arg(i);
- QString sID = pPrinter -> option(diagram);
+ TQString diagram = i18n("kde-uml-Diagram") + TQString("%1").arg(i);
+ TQString sID = pPrinter -> option(diagram);
Uml::IDType id = STR2ID(sID);
printView = findView(id);
@@ -2044,10 +2044,10 @@ bool UMLDoc::addUMLView(UMLView * pView ) {
return false;
int i = 0;
- QString viewName = (QString)pView->getName();
- QString name = viewName;
+ TQString viewName = (TQString)pView->getName();
+ TQString name = viewName;
while( findView(pView->getType(), name) != NULL) {
- name = viewName + '_' + QString::number(++i);
+ name = viewName + '_' + TQString::number(++i);
}
if(i) //If name was modified
pView->setName(name);
@@ -2081,14 +2081,14 @@ void UMLDoc::settingsChanged(Settings::OptionState optionState) {
void UMLDoc::initSaveTimer() {
if( m_pAutoSaveTimer ) {
m_pAutoSaveTimer -> stop();
- disconnect( m_pAutoSaveTimer, SIGNAL( timeout() ), this, SLOT( slotAutoSave() ) );
+ disconnect( m_pAutoSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoSave() ) );
delete m_pAutoSaveTimer;
m_pAutoSaveTimer = 0;
}
Settings::OptionState optionState = Settings::getOptionState();
if( optionState.generalState.autosave ) {
- m_pAutoSaveTimer = new QTimer(this, "_AUTOSAVETIMER_" );
- connect( m_pAutoSaveTimer, SIGNAL( timeout() ), this, SLOT( slotAutoSave() ) );
+ m_pAutoSaveTimer = new TQTimer(this, "_AUTOSAVETIMER_" );
+ connect( m_pAutoSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoSave() ) );
m_pAutoSaveTimer->start( optionState.generalState.autosavetime * 60000, false );
}
return;
@@ -2101,7 +2101,7 @@ void UMLDoc::slotAutoSave() {
}
KURL tempURL = m_doc_url;
if( tempURL.fileName() == i18n("Untitled") ) {
- tempURL.setPath( QDir::homeDirPath() + i18n("/autosave%1").arg(".xmi") );
+ tempURL.setPath( TQDir::homeDirPath() + i18n("/autosave%1").arg(".xmi") );
saveDocument( tempURL );
m_doc_url.setFileName( i18n("Untitled") );
m_modified = true;
@@ -2109,9 +2109,9 @@ void UMLDoc::slotAutoSave() {
} else {
// 2004-05-17 Achim Spangler
KURL orgDocUrl = m_doc_url;
- QString orgFileName = m_doc_url.fileName();
+ TQString orgFileName = m_doc_url.fileName();
// don't overwrite manually saved file with autosave content
- QString fileName = tempURL.fileName();
+ TQString fileName = tempURL.fileName();
Settings::OptionState optionState = Settings::getOptionState();
fileName.replace( ".xmi", optionState.generalState.autosavesuffix );
tempURL.setFileName( fileName );
@@ -2144,9 +2144,9 @@ void UMLDoc::signalDiagramRenamed(UMLView* pView ) {
void UMLDoc::addToUndoStack() {
Settings::OptionState optionState = Settings::getOptionState();
if (!m_bLoading && optionState.generalState.undo) {
- QBuffer* buffer = new QBuffer();
+ TQBuffer* buffer = new TQBuffer();
buffer->open(IO_WriteOnly);
- QDataStream* undoData = new QDataStream();
+ TQDataStream* undoData = new TQDataStream();
undoData->setDevice(buffer);
saveToXMI(*buffer);
buffer->close();
@@ -2193,8 +2193,8 @@ void UMLDoc::loadUndoData() {
m_bLoading = true;
closeDocument();
redoStack.prepend( undoStack.take(0) );
- QDataStream* undoData = undoStack.getFirst();
- QBuffer* buffer = static_cast<QBuffer*>( undoData->device() );
+ TQDataStream* undoData = undoStack.getFirst();
+ TQBuffer* buffer = static_cast<TQBuffer*>( undoData->device() );
buffer->open(IO_ReadOnly);
loadFromXMI(*buffer);
buffer->close();
@@ -2231,9 +2231,9 @@ void UMLDoc::loadRedoData() {
m_bLoading = true;
closeDocument();
undoStack.prepend( redoStack.getFirst() );
- QDataStream* redoData = redoStack.getFirst();
+ TQDataStream* redoData = redoStack.getFirst();
redoStack.removeFirst();
- QBuffer* buffer = static_cast<QBuffer*>( redoData->device() );
+ TQBuffer* buffer = static_cast<TQBuffer*>( redoData->device() );
buffer->open(IO_ReadOnly);
loadFromXMI(*buffer);
buffer->close();
@@ -2266,13 +2266,13 @@ void UMLDoc::addDefaultDatatypes() {
<< endl;
return;
}
- QStringList entries = cg->defaultDatatypes();
- QStringList::Iterator end(entries.end());
- for (QStringList::Iterator it = entries.begin(); it != end; ++it)
+ TQStringList entries = cg->defaultDatatypes();
+ TQStringList::Iterator end(entries.end());
+ for (TQStringList::Iterator it = entries.begin(); it != end; ++it)
createDatatype(*it);
}
-void UMLDoc::createDatatype(const QString &name) {
+void UMLDoc::createDatatype(const TQString &name) {
UMLObjectList datatypes = m_datatypeRoot->containedObjects();
UMLObject* umlobject = Model_Utils::findUMLObject(datatypes, name,
ot_Datatype, m_datatypeRoot);
@@ -2282,7 +2282,7 @@ void UMLDoc::createDatatype(const QString &name) {
UMLApp::app()->getListView()->closeDatatypesFolder();
}
-void UMLDoc::slotDiagramPopupMenu(QWidget* umlview, const QPoint& point) {
+void UMLDoc::slotDiagramPopupMenu(TQWidget* umlview, const TQPoint& point) {
UMLView* view = (UMLView*) umlview;
if(m_pTabPopupMenu != 0) {
m_pTabPopupMenu->hide();
@@ -2338,7 +2338,7 @@ void UMLDoc::slotDiagramPopupMenu(QWidget* umlview, const QPoint& point) {
m_pTabPopupMenu = new ListPopupMenu(UMLApp::app()->getMainViewWidget(), type);
m_pTabPopupMenu->popup(point);
- connect(m_pTabPopupMenu, SIGNAL(activated(int)), view, SLOT(slotMenuSelection(int)));
+ connect(m_pTabPopupMenu, TQT_SIGNAL(activated(int)), view, TQT_SLOT(slotMenuSelection(int)));
}
void UMLDoc::addDefaultStereotypes() {
diff --git a/umbrello/umbrello/umldoc.h b/umbrello/umbrello/umldoc.h
index 2e936a3f..15dad895 100644
--- a/umbrello/umbrello/umldoc.h
+++ b/umbrello/umbrello/umldoc.h
@@ -20,10 +20,10 @@
#include <typeinfo>
// qt includes
-#include <qdatastream.h>
-#include <qmap.h>
-#include <qdict.h>
-#include <qptrstack.h>
+#include <tqdatastream.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqptrstack.h>
// kde includes
#include <kurl.h>
@@ -74,7 +74,7 @@ class UMLFolder;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLDoc : public QObject {
+class UMLDoc : public TQObject {
Q_OBJECT
public:
/**
@@ -200,7 +200,7 @@ public:
* @param name The name to check.
* @return True if name is unique.
*/
- bool isUnique(const QString &name);
+ bool isUnique(const TQString &name);
/**
* Returns true if the given name is unique within its scope of given package.
@@ -209,12 +209,12 @@ public:
* @package The UMLPackage in which we have to determine the unique-ness
* @return True if name is unique.
*/
- bool isUnique(const QString &name, UMLPackage *package);
+ bool isUnique(const TQString &name, UMLPackage *package);
/**
* Finds or creates a stereotype for the parent object.
*/
- UMLStereotype* findOrCreateStereotype(const QString &name);
+ UMLStereotype* findOrCreateStereotype(const TQString &name);
/**
* Creates an association between two UMLObjects.
@@ -338,7 +338,7 @@ public:
* object are searched before the global scope.
* @return Pointer to the UMLObject found, or NULL if not found.
*/
- UMLObject* findUMLObject(const QString &name,
+ UMLObject* findUMLObject(const TQString &name,
Uml::Object_Type type = Uml::ot_UMLObject,
UMLObject *currentObj = NULL);
@@ -351,14 +351,14 @@ public:
* @param idStr The AuxId for the @ref UMLObject to find.
* @return Pointer to the UMLObject found, or NULL if not found.
*/
- UMLObject* findObjectByAuxId(const QString &idStr);
+ UMLObject* findObjectByAuxId(const TQString &idStr);
/**
* Used to find a @ref UMLClassifier by its name.
*
* @param name The name of the @ref UMLObject to find.
*/
- UMLClassifier * findUMLClassifier (const QString &name);
+ UMLClassifier * findUMLClassifier (const TQString &name);
/**
* Finds a UMLStereotype by its name.
@@ -366,7 +366,7 @@ public:
* @param name The name of the UMLStereotype to find.
* @return Pointer to the UMLStereotype found, or NULL if not found.
*/
- UMLStereotype * findStereotype(const QString &name);
+ UMLStereotype * findStereotype(const TQString &name);
/**
* Finds a view (diagram) by the ID given to method.
@@ -384,18 +384,18 @@ public:
* @param searchAllScopes Search in all subfolders (default: false.)
* @return Pointer to the view found, or NULL if not found.
*/
- UMLView * findView(Uml::Diagram_Type type, const QString &name,
+ UMLView * findView(Uml::Diagram_Type type, const TQString &name,
bool searchAllScopes = false);
/**
* Set the name of this model.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* Return the name of this model.
*/
- QString getName() const;
+ TQString getName() const;
/**
* Return the m_modelID (currently this a fixed value:
@@ -410,7 +410,7 @@ public:
*
* @param file The file to be saved to.
*/
- virtual void saveToXMI(QIODevice& file);
+ virtual void saveToXMI(TQIODevice& file);
/**
* Checks the given XMI file if it was saved with correct Unicode
@@ -418,7 +418,7 @@ public:
*
* @param file The file to be checked.
*/
- short getEncoding(QIODevice & file);
+ short getEncoding(TQIODevice & file);
/**
* Load a given XMI model from a file. If the encoding of the file
@@ -428,7 +428,7 @@ public:
* @param file The file to be loaded.
* @param encode The encoding used.
*/
- virtual bool loadFromXMI(QIODevice& file, short encode = ENC_UNKNOWN);
+ virtual bool loadFromXMI(TQIODevice& file, short encode = ENC_UNKNOWN);
/**
* Ensures the XMI file is a valid UML file.
@@ -436,28 +436,28 @@ public:
*
* @param headerNode The <XMI.header> node
*/
- bool validateXMIHeader(QDomNode& headerNode);
+ bool validateXMIHeader(TQDomNode& headerNode);
/**
* Loads all UML objects from XMI into the current UMLDoc.
*
* @return True if operation successful.
*/
- bool loadUMLObjectsFromXMI( QDomElement & element );
+ bool loadUMLObjectsFromXMI( TQDomElement & element );
/**
* Loads umbrello specific extensions from XMI to the UMLDoc.
* The extension tags are: "docsettings", "diagrams", "listview",
* and "codegeneration".
*/
- void loadExtensionsFromXMI(QDomNode & node);
+ void loadExtensionsFromXMI(TQDomNode & node);
/**
* Loads all diagrams from XMI into the current UMLDoc.
*
* @return True if operation successful.
*/
- bool loadDiagramsFromXMI( QDomNode & node );
+ bool loadDiagramsFromXMI( TQDomNode & node );
/**
* Signal a view/diagram has been renamed.
@@ -640,7 +640,7 @@ public:
*
* @return The documentation text of this UMLDoc.
*/
- QString getDocumentation() const {
+ TQString getDocumentation() const {
return m_Doc;
}
@@ -649,7 +649,7 @@ public:
*
* @param doc The documentation to set for this UMLDoc.
*/
- void setDocumentation(const QString &doc) {
+ void setDocumentation(const TQString &doc) {
m_Doc = doc;
}
@@ -705,7 +705,7 @@ public:
* if the default name is taken e.g. class diagram, class
* diagram_1 etc
*/
- QString uniqViewName(const Uml::Diagram_Type type);
+ TQString uniqViewName(const Uml::Diagram_Type type);
/**
* Returns true when loading a document file.
@@ -726,7 +726,7 @@ public:
* Add a datatype if it doesn't already exist.
* Used by code generators and attribute dialog.
*/
- void createDatatype(const QString &name);
+ void createDatatype(const TQString &name);
/**
* Find a UMLStereotype by its unique ID.
@@ -759,7 +759,7 @@ public:
/**
* Write text to the status bar.
*/
- void writeToStatusBar(const QString &text);
+ void writeToStatusBar(const TQString &text);
/**
* Type resolution pass.
@@ -791,7 +791,7 @@ private:
*/
UMLStereotypeList m_stereoList;
- QString m_Name; ///< name of this model as stored in the <UML:Model> tag
+ TQString m_Name; ///< name of this model as stored in the <UML:Model> tag
Uml::IDType m_modelID; ///< xmi.id of this model in the <UML:Model>
int m_count; ///< auxiliary counter for the progress bar
bool m_modified;
@@ -810,12 +810,12 @@ private:
/**
* Documentation for the project.
*/
- QString m_Doc;
+ TQString m_Doc;
/**
* Used for autosave
*/
- QTimer * m_pAutoSaveTimer;
+ TQTimer * m_pAutoSaveTimer;
/**
* Stores the version of old UML files.
@@ -824,17 +824,17 @@ private:
/**
* The stack of images of the document added to each time
- * something is changed. A QPtrList is used rather than a
- * QPtrStack to be able to remove the ones off the bottom once
+ * something is changed. A TQPtrList is used rather than a
+ * TQPtrStack to be able to remove the ones off the bottom once
* the stack gets too big.
*/
- QPtrList<QDataStream> undoStack;
+ TQPtrList<TQDataStream> undoStack;
/**
* The stack of images of the document added to each time
* undo is called.
*/
- QPtrList<QDataStream> redoStack;
+ TQPtrList<TQDataStream> redoStack;
/**
* Auxiliary to <docsettings> processing
@@ -872,7 +872,7 @@ public slots:
* Make a popup menu for the tabs
* signalled from tabWidget's contextMenu()
*/
- void slotDiagramPopupMenu(QWidget* umlview, const QPoint& point);
+ void slotDiagramPopupMenu(TQWidget* umlview, const TQPoint& point);
signals:
void sigDiagramCreated(Uml::IDType id);
@@ -906,7 +906,7 @@ signals:
/**
* Write text to the status bar.
*/
- void sigWriteToStatusBar(const QString &text);
+ void sigWriteToStatusBar(const TQString &text);
/**
* The diagram being displayed has changed.
diff --git a/umbrello/umbrello/umlentityattributelist.h b/umbrello/umbrello/umlentityattributelist.h
index 35c0a150..774922ca 100644
--- a/umbrello/umbrello/umlentityattributelist.h
+++ b/umbrello/umbrello/umlentityattributelist.h
@@ -12,19 +12,19 @@
#ifndef UMLENTITYATTRIBUTELIST_H
#define UMLENTITYATTRIBUTELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLEntityAttribute;
-//typedef QPtrList<UMLEntityAttribute> UMLEntityAttributeList;
-typedef QPtrListIterator<UMLEntityAttribute> UMLEntityAttributeListIt;
+//typedef TQPtrList<UMLEntityAttribute> UMLEntityAttributeList;
+typedef TQPtrListIterator<UMLEntityAttribute> UMLEntityAttributeListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLEntityAttribute>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLEntityAttribute>
* base class.
*/
-class UMLEntityAttributeList : public QPtrList<UMLEntityAttribute>
+class UMLEntityAttributeList : public TQPtrList<UMLEntityAttribute>
{
public:
diff --git a/umbrello/umbrello/umlenumliterallist.h b/umbrello/umbrello/umlenumliterallist.h
index 60e03199..3850b262 100644
--- a/umbrello/umbrello/umlenumliterallist.h
+++ b/umbrello/umbrello/umlenumliterallist.h
@@ -12,12 +12,12 @@
#ifndef UMLENUMLITERALLIST_H
#define UMLENUMLITERALLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLEnumLiteral;
-typedef QPtrList<UMLEnumLiteral> UMLEnumLiteralList;
-typedef QPtrListIterator<UMLEnumLiteral> UMLEnumLiteralListIt;
+typedef TQPtrList<UMLEnumLiteral> UMLEnumLiteralList;
+typedef TQPtrListIterator<UMLEnumLiteral> UMLEnumLiteralListIt;
#endif
diff --git a/umbrello/umbrello/umllistview.cpp b/umbrello/umbrello/umllistview.cpp
index d12fed58..29e270ce 100644
--- a/umbrello/umbrello/umllistview.cpp
+++ b/umbrello/umbrello/umllistview.cpp
@@ -13,12 +13,12 @@
#include "umllistview.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qevent.h>
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqregexp.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqevent.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -66,17 +66,17 @@
class LVToolTip : public QToolTip
{
public:
- LVToolTip (QWidget* parent) : QToolTip (parent) {}
+ LVToolTip (TQWidget* parent) : TQToolTip (parent) {}
virtual ~LVToolTip () {}
protected:
/**
- * Reimplemented from QToolTip for internal reasons.
+ * Reimplemented from TQToolTip for internal reasons.
* At classifiers, only the method names are shown in the list view -
* we use a tooltip for the full signature display.
* Once KListView's tooltip overriding mechanism works, we can kick
* this class out.
*/
- virtual void maybeTip (const QPoint& pos) {
+ virtual void maybeTip (const TQPoint& pos) {
UMLListView *lv = UMLApp::app()->getListView();
UMLListViewItem * item = (UMLListViewItem*)lv->itemAt(pos);
if (item == NULL)
@@ -85,15 +85,15 @@ protected:
if (obj == NULL || obj->getBaseType() != Uml::ot_Operation)
return;
UMLOperation *op = static_cast<UMLOperation*>(obj);
- QString text = op->toString(Uml::st_ShowSig);
- QRect rect = lv->itemRect(item);
+ TQString text = op->toString(Uml::st_ShowSig);
+ TQRect rect = lv->itemRect(item);
tip(rect, text);
}
};
#endif
-UMLListView::UMLListView(QWidget *parent, const char *name)
+UMLListView::UMLListView(TQWidget *parent, const char *name)
: KListView(parent,name), m_pMenu(0), m_doc(UMLApp::app()->getDocument())
{
loadPixmaps();
@@ -105,7 +105,7 @@ UMLListView::UMLListView(QWidget *parent, const char *name)
setItemsMovable(true);
setItemsRenameable( true );
setSelectionModeExt(FileManager);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
setDragEnabled(true);
setColumnWidthMode( 0, Manual );
setDefaultRenameAction( Accept );
@@ -131,41 +131,41 @@ UMLListView::UMLListView(QWidget *parent, const char *name)
m_lv[i] = NULL;
m_datatypeFolder = NULL;
//setup slots/signals
- connect(this, SIGNAL(dropped(QDropEvent *, QListViewItem *, QListViewItem *)),
- this, SLOT(slotDropped(QDropEvent *, QListViewItem *, QListViewItem *)));
- connect( this, SIGNAL( collapsed( QListViewItem * ) ),
- this, SLOT( slotCollapsed( QListViewItem * ) ) );
- connect( this, SIGNAL( expanded( QListViewItem * ) ), this, SLOT( slotExpanded( QListViewItem * ) ) );
- connect( UMLApp::app(), SIGNAL( sigCutSuccessful() ), this, SLOT( slotCutSuccessful() ) );
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent *, TQListViewItem *, TQListViewItem *)),
+ this, TQT_SLOT(slotDropped(TQDropEvent *, TQListViewItem *, TQListViewItem *)));
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotCollapsed( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ), this, TQT_SLOT( slotExpanded( TQListViewItem * ) ) );
+ connect( UMLApp::app(), TQT_SIGNAL( sigCutSuccessful() ), this, TQT_SLOT( slotCutSuccessful() ) );
}
UMLListView::~UMLListView() {}
-bool UMLListView::eventFilter(QObject *o, QEvent *e) {
- if (e->type() != QEvent::MouseButtonPress || !o->isA("QHeader"))
- return QListView::eventFilter(o, e);
- QMouseEvent *me = static_cast<QMouseEvent*>(e);
+bool UMLListView::eventFilter(TQObject *o, TQEvent *e) {
+ if (e->type() != TQEvent::MouseButtonPress || !o->isA("TQHeader"))
+ return TQListView::eventFilter(o, e);
+ TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
if (me->button() == Qt::RightButton) {
if (m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
delete m_pMenu;
}
m_pMenu = new ListPopupMenu(this, Uml::lvt_Model);
m_pMenu->popup(me->globalPos());
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
return true;
}
- return QListView::eventFilter(o, e);
+ return TQListView::eventFilter(o, e);
}
-void UMLListView::contentsMousePressEvent(QMouseEvent *me) {
+void UMLListView::contentsMousePressEvent(TQMouseEvent *me) {
UMLView *currentView = UMLApp::app()->getCurrentView();
if (currentView)
currentView->clearSelected();
if( me -> state() != Qt::ShiftButton )
clearSelection();
- QPoint pt = this->QScrollView::contentsToViewport( me->pos() );
+ TQPoint pt = this->TQScrollView::contentsToViewport( me->pos() );
UMLListViewItem * item = (UMLListViewItem*)itemAt(pt);
const Qt::ButtonState button = me->button();
@@ -184,25 +184,25 @@ void UMLListView::contentsMousePressEvent(QMouseEvent *me) {
if (button == Qt::RightButton) {
if(m_pMenu != 0) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
const Uml::ListView_Type type = item->getType();
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(me->globalPos());
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
}//end if right button
this->KListView::contentsMousePressEvent(me);
}
-void UMLListView::contentsMouseReleaseEvent(QMouseEvent *me) {
+void UMLListView::contentsMouseReleaseEvent(TQMouseEvent *me) {
if (me->button() != Qt::LeftButton) {
this->KListView::contentsMouseReleaseEvent(me);
return;
}
- const QPoint pt = this->QScrollView::contentsToViewport( me->pos() );
+ const TQPoint pt = this->TQScrollView::contentsToViewport( me->pos() );
UMLListViewItem *item = dynamic_cast<UMLListViewItem*>(itemAt(pt));
if (item == NULL || !Model_Utils::typeIsDiagram(item->getType())) {
this->KListView::contentsMouseReleaseEvent(me);
@@ -215,7 +215,7 @@ void UMLListView::contentsMouseReleaseEvent(QMouseEvent *me) {
this->KListView::contentsMouseReleaseEvent(me);
}
-void UMLListView::keyPressEvent(QKeyEvent *ke) {
+void UMLListView::keyPressEvent(TQKeyEvent *ke) {
UMLView *view = UMLApp::app()->getCurrentView();
if (view && view->getSelectCount()) {
// Widgets have been selected in the diagram area,
@@ -232,7 +232,7 @@ void UMLListView::keyPressEvent(QKeyEvent *ke) {
deleteItem(dynamic_cast<UMLListViewItem*>(item));
}
} else {
- QListView::keyPressEvent(ke); // let parent handle it
+ TQListView::keyPressEvent(ke); // let parent handle it
}
}
}
@@ -247,7 +247,7 @@ void UMLListView::popupMenuSel(int sel) {
Uml::ListView_Type lvt = temp -> getType();
Uml::Object_Type umlType = Uml::ot_UMLObject;
ListPopupMenu::Menu_Type menuType = (ListPopupMenu::Menu_Type)sel;
- QString name;
+ TQString name;
switch (menuType) {
case ListPopupMenu::mt_Class:
@@ -343,21 +343,21 @@ void UMLListView::popupMenuSel(int sel) {
return;
}
// configure & show the file dialog
- const QString rootDir(m_doc->URL().directory());
+ const TQString rootDir(m_doc->URL().directory());
KFileDialog fileDialog(rootDir, "*.xml", this, ":externalize-folder", true);
fileDialog.setCaption(i18n("Externalize Folder"));
fileDialog.setOperationMode(KFileDialog::Other);
// set a sensible default filename
- QString defaultFilename = current->getText().lower();
- defaultFilename.replace(QRegExp("\\W+"), "_");
+ TQString defaultFilename = current->getText().lower();
+ defaultFilename.replace(TQRegExp("\\W+"), "_");
defaultFilename.append(".xml"); // default extension
fileDialog.setSelection(defaultFilename);
fileDialog.exec();
KURL selURL = fileDialog.selectedURL();
if (selURL.isEmpty())
return;
- QString path = selURL.path();
- QString fileName = path;
+ TQString path = selURL.path();
+ TQString fileName = path;
if (fileName.startsWith(rootDir)) {
fileName.remove(rootDir);
} else {
@@ -368,7 +368,7 @@ void UMLListView::popupMenuSel(int sel) {
<< rootDir << endl;
return;
}
- QFile file(path);
+ TQFile file(path);
// Warn if file exists.
if (file.exists()) {
// This should be done using a KMessageBox but we currently
@@ -387,8 +387,8 @@ void UMLListView::popupMenuSel(int sel) {
}
modelFolder->setFolderFile(fileName);
// Recompute text of the folder
- QString folderText = current->getText();
- folderText.remove( QRegExp("\\s*\\(.*$") );
+ TQString folderText = current->getText();
+ folderText.remove( TQRegExp("\\s*\\(.*$") );
folderText.append( " (" + fileName + ')' );
current->setText(folderText);
break;
@@ -402,10 +402,10 @@ void UMLListView::popupMenuSel(int sel) {
kError() << "UMLListView::popupMenuSel: modelFolder is NULL" << endl;
return;
}
- modelFolder->setFolderFile(QString::null);
+ modelFolder->setFolderFile(TQString::null);
// Recompute text of the folder
- QString folderText = current->getText();
- folderText.remove( QRegExp("\\s*\\(.*$") );
+ TQString folderText = current->getText();
+ folderText.remove( TQRegExp("\\s*\\(.*$") );
current->setText(folderText);
break;
}
@@ -413,7 +413,7 @@ void UMLListView::popupMenuSel(int sel) {
case ListPopupMenu::mt_Model:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter Model Name"),
+ TQString name = KInputDialog::getText( i18n("Enter Model Name"),
i18n("Enter the new name of the model:"),
m_doc->getName(), &ok, UMLApp::app() );
if (ok) {
@@ -660,10 +660,10 @@ void UMLListView::slotObjectCreated(UMLObject* object) {
connectNewObjectsSlots(object);
const Uml::ListView_Type lvt = Model_Utils::convert_OT_LVT(object);
- QString name = object->getName();
+ TQString name = object->getName();
if (type == Uml::ot_Folder) {
UMLFolder *f = static_cast<UMLFolder*>(object);
- QString folderFile = f->getFolderFile();
+ TQString folderFile = f->getFolderFile();
if (!folderFile.isEmpty())
name.append(" (" + folderFile + ')');
}
@@ -692,40 +692,40 @@ void UMLListView::connectNewObjectsSlots(UMLObject* object) {
case Uml::ot_Interface:
{
UMLClassifier *c = static_cast<UMLClassifier*>(object);
- connect(c, SIGNAL(attributeAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(c, SIGNAL(attributeRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
- connect(c, SIGNAL(operationAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(c, SIGNAL(operationRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
- connect(c, SIGNAL(templateAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(c, SIGNAL(templateRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(c, TQT_SIGNAL(attributeAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(operationAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(operationRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(templateAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(templateRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
}
break;
case Uml::ot_Enum:
{
UMLEnum *e = static_cast<UMLEnum*>(object);
- connect(e, SIGNAL(enumLiteralAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(e, SIGNAL(enumLiteralRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(e, TQT_SIGNAL(enumLiteralAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(e, TQT_SIGNAL(enumLiteralRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
}
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
break;
case Uml::ot_Entity:
{
UMLEntity *ent = static_cast<UMLEntity*>(object);
- connect(ent, SIGNAL(entityAttributeAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(ent, SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(ent, TQT_SIGNAL(entityAttributeAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(ent, TQT_SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
}
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
break;
case Uml::ot_Datatype:
case Uml::ot_Attribute:
@@ -740,7 +740,7 @@ void UMLListView::connectNewObjectsSlots(UMLObject* object) {
case Uml::ot_Artifact:
case Uml::ot_Node:
case Uml::ot_Folder:
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
break;
case Uml::ot_UMLObject:
case Uml::ot_Association:
@@ -771,7 +771,7 @@ void UMLListView::childObjectAdded(UMLClassifierListItem* obj) {
void UMLListView::childObjectAdded(UMLClassifierListItem* child, UMLClassifier* parent) {
if (m_bCreatingChildObject)
return;
- const QString text = child->toString(Uml::st_SigNoVis);
+ const TQString text = child->toString(Uml::st_SigNoVis);
UMLListViewItem *childItem = NULL;
UMLListViewItem *parentItem = findUMLObject(parent);
if (parentItem == NULL) {
@@ -826,18 +826,18 @@ void UMLListView::setDocument(UMLDoc *d) {
}
m_doc = d;
- connect(m_doc, SIGNAL(sigDiagramCreated(Uml::IDType)), this, SLOT(slotDiagramCreated(Uml::IDType)));
- connect(m_doc, SIGNAL(sigDiagramRemoved(Uml::IDType)), this, SLOT(slotDiagramRemoved(Uml::IDType)));
- connect(m_doc, SIGNAL(sigDiagramRenamed(Uml::IDType)), this, SLOT(slotDiagramRenamed(Uml::IDType)));
- connect(m_doc, SIGNAL(sigObjectCreated(UMLObject *)), this, SLOT(slotObjectCreated(UMLObject *)));
- connect(m_doc, SIGNAL(sigObjectRemoved(UMLObject *)), this, SLOT(slotObjectRemoved(UMLObject *)));
+ connect(m_doc, TQT_SIGNAL(sigDiagramCreated(Uml::IDType)), this, TQT_SLOT(slotDiagramCreated(Uml::IDType)));
+ connect(m_doc, TQT_SIGNAL(sigDiagramRemoved(Uml::IDType)), this, TQT_SLOT(slotDiagramRemoved(Uml::IDType)));
+ connect(m_doc, TQT_SIGNAL(sigDiagramRenamed(Uml::IDType)), this, TQT_SLOT(slotDiagramRenamed(Uml::IDType)));
+ connect(m_doc, TQT_SIGNAL(sigObjectCreated(UMLObject *)), this, TQT_SLOT(slotObjectCreated(UMLObject *)));
+ connect(m_doc, TQT_SIGNAL(sigObjectRemoved(UMLObject *)), this, TQT_SLOT(slotObjectRemoved(UMLObject *)));
}
void UMLListView::slotObjectRemoved(UMLObject* object) {
if (m_doc->loading()) { //needed for class wizard
return;
}
- disconnect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ disconnect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
UMLListViewItem* item = findItem(object->getID());
delete item;
UMLApp::app()->getDocWindow()->updateDocumentation(true);
@@ -849,7 +849,7 @@ void UMLListView::slotDiagramRemoved(Uml::IDType id) {
UMLApp::app()->getDocWindow()->updateDocumentation(true);
}
-QDragObject* UMLListView::dragObject() {
+TQDragObject* UMLListView::dragObject() {
UMLListViewItemList selecteditems;
getSelectedItems(selecteditems);
selecteditems.setAutoDelete( false );
@@ -872,7 +872,7 @@ QDragObject* UMLListView::dragObject() {
}
void UMLListView::startDrag() {
- QDragObject *o = dragObject();
+ TQDragObject *o = dragObject();
if (o)
o->dragCopy();
}
@@ -987,7 +987,7 @@ UMLListViewItem* UMLListView::recursiveSearchForView(UMLListViewItem* listViewIt
UMLListViewItem* UMLListView::findItem(Uml::IDType id) {
UMLListViewItem *temp;
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
for( ; (temp = (UMLListViewItem*)it.current()); ++it ) {
UMLListViewItem * item = temp->findItem(id);
if (item)
@@ -1039,7 +1039,7 @@ void UMLListView::setView(UMLView * v) {
setSelected(temp, true);
}
-void UMLListView::contentsMouseDoubleClickEvent(QMouseEvent * me) {
+void UMLListView::contentsMouseDoubleClickEvent(TQMouseEvent * me) {
UMLListViewItem * item = static_cast<UMLListViewItem *>( currentItem() );
if( !item || me -> button() != Qt::LeftButton )
return;
@@ -1079,8 +1079,8 @@ void UMLListView::contentsMouseDoubleClickEvent(QMouseEvent * me) {
}
-bool UMLListView::acceptDrag(QDropEvent* event) const {
- QPoint mousePoint = ((UMLListView*)this)->contentsToViewport( event->pos() );
+bool UMLListView::acceptDrag(TQDropEvent* event) const {
+ TQPoint mousePoint = ((UMLListView*)this)->contentsToViewport( event->pos() );
UMLListViewItem* item = (UMLListViewItem*)itemAt(mousePoint);
if(!item) {
@@ -1088,7 +1088,7 @@ bool UMLListView::acceptDrag(QDropEvent* event) const {
<< endl;
return false;
}
- ((QListView*)this)->setCurrentItem( (QListViewItem*)item );
+ ((TQListView*)this)->setCurrentItem( (TQListViewItem*)item );
UMLDrag::LvTypeAndID_List list;
if (! UMLDrag::getClip3TypeAndID(event, list)) {
@@ -1429,7 +1429,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
// We can't use the existing 'att' directly
// because its parent is fixed to the old classifier
// and we have no way of changing that:
- // QObject does not permit changing the parent().
+ // TQObject does not permit changing the parent().
if (att == NULL) {
kError() << "moveObject internal error: srcObj "
<< srcObj->getName() << " is not a UMLAttribute" << endl;
@@ -1437,7 +1437,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
kError() << "moveObject: oldParentClassifier->takeItem(att "
<< att->getName() << ") returns NULL" << endl;
} else {
- const QString& nm = att->getName();
+ const TQString& nm = att->getName();
UMLAttribute *newAtt = newParentClassifier->createAttribute(nm,
att->getType(),
att->getVisibility(),
@@ -1456,7 +1456,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
// We can't use the existing 'op' directly
// because its parent is fixed to the old classifier
// and we have no way of changing that:
- // QObject does not permit changing the parent().
+ // TQObject does not permit changing the parent().
if (op && oldParentClassifier->takeItem(op) != -1) {
bool isExistingOp;
Model_Utils::NameAndType_List ntDummyList;
@@ -1502,7 +1502,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
return newItem;
}
-void UMLListView::slotDropped(QDropEvent* de, QListViewItem* /* parent */, QListViewItem* item) {
+void UMLListView::slotDropped(TQDropEvent* de, TQListViewItem* /* parent */, TQListViewItem* item) {
item = (UMLListViewItem *)currentItem();
if(!item) {
kDebug() << "UMLListView::slotDropped: item is NULL - doing nothing" << endl;
@@ -1524,7 +1524,7 @@ void UMLListView::slotDropped(QDropEvent* de, QListViewItem* /* parent */, QList
int UMLListView::getSelectedItems(UMLListViewItemList &ItemList) {
ItemList.setAutoDelete( false );
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
// iterate through all items of the list view
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
@@ -1539,7 +1539,7 @@ int UMLListView::getSelectedItems(UMLListViewItemList &ItemList) {
int UMLListView::getSelectedItemsRoot(UMLListViewItemList &ItemList) {
ItemList.setAutoDelete( false );
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
// iterate through all items of the list view
for ( ; it.current(); ++it ) {
@@ -1702,7 +1702,7 @@ UMLListViewItem* UMLListView::determineParentItem(Uml::ListView_Type lvt) const
}
int UMLListView::getSelectedCount() {
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
int count = 0;
// iterate through all items of the list view
for ( ; it.current(); ++it ) {
@@ -1714,15 +1714,15 @@ int UMLListView::getSelectedCount() {
return count;
}
-void UMLListView::focusOutEvent ( QFocusEvent * fe) {
- QFocusEvent::Reason reason = fe->reason();
- if (reason != QFocusEvent::Popup) {
+void UMLListView::focusOutEvent ( TQFocusEvent * fe) {
+ TQFocusEvent::Reason reason = fe->reason();
+ if (reason != TQFocusEvent::Popup) {
clearSelection();
triggerUpdate();
}
//repaint();
- QListView::focusOutEvent(fe);
+ TQListView::focusOutEvent(fe);
}
Uml::ListView_Type UMLListView::rootViewType(UMLListViewItem *item) {
@@ -1744,7 +1744,7 @@ Uml::ListView_Type UMLListView::rootViewType(UMLListViewItem *item) {
return Uml::lvt_Unknown;
}
-QPixmap & UMLListView::getPixmap(Uml::Icon_Type type) {
+TQPixmap & UMLListView::getPixmap(Uml::Icon_Type type) {
if (type < Uml::it_Home || type >= Uml::N_ICONTYPES) {
kWarning() << "getPixmap() called on unknown icon " << type << endl;
// you'll know you have a problem if this shows up in the list
@@ -1755,7 +1755,7 @@ QPixmap & UMLListView::getPixmap(Uml::Icon_Type type) {
void UMLListView::loadPixmaps() {
KStandardDirs * dirs = KGlobal::dirs();
- QString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
+ TQString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
dataDir += "/umbrello/pics/";
#define makeBarIcon(iconType, barIcon) m_Pixmaps[iconType] = BarIcon(barIcon)
@@ -1823,13 +1823,13 @@ bool UMLListView::isExpandable(Uml::ListView_Type lvt) {
return false;
}
-void UMLListView::slotExpanded( QListViewItem * item ) {
+void UMLListView::slotExpanded( TQListViewItem * item ) {
UMLListViewItem * myItem= static_cast<UMLListViewItem*>(item);
if (isExpandable(myItem->getType()))
myItem->updateFolder();
}
-void UMLListView::slotCollapsed( QListViewItem * item ) {
+void UMLListView::slotCollapsed( TQListViewItem * item ) {
UMLListViewItem * myItem = static_cast<UMLListViewItem*>(item);
if (isExpandable(myItem->getType()))
myItem->updateFolder();
@@ -1853,7 +1853,7 @@ void UMLListView::addNewItem(UMLListViewItem *parentItem, Uml::ListView_Type typ
Uml::Icon_Type icon = Model_Utils::convert_LVT_IT(type);
- QString name;
+ TQString name;
if (Model_Utils::typeIsDiagram(type)) {
Uml::Diagram_Type dt = Model_Utils::convert_LVT_DT(type);
name = getUniqueDiagramName(dt);
@@ -1884,12 +1884,12 @@ void UMLListView::addNewItem(UMLListViewItem *parentItem, Uml::ListView_Type typ
newItem->setIcon( icon );
newItem->setOpen( true );
newItem->setCreating( true );
- newItem->startRename( 0 ); // calls QListView::ensureItemVisible()
+ newItem->startRename( 0 ); // calls TQListView::ensureItemVisible()
// When the user accepts the rename operation, UMLListViewItem::okRename()
- // is called (automatically by QListViewItem.)
+ // is called (automatically by TQListViewItem.)
}
-bool UMLListView::itemRenamed( QListViewItem * item , int /*col*/ ) {
+bool UMLListView::itemRenamed( TQListViewItem * item , int /*col*/ ) {
//if true the item was cancel before this message
if( m_bIgnoreCancelRename ) {
return true;
@@ -1897,11 +1897,11 @@ bool UMLListView::itemRenamed( QListViewItem * item , int /*col*/ ) {
m_bIgnoreCancelRename = true;
UMLListViewItem * renamedItem = static_cast< UMLListViewItem *>( item ) ;
Uml::ListView_Type type = renamedItem -> getType();
- QString newText = renamedItem -> text( 0 );
+ TQString newText = renamedItem -> text( 0 );
renamedItem -> setCreating( false );
// If the type is empty then delete it.
- if (newText.isEmpty() || newText.contains(QRegExp("^\\s+$"))) {
+ if (newText.isEmpty() || newText.contains(TQRegExp("^\\s+$"))) {
KMessageBox::error(
kapp -> mainWidget(),
i18n( "The name you entered was invalid.\nCreation process has been canceled." ),
@@ -2010,7 +2010,7 @@ bool UMLListView::itemRenamed( QListViewItem * item , int /*col*/ ) {
}
UMLObject *UMLListView::createUMLObject( UMLListViewItem * item, Uml::Object_Type type ) {
- QString name = item -> text( 0 );
+ TQString name = item -> text( 0 );
UMLObject * object = NULL;
switch( type ) {
case Uml::ot_UseCase:
@@ -2093,7 +2093,7 @@ UMLObject *UMLListView::createUMLObject( UMLListViewItem * item, Uml::Object_Typ
bool UMLListView::createChildUMLObject( UMLListViewItem * item, Uml::Object_Type type ) {
m_bCreatingChildObject = true;
- QString text = item->text( 0 );
+ TQString text = item->text( 0 );
UMLObject* parent = static_cast<UMLListViewItem *>( item->parent() )->getUMLObject();
if( !parent ) {
kError() << "UMLListView::createChildUMLObject: parent UMLObject is NULL" << endl;
@@ -2193,7 +2193,7 @@ bool UMLListView::createChildUMLObject( UMLListViewItem * item, Uml::Object_Type
}
void UMLListView::createDiagram( UMLListViewItem * item, Uml::Diagram_Type type ) {
- QString name = item -> text( 0 );
+ TQString name = item -> text( 0 );
UMLView * view = m_doc -> findView( type, name );
if( view ) {
delete item;
@@ -2219,11 +2219,11 @@ void UMLListView::createDiagram( UMLListViewItem * item, Uml::Diagram_Type type
m_doc -> changeCurrentView( view -> getID() );
}
-QString UMLListView::getUniqueDiagramName(Uml::Diagram_Type type) {
+TQString UMLListView::getUniqueDiagramName(Uml::Diagram_Type type) {
return m_doc->uniqViewName(type);
}
-bool UMLListView::isUnique( UMLListViewItem * item, const QString &name ) {
+bool UMLListView::isUnique( UMLListViewItem * item, const TQString &name ) {
UMLListViewItem * parentItem = static_cast<UMLListViewItem *>( item -> parent() );
Uml::ListView_Type type = item -> getType();
switch( type ) {
@@ -2314,32 +2314,32 @@ bool UMLListView::isUnique( UMLListViewItem * item, const QString &name ) {
return false;
}
-void UMLListView::cancelRename( QListViewItem * item ) {
+void UMLListView::cancelRename( TQListViewItem * item ) {
if( !m_bIgnoreCancelRename ) {
delete item;
m_bIgnoreCancelRename = true;
}
}
-void UMLListView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
- QDomElement listElement = qDoc.createElement( "listview" );
+void UMLListView::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQDomElement listElement = qDoc.createElement( "listview" );
m_rv->saveToXMI(qDoc, listElement);
qElement.appendChild( listElement );
}
-bool UMLListView::loadFromXMI( QDomElement & element ) {
+bool UMLListView::loadFromXMI( TQDomElement & element ) {
/*
deleteChildrenOf( m_ucv );
deleteChildrenOf( m_lv );
deleteChildrenOf( m_cmpv );
deleteChildrenOf( m_dplv );
*/
- QDomNode node = element.firstChild();
- QDomElement domElement = node.toElement();
+ TQDomNode node = element.firstChild();
+ TQDomElement domElement = node.toElement();
m_doc->writeToStatusBar( i18n("Loading listview...") );
while( !domElement.isNull() ) {
if( domElement.tagName() == "listitem" ) {
- QString type = domElement.attribute( "type", "-1" );
+ TQString type = domElement.attribute( "type", "-1" );
if( type == "-1" )
return false;
Uml::ListView_Type lvType = (Uml::ListView_Type)type.toInt();
@@ -2356,20 +2356,20 @@ bool UMLListView::loadFromXMI( QDomElement & element ) {
return true;
}
-bool UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & element ) {
- QDomNode node = element.firstChild();
- QDomElement domElement = node.toElement();
- const QString pfx("UMLListView::loadChildrenFromXMI: ");
+bool UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, TQDomElement & element ) {
+ TQDomNode node = element.firstChild();
+ TQDomElement domElement = node.toElement();
+ const TQString pfx("UMLListView::loadChildrenFromXMI: ");
while( !domElement.isNull() ) {
node = domElement.nextSibling();
if( domElement.tagName() != "listitem" ) {
domElement = node.toElement();
continue;
}
- QString id = domElement.attribute( "id", "-1" );
- QString type = domElement.attribute( "type", "-1" );
- QString label = domElement.attribute( "label", "" );
- QString open = domElement.attribute( "open", "1" );
+ TQString id = domElement.attribute( "id", "-1" );
+ TQString type = domElement.attribute( "type", "-1" );
+ TQString label = domElement.attribute( "label", "" );
+ TQString open = domElement.attribute( "open", "1" );
if( type == "-1" )
return false;
Uml::ListView_Type lvType = (Uml::ListView_Type)type.toInt();
@@ -2580,14 +2580,14 @@ bool UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & e
}
/** Open all items in the list view*/
-void UMLListView::expandAll(QListViewItem *item) {
+void UMLListView::expandAll(TQListViewItem *item) {
if(!item) item = firstChild();
for (item = item->firstChild(); item; item = item->nextSibling()) {
item->setOpen(true);
}
}
/** Close all items in the list view*/
-void UMLListView::collapseAll(QListViewItem *item) {
+void UMLListView::collapseAll(TQListViewItem *item) {
if(!item) item = firstChild();
for( item = item->firstChild(); item; item = item->nextSibling())
item->setOpen(false);
@@ -2635,7 +2635,7 @@ UMLListViewItem *UMLListView::rootView(Uml::ListView_Type type) {
return theView;
}
-void UMLListView::deleteChildrenOf(QListViewItem* parent) {
+void UMLListView::deleteChildrenOf(TQListViewItem* parent) {
if ( !parent ) {
return;
}
diff --git a/umbrello/umbrello/umllistview.h b/umbrello/umbrello/umllistview.h
index 5656a537..17a0c632 100644
--- a/umbrello/umbrello/umllistview.h
+++ b/umbrello/umbrello/umllistview.h
@@ -12,8 +12,8 @@
#ifndef UMLLISTVIEW_H
#define UMLLISTVIEW_H
-#include <qdom.h>
-#include <qpixmap.h>
+#include <tqdom.h>
+#include <tqpixmap.h>
#include <klistview.h>
#include "umlnamespace.h"
#include "umllistviewitemlist.h"
@@ -51,7 +51,7 @@ public:
* @param parent The parent to this.
* @param name The internal name for this class.
*/
- UMLListView(QWidget *parent,const char *name);
+ UMLListView(TQWidget *parent,const char *name);
/**
* Standard deconstructor.
@@ -158,7 +158,7 @@ public:
/**
* Returns the correct pixmap for the given type.
*/
- QPixmap & getPixmap( Uml::Icon_Type type );
+ TQPixmap & getPixmap( Uml::Icon_Type type );
/**
* Returns the document pointer. Called by the UMLListViewItem class.
@@ -226,17 +226,17 @@ public:
/**
* Returns a unique name for a diagram.
*/
- QString getUniqueDiagramName( Uml::Diagram_Type type );
+ TQString getUniqueDiagramName( Uml::Diagram_Type type );
/**
* Returns if the given name is unique for the given items type.
*/
- bool isUnique( UMLListViewItem * item, const QString &name );
+ bool isUnique( UMLListViewItem * item, const TQString &name );
/**
* Cancel rename event has occurred for the given item.
*/
- void cancelRename( QListViewItem * item );
+ void cancelRename( TQListViewItem * item );
/**
* Set the variable m_bStartedCut
@@ -268,7 +268,7 @@ public:
/**
* Called for informing the list view that an item was renamed.
*/
- bool itemRenamed(QListViewItem* item , int col);
+ bool itemRenamed(TQListViewItem* item , int col);
void closeDatatypesFolder();
@@ -290,18 +290,18 @@ public:
*/
Uml::ListView_Type rootViewType(UMLListViewItem *item);
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement);
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement);
- bool loadFromXMI( QDomElement & element );
+ bool loadFromXMI( TQDomElement & element );
- bool loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & element );
+ bool loadChildrenFromXMI( UMLListViewItem * parent, TQDomElement & element );
protected:
UMLListViewItem* m_rv; // root view (home)
UMLListViewItem* m_lv[Uml::N_MODELTYPES]; // predefined list view roots
UMLListViewItem* m_datatypeFolder;
ListPopupMenu * m_pMenu;
- QString oldText, message;
+ TQString oldText, message;
UMLDoc *m_doc;
bool m_bStartedCut, m_bStartedCopy, m_bIgnoreCancelRename;
@@ -310,17 +310,17 @@ protected:
*/
bool m_bCreatingChildObject;
- QPixmap m_Pixmaps[Uml::N_ICONTYPES];
+ TQPixmap m_Pixmaps[Uml::N_ICONTYPES];
- bool eventFilter(QObject *o, QEvent *e);
- void contentsMouseReleaseEvent(QMouseEvent * me);
- void contentsMousePressEvent(QMouseEvent *me);
- void contentsMouseDoubleClickEvent(QMouseEvent * me);
- void focusOutEvent ( QFocusEvent * fe);
- QDragObject* dragObject();
+ bool eventFilter(TQObject *o, TQEvent *e);
+ void contentsMouseReleaseEvent(TQMouseEvent * me);
+ void contentsMousePressEvent(TQMouseEvent *me);
+ void contentsMouseDoubleClickEvent(TQMouseEvent * me);
+ void focusOutEvent ( TQFocusEvent * fe);
+ TQDragObject* dragObject();
void startDrag();
- bool acceptDrag (QDropEvent* event) const;
- void keyPressEvent(QKeyEvent *);
+ bool acceptDrag (TQDropEvent* event) const;
+ void keyPressEvent(TQKeyEvent *);
/**
* This methods looks for a object in a folder an its subfolders recursive.
@@ -344,7 +344,7 @@ protected:
/**
* Deletes all child-items of @p parent.
*/
- void deleteChildrenOf( QListViewItem *parent );
+ void deleteChildrenOf( TQListViewItem *parent );
/**
* Delete a listview item.
@@ -432,27 +432,27 @@ public slots:
/**
* Something has been dragged and dropped onto the list view
*/
- void slotDropped(QDropEvent* de, QListViewItem* parent, QListViewItem* item);
+ void slotDropped(TQDropEvent* de, TQListViewItem* parent, TQListViewItem* item);
/**
* calls updateFolder() on the item to update the icon to open
*/
- void slotExpanded(QListViewItem* item);
+ void slotExpanded(TQListViewItem* item);
/**
* calls updateFolder() on the item to update the icon to closed
*/
- void slotCollapsed(QListViewItem* item);
+ void slotCollapsed(TQListViewItem* item);
/**
* Open all items in the list view
*/
- void expandAll(QListViewItem *item);
+ void expandAll(TQListViewItem *item);
/**
* Close all items in the list view
*/
- void collapseAll(QListViewItem *item);
+ void collapseAll(TQListViewItem *item);
/**
* Connects to the signal that @ref UMLApp emits when a
diff --git a/umbrello/umbrello/umllistviewitem.cpp b/umbrello/umbrello/umllistviewitem.cpp
index c24ac853..89bb581c 100644
--- a/umbrello/umbrello/umllistviewitem.cpp
+++ b/umbrello/umbrello/umllistviewitem.cpp
@@ -16,8 +16,8 @@
#include <cstdlib>
// qt/kde includes
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -39,9 +39,9 @@
UMLListView* UMLListViewItem::s_pListView = 0;
-UMLListViewItem::UMLListViewItem( UMLListView * parent, const QString &name,
+UMLListViewItem::UMLListViewItem( UMLListView * parent, const TQString &name,
Uml::ListView_Type t, UMLObject* o)
- : QListViewItem(parent, name) {
+ : TQListViewItem(parent, name) {
init(parent);
m_Type = t;
m_pObject = o;
@@ -53,19 +53,19 @@ UMLListViewItem::UMLListViewItem( UMLListView * parent, const QString &name,
}
UMLListViewItem::UMLListViewItem(UMLListView * parent)
- : QListViewItem(parent) {
+ : TQListViewItem(parent) {
init(parent);
if (parent == NULL)
kDebug() << "UMLListViewItem constructor called with a NULL listview parent" << endl;
}
UMLListViewItem::UMLListViewItem(UMLListViewItem * parent)
- : QListViewItem(parent) {
+ : TQListViewItem(parent) {
init();
}
-UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t,UMLObject*o)
- : QListViewItem(parent, name) {
+UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t,UMLObject*o)
+ : TQListViewItem(parent, name) {
init();
m_Type = t;
m_pObject = o;
@@ -83,8 +83,8 @@ UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name,
setText( name );
}
-UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t,Uml::IDType id)
- : QListViewItem(parent, name) {
+UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t,Uml::IDType id)
+ : TQListViewItem(parent, name) {
init();
m_Type = t;
m_nId = id;
@@ -176,13 +176,13 @@ void UMLListViewItem::setID(Uml::IDType id) {
}
bool UMLListViewItem::isOwnParent(Uml::IDType listViewItemID) {
- QListViewItem *lvi = (QListViewItem*)s_pListView->findItem(listViewItemID);
+ TQListViewItem *lvi = (TQListViewItem*)s_pListView->findItem(listViewItemID);
if (lvi == NULL) {
kError() << "UMLListViewItem::isOwnParent: ListView->findItem("
<< ID2STR(listViewItemID) << ") returns NULL" << endl;
return true;
}
- for (QListViewItem *self = (QListViewItem*)this; self; self = self->parent()) {
+ for (TQListViewItem *self = (TQListViewItem*)this; self; self = self->parent()) {
if (lvi == self)
return true;
}
@@ -195,7 +195,7 @@ void UMLListViewItem::updateObject() {
Uml::Visibility scope = m_pObject->getVisibility();
Uml::Object_Type ot = m_pObject->getBaseType();
- QString modelObjText = m_pObject->getName();
+ TQString modelObjText = m_pObject->getName();
if (Model_Utils::isClassifierListitem(ot)) {
UMLClassifierListItem *pNarrowed = static_cast<UMLClassifierListItem*>(m_pObject);
modelObjText = pNarrowed->toString(Uml::st_SigNoVis);
@@ -258,16 +258,16 @@ void UMLListViewItem::updateFolder() {
}
void UMLListViewItem::setOpen( bool open ) {
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
updateFolder();
}
-void UMLListViewItem::setText(const QString &newText) {
+void UMLListViewItem::setText(const TQString &newText) {
m_Label = newText;
- QListViewItem::setText(0, newText);
+ TQListViewItem::setText(0, newText);
}
-QString UMLListViewItem::getText() const {
+TQString UMLListViewItem::getText() const {
return m_Label;
}
@@ -276,11 +276,11 @@ void UMLListViewItem::setIcon(Uml::Icon_Type iconType) {
}
void UMLListViewItem::okRename( int col ) {
- QListViewItem::okRename( col );
+ TQListViewItem::okRename( col );
UMLDoc* doc = s_pListView->getDocument();
if (m_bCreating) {
m_bCreating = false;
- QString savedLabel = m_Label;
+ TQString savedLabel = m_Label;
m_Label = text(col);
if ( s_pListView->itemRenamed( this, col ) ) {
s_pListView->ensureItemVisible(this);
@@ -290,7 +290,7 @@ void UMLListViewItem::okRename( int col ) {
}
return;
}
- QString newText = text( col );
+ TQString newText = text( col );
if ( newText == m_Label ) {
return;
}
@@ -371,7 +371,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -405,7 +405,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -433,7 +433,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -467,7 +467,7 @@ void UMLListViewItem::okRename( int col ) {
KMessageBox::error( kapp->mainWidget() ,
i18n("Renaming an item of listview type %1 is not yet implemented.").arg(m_Type),
i18n("Function Not Implemented") );
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
doc->setModified(true);
@@ -477,11 +477,11 @@ void UMLListViewItem::cancelRenameWithMsg() {
KMessageBox::error( kapp->mainWidget() ,
i18n("The name you entered was invalid.\nRenaming process has been canceled."),
i18n("Name Not Valid") );
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
}
void UMLListViewItem::cancelRename(int col) {
- QListViewItem::cancelRename(col);
+ TQListViewItem::cancelRename(col);
if (m_bCreating) {
s_pListView->cancelRename(this);
}
@@ -489,7 +489,7 @@ void UMLListViewItem::cancelRename(int col) {
// Sort the listview items by type and position within the corresponding list
// of UMLObjects. If the item does not have an UMLObject then place it last.
-int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) const
+int UMLListViewItem::compare(TQListViewItem *other, int col, bool ascending) const
{
UMLListViewItem *ulvi = static_cast<UMLListViewItem*>(other);
Uml::ListView_Type ourType = getType();
@@ -503,7 +503,7 @@ int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) cons
const bool subItem = Model_Utils::typeIsClassifierList(ourType);
const int alphaOrder = key(col, ascending).compare(other->key(col, ascending));
int retval = 0;
- QString dbgPfx = "compare(type=" + QString::number((int)ourType)
+ TQString dbgPfx = "compare(type=" + TQString::number((int)ourType)
+ ", self=" + getText() + ", other=" + ulvi->getText()
+ "): return ";
UMLObject *otherObj = ulvi->getUMLObject();
@@ -577,7 +577,7 @@ int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) cons
}
UMLListViewItem* UMLListViewItem::deepCopy(UMLListViewItem *newParent) {
- QString nm = getText();
+ TQString nm = getText();
Uml::ListView_Type t = getType();
UMLObject *o = getUMLObject();
UMLListViewItem* newItem;
@@ -627,10 +627,10 @@ UMLListViewItem * UMLListViewItem::findItem(Uml::IDType id) {
return NULL;
}
-void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
- QDomElement itemElement = qDoc.createElement( "listitem" );
+void UMLListViewItem::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQDomElement itemElement = qDoc.createElement( "listitem" );
Uml::IDType id = getID();
- QString idStr = ID2STR(id);
+ TQString idStr = ID2STR(id);
//kDebug() << "UMLListViewItem::saveToXMI: id = " << idStr
// << ", type = " << m_Type << endl;
if (id != Uml::id_None)
@@ -660,7 +660,7 @@ void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
}
}
itemElement.setAttribute("open", isOpen());
- QDomElement folderRoot;
+ TQDomElement folderRoot;
UMLListViewItem *childItem = static_cast<UMLListViewItem*>( firstChild() );
while (childItem) {
childItem->saveToXMI(qDoc, itemElement);
@@ -669,11 +669,11 @@ void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
qElement.appendChild( itemElement );
}
-bool UMLListViewItem::loadFromXMI(QDomElement& qElement) {
- QString id = qElement.attribute( "id", "-1" );
- QString type = qElement.attribute( "type", "-1" );
- QString label = qElement.attribute( "label", "" );
- QString open = qElement.attribute( "open", "1" );
+bool UMLListViewItem::loadFromXMI(TQDomElement& qElement) {
+ TQString id = qElement.attribute( "id", "-1" );
+ TQString type = qElement.attribute( "type", "-1" );
+ TQString label = qElement.attribute( "label", "" );
+ TQString open = qElement.attribute( "open", "1" );
if (!label.isEmpty())
setText( label );
else if (id == "-1") {
diff --git a/umbrello/umbrello/umllistviewitem.h b/umbrello/umbrello/umllistviewitem.h
index 99cedf4e..1064befc 100644
--- a/umbrello/umbrello/umllistviewitem.h
+++ b/umbrello/umbrello/umllistviewitem.h
@@ -13,9 +13,9 @@
#ifndef UMLLISTVIEWITEM_H
#define UMLLISTVIEWITEM_H
-#include <qlistview.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqlistview.h>
+#include <tqmap.h>
+#include <tqdom.h>
#include "umlnamespace.h"
// forward declarations
@@ -33,7 +33,7 @@ class UMLClassifierListItem;
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLListViewItem : public QListViewItem {
+class UMLListViewItem : public TQListViewItem {
public:
/**
* Sets up an instance.
@@ -43,7 +43,7 @@ public:
* @param t The type of this instance.
* @param o The object it represents.
*/
- UMLListViewItem(UMLListView * parent, const QString &name, Uml::ListView_Type t, UMLObject*o=0);
+ UMLListViewItem(UMLListView * parent, const TQString &name, Uml::ListView_Type t, UMLObject*o=0);
/**
* Sets up an instance for subsequent loadFromXMI().
@@ -67,7 +67,7 @@ public:
* @param t The type of this instance.
* @param o The object it represents.
*/
- UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t, UMLObject*o=0);
+ UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t, UMLObject*o=0);
/**
* Sets up an instance.
@@ -77,7 +77,7 @@ public:
* @param t The type of this instance.
* @param id The id of this instance.
*/
- UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t, Uml::IDType id);
+ UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t, Uml::IDType id);
/**
* Standard deconstructor.
@@ -150,12 +150,12 @@ public:
/**
* Changes the current text and updates the tooltip.
*/
- void setText( const QString &text );
+ void setText( const TQString &text );
/**
* Returns the current text.
*/
- QString getText() const;
+ TQString getText() const;
/**
* Sets if the item is in the middle of being created.
@@ -187,7 +187,7 @@ public:
/**
* Overrides the default sorting to sort by item type.
*/
- virtual int compare(QListViewItem *other, int col, bool ascending) const;
+ virtual int compare(TQListViewItem *other, int col, bool ascending) const;
/**
* Returns the number of children of the UMLListViewItem
@@ -232,12 +232,12 @@ public:
/**
* saves the listview item to a "listitem" tag
*/
- void saveToXMI( QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI( TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads a "listitem" tag, this is only used by the clipboard currently
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
@@ -272,13 +272,13 @@ protected:
* firstChild()/nextSibling() because the latter incur enforceItemVisible()
* and thus expensive sorting.
*/
- typedef QMap<UMLClassifierListItem*, UMLListViewItem*> ChildObjectMap;
+ typedef TQMap<UMLClassifierListItem*, UMLListViewItem*> ChildObjectMap;
Uml::ListView_Type m_Type;
Uml::IDType m_nId;
int m_nChildren;
UMLObject * m_pObject;
- QString m_Label;
+ TQString m_Label;
ChildObjectMap m_comap;
};
diff --git a/umbrello/umbrello/umllistviewitemlist.h b/umbrello/umbrello/umllistviewitemlist.h
index 49663163..42194044 100644
--- a/umbrello/umbrello/umllistviewitemlist.h
+++ b/umbrello/umbrello/umllistviewitemlist.h
@@ -19,11 +19,11 @@
#ifndef UMLLISTVIEWITEMLIST_H
#define UMLLISTVIEWITEMLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class UMLListViewItem;
-typedef QPtrList<UMLListViewItem> UMLListViewItemList;
-typedef QPtrListIterator<UMLListViewItem> UMLListViewItemListIt;
+typedef TQPtrList<UMLListViewItem> UMLListViewItemList;
+typedef TQPtrListIterator<UMLListViewItem> UMLListViewItemListIt;
#endif
diff --git a/umbrello/umbrello/umlnamespace.cpp b/umbrello/umbrello/umlnamespace.cpp
index f2d81eeb..45c40de6 100644
--- a/umbrello/umbrello/umlnamespace.cpp
+++ b/umbrello/umbrello/umlnamespace.cpp
@@ -10,20 +10,20 @@
***************************************************************************/
#include "umlnamespace.h"
-#include "qregexp.h"
+#include "tqregexp.h"
namespace Uml {
-bool tagEq (const QString& inTag, const QString& inPattern) {
- QString tag = inTag;
- QString pattern = inPattern;
- tag.remove( QRegExp("^\\w+:") ); // remove leading "UML:" or other
+bool tagEq (const TQString& inTag, const TQString& inPattern) {
+ TQString tag = inTag;
+ TQString pattern = inPattern;
+ tag.remove( TQRegExp("^\\w+:") ); // remove leading "UML:" or other
int patSections = pattern.contains( '.' ) + 1;
- QString tagEnd = tag.section( '.', -patSections );
+ TQString tagEnd = tag.section( '.', -patSections );
return (tagEnd.lower() == pattern.lower());
}
-QString Visibility::toString(Value value, bool mnemonic) {
+TQString Visibility::toString(Value value, bool mnemonic) {
switch (value) {
case Protected:
return (mnemonic ? "#" : "protected");
@@ -41,7 +41,7 @@ QString Visibility::toString(Value value, bool mnemonic) {
}
}
-Visibility Visibility::fromString(const QString& vis) {
+Visibility Visibility::fromString(const TQString& vis) {
if (vis == "public" || vis == "+")
return Visibility(Public);
else if (vis == "protected" || vis == "#")
@@ -64,7 +64,7 @@ Visibility::Visibility(): _v(Public) {
Visibility::Visibility(Value v): _v(v) {
}
-QString Visibility::toString(bool mnemonic) const {
+TQString Visibility::toString(bool mnemonic) const {
return toString(_v, mnemonic);
}
diff --git a/umbrello/umbrello/umlnamespace.h b/umbrello/umbrello/umlnamespace.h
index 0c0ea2fd..7f466a99 100644
--- a/umbrello/umbrello/umlnamespace.h
+++ b/umbrello/umbrello/umlnamespace.h
@@ -13,7 +13,7 @@
#define UMLNAMESPACE_H
#include <string>
-#include <qstring.h>
+#include <tqstring.h>
/**
@@ -67,16 +67,16 @@ class Visibility {
};
Visibility();
Visibility(Value v);
- static QString toString(Value value, bool mnemonic);
- static Visibility fromString(const QString& vis);
+ static TQString toString(Value value, bool mnemonic);
+ static Visibility fromString(const TQString& vis);
/**
- * Convert Visibility value into QString representation.
+ * Convert Visibility value into TQString representation.
*
* @param mnemonic If true then return a single character:
* "+" for public, "-" for private,
* "#" for protected or "~" for implementation
*/
- QString toString(bool mnemonic = false) const;
+ TQString toString(bool mnemonic = false) const;
operator Value () const;
private:
Value _v;
@@ -336,7 +336,7 @@ const IDType id_None = "-1";
const IDType id_Reserved = "0";
# define STR2ID(id) id.ascii()
-# define ID2STR(id) QString(id.c_str())
+# define ID2STR(id) TQString(id.c_str())
// KDE4 compatibility
# define kDebug kdDebug
@@ -346,7 +346,7 @@ const IDType id_Reserved = "0";
/**
* Function for comparing tags in XMI files.
*/
-bool tagEq (const QString& tag, const QString& pattern);
+bool tagEq (const TQString& tag, const TQString& pattern);
} // end namespace Uml
diff --git a/umbrello/umbrello/umlobject.cpp b/umbrello/umbrello/umlobject.cpp
index e28ed7da..85de579f 100644
--- a/umbrello/umbrello/umlobject.cpp
+++ b/umbrello/umbrello/umlobject.cpp
@@ -12,7 +12,7 @@
// own header
#include "umlobject.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kapplication.h>
// app includes
@@ -30,8 +30,8 @@
#include "docwindow.h"
#include "dialogs/classpropdlg.h"
-UMLObject::UMLObject(const UMLObject * parent, const QString &name, Uml::IDType id)
- : QObject(const_cast<UMLObject*>(parent), "UMLObject" ) {
+UMLObject::UMLObject(const UMLObject * parent, const TQString &name, Uml::IDType id)
+ : TQObject(const_cast<UMLObject*>(parent), "UMLObject" ) {
init();
if (id == Uml::id_None)
m_nId = UniqueID::gen();
@@ -40,8 +40,8 @@ UMLObject::UMLObject(const UMLObject * parent, const QString &name, Uml::IDType
m_Name = name;
}
-UMLObject::UMLObject(const QString &name, Uml::IDType id)
- : QObject(UMLApp::app()->getDocument()) {
+UMLObject::UMLObject(const TQString &name, Uml::IDType id)
+ : TQObject(UMLApp::app()->getDocument()) {
init();
if (id == Uml::id_None)
m_nId = UniqueID::gen();
@@ -51,7 +51,7 @@ UMLObject::UMLObject(const QString &name, Uml::IDType id)
}
UMLObject::UMLObject(const UMLObject * parent)
- : QObject(const_cast<UMLObject*>(parent)) {
+ : TQObject(const_cast<UMLObject*>(parent)) {
init();
}
@@ -76,7 +76,7 @@ void UMLObject::init() {
bool UMLObject::showProperties(int page, bool assoc) {
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ClassPropDlg* dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this, page, assoc);
+ ClassPropDlg* dlg = new ClassPropDlg((TQWidget*)UMLApp::app(), this, page, assoc);
bool modified = false;
if (dlg->exec()) {
docwindow->showDocumentation(this, true);
@@ -97,18 +97,18 @@ void UMLObject::setID(Uml::IDType NewID) {
emitModified();
}
-void UMLObject::setName(const QString &strName) {
+void UMLObject::setName(const TQString &strName) {
m_Name = strName;
emitModified();
}
-QString UMLObject::getName() const {
+TQString UMLObject::getName() const {
return m_Name;
}
-QString UMLObject::getFullyQualifiedName(const QString& separator,
+TQString UMLObject::getFullyQualifiedName(const TQString& separator,
bool includeRoot /* = false */) const {
- QString fqn;
+ TQString fqn;
if (m_pUMLPackage) {
bool skipPackage = false;
if (!includeRoot) {
@@ -118,7 +118,7 @@ QString UMLObject::getFullyQualifiedName(const QString& separator,
skipPackage = true;
}
if (!skipPackage) {
- QString tempSeparator = separator;
+ TQString tempSeparator = separator;
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
fqn = m_pUMLPackage->getFullyQualifiedName(tempSeparator, includeRoot);
@@ -200,7 +200,7 @@ void UMLObject::copyInto(UMLObject *rhs) const
// Create a new ID.
rhs->m_nId = UniqueID::gen();
- // Hope that the parent from QObject is okay.
+ // Hope that the parent from TQObject is okay.
if (rhs->parent() != parent())
kDebug() << "copyInto has a wrong parent" << endl;
}
@@ -238,7 +238,7 @@ void UMLObject::emitModified()
emit modified();
}
-void UMLObject::setDoc(const QString &d) {
+void UMLObject::setDoc(const TQString &d) {
m_Doc = d;
//emit modified(); No, this is done centrally at DocWindow::updateDocumentation()
}
@@ -255,7 +255,7 @@ Uml::IDType UMLObject::getID() const {
return m_nId;
}
-QString UMLObject::getDoc() const {
+TQString UMLObject::getDoc() const {
return m_Doc;
}
@@ -287,7 +287,7 @@ void UMLObject::setUMLStereotype(UMLStereotype *stereo) {
emitModified();
}
-void UMLObject::setStereotype(const QString &_name) {
+void UMLObject::setStereotype(const TQString &_name) {
if (_name.isEmpty()) {
setUMLStereotype(NULL);
return;
@@ -297,7 +297,7 @@ void UMLObject::setStereotype(const QString &_name) {
setUMLStereotype(s);
}
-void UMLObject::setPackage(const QString &_name) {
+void UMLObject::setPackage(const TQString &_name) {
UMLObject *pkgObj = NULL;
if (!_name.isEmpty()) {
UMLDoc* umldoc = UMLApp::app()->getDocument();
@@ -329,23 +329,23 @@ const UMLStereotype * UMLObject::getUMLStereotype() {
return m_pStereotype;
}
-QString UMLObject::getStereotype(bool includeAdornments /* = false */) const {
+TQString UMLObject::getStereotype(bool includeAdornments /* = false */) const {
if (m_pStereotype == NULL)
return "";
- QString name = m_pStereotype->getName();
+ TQString name = m_pStereotype->getName();
if (includeAdornments)
- name = QString::fromUtf8("«") + name + QString::fromUtf8("»");
+ name = TQString::fromUtf8("«") + name + TQString::fromUtf8("»");
return name;
}
-QString UMLObject::getPackage(const QString& separator, bool includeRoot) {
- QString tempSeparator = separator;
+TQString UMLObject::getPackage(const TQString& separator, bool includeRoot) {
+ TQString tempSeparator = separator;
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
- QString fqn = getFullyQualifiedName(tempSeparator, includeRoot);
+ TQString fqn = getFullyQualifiedName(tempSeparator, includeRoot);
if (!fqn.contains(tempSeparator))
return "";
- QString scope = fqn.left(fqn.length() - tempSeparator.length() - m_Name.length());
+ TQString scope = fqn.left(fqn.length() - tempSeparator.length() - m_Name.length());
return scope;
}
@@ -365,19 +365,19 @@ UMLPackage* UMLObject::getUMLPackage() {
return m_pUMLPackage;
}
-QString UMLObject::getSecondaryId() const {
+TQString UMLObject::getSecondaryId() const {
return m_SecondaryId;
}
-void UMLObject::setSecondaryId(const QString& id) {
+void UMLObject::setSecondaryId(const TQString& id) {
m_SecondaryId = id;
}
-QString UMLObject::getSecondaryFallback() const {
+TQString UMLObject::getSecondaryFallback() const {
return m_SecondaryFallback;
}
-void UMLObject::setSecondaryFallback(const QString& id) {
+void UMLObject::setSecondaryFallback(const TQString& id) {
m_SecondaryFallback = id;
}
@@ -490,12 +490,12 @@ bool UMLObject::resolveRef() {
return true;
}
-QDomElement UMLObject::save( const QString &tag, QDomDocument & qDoc ) {
+TQDomElement UMLObject::save( const TQString &tag, TQDomDocument & qDoc ) {
/*
Call as the first action of saveToXMI() in child class:
- This creates the QDomElement with which to work.
+ This creates the TQDomElement with which to work.
*/
- QDomElement qElement = qDoc.createElement(tag);
+ TQDomElement qElement = qDoc.createElement(tag);
qElement.setAttribute( "isSpecification", "false" );
if (m_BaseType != Uml::ot_Association &&
m_BaseType != Uml::ot_Role &&
@@ -525,7 +525,7 @@ QDomElement UMLObject::save( const QString &tag, QDomDocument & qDoc ) {
if (m_pUMLPackage) //FIXME: uml13.dtd compliance
qElement.setAttribute( "package", m_pUMLPackage->getID() );
#endif
- QString visibility = m_Vis.toString(false);
+ TQString visibility = m_Vis.toString(false);
qElement.setAttribute( "visibility", visibility);
if (m_pStereotype != NULL)
qElement.setAttribute( "stereotype", ID2STR(m_pStereotype->getID()) );
@@ -537,25 +537,25 @@ QDomElement UMLObject::save( const QString &tag, QDomDocument & qDoc ) {
return qElement;
}
-bool UMLObject::load( QDomElement& ) {
+bool UMLObject::load( TQDomElement& ) {
// This body is not usually executed because child classes
// overwrite the load method.
return true;
}
-bool UMLObject::loadStereotype(QDomElement & element) {
- QString tag = element.tagName();
+bool UMLObject::loadStereotype(TQDomElement & element) {
+ TQString tag = element.tagName();
if (!Uml::tagEq(tag, "stereotype"))
return false;
- QString stereo = element.attribute("xmi.value", "");
+ TQString stereo = element.attribute("xmi.value", "");
if (stereo.isEmpty() && element.hasChildNodes()) {
/* like so:
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref = '07CD'/>
</UML:ModelElement.stereotype>
*/
- QDomNode stereoNode = element.firstChild();
- QDomElement stereoElem = stereoNode.toElement();
+ TQDomNode stereoNode = element.firstChild();
+ TQDomElement stereoElem = stereoNode.toElement();
tag = stereoElem.tagName();
if (Uml::tagEq(tag, "Stereotype")) {
stereo = stereoElem.attribute("xmi.idref", "");
@@ -573,7 +573,7 @@ bool UMLObject::loadStereotype(QDomElement & element) {
return true;
}
-bool UMLObject::loadFromXMI( QDomElement & element) {
+bool UMLObject::loadFromXMI( TQDomElement & element) {
UMLDoc* umldoc = UMLApp::app()->getDocument();
if (umldoc == NULL) {
kError() << "UMLObject::loadFromXMI: umldoc is NULL" << endl;
@@ -582,7 +582,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
// Read the name first so that if we encounter a problem, the error
// message can say the name.
m_Name = element.attribute( "name", "" );
- QString id = element.attribute( "xmi.id", "" );
+ TQString id = element.attribute( "xmi.id", "" );
if (id.isEmpty() || id == "-1") {
if (m_BaseType == Uml::ot_Role) {
// Before version 1.4, Umbrello did not save the xmi.id
@@ -616,7 +616,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
m_Vis = Uml::Visibility::Public;
if (element.hasAttribute("scope")) { // for bkwd compat.
- QString scope = element.attribute( "scope", "" );
+ TQString scope = element.attribute( "scope", "" );
if (scope == "instance_level") // nsuml compat.
m_bStatic = false;
else if (scope == "classifier_level") // nsuml compat.
@@ -630,7 +630,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
<< "): illegal scope" << endl; // soft error
}
} else {
- QString visibility = element.attribute( "visibility", "public" );
+ TQString visibility = element.attribute( "visibility", "public" );
if (visibility == "private"
|| visibility == "private_vis") // for compatibility with other programs
m_Vis = Uml::Visibility::Private;
@@ -641,7 +641,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
m_Vis = Uml::Visibility::Implementation;
}
- QString stereo = element.attribute( "stereotype", "" );
+ TQString stereo = element.attribute( "stereotype", "" );
if (!stereo.isEmpty()) {
Uml::IDType stereoID = STR2ID(stereo);
m_pStereotype = umldoc->findStereotypeById(stereoID);
@@ -656,36 +656,36 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
}
if( element.hasAttribute("abstract") ) { // for bkwd compat.
- QString abstract = element.attribute( "abstract", "0" );
+ TQString abstract = element.attribute( "abstract", "0" );
m_bAbstract = (bool)abstract.toInt();
} else {
- QString isAbstract = element.attribute( "isAbstract", "false" );
+ TQString isAbstract = element.attribute( "isAbstract", "false" );
m_bAbstract = (isAbstract == "true");
}
if( element.hasAttribute("static") ) { // for bkwd compat.
- QString staticScope = element.attribute( "static", "0" );
+ TQString staticScope = element.attribute( "static", "0" );
m_bStatic = (bool)staticScope.toInt();
} else {
- QString ownerScope = element.attribute( "ownerScope", "instance" );
+ TQString ownerScope = element.attribute( "ownerScope", "instance" );
m_bStatic = (ownerScope == "classifier");
}
// If the node has child nodes, check whether attributes can be
// extracted from them.
if (element.hasChildNodes()) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
if (node.isComment())
node = node.nextSibling();
- QDomElement elem = node.toElement();
+ TQDomElement elem = node.toElement();
while( !elem.isNull() ) {
- QString tag = elem.tagName();
+ TQString tag = elem.tagName();
if (Uml::tagEq(tag, "name")) {
m_Name = elem.attribute("xmi.value", "");
if (m_Name.isEmpty())
m_Name = elem.text();
} else if (Uml::tagEq(tag, "visibility")) {
- QString vis = elem.attribute("xmi.value", "");
+ TQString vis = elem.attribute("xmi.value", "");
if (vis.isEmpty())
vis = elem.text();
if (vis == "private" || vis == "private_vis")
@@ -695,12 +695,12 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
else if (vis == "implementation")
m_Vis = Uml::Visibility::Implementation;
} else if (Uml::tagEq(tag, "isAbstract")) {
- QString isAbstract = elem.attribute("xmi.value", "");
+ TQString isAbstract = elem.attribute("xmi.value", "");
if (isAbstract.isEmpty())
isAbstract = elem.text();
m_bAbstract = (isAbstract == "true");
} else if (Uml::tagEq(tag, "ownerScope")) {
- QString ownerScope = elem.attribute("xmi.value", "");
+ TQString ownerScope = elem.attribute("xmi.value", "");
if (ownerScope.isEmpty())
ownerScope = elem.text();
m_bStatic = (ownerScope == "classifier");
diff --git a/umbrello/umbrello/umlobject.h b/umbrello/umbrello/umlobject.h
index d912bafc..56475807 100644
--- a/umbrello/umbrello/umlobject.h
+++ b/umbrello/umbrello/umlobject.h
@@ -13,9 +13,9 @@
#define UMLOBJECT_H
//qt includes
-#include <qobject.h>
-#include <qstring.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include "umlnamespace.h"
#include "umlpackagelist.h"
@@ -33,7 +33,7 @@ class UMLObject;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLObject : public QObject {
+class UMLObject : public TQObject {
Q_OBJECT
public:
@@ -45,7 +45,7 @@ public:
* @param id The ID of the object (optional.) If omitted
* then a new ID will be assigned internally.
*/
- UMLObject(const UMLObject * parent, const QString &name, Uml::IDType id = Uml::id_None);
+ UMLObject(const UMLObject * parent, const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Creates a UMLObject.
@@ -60,7 +60,7 @@ public:
* @param name The name of the object.
* @param id The unique ID of the object.
*/
- explicit UMLObject(const QString &name = "" , Uml::IDType id = Uml::id_None);
+ explicit UMLObject(const TQString &name = "" , Uml::IDType id = Uml::id_None);
/**
* Overloaded '==' operator
@@ -110,14 +110,14 @@ public:
*
* @param d The documentation for the object.
*/
- void setDoc(const QString &d);
+ void setDoc(const TQString &d);
/**
* Returns the documentation for the object.
*
* @return Returns the documentation for the object.
*/
- QString getDoc() const;
+ TQString getDoc() const;
/**
* Returns the visibility of the object.
@@ -139,7 +139,7 @@ public:
*
* @param _name Sets the classes stereotype name.
*/
- void setStereotype(const QString &_name);
+ void setStereotype(const TQString &_name);
/**
* Sets the class' UMLStereotype. Adjusts the reference counts
@@ -158,7 +158,7 @@ public:
*
* @param _name The classes Package name.
*/
- void setPackage(const QString &_name);
+ void setPackage(const TQString &_name);
/**
* Sets the UMLPackage in which this class is located.
@@ -182,7 +182,7 @@ public:
* "«" and "»".
* @return Returns the classes stereotype name.
*/
- QString getStereotype(bool includeAdornments = false) const;
+ TQString getStereotype(bool includeAdornments = false) const;
/**
* Return the package(s) in which this UMLObject is contained
@@ -196,7 +196,7 @@ public:
* Default: false.
* @return The UMLObject's enclosing package(s) as a text.
*/
- QString getPackage(const QString& separator = QString::null,
+ TQString getPackage(const TQString& separator = TQString::null,
bool includeRoot = false);
/**
@@ -224,12 +224,12 @@ public:
/**
* Returns a copy of m_Name
*/
- QString getName() const;
+ TQString getName() const;
/**
* Set the UMLObject's name
*/
- virtual void setName(const QString &strName);
+ virtual void setName(const TQString &strName);
/**
* Returns the fully qualified name, i.e. all package prefixes and then m_Name.
@@ -242,7 +242,7 @@ public:
* See UMLDoc::getRootFolder(). Default: false.
* @return The fully qualified name of this UMLObject.
*/
- virtual QString getFullyQualifiedName(const QString& separator = QString::null,
+ virtual TQString getFullyQualifiedName(const TQString& separator = TQString::null,
bool includeRoot = false) const;
/**
@@ -287,10 +287,10 @@ public:
/**
* This method saves the XMI attributes of each specific model class.
* It needs to be implemented by each child class.
- * For creating the QDomElement and saving the common XMI parts,
+ * For creating the TQDomElement and saving the common XMI parts,
* it can use the save() method.
*/
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) = 0;
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) = 0;
/**
* This method loads the generic parts of the XMI common to most model
@@ -298,17 +298,17 @@ public:
* Instead, it invokes the load() method which implements the loading
* of the specifics of each child class.
*
- * @param element The QDomElement from which to load.
+ * @param element The TQDomElement from which to load.
*/
- virtual bool loadFromXMI( QDomElement & element );
+ virtual bool loadFromXMI( TQDomElement & element );
/**
- * Analyzes the given QDomElement for a reference to a stereotype.
+ * Analyzes the given TQDomElement for a reference to a stereotype.
*
- * @param element QDomElement to analyze.
+ * @param element TQDomElement to analyze.
* @return True if a stereotype reference was found, else false.
*/
- bool loadStereotype(QDomElement & element);
+ bool loadStereotype(TQDomElement & element);
/**
* Returns true if this UMLObject has classifier scope,
@@ -339,34 +339,34 @@ public:
/**
* Return secondary ID. Required by resolveRef().
*/
- QString getSecondaryId() const;
+ TQString getSecondaryId() const;
/**
* Set the secondary ID.
* Currently only required by petalTree2Uml(); all other setting of the
* m_SecondaryID is internal to the UMLObject class hierarchy.
*/
- void setSecondaryId(const QString& id);
+ void setSecondaryId(const TQString& id);
/**
* Return secondary ID fallback.
* Required by resolveRef() for imported model files.
*/
- QString getSecondaryFallback() const;
+ TQString getSecondaryFallback() const;
/**
* Set the secondary ID fallback.
* Currently only used by petalTree2Uml().
*/
- void setSecondaryFallback(const QString& id);
+ void setSecondaryFallback(const TQString& id);
/**
* Auxiliary to saveToXMI.
- * Create a QDomElement with the given tag, and save the XMI attributes
+ * Create a TQDomElement with the given tag, and save the XMI attributes
* that are common to all child classes to the newly created element.
* This method does not need to be overridden by child classes.
*/
- QDomElement save( const QString &tag, QDomDocument & qDoc );
+ TQDomElement save( const TQString &tag, TQDomDocument & qDoc );
public slots:
/**
@@ -402,7 +402,7 @@ protected:
* It is responsible for loading the specific XMI structure
* of the child class.
*/
- virtual bool load( QDomElement& element );
+ virtual bool load( TQDomElement& element );
/**
* The object's id.
@@ -412,7 +412,7 @@ protected:
/**
* The object's documentation.
*/
- QString m_Doc;
+ TQString m_Doc;
/**
* The package the object belongs to if applicable.
@@ -427,7 +427,7 @@ protected:
/**
* The objects name.
*/
- QString m_Name;
+ TQString m_Name;
/**
* The objects type.
@@ -473,7 +473,7 @@ protected:
* loading. The secondary ID is resolved to the m_pSecondary
* in the course of resolveRef() at the end of loading.
*/
- QString m_SecondaryId;
+ TQString m_SecondaryId;
/**
* Last-chance backup for when m_SecondaryId is not found.
@@ -483,7 +483,7 @@ protected:
* In case the quidu is not found, the human readable name is
* used which we store in m_SecondaryFallback.
*/
- QString m_SecondaryFallback;
+ TQString m_SecondaryFallback;
};
/**
diff --git a/umbrello/umbrello/umlobjectlist.h b/umbrello/umbrello/umlobjectlist.h
index d9d11c83..f9d633c2 100644
--- a/umbrello/umbrello/umlobjectlist.h
+++ b/umbrello/umbrello/umlobjectlist.h
@@ -19,20 +19,20 @@
#ifndef UMLOBJECTLIST_H
#define UMLOBJECTLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class UMLObject;
-//typedef QPtrList<UMLObject> UMLObjectList;
-typedef QPtrListIterator<UMLObject> UMLObjectListIt;
+//typedef TQPtrList<UMLObject> UMLObjectList;
+typedef TQPtrListIterator<UMLObject> UMLObjectListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLObject>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLObject>
* base class.
*/
-class UMLObjectList : public QPtrList<UMLObject>
+class UMLObjectList : public TQPtrList<UMLObject>
{
public:
diff --git a/umbrello/umbrello/umloperationlist.h b/umbrello/umbrello/umloperationlist.h
index dfb9007e..250c3708 100644
--- a/umbrello/umbrello/umloperationlist.h
+++ b/umbrello/umbrello/umloperationlist.h
@@ -12,12 +12,12 @@
#ifndef UMLOPERATIONLIST_H
#define UMLOPERATIONLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLOperation;
-typedef QPtrList<UMLOperation> UMLOperationList;
-typedef QPtrListIterator<UMLOperation> UMLOperationListIt;
+typedef TQPtrList<UMLOperation> UMLOperationList;
+typedef TQPtrListIterator<UMLOperation> UMLOperationListIt;
#endif
diff --git a/umbrello/umbrello/umlpackagelist.h b/umbrello/umbrello/umlpackagelist.h
index d74e8c33..6e952d03 100644
--- a/umbrello/umbrello/umlpackagelist.h
+++ b/umbrello/umbrello/umlpackagelist.h
@@ -12,11 +12,11 @@
#ifndef UMLPACKAGELIST_H
#define UMLPACKAGELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class UMLPackage;
-typedef QPtrList<UMLPackage> UMLPackageList;
-typedef QPtrListIterator<UMLPackage> UMLPackageListIt;
+typedef TQPtrList<UMLPackage> UMLPackageList;
+typedef TQPtrListIterator<UMLPackage> UMLPackageListIt;
#endif
diff --git a/umbrello/umbrello/umlrole.cpp b/umbrello/umbrello/umlrole.cpp
index 9b4449fc..ca33dffb 100644
--- a/umbrello/umbrello/umlrole.cpp
+++ b/umbrello/umbrello/umlrole.cpp
@@ -14,7 +14,7 @@
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "association.h"
@@ -54,7 +54,7 @@ Uml::Changeability_Type UMLRole::getChangeability() const {
return m_Changeability;
}
-QString UMLRole::getMultiplicity() const {
+TQString UMLRole::getMultiplicity() const {
return m_Multi;
}
@@ -79,7 +79,7 @@ void UMLRole::setChangeability (Uml::Changeability_Type value) {
UMLObject::emitModified();
}
-void UMLRole::setMultiplicity ( const QString &multi ) {
+void UMLRole::setMultiplicity ( const TQString &multi ) {
m_Multi = multi;
UMLObject::emitModified();
}
@@ -98,11 +98,11 @@ void UMLRole::init(UMLAssociation * parent, UMLObject * parentObj, Uml::Role_Typ
m_Changeability = Uml::chg_Changeable;
// connect this up to parent
- connect(this,SIGNAL(modified()),parent,SIGNAL(modified()));
+ connect(this,TQT_SIGNAL(modified()),parent,TQT_SIGNAL(modified()));
}
-void UMLRole::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement roleElement = UMLObject::save("UML:AssociationEnd", qDoc);
+void UMLRole::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement roleElement = UMLObject::save("UML:AssociationEnd", qDoc);
if (m_pSecondary)
roleElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
else
@@ -156,9 +156,9 @@ void UMLRole::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( roleElement );
}
-bool UMLRole::load( QDomElement & element ) {
+bool UMLRole::load( TQDomElement & element ) {
UMLDoc * doc = UMLApp::app()->getDocument();
- QString type = element.attribute("type", "");
+ TQString type = element.attribute("type", "");
if (!type.isEmpty()) {
if (!m_SecondaryId.isEmpty())
kWarning() << "UMLRole::load: overwriting old m_SecondaryId \""
@@ -167,11 +167,11 @@ bool UMLRole::load( QDomElement & element ) {
m_SecondaryId = type;
}
// Inspect child nodes - for multiplicity (and type if not set above.)
- for (QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ for (TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Uml::tagEq(tag, "name")) {
m_Name = tempElement.text();
} else if (Uml::tagEq(tag, "AssociationEnd.multiplicity")) {
@@ -182,7 +182,7 @@ bool UMLRole::load( QDomElement & element ) {
* - direct value in subordinate <MultiplicityRange.lower> and
* <MultiplicityRange.upper> tags
*/
- QDomNode n = tempElement.firstChild();
+ TQDomNode n = tempElement.firstChild();
if (node.isNull() || tempElement.isNull() || n.isNull() ||
n.toElement().isNull()) {
m_Multi = tempElement.text().stripWhiteSpace();
@@ -208,7 +208,7 @@ bool UMLRole::load( QDomElement & element ) {
m_Multi = tempElement.text().stripWhiteSpace();
continue;
}
- QString multiUpper;
+ TQString multiUpper;
if (tempElement.hasAttribute("lower")) {
m_Multi = tempElement.attribute("lower", "");
multiUpper = tempElement.attribute("upper", "");
@@ -242,8 +242,8 @@ bool UMLRole::load( QDomElement & element ) {
if (m_SecondaryId.isEmpty())
m_SecondaryId = tempElement.attribute("xmi.idref", "");
if (m_SecondaryId.isEmpty()) {
- QDomNode inner = tempElement.firstChild();
- QDomElement innerElem = inner.toElement();
+ TQDomNode inner = tempElement.firstChild();
+ TQDomElement innerElem = inner.toElement();
m_SecondaryId = innerElem.attribute("xmi.id", "");
if (m_SecondaryId.isEmpty())
m_SecondaryId = innerElem.attribute("xmi.idref", "");
@@ -280,7 +280,7 @@ bool UMLRole::load( QDomElement & element ) {
// when (m_role == Uml::A) but some XMI writers (e.g. StarUML) place
// the aggregation attribute at role B.
// The role end with the aggregation unequal to "none" wins.
- QString aggregation = element.attribute("aggregation", "none");
+ TQString aggregation = element.attribute("aggregation", "none");
if (aggregation == "composite")
m_pAssoc->setAssocType(Uml::at_Composition);
else if (aggregation == "shared" // UML1.3
@@ -323,7 +323,7 @@ bool UMLRole::load( QDomElement & element ) {
// Changeability defaults to Changeable if it cant set it here..
m_Changeability = Uml::chg_Changeable;
- QString changeability = element.attribute("changeability", "");
+ TQString changeability = element.attribute("changeability", "");
if (changeability.isEmpty())
element.attribute("changeable", ""); // for backward compatibility
if (changeability == "frozen")
diff --git a/umbrello/umbrello/umlrole.h b/umbrello/umbrello/umlrole.h
index 63fe42b2..48e18049 100644
--- a/umbrello/umbrello/umlrole.h
+++ b/umbrello/umbrello/umlrole.h
@@ -63,7 +63,7 @@ public:
*
* @return The multiplicity assigned to the role.
*/
- QString getMultiplicity() const;
+ TQString getMultiplicity() const;
/**
* Sets the UMLObject playing the role in the association.
@@ -84,7 +84,7 @@ public:
*
* @param multi The multiplicity of role.
*/
- void setMultiplicity ( const QString &multi );
+ void setMultiplicity ( const TQString &multi );
UMLAssociation * getParentAssociation ();
@@ -105,14 +105,14 @@ public:
/**
* Creates the <UML:AssociationEnd> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Loads the <UML:AssociationEnd> XMI element.
* Auxiliary to UMLObject::loadFromXMI.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
private:
@@ -121,7 +121,7 @@ private:
UMLAssociation * m_pAssoc;
Uml::Role_Type m_role;
- QString m_Multi;
+ TQString m_Multi;
Uml::Changeability_Type m_Changeability;
};
diff --git a/umbrello/umbrello/umlstereotypelist.h b/umbrello/umbrello/umlstereotypelist.h
index acf2edd7..efaf9188 100644
--- a/umbrello/umbrello/umlstereotypelist.h
+++ b/umbrello/umbrello/umlstereotypelist.h
@@ -12,12 +12,12 @@
#ifndef UMLSTEREOTYPELIST_H
#define UMLSTEREOTYPELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLStereotype;
-typedef QPtrList<UMLStereotype> UMLStereotypeList;
-typedef QPtrListIterator<UMLStereotype> UMLStereotypeListIt;
+typedef TQPtrList<UMLStereotype> UMLStereotypeList;
+typedef TQPtrListIterator<UMLStereotype> UMLStereotypeListIt;
#endif
diff --git a/umbrello/umbrello/umltemplatelist.h b/umbrello/umbrello/umltemplatelist.h
index aa7415a4..908a665d 100644
--- a/umbrello/umbrello/umltemplatelist.h
+++ b/umbrello/umbrello/umltemplatelist.h
@@ -12,12 +12,12 @@
#ifndef UMLTEMPLATELIST_H
#define UMLTEMPLATELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLTemplate;
-typedef QPtrList<UMLTemplate> UMLTemplateList;
-typedef QPtrListIterator<UMLTemplate> UMLTemplateListIt;
+typedef TQPtrList<UMLTemplate> UMLTemplateList;
+typedef TQPtrListIterator<UMLTemplate> UMLTemplateListIt;
#endif
diff --git a/umbrello/umbrello/umlview.cpp b/umbrello/umbrello/umlview.cpp
index 0b6a7935..35ee3a77 100644
--- a/umbrello/umbrello/umlview.cpp
+++ b/umbrello/umbrello/umlview.cpp
@@ -17,21 +17,21 @@
#include <math.h>
// include files for Qt
-#include <qpixmap.h>
-#include <qpicture.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobjectlist.h>
-#include <qobjectdict.h>
-#include <qdragobject.h>
-#include <qpaintdevicemetrics.h>
-#include <qfileinfo.h>
-#include <qptrlist.h>
-#include <qcolor.h>
-#include <qwmatrix.h>
-#include <qregexp.h>
+#include <tqpixmap.h>
+#include <tqpicture.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobjectlist.h>
+#include <tqobjectdict.h>
+#include <tqdragobject.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfileinfo.h>
+#include <tqptrlist.h>
+#include <tqcolor.h>
+#include <tqwmatrix.h>
+#include <tqregexp.h>
//kde include files
#include <ktempfile.h>
@@ -107,7 +107,7 @@ using namespace Uml;
// constructor
-UMLView::UMLView(UMLFolder *parentFolder) : QCanvasView(UMLApp::app()->getMainViewWidget()) {
+UMLView::UMLView(UMLFolder *parentFolder) : TQCanvasView(UMLApp::app()->getMainViewWidget()) {
init();
m_pDoc = UMLApp::app()->getDocument();
m_pFolder = parentFolder;
@@ -141,7 +141,7 @@ void UMLView::init() {
m_bPopupShowing = false;
m_bStartedCut = false;
//clear pointers
- m_PastePoint = QPoint(0, 0);
+ m_PastePoint = TQPoint(0, 0);
m_pIDChangesLog = 0;
m_pMenu = 0;
@@ -166,9 +166,9 @@ void UMLView::init() {
viewport() -> setMouseTracking(false);
//setup signals
- connect( this, SIGNAL(sigRemovePopupMenu()), this, SLOT(slotRemovePopupMenu() ) );
- connect( UMLApp::app(), SIGNAL( sigCutSuccessful() ),
- this, SLOT( slotCutSuccessful() ) );
+ connect( this, TQT_SIGNAL(sigRemovePopupMenu()), this, TQT_SLOT(slotRemovePopupMenu() ) );
+ connect( UMLApp::app(), TQT_SIGNAL( sigCutSuccessful() ),
+ this, TQT_SLOT( slotCutSuccessful() ) );
// Create the ToolBarState factory. This class is not a singleton, because it
// needs a pointer to this object.
@@ -185,7 +185,7 @@ UMLView::~UMLView() {
m_pIDChangesLog = 0;
}
- // before we can delete the QCanvas, all widgets must be explicitly
+ // before we can delete the TQCanvas, all widgets must be explicitly
// removed
// otherwise the implicit remove of the contained widgets will cause
// events which would demand a valid connected QCanvas
@@ -198,17 +198,17 @@ UMLView::~UMLView() {
delete m_pToolBarStateFactory;
m_pToolBarStateFactory = NULL;
- // Qt Doc for QCanvasView::~QCanvasView () states:
+ // Qt Doc for TQCanvasView::~TQCanvasView () states:
// "Destroys the canvas view. The associated canvas is not deleted."
// we should do it now
delete canvas();
}
-QString UMLView::getName() const {
+TQString UMLView::getName() const {
return m_Name;
}
-void UMLView::setName(const QString &name) {
+void UMLView::setName(const TQString &name) {
m_Name = name;
}
@@ -216,12 +216,12 @@ int UMLView::generateCollaborationId() {
return ++m_nCollaborationId;
}
-void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
+void UMLView::print(KPrinter *pPrinter, TQPainter & pPainter) {
int height, width;
//get the size of the page
pPrinter->setFullPage( true );
- QPaintDeviceMetrics metrics(pPrinter);
- QFontMetrics fm = pPainter.fontMetrics(); // use the painter font metrics, not the screen fm!
+ TQPaintDeviceMetrics metrics(pPrinter);
+ TQFontMetrics fm = pPainter.fontMetrics(); // use the painter font metrics, not the screen fm!
int fontHeight = fm.lineSpacing();
uint left, right, top, bottom;
// fetch printer margins individual for all four page sides, as at least top and bottom are not the same
@@ -253,7 +253,7 @@ void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
height = metrics.height() - top - bottom;
//get the smallest rect holding the diagram
- QRect rect = getDiagramRect();
+ TQRect rect = getDiagramRect();
//now draw to printer
#if 0
@@ -287,15 +287,15 @@ void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
// make sure the part of the diagram is painted at the correct
// place in the printout
pPainter.translate(-offsetX,-offsetY);
- getDiagram(QRect(offsetX, offsetY,widthX, heightY),
+ getDiagram(TQRect(offsetX, offsetY,widthX, heightY),
pPainter);
// undo the translation so the coordinates for the painter
// correspond to the page again
pPainter.translate(offsetX,offsetY);
//draw foot note
- QString string = i18n("Diagram: %2 Page %1").arg(page + 1).arg(getName());
- QColor textColor(50, 50, 50);
+ TQString string = i18n("Diagram: %2 Page %1").arg(page + 1).arg(getName());
+ TQColor textColor(50, 50, 50);
pPainter.setPen(textColor);
pPainter.drawLine(0, height + 2, width, height + 2);
pPainter.drawText(0, height + 4, width, fontHeight, Qt::AlignLeft, string);
@@ -346,16 +346,16 @@ void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
pPainter.setWindow( rect.x(), rect.y(), windowWidth, windowHeight );
// set viewport - the physical mapping
- // --> Qt's QPainter will map all drawed elements from diagram area ( window )
+ // --> Qt's TQPainter will map all drawed elements from diagram area ( window )
// to printer area ( viewport )
pPainter.setViewport( left, top, width, height );
// get Diagram
- getDiagram(QRect(rect.x(), rect.y(), windowWidth, diagramHeight), pPainter);
+ getDiagram(TQRect(rect.x(), rect.y(), windowWidth, diagramHeight), pPainter);
//draw foot note
- QString string = i18n("Diagram: %2 Page %1").arg( 1).arg(getName());
- QColor textColor(50, 50, 50);
+ TQString string = i18n("Diagram: %2 Page %1").arg( 1).arg(getName());
+ TQColor textColor(50, 50, 50);
pPainter.setPen(textColor);
pPainter.drawLine(rect.x(), footTop , windowWidth, footTop);
pPainter.drawText(rect.x(), footTop + 3, windowWidth, fontHeight, Qt::AlignLeft, string);
@@ -381,7 +381,7 @@ void UMLView::setupNewWidget(UMLWidget *w) {
m_pDoc->setModified();
}
-void UMLView::contentsMouseReleaseEvent(QMouseEvent* ome) {
+void UMLView::contentsMouseReleaseEvent(TQMouseEvent* ome) {
m_pToolBarState->mouseRelease(ome);
}
@@ -393,7 +393,7 @@ void UMLView::slotToolBarChanged(int c) {
m_bPaste = false;
}
-void UMLView::showEvent(QShowEvent* /*se*/) {
+void UMLView::showEvent(TQShowEvent* /*se*/) {
# ifdef MANUAL_CONTROL_DOUBLE_BUFFERING
//kWarning() << "Show Event for " << getName() << endl;
@@ -406,28 +406,28 @@ void UMLView::showEvent(QShowEvent* /*se*/) {
UMLApp* theApp = UMLApp::app();
WorkToolBar* tb = theApp->getWorkToolBar();
- connect(tb,SIGNAL(sigButtonChanged(int)), this, SLOT(slotToolBarChanged(int)));
- connect(this,SIGNAL(sigResetToolBar()), tb, SLOT(slotResetToolBar()));
- connect(m_pDoc, SIGNAL(sigObjectCreated(UMLObject *)),
- this, SLOT(slotObjectCreated(UMLObject *)));
- connect(this, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotAssociationRemoved(AssociationWidget*)));
- connect(this, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotWidgetRemoved(UMLWidget*)));
+ connect(tb,TQT_SIGNAL(sigButtonChanged(int)), this, TQT_SLOT(slotToolBarChanged(int)));
+ connect(this,TQT_SIGNAL(sigResetToolBar()), tb, TQT_SLOT(slotResetToolBar()));
+ connect(m_pDoc, TQT_SIGNAL(sigObjectCreated(UMLObject *)),
+ this, TQT_SLOT(slotObjectCreated(UMLObject *)));
+ connect(this, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ connect(this, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
resetToolbar();
}
-void UMLView::hideEvent(QHideEvent* /*he*/) {
+void UMLView::hideEvent(TQHideEvent* /*he*/) {
UMLApp* theApp = UMLApp::app();
WorkToolBar* tb = theApp->getWorkToolBar();
- disconnect(tb,SIGNAL(sigButtonChanged(int)), this, SLOT(slotToolBarChanged(int)));
- disconnect(this,SIGNAL(sigResetToolBar()), tb, SLOT(slotResetToolBar()));
- disconnect(m_pDoc, SIGNAL(sigObjectCreated(UMLObject *)), this, SLOT(slotObjectCreated(UMLObject *)));
- disconnect(this, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotAssociationRemoved(AssociationWidget*)));
- disconnect(this, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotWidgetRemoved(UMLWidget*)));
+ disconnect(tb,TQT_SIGNAL(sigButtonChanged(int)), this, TQT_SLOT(slotToolBarChanged(int)));
+ disconnect(this,TQT_SIGNAL(sigResetToolBar()), tb, TQT_SLOT(slotResetToolBar()));
+ disconnect(m_pDoc, TQT_SIGNAL(sigObjectCreated(UMLObject *)), this, TQT_SLOT(slotObjectCreated(UMLObject *)));
+ disconnect(this, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ disconnect(this, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
# ifdef MANUAL_CONTROL_DOUBLE_BUFFERING
//kWarning() << "Hide Event for " << getName() << endl;
@@ -508,7 +508,7 @@ void UMLView::slotObjectRemoved(UMLObject * o) {
}
}
-void UMLView::contentsDragEnterEvent(QDragEnterEvent *e) {
+void UMLView::contentsDragEnterEvent(TQDragEnterEvent *e) {
UMLDrag::LvTypeAndID_List tidList;
if(!UMLDrag::getClip3TypeAndID(e, tidList)) {
return;
@@ -604,7 +604,7 @@ void UMLView::contentsDragEnterEvent(QDragEnterEvent *e) {
e->accept(bAccept);
}
-void UMLView::contentsDropEvent(QDropEvent *e) {
+void UMLView::contentsDropEvent(TQDropEvent *e) {
UMLDrag::LvTypeAndID_List tidList;
if( !UMLDrag::getClip3TypeAndID(e, tidList) ) {
return;
@@ -645,7 +645,7 @@ void UMLView::contentsDropEvent(QDropEvent *e) {
m_pDoc -> setModified(true);
}
-ObjectWidget * UMLView::onWidgetLine( const QPoint &point ) {
+ObjectWidget * UMLView::onWidgetLine( const TQPoint &point ) {
UMLWidget *obj;
for (UMLWidgetListIt it(m_WidgetList); (obj = it.current()) != NULL; ++it) {
ObjectWidget *ow = dynamic_cast<ObjectWidget*>(obj);
@@ -663,7 +663,7 @@ ObjectWidget * UMLView::onWidgetLine( const QPoint &point ) {
return 0;
}
-UMLWidget *UMLView::getWidgetAt(const QPoint& p) {
+UMLWidget *UMLView::getWidgetAt(const TQPoint& p) {
int relativeSize = 10000; // start with an arbitrary large number
UMLWidget *obj, *retObj = NULL;
UMLWidgetListIt it(m_WidgetList);
@@ -719,7 +719,7 @@ bool UMLView::widgetOnDiagram(Uml::IDType id) {
return false;
}
-void UMLView::contentsMouseMoveEvent(QMouseEvent* ome) {
+void UMLView::contentsMouseMoveEvent(TQMouseEvent* ome) {
m_pToolBarState->mouseMove(ome);
}
@@ -765,7 +765,7 @@ AssociationWidget * UMLView::findAssocWidget( Uml::IDType id ) {
}
AssociationWidget * UMLView::findAssocWidget(UMLWidget *pWidgetA,
- UMLWidget *pWidgetB, const QString& roleNameB) {
+ UMLWidget *pWidgetB, const TQString& roleNameB) {
AssociationWidget *assoc;
AssociationWidgetListIt it(m_AssociationList);
while ((assoc = it.current()) != 0) {
@@ -815,9 +815,9 @@ void UMLView::removeWidget(UMLWidget * o) {
o -> cleanup();
m_SelectedList.remove(o);
- disconnect( this, SIGNAL( sigRemovePopupMenu() ), o, SLOT( slotRemovePopupMenu() ) );
- disconnect( this, SIGNAL( sigClearAllSelected() ), o, SLOT( slotClearAllSelected() ) );
- disconnect( this, SIGNAL(sigColorChanged(Uml::IDType)), o, SLOT(slotColorChanged(Uml::IDType)));
+ disconnect( this, TQT_SIGNAL( sigRemovePopupMenu() ), o, TQT_SLOT( slotRemovePopupMenu() ) );
+ disconnect( this, TQT_SIGNAL( sigClearAllSelected() ), o, TQT_SLOT( slotClearAllSelected() ) );
+ disconnect( this, TQT_SIGNAL(sigColorChanged(Uml::IDType)), o, TQT_SLOT(slotColorChanged(Uml::IDType)));
if (t == wt_Message)
m_MessageList.remove(static_cast<MessageWidget*>(o));
else
@@ -834,21 +834,21 @@ void UMLView::setUseFillColor(bool ufc) {
m_Options.uiState.useFillColor = ufc;
}
-QColor UMLView::getFillColor() const {
+TQColor UMLView::getFillColor() const {
return m_Options.uiState.fillColor;
}
-void UMLView::setFillColor(const QColor &color) {
+void UMLView::setFillColor(const TQColor &color) {
m_Options.uiState.fillColor = color;
emit sigColorChanged( getID() );
canvas()->setAllChanged();
}
-QColor UMLView::getLineColor() const {
+TQColor UMLView::getLineColor() const {
return m_Options.uiState.lineColor;
}
-void UMLView::setLineColor(const QColor &color) {
+void UMLView::setLineColor(const TQColor &color) {
m_Options.uiState.lineColor = color;
emit sigColorChanged( getID() );
canvas() -> setAllChanged();
@@ -864,11 +864,11 @@ void UMLView::setLineWidth(uint width) {
canvas() -> setAllChanged();
}
-void UMLView::contentsMouseDoubleClickEvent(QMouseEvent* ome) {
+void UMLView::contentsMouseDoubleClickEvent(TQMouseEvent* ome) {
m_pToolBarState->mouseDoubleClick(ome);
}
-QRect UMLView::getDiagramRect() {
+TQRect UMLView::getDiagramRect() {
int startx, starty, endx, endy;
startx = starty = INT_MAX;
endx = endy = 0;
@@ -907,7 +907,7 @@ QRect UMLView::getDiagramRect() {
* UMLWidgets */
AssociationWidgetListIt assoc_it (m_AssociationList);
AssociationWidget * assoc_obj;
- QRect rect;
+ TQRect rect;
while ((assoc_obj = assoc_it.current()) != 0)
{
@@ -933,10 +933,10 @@ QRect UMLView::getDiagramRect() {
endy += 20;
*/
- return QRect(startx, starty, endx - startx, endy - starty);
+ return TQRect(startx, starty, endx - startx, endy - starty);
}
-void UMLView::setSelected(UMLWidget * w, QMouseEvent * /*me*/) {
+void UMLView::setSelected(UMLWidget * w, TQMouseEvent * /*me*/) {
//only add if wasn't in list
if(!m_SelectedList.remove(w))
m_SelectedList.append(w);
@@ -970,14 +970,14 @@ void UMLView::selectionUseFillColor(bool useFC) {
temp -> setUseFillColour(useFC);
}
-void UMLView::selectionSetFont( const QFont &font )
+void UMLView::selectionSetFont( const TQFont &font )
{
UMLWidget * temp = 0;
for(temp=(UMLWidget *)m_SelectedList.first();temp;temp=(UMLWidget *)m_SelectedList.next())
temp -> setFont( font );
}
-void UMLView::selectionSetLineColor( const QColor &color )
+void UMLView::selectionSetLineColor( const TQColor &color )
{
UMLWidget * temp = 0;
for (temp = m_SelectedList.first(); temp; temp = m_SelectedList.next()) {
@@ -1005,7 +1005,7 @@ void UMLView::selectionSetLineWidth( uint width )
}
}
-void UMLView::selectionSetFillColor( const QColor &color )
+void UMLView::selectionSetFillColor( const TQColor &color )
{
UMLWidget * temp = 0;
for(temp=(UMLWidget *) m_SelectedList.first();
@@ -1141,7 +1141,7 @@ bool UMLView::isSavedInSeparateFile() {
// when tabbed diagrams are enabled.
return false;
}
- const QString msgPrefix("UMLView::isSavedInSeparateFile(" + getName() + "): ");
+ const TQString msgPrefix("UMLView::isSavedInSeparateFile(" + getName() + "): ");
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem *lvItem = listView->findItem(m_nID);
if (lvItem == NULL) {
@@ -1164,11 +1164,11 @@ bool UMLView::isSavedInSeparateFile() {
<< "parent model object is not a UMLFolder (?)" << endl;
return false;
}
- QString folderFile = modelFolder->getFolderFile();
+ TQString folderFile = modelFolder->getFolderFile();
return !folderFile.isEmpty();
}
-void UMLView::contentsMousePressEvent(QMouseEvent* ome) {
+void UMLView::contentsMousePressEvent(TQMouseEvent* ome) {
m_pToolBarState->mousePress(ome);
//TODO should be managed by widgets when are selected. Right now also has some
//problems, such as clicking on a widget, and clicking to move that widget shows
@@ -1208,7 +1208,7 @@ void UMLView::selectWidgetsOfAssoc (AssociationWidget * a) {
void UMLView::selectWidgets(int px, int py, int qx, int qy) {
clearSelected();
- QRect rect;
+ TQRect rect;
if(px <= qx) {
rect.setLeft(px);
rect.setRight(qx);
@@ -1230,7 +1230,7 @@ void UMLView::selectWidgets(int px, int py, int qx, int qy) {
int y = temp -> getY();
int w = temp -> getWidth();
int h = temp -> getHeight();
- QRect rect2(x, y, w, h);
+ TQRect rect2(x, y, w, h);
++it;
//see if any part of widget is in the rectangle
if( !rect.intersects(rect2) )
@@ -1274,14 +1274,14 @@ void UMLView::selectWidgets(int px, int py, int qx, int qy) {
}//end while
}
-void UMLView::getDiagram(const QRect &rect, QPixmap & diagram) {
- QPixmap pixmap(rect.x() + rect.width(), rect.y() + rect.height());
- QPainter painter(&pixmap);
+void UMLView::getDiagram(const TQRect &rect, TQPixmap & diagram) {
+ TQPixmap pixmap(rect.x() + rect.width(), rect.y() + rect.height());
+ TQPainter painter(&pixmap);
getDiagram(canvas()->rect(),painter);
- bitBlt(&diagram, QPoint(0, 0), &pixmap, rect);
+ bitBlt(&diagram, TQPoint(0, 0), &pixmap, rect);
}
-void UMLView::getDiagram(const QRect &area, QPainter & painter) {
+void UMLView::getDiagram(const TQRect &area, TQPainter & painter) {
//TODO unselecting and selecting later doesn't work now as the selection is
//cleared in UMLViewImageExporter. Check if the anything else than the
//following is needed and, if it works, remove the clearSelected in
@@ -1472,7 +1472,7 @@ bool UMLView::addWidget( UMLWidget * pWidget , bool isPasteOperation ) {
bool xIsOutOfRange = (wX <= 0 || wX >= FloatingTextWidget::restrictPositionMax);
bool yIsOutOfRange = (wY <= 0 || wY >= FloatingTextWidget::restrictPositionMax);
if (xIsOutOfRange || yIsOutOfRange) {
- QString name = pWidget->getName();
+ TQString name = pWidget->getName();
if (name.isEmpty()) {
FloatingTextWidget *ft = dynamic_cast<FloatingTextWidget*>(pWidget);
if (ft)
@@ -1826,8 +1826,8 @@ void UMLView::getWidgetAssocs(UMLObject* Obj, AssociationWidgetList & Associatio
}//end while
}
-void UMLView::closeEvent ( QCloseEvent * e ) {
- QWidget::closeEvent(e);
+void UMLView::closeEvent ( TQCloseEvent * e ) {
+ TQWidget::closeEvent(e);
}
void UMLView::removeAllAssociations() {
@@ -2245,10 +2245,10 @@ void UMLView::findMaxBoundingRectangle(const FloatingTextWidget* ft, int& px, in
qy = y1;
}
-void UMLView::copyAsImage(QPixmap*& pix) {
+void UMLView::copyAsImage(TQPixmap*& pix) {
//get the smallest rect holding the diagram
- QRect rect = getDiagramRect();
- QPixmap diagram( rect.width(), rect.height() );
+ TQRect rect = getDiagramRect();
+ TQPixmap diagram( rect.width(), rect.height() );
//only draw what is selected
m_bDrawSelectedOnly = true;
@@ -2303,7 +2303,7 @@ void UMLView::copyAsImage(QPixmap*& pix) {
findMaxBoundingRectangle(changeB, px, py, qx, qy);
}//end while
- QRect imageRect; //area with respect to getDiagramRect()
+ TQRect imageRect; //area with respect to getDiagramRect()
//i.e. all widgets on the canvas. Was previously with
//respect to whole canvas
@@ -2312,8 +2312,8 @@ void UMLView::copyAsImage(QPixmap*& pix) {
imageRect.setRight( qx - rect.left() );
imageRect.setBottom( qy - rect.top() );
- pix = new QPixmap(imageRect.width(), imageRect.height());
- bitBlt(pix, QPoint(0, 0), &diagram, imageRect);
+ pix = new TQPixmap(imageRect.width(), imageRect.height());
+ bitBlt(pix, TQPoint(0, 0), &diagram, imageRect);
m_bDrawSelectedOnly = false;
}
@@ -2364,14 +2364,14 @@ void UMLView::setMenu() {
}//end switch
if( menu != ListPopupMenu::mt_Undefined ) {
m_pMenu = new ListPopupMenu(this, menu, this);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
m_pMenu->popup( mapToGlobal( contentsToViewport(worldMatrix().map(m_Pos)) ) );
}
}
void UMLView::slotRemovePopupMenu() {
if(m_pMenu) {
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
@@ -2506,7 +2506,7 @@ void UMLView::slotMenuSelection(int sel) {
case ListPopupMenu::mt_State:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter State Name"),
+ TQString name = KInputDialog::getText( i18n("Enter State Name"),
i18n("Enter the name of the new state:"),
i18n("new state"), &ok, UMLApp::app() );
if ( ok ) {
@@ -2542,7 +2542,7 @@ void UMLView::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Activity:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter Activity Name"),
+ TQString name = KInputDialog::getText( i18n("Enter Activity Name"),
i18n("Enter the name of the new activity:"),
i18n("new activity"), &ok, UMLApp::app() );
if ( ok ) {
@@ -2575,7 +2575,7 @@ void UMLView::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Rename:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter Diagram Name"),
+ TQString name = KInputDialog::getText( i18n("Enter Diagram Name"),
i18n("Enter the new name of the diagram:"),
getName(), &ok, UMLApp::app() );
if (ok) {
@@ -2601,8 +2601,8 @@ void UMLView::slotShowView() {
m_pDoc -> changeCurrentView( getID() );
}
-QPoint UMLView::getPastePoint() {
- QPoint point = m_PastePoint;
+TQPoint UMLView::getPastePoint() {
+ TQPoint point = m_PastePoint;
point.setX( point.x() - m_Pos.x() );
point.setY( point.y() - m_Pos.y() );
return point;
@@ -2643,11 +2643,11 @@ bool UMLView::showPropDialog() {
}
-QFont UMLView::getFont() const {
+TQFont UMLView::getFont() const {
return m_Options.uiState.font;
}
-void UMLView::setFont(QFont font, bool changeAllWidgets /* = false */) {
+void UMLView::setFont(TQFont font, bool changeAllWidgets /* = false */) {
m_Options.uiState.font = font;
if (!changeAllWidgets)
return;
@@ -2788,7 +2788,7 @@ void UMLView::setZoom(int zoom) {
zoom = 500;
}
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(zoom/100.0,zoom/100.0);
setWorldMatrix(wm);
@@ -2801,13 +2801,13 @@ int UMLView::currentZoom() {
}
void UMLView::zoomIn() {
- QWMatrix wm = worldMatrix();
+ TQWMatrix wm = worldMatrix();
wm.scale(1.5,1.5); // adjust zooming step here
setZoom( (int)(wm.m11()*100.0) );
}
void UMLView::zoomOut() {
- QWMatrix wm = worldMatrix();
+ TQWMatrix wm = worldMatrix();
wm.scale(2.0/3.0, 2.0/3.0); //adjust zooming step here
setZoom( (int)(wm.m11()*100.0) );
}
@@ -2824,7 +2824,7 @@ void UMLView::setCanvasSize(int width, int height) {
}
void UMLView::resizeCanvasToItems() {
- QRect canvasSize = getDiagramRect();
+ TQRect canvasSize = getDiagramRect();
int canvasWidth = canvasSize.right() + 5;
int canvasHeight = canvasSize.bottom() + 5;
@@ -2846,7 +2846,7 @@ void UMLView::resizeCanvasToItems() {
}
void UMLView::show() {
- QWidget::show();
+ TQWidget::show();
resizeCanvasToItems();
}
@@ -2865,11 +2865,11 @@ void UMLView::updateComponentSizes() {
* the widgets are drawn.
* This is necessary because the widget size might depend on the
* font metrics and the font metrics might change for different
- * QPainter, i.e. font metrics for Display font and Printer font are
+ * TQPainter, i.e. font metrics for Display font and Printer font are
* usually different.
- * Call this when you change the QPainter.
+ * Call this when you change the TQPainter.
*/
-void UMLView::forceUpdateWidgetFontMetrics(QPainter * painter) {
+void UMLView::forceUpdateWidgetFontMetrics(TQPainter * painter) {
UMLWidgetListIt it( m_WidgetList );
UMLWidget *obj;
@@ -2879,8 +2879,8 @@ void UMLView::forceUpdateWidgetFontMetrics(QPainter * painter) {
}
}
-void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement viewElement = qDoc.createElement( "diagram" );
+void UMLView::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement viewElement = qDoc.createElement( "diagram" );
viewElement.setAttribute( "xmi.id", ID2STR(m_nID) );
viewElement.setAttribute( "name", getName() );
viewElement.setAttribute( "type", m_Type );
@@ -2912,7 +2912,7 @@ void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
//now save all the widgets
UMLWidget * widget = 0;
UMLWidgetListIt w_it( m_WidgetList );
- QDomElement widgetElement = qDoc.createElement( "widgets" );
+ TQDomElement widgetElement = qDoc.createElement( "widgets" );
while( ( widget = w_it.current() ) ) {
++w_it;
// Having an exception is bad I know, but gotta work with
@@ -2927,14 +2927,14 @@ void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
viewElement.appendChild( widgetElement );
//now save the message widgets
MessageWidgetListIt m_it( m_MessageList );
- QDomElement messageElement = qDoc.createElement( "messages" );
+ TQDomElement messageElement = qDoc.createElement( "messages" );
while( ( widget = m_it.current() ) ) {
++m_it;
widget -> saveToXMI( qDoc, messageElement );
}
viewElement.appendChild( messageElement );
//now save the associations
- QDomElement assocElement = qDoc.createElement( "associations" );
+ TQDomElement assocElement = qDoc.createElement( "associations" );
if ( m_AssociationList.count() ) {
// We guard against ( m_AssociationList.count() == 0 ) because
// this code could be reached as follows:
@@ -2960,28 +2960,28 @@ void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( viewElement );
}
-bool UMLView::loadFromXMI( QDomElement & qElement ) {
- QString id = qElement.attribute( "xmi.id", "-1" );
+bool UMLView::loadFromXMI( TQDomElement & qElement ) {
+ TQString id = qElement.attribute( "xmi.id", "-1" );
m_nID = STR2ID(id);
if( m_nID == Uml::id_None )
return false;
setName( qElement.attribute( "name", "" ) );
- QString type = qElement.attribute( "type", "0" );
+ TQString type = qElement.attribute( "type", "0" );
m_Documentation = qElement.attribute( "documentation", "" );
- QString localid = qElement.attribute( "localid", "0" );
+ TQString localid = qElement.attribute( "localid", "0" );
//optionstate uistate
- QString font = qElement.attribute( "font", "" );
+ TQString font = qElement.attribute( "font", "" );
if (!font.isEmpty()) {
m_Options.uiState.font.fromString( font );
m_Options.uiState.font.setUnderline(false);
}
- QString fillcolor = qElement.attribute( "fillcolor", "" );
- QString linecolor = qElement.attribute( "linecolor", "" );
- QString linewidth = qElement.attribute( "linewidth", "" );
- QString usefillcolor = qElement.attribute( "usefillcolor", "0" );
+ TQString fillcolor = qElement.attribute( "fillcolor", "" );
+ TQString linecolor = qElement.attribute( "linecolor", "" );
+ TQString linewidth = qElement.attribute( "linewidth", "" );
+ TQString usefillcolor = qElement.attribute( "usefillcolor", "0" );
m_Options.uiState.useFillColor = (bool)usefillcolor.toInt();
//optionstate classstate
- QString temp = qElement.attribute( "showattsig", "0" );
+ TQString temp = qElement.attribute( "showattsig", "0" );
m_Options.classState.showAttSig = (bool)temp.toInt();
temp = qElement.attribute( "showatts", "0" );
m_Options.classState.showAtts = (bool)temp.toInt();
@@ -2996,28 +2996,28 @@ bool UMLView::loadFromXMI( QDomElement & qElement ) {
temp = qElement.attribute( "showstereotype", "0" );
m_Options.classState.showStereoType = (bool)temp.toInt();
//misc
- QString showgrid = qElement.attribute( "showgrid", "0" );
+ TQString showgrid = qElement.attribute( "showgrid", "0" );
m_bShowSnapGrid = (bool)showgrid.toInt();
- QString snapgrid = qElement.attribute( "snapgrid", "0" );
+ TQString snapgrid = qElement.attribute( "snapgrid", "0" );
m_bUseSnapToGrid = (bool)snapgrid.toInt();
- QString snapcsgrid = qElement.attribute( "snapcsgrid", "0" );
+ TQString snapcsgrid = qElement.attribute( "snapcsgrid", "0" );
m_bUseSnapComponentSizeToGrid = (bool)snapcsgrid.toInt();
- QString snapx = qElement.attribute( "snapx", "10" );
+ TQString snapx = qElement.attribute( "snapx", "10" );
m_nSnapX = snapx.toInt();
- QString snapy = qElement.attribute( "snapy", "10" );
+ TQString snapy = qElement.attribute( "snapy", "10" );
m_nSnapY = snapy.toInt();
- QString zoom = qElement.attribute( "zoom", "100" );
+ TQString zoom = qElement.attribute( "zoom", "100" );
m_nZoom = zoom.toInt();
- QString height = qElement.attribute( "canvasheight", QString("%1").arg(UMLView::defaultCanvasSize) );
+ TQString height = qElement.attribute( "canvasheight", TQString("%1").arg(UMLView::defaultCanvasSize) );
m_nCanvasHeight = height.toInt();
- QString width = qElement.attribute( "canvaswidth", QString("%1").arg(UMLView::defaultCanvasSize) );
+ TQString width = qElement.attribute( "canvaswidth", TQString("%1").arg(UMLView::defaultCanvasSize) );
m_nCanvasWidth = width.toInt();
int nType = type.toInt();
@@ -3060,17 +3060,17 @@ bool UMLView::loadFromXMI( QDomElement & qElement ) {
m_Type = (Uml::Diagram_Type)nType;
}
if( !fillcolor.isEmpty() )
- m_Options.uiState.fillColor = QColor( fillcolor );
+ m_Options.uiState.fillColor = TQColor( fillcolor );
if( !linecolor.isEmpty() )
- m_Options.uiState.lineColor = QColor( linecolor );
+ m_Options.uiState.lineColor = TQColor( linecolor );
if( !linewidth.isEmpty() )
m_Options.uiState.lineWidth = linewidth.toInt();
m_nLocalID = STR2ID(localid);
- QDomNode node = qElement.firstChild();
+ TQDomNode node = qElement.firstChild();
bool widgetsLoaded = false, messagesLoaded = false, associationsLoaded = false;
while (!node.isNull()) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if (!element.isNull()) {
if (element.tagName() == "widgets")
widgetsLoaded = loadWidgetsFromXMI( element );
@@ -3097,10 +3097,10 @@ bool UMLView::loadFromXMI( QDomElement & qElement ) {
return true;
}
-bool UMLView::loadWidgetsFromXMI( QDomElement & qElement ) {
+bool UMLView::loadWidgetsFromXMI( TQDomElement & qElement ) {
UMLWidget* widget = 0;
- QDomNode node = qElement.firstChild();
- QDomElement widgetElement = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement widgetElement = node.toElement();
while( !widgetElement.isNull() ) {
widget = loadWidgetFromXMI(widgetElement);
if (widget) {
@@ -3118,15 +3118,15 @@ bool UMLView::loadWidgetsFromXMI( QDomElement & qElement ) {
return true;
}
-UMLWidget* UMLView::loadWidgetFromXMI(QDomElement& widgetElement) {
+UMLWidget* UMLView::loadWidgetFromXMI(TQDomElement& widgetElement) {
if ( !m_pDoc ) {
kWarning() << "UMLView::loadWidgetFromXMI(): m_pDoc is NULL" << endl;
return 0L;
}
- QString tag = widgetElement.tagName();
- QString idstr = widgetElement.attribute( "xmi.id", "-1" );
+ TQString tag = widgetElement.tagName();
+ TQString idstr = widgetElement.attribute( "xmi.id", "-1" );
UMLWidget* widget = Widget_Factory::makeWidgetFromXMI(tag, idstr, this);
if (widget == NULL)
return NULL;
@@ -3138,12 +3138,12 @@ UMLWidget* UMLView::loadWidgetFromXMI(QDomElement& widgetElement) {
return widget;
}
-bool UMLView::loadMessagesFromXMI( QDomElement & qElement ) {
+bool UMLView::loadMessagesFromXMI( TQDomElement & qElement ) {
MessageWidget * message = 0;
- QDomNode node = qElement.firstChild();
- QDomElement messageElement = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement messageElement = node.toElement();
while( !messageElement.isNull() ) {
- QString tag = messageElement.tagName();
+ TQString tag = messageElement.tagName();
if (tag == "messagewidget" ||
tag == "UML:MessageWidget" ) { // for bkwd compatibility
message = new MessageWidget(this, sequence_message_asynchronous,
@@ -3166,12 +3166,12 @@ bool UMLView::loadMessagesFromXMI( QDomElement & qElement ) {
return true;
}
-bool UMLView::loadAssociationsFromXMI( QDomElement & qElement ) {
- QDomNode node = qElement.firstChild();
- QDomElement assocElement = node.toElement();
+bool UMLView::loadAssociationsFromXMI( TQDomElement & qElement ) {
+ TQDomNode node = qElement.firstChild();
+ TQDomElement assocElement = node.toElement();
int countr = 0;
while( !assocElement.isNull() ) {
- QString tag = assocElement.tagName();
+ TQString tag = assocElement.tagName();
if (tag == "assocwidget" ||
tag == "UML:AssocWidget") { // for bkwd compatibility
countr++;
@@ -3210,27 +3210,27 @@ void UMLView::addObject(UMLObject *object)
m_bCreateObject = false;
}
-bool UMLView::loadUisDiagramPresentation(QDomElement & qElement) {
- for (QDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
- QDomElement elem = node.toElement();
- QString tag = elem.tagName();
+bool UMLView::loadUisDiagramPresentation(TQDomElement & qElement) {
+ for (TQDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ TQDomElement elem = node.toElement();
+ TQString tag = elem.tagName();
if (! Uml::tagEq(tag, "Presentation")) {
kError() << "ignoring unknown UisDiagramPresentation tag "
<< tag << endl;
continue;
}
- QDomNode n = elem.firstChild();
- QDomElement e = n.toElement();
- QString idStr;
+ TQDomNode n = elem.firstChild();
+ TQDomElement e = n.toElement();
+ TQString idStr;
int x = 0, y = 0, w = 0, h = 0;
while (!e.isNull()) {
tag = e.tagName();
kDebug() << "Presentation: tag = " << tag << endl;
if (Uml::tagEq(tag, "Presentation.geometry")) {
- QDomNode gnode = e.firstChild();
- QDomElement gelem = gnode.toElement();
- QString csv = gelem.text();
- QStringList dim = QStringList::split(",", csv);
+ TQDomNode gnode = e.firstChild();
+ TQDomElement gelem = gnode.toElement();
+ TQString csv = gelem.text();
+ TQStringList dim = TQStringList::split(",", csv);
x = dim[0].toInt();
y = dim[1].toInt();
w = dim[2].toInt();
@@ -3238,8 +3238,8 @@ bool UMLView::loadUisDiagramPresentation(QDomElement & qElement) {
} else if (Uml::tagEq(tag, "Presentation.style")) {
// TBD
} else if (Uml::tagEq(tag, "Presentation.model")) {
- QDomNode mnode = e.firstChild();
- QDomElement melem = mnode.toElement();
+ TQDomNode mnode = e.firstChild();
+ TQDomElement melem = mnode.toElement();
idStr = melem.attribute("xmi.idref", "");
} else {
kDebug() << "UMLView::uisLoadFromXMI: ignoring tag "
@@ -3312,23 +3312,23 @@ bool UMLView::loadUisDiagramPresentation(QDomElement & qElement) {
return true;
}
-bool UMLView::loadUISDiagram(QDomElement & qElement) {
- QString idStr = qElement.attribute( "xmi.id", "" );
+bool UMLView::loadUISDiagram(TQDomElement & qElement) {
+ TQString idStr = qElement.attribute( "xmi.id", "" );
if (idStr.isEmpty())
return false;
m_nID = STR2ID(idStr);
UMLListViewItem *ulvi = NULL;
- for (QDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ for (TQDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement elem = node.toElement();
- QString tag = elem.tagName();
+ TQDomElement elem = node.toElement();
+ TQString tag = elem.tagName();
if (tag == "uisDiagramName") {
setName( elem.text() );
if (ulvi)
ulvi->setText( getName() );
} else if (tag == "uisDiagramStyle") {
- QString diagramStyle = elem.text();
+ TQString diagramStyle = elem.text();
if (diagramStyle != "ClassDiagram") {
kError() << "UMLView::uisLoadFromXMI: diagram style " << diagramStyle
<< " is not yet implemented" << endl;
diff --git a/umbrello/umbrello/umlview.h b/umbrello/umbrello/umlview.h
index 99a39198..0a74331f 100644
--- a/umbrello/umbrello/umlview.h
+++ b/umbrello/umbrello/umlview.h
@@ -18,8 +18,8 @@
// system includes
#include <kurl.h>
-#include <qdom.h>
-#include <qcanvas.h>
+#include <tqdom.h>
+#include <tqcanvas.h>
//local includes
#include "umlobjectlist.h"
@@ -49,15 +49,15 @@ class ToolBarStateFactory;
/**
* UMLView instances represent diagrams.
- * The UMLApp instance manages a QWidgetStack of UMLView instances.
+ * The UMLApp instance manages a TQWidgetStack of UMLView instances.
* The visible diagram is at the top of stack.
- * The UMLView class inherits from QCanvasView and it owns the
- * objects displayed on its related QCanvas (see m_WidgetList.)
+ * The UMLView class inherits from TQCanvasView and it owns the
+ * objects displayed on its related TQCanvas (see m_WidgetList.)
*
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLView : public QCanvasView {
+class UMLView : public TQCanvasView {
Q_OBJECT
public:
friend class UMLViewImageExporterModel;
@@ -91,26 +91,26 @@ public:
/**
* Return the documentation of the diagram.
*/
- QString getDoc() const {
+ TQString getDoc() const {
return m_Documentation;
}
/**
* Set the documentation of the diagram.
*/
- void setDoc( const QString &doc ) {
+ void setDoc( const TQString &doc ) {
m_Documentation = doc;
}
/**
* Return the name of the diagram.
*/
- QString getName() const;
+ TQString getName() const;
/**
* Set the name of the diagram.
*/
- void setName(const QString &name);
+ void setName(const TQString &name);
/**
* Returns the type of the diagram.
@@ -129,26 +129,26 @@ public:
/**
* Returns the fill color to use.
*/
- QColor getFillColor() const;
+ TQColor getFillColor() const;
/**
* Set the background color.
*
* @param color The color to use.
*/
- void setFillColor( const QColor &color );
+ void setFillColor( const TQColor &color );
/**
* Returns the line color to use.
*/
- QColor getLineColor() const;
+ TQColor getLineColor() const;
/**
* Sets the line color.
*
* @param color The color to use.
*/
- void setLineColor( const QColor &color );
+ void setLineColor( const TQColor &color );
/**
* Returns the line width to use.
@@ -287,12 +287,12 @@ public:
/**
* Returns the font to use
*/
- QFont getFont() const;
+ TQFont getFont() const;
/**
* Sets the font for the view and optionally all the widgets on the view.
*/
- void setFont(QFont font, bool changeAllWidgets = false);
+ void setFont(TQFont font, bool changeAllWidgets = false);
/**
* Returns whether to show operation signatures.
@@ -350,17 +350,17 @@ public:
/**
* contains the implementation for printing functionality
*/
- void print(KPrinter *pPrinter, QPainter & pPainter);
+ void print(KPrinter *pPrinter, TQPainter & pPainter);
/**
* Overrides the standard operation.
*/
- void hideEvent(QHideEvent *he);
+ void hideEvent(TQHideEvent *he);
/**
* Overrides the standard operation.
*/
- void showEvent(QShowEvent *se);
+ void showEvent(TQShowEvent *se);
/**
* Sees if a message is relevant to the given widget. If it does delete it.
@@ -411,7 +411,7 @@ public:
* @return Returns the widget found, returns 0 if no widget found.
*/
AssociationWidget * findAssocWidget(UMLWidget *pWidgetA,
- UMLWidget *pWidgetB, const QString& roleNameB);
+ UMLWidget *pWidgetB, const TQString& roleNameB);
/**
* Remove a widget from view.
@@ -426,7 +426,7 @@ public:
* @param w The widget to set to selected.
* @param me The mouse event containing the information about the selection.
*/
- void setSelected(UMLWidget * w, QMouseEvent * me);
+ void setSelected(UMLWidget * w, TQMouseEvent * me);
/**
* Clear the selected widgets list.
@@ -461,12 +461,12 @@ public:
/**
* Set the font for all the currently selected items.
*/
- void selectionSetFont( const QFont &font );
+ void selectionSetFont( const TQFont &font );
/**
* Set the line color for all the currently selected items.
*/
- void selectionSetLineColor( const QColor &color );
+ void selectionSetLineColor( const TQColor &color );
/**
* Set the line width for all the currently selected items.
@@ -476,7 +476,7 @@ public:
/**
* Set the fill color for all the currently selected items.
*/
- void selectionSetFillColor( const QColor &color );
+ void selectionSetFillColor( const TQColor &color );
/**
* Toggles the show setting sel of all selected items.
@@ -518,7 +518,7 @@ public:
/**
* Get the pos variable. Used internally to keep track of the cursor.
*/
- QPoint & getPos() {
+ TQPoint & getPos() {
return m_Pos;
}
@@ -527,7 +527,7 @@ public:
*
* @param _pos The position to set to.
*/
- void setPos(const QPoint &_pos) {
+ void setPos(const TQPoint &_pos) {
m_Pos = _pos;
}
@@ -654,17 +654,17 @@ public:
* @param rect the area of the diagram to copy
* @param diagram the class to store PNG picture of the paste operation.
*/
- void getDiagram(const QRect &rect, QPixmap & diagram);
+ void getDiagram(const TQRect &rect, TQPixmap & diagram);
/**
* Paint diagram to the paint device
*/
- void getDiagram(const QRect &area, QPainter & painter);
+ void getDiagram(const TQRect &area, TQPainter & painter);
/**
* Returns the PNG picture of the paste operation.
*/
- void copyAsImage(QPixmap*& pix);
+ void copyAsImage(TQPixmap*& pix);
/**
* Returns the imageExporter used to export the view.
@@ -697,7 +697,7 @@ public:
* Only call this straight after the event, the value won't stay valid.
* Should only be called by Assoc widgets at the moment. no one else needs it.
*/
- QPoint getPastePoint();
+ TQPoint getPastePoint();
/**
* Reset the paste point.
@@ -828,22 +828,22 @@ public:
/**
* Creates the "diagram" tag and fills it with the contents of the diagram.
*/
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads the "diagram" tag.
*/
- virtual bool loadFromXMI( QDomElement & qElement );
+ virtual bool loadFromXMI( TQDomElement & qElement );
/**
* Loads the "UISDiagram" tag of Unisys.IntegratePlus.2 generated files.
*/
- bool loadUISDiagram(QDomElement & qElement);
+ bool loadUISDiagram(TQDomElement & qElement);
/**
* Loads a "widget" element from XMI, used by loadFromXMI() and the clipboard.
*/
- UMLWidget* loadWidgetFromXMI(QDomElement& widgetElement);
+ UMLWidget* loadWidgetFromXMI(TQDomElement& widgetElement);
/**
* Add an object to the application, and update the view.
@@ -862,7 +862,7 @@ public:
* @return The widget thats line was clicked on.
* Returns 0 if no line was clicked on.
*/
- ObjectWidget * onWidgetLine( const QPoint &point );
+ ObjectWidget * onWidgetLine( const TQPoint &point );
/**
* Return pointer to the first selected widget (for multi-selection)
@@ -878,7 +878,7 @@ public:
* Returns NULL if the point is not inside any widget.
* Does not use or modify the m_pOnWidget member.
*/
- UMLWidget *getWidgetAt(const QPoint& p);
+ UMLWidget *getWidgetAt(const TQPoint& p);
/**
* Initialize and announce a newly created widget.
@@ -916,13 +916,13 @@ protected:
// Methods and members related to loading/saving
- bool loadWidgetsFromXMI( QDomElement & qElement );
+ bool loadWidgetsFromXMI( TQDomElement & qElement );
- bool loadMessagesFromXMI( QDomElement & qElement );
+ bool loadMessagesFromXMI( TQDomElement & qElement );
- bool loadAssociationsFromXMI( QDomElement & qElement );
+ bool loadAssociationsFromXMI( TQDomElement & qElement );
- bool loadUisDiagramPresentation(QDomElement & qElement);
+ bool loadUisDiagramPresentation(TQDomElement & qElement);
/**
* Contains the unique ID to allocate to a widget that needs an
@@ -943,12 +943,12 @@ protected:
/**
* The name of the diagram.
*/
- QString m_Name;
+ TQString m_Name;
/**
* The documentation of the diagram.
*/
- QString m_Documentation;
+ TQString m_Documentation;
/**
* Options used by view
@@ -1017,17 +1017,17 @@ protected:
/**
* Override standard method.
*/
- void closeEvent ( QCloseEvent * e );
+ void closeEvent ( TQCloseEvent * e );
/**
* Override standard method.
*/
- void contentsDragEnterEvent(QDragEnterEvent* mouseEvent);
+ void contentsDragEnterEvent(TQDragEnterEvent* mouseEvent);
/**
* Override standard method.
*/
- void contentsDropEvent(QDropEvent* mouseEvent);
+ void contentsDropEvent(TQDropEvent* mouseEvent);
/**
@@ -1035,7 +1035,7 @@ protected:
*
* @return Returns the smallest area to print.
*/
- QRect getDiagramRect();
+ TQRect getDiagramRect();
/**
@@ -1047,25 +1047,25 @@ protected:
* Overrides the standard operation.
* Calls the same method in the current tool bar state.
*/
- void contentsMouseReleaseEvent(QMouseEvent* mouseEvent);
+ void contentsMouseReleaseEvent(TQMouseEvent* mouseEvent);
/**
* Overrides the standard operation.
* Calls the same method in the current tool bar state.
*/
- void contentsMouseMoveEvent(QMouseEvent* mouseEvent);
+ void contentsMouseMoveEvent(TQMouseEvent* mouseEvent);
/**
* Override standard method.
* Calls the same method in the current tool bar state.
*/
- void contentsMouseDoubleClickEvent(QMouseEvent* mouseEvent);
+ void contentsMouseDoubleClickEvent(TQMouseEvent* mouseEvent);
/**
* Override standard method.
* Calls the same method in the current tool bar state.
*/
- void contentsMousePressEvent(QMouseEvent* mouseEvent);
+ void contentsMousePressEvent(TQMouseEvent* mouseEvent);
/**
@@ -1106,14 +1106,14 @@ protected:
void findMaxBoundingRectangle(const FloatingTextWidget* ft,
int& px, int& py, int& qx, int& qy);
- void forceUpdateWidgetFontMetrics(QPainter *painter);
+ void forceUpdateWidgetFontMetrics(TQPainter *painter);
/**
* Used for creating unique name of collaboration messages.
*/
int m_nCollaborationId;
- QPoint m_Pos;
+ TQPoint m_Pos;
bool m_bCreateObject, m_bDrawSelectedOnly, m_bPaste;
ListPopupMenu * m_pMenu;
UMLWidgetList m_SelectedList;
@@ -1159,7 +1159,7 @@ private:
/**
* The offset at which to paste the clipboard.
*/
- QPoint m_PastePoint;
+ TQPoint m_PastePoint;
/**
* Pointer to the UMLDoc
@@ -1226,7 +1226,7 @@ public slots:
void slotShowView();
/**
- * Overrides standard method from QWidget to resize canvas when
+ * Overrides standard method from TQWidget to resize canvas when
* it's shown.
*/
void show();
diff --git a/umbrello/umbrello/umlviewcanvas.cpp b/umbrello/umbrello/umlviewcanvas.cpp
index 15de4169..134bdf47 100644
--- a/umbrello/umbrello/umlviewcanvas.cpp
+++ b/umbrello/umbrello/umlviewcanvas.cpp
@@ -13,20 +13,20 @@
#include "umlviewcanvas.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
// app includes
#include "umlview.h"
-UMLViewCanvas::UMLViewCanvas( UMLView * pView ) : QCanvas( pView ) {
+UMLViewCanvas::UMLViewCanvas( UMLView * pView ) : TQCanvas( pView ) {
m_pView = pView;
}
UMLViewCanvas::~UMLViewCanvas() {}
-void UMLViewCanvas::drawBackground( QPainter & painter, const QRect & clip ) {
- QCanvas::drawBackground( painter, clip );
+void UMLViewCanvas::drawBackground( TQPainter & painter, const TQRect & clip ) {
+ TQCanvas::drawBackground( painter, clip );
if( m_pView -> getShowSnapGrid() ) {
painter.setPen( Qt::gray );
int gridX = m_pView -> getSnapX();
diff --git a/umbrello/umbrello/umlviewcanvas.h b/umbrello/umbrello/umlviewcanvas.h
index 78d7d4dd..6fb39e4e 100644
--- a/umbrello/umbrello/umlviewcanvas.h
+++ b/umbrello/umbrello/umlviewcanvas.h
@@ -12,7 +12,7 @@
#ifndef UMLVIEWCANVAS_H
#define UMLVIEWCANVAS_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
/**
*@author Paul Hensgen
@@ -20,7 +20,7 @@
*/
class UMLView;
-class UMLViewCanvas : public QCanvas {
+class UMLViewCanvas : public TQCanvas {
public:
/**
* Constructor
@@ -37,7 +37,7 @@ protected:
/**
* Overrides default method.
*/
- virtual void drawBackground( QPainter & painter, const QRect & clip );
+ virtual void drawBackground( TQPainter & painter, const TQRect & clip );
/**
* The view the canvas is associated with.
diff --git a/umbrello/umbrello/umlviewimageexporter.cpp b/umbrello/umbrello/umlviewimageexporter.cpp
index 251d0ffb..4c474751 100644
--- a/umbrello/umbrello/umlviewimageexporter.cpp
+++ b/umbrello/umbrello/umlviewimageexporter.cpp
@@ -13,8 +13,8 @@
#include "umlviewimageexporter.h"
// include files for Qt
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
//kde include files
#include <klocale.h>
@@ -44,7 +44,7 @@ void UMLViewImageExporter::exportView() {
// export the view
app->getDocument()->writeToStatusBar(i18n("Exporting view..."));
- QString error = UMLViewImageExporterModel().exportView(m_view,
+ TQString error = UMLViewImageExporterModel().exportView(m_view,
UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType), m_imageURL);
if (!error.isNull()) {
KMessageBox::error(app, i18n("An error happened when exporting the image:\n") + error);
@@ -80,7 +80,7 @@ bool UMLViewImageExporter::getParametersFromUser() {
UMLApp *app = UMLApp::app();
// configure & show the file dialog
- KFileDialog fileDialog(QString::null, QString::null, m_view,
+ KFileDialog fileDialog(TQString::null, TQString::null, m_view,
":export-image", true);
prepareFileDialog(fileDialog);
fileDialog.exec();
@@ -95,9 +95,9 @@ bool UMLViewImageExporter::getParametersFromUser() {
m_imageURL = fileDialog.selectedURL();
// check if the extension is the extension of the mime type
- QFileInfo info(m_imageURL.filename());
- QString ext = info.extension(false);
- QString extDef = UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType);
+ TQFileInfo info(m_imageURL.filename());
+ TQString ext = info.extension(false);
+ TQString extDef = UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType);
if(ext != extDef) {
m_imageURL.setFileName(m_imageURL.fileName() + '.' + extDef);
}
@@ -107,7 +107,7 @@ bool UMLViewImageExporter::getParametersFromUser() {
void UMLViewImageExporter::prepareFileDialog(KFileDialog &fileDialog) {
// get all supported mime types
- QStringList mimeTypes = UMLViewImageExporterModel::supportedMimeTypes();
+ TQStringList mimeTypes = UMLViewImageExporterModel::supportedMimeTypes();
fileDialog.setCaption(i18n("Save As"));
fileDialog.setOperationMode(KFileDialog::Saving);
diff --git a/umbrello/umbrello/umlviewimageexporter.h b/umbrello/umbrello/umlviewimageexporter.h
index 2400213b..5ea1def1 100644
--- a/umbrello/umbrello/umlviewimageexporter.h
+++ b/umbrello/umbrello/umlviewimageexporter.h
@@ -12,7 +12,7 @@
#ifndef UMLVIEWIMAGEEXPORTER_H
#define UMLVIEWIMAGEEXPORTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
class UMLView;
@@ -67,7 +67,7 @@ public:
*
* @return The mime type used to save the image.
*/
- QString getImageMimeType() const {
+ TQString getImageMimeType() const {
return m_imageMimeType;
}
@@ -86,7 +86,7 @@ private:
/**
* The mime type used to save the image.
*/
- QString m_imageMimeType;
+ TQString m_imageMimeType;
/**
* Shows a save file dialog to the user to get the parameters used
diff --git a/umbrello/umbrello/umlviewimageexporterall.cpp b/umbrello/umbrello/umlviewimageexporterall.cpp
index fceb6aa3..9f80dad1 100644
--- a/umbrello/umbrello/umlviewimageexporterall.cpp
+++ b/umbrello/umbrello/umlviewimageexporterall.cpp
@@ -13,9 +13,9 @@
#include "umlviewimageexporterall.h"
// include files for Qt
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
// kde include files
#include <klocale.h>
@@ -48,7 +48,7 @@ void UMLViewImageExporterAll::exportAllViews() {
m_dialog->m_kURL->setURL(umlDoc->URL().directory());
}
- if (m_dialog->exec() == QDialog::Rejected) {
+ if (m_dialog->exec() == TQDialog::Rejected) {
return;
}
@@ -56,15 +56,15 @@ void UMLViewImageExporterAll::exportAllViews() {
// export all views
umlDoc->writeToStatusBar(i18n("Exporting all views..."));
- QStringList errors = UMLViewImageExporterModel().exportAllViews(
+ TQStringList errors = UMLViewImageExporterModel().exportAllViews(
UMLViewImageExporterModel::mimeTypeToImageType(m_dialog->m_imageType->currentFilter()),
KURL(m_dialog->m_kURL->url()), m_dialog->m_useFolders->isChecked());
if (!errors.empty()) {
#if KDE_IS_VERSION(3,4,0)
KMessageBox::errorList(app, i18n("Some errors happened when exporting the images:"), errors);
#else
- QString errorsCaption;
- for (QStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
+ TQString errorsCaption;
+ for (TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
errorsCaption += "\n" + *it;
}
KMessageBox::error(app, i18n("Some errors happened when exporting the images:") + errorsCaption);
diff --git a/umbrello/umbrello/umlviewimageexportermodel.cpp b/umbrello/umbrello/umlviewimageexportermodel.cpp
index e829a3f7..7f34c104 100644
--- a/umbrello/umbrello/umlviewimageexportermodel.cpp
+++ b/umbrello/umbrello/umlviewimageexportermodel.cpp
@@ -16,14 +16,14 @@
#include <math.h>
// include files for Qt
-#include <qstringlist.h>
-#include <qrect.h>
-#include <qimage.h>
-#include <qpicture.h>
-#include <qpainter.h>
-#include <qprinter.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
+#include <tqimage.h>
+#include <tqpicture.h>
+#include <tqpainter.h>
+#include <tqprinter.h>
+#include <tqdir.h>
+#include <tqregexp.h>
// kde include files
#include <kdebug.h>
@@ -39,30 +39,30 @@
#include "umllistview.h"
#include "umllistviewitem.h"
-static QStringList supportedImageTypesList;
-static QStringList supportedMimeTypesList;
+static TQStringList supportedImageTypesList;
+static TQStringList supportedMimeTypesList;
-QStringList UMLViewImageExporterModel::supportedImageTypes() {
+TQStringList UMLViewImageExporterModel::supportedImageTypes() {
if (!supportedImageTypesList.size()) {
// specific supported formats
supportedImageTypesList << "eps";
supportedImageTypesList << "svg";
// QT supported formats
- QStrList qImageFormats = QImage::outputFormats();
+ TQStrList qImageFormats = TQImage::outputFormats();
for (const char* format = qImageFormats.first(); format; format = qImageFormats.next()) {
- supportedImageTypesList << QString(format).lower();
+ supportedImageTypesList << TQString(format).lower();
}
}
return supportedImageTypesList;
}
-QStringList UMLViewImageExporterModel::supportedMimeTypes() {
+TQStringList UMLViewImageExporterModel::supportedMimeTypes() {
if (!supportedMimeTypesList.size()) {
- QStringList imageTypes = UMLViewImageExporterModel::supportedImageTypes();
- for(QStringList::Iterator it = imageTypes.begin(); it != imageTypes.end(); ++it ) {
- QString mimeType = imageTypeToMimeType(*it);
+ TQStringList imageTypes = UMLViewImageExporterModel::supportedImageTypes();
+ for(TQStringList::Iterator it = imageTypes.begin(); it != imageTypes.end(); ++it ) {
+ TQString mimeType = imageTypeToMimeType(*it);
if (!mimeType.isNull())
supportedMimeTypesList.append(mimeType);
}
@@ -71,47 +71,47 @@ QStringList UMLViewImageExporterModel::supportedMimeTypes() {
return supportedMimeTypesList;
}
-QString UMLViewImageExporterModel::imageTypeToMimeType(const QString& imageType) {
- const QString imgType = imageType.lower();
- if (QString("bmp") == imgType) return "image/x-bmp";
- if (QString("jpeg") == imgType) return "image/jpeg";
- if (QString("pbm") == imgType) return "image/x-portable-bitmap";
- if (QString("pgm") == imgType) return "image/x-portable-greymap";
- if (QString("png") == imgType) return "image/png";
- if (QString("ppm") == imgType) return "image/x-portable-pixmap";
- if (QString("xbm") == imgType) return "image/x-xbm";
- if (QString("xpm") == imgType) return "image/x-xpm";
- if (QString("eps") == imgType) return "image/x-eps";
- if (QString("svg") == imgType) return "image/svg+xml";
- return QString::null;
+TQString UMLViewImageExporterModel::imageTypeToMimeType(const TQString& imageType) {
+ const TQString imgType = imageType.lower();
+ if (TQString("bmp") == imgType) return "image/x-bmp";
+ if (TQString("jpeg") == imgType) return "image/jpeg";
+ if (TQString("pbm") == imgType) return "image/x-portable-bitmap";
+ if (TQString("pgm") == imgType) return "image/x-portable-greymap";
+ if (TQString("png") == imgType) return "image/png";
+ if (TQString("ppm") == imgType) return "image/x-portable-pixmap";
+ if (TQString("xbm") == imgType) return "image/x-xbm";
+ if (TQString("xpm") == imgType) return "image/x-xpm";
+ if (TQString("eps") == imgType) return "image/x-eps";
+ if (TQString("svg") == imgType) return "image/svg+xml";
+ return TQString::null;
}
-QString UMLViewImageExporterModel::mimeTypeToImageType(const QString& mimeType) {
- if (QString("image/x-bmp") == mimeType) return "bmp";
- if (QString("image/jpeg") == mimeType) return "jpeg";
- if (QString("image/x-portable-bitmap") == mimeType) return "pbm";
- if (QString("image/x-portable-greymap") == mimeType) return "pgm";
- if (QString("image/png") == mimeType) return "png";
- if (QString("image/x-portable-pixmap") == mimeType) return "ppm";
- if (QString("image/x-xbm") == mimeType) return "xbm";
- if (QString("image/x-xpm") == mimeType) return "xpm";
- if (QString("image/x-eps") == mimeType) return "eps";
- if (QString("image/svg+xml") == mimeType) return "svg";
- return QString::null;
+TQString UMLViewImageExporterModel::mimeTypeToImageType(const TQString& mimeType) {
+ if (TQString("image/x-bmp") == mimeType) return "bmp";
+ if (TQString("image/jpeg") == mimeType) return "jpeg";
+ if (TQString("image/x-portable-bitmap") == mimeType) return "pbm";
+ if (TQString("image/x-portable-greymap") == mimeType) return "pgm";
+ if (TQString("image/png") == mimeType) return "png";
+ if (TQString("image/x-portable-pixmap") == mimeType) return "ppm";
+ if (TQString("image/x-xbm") == mimeType) return "xbm";
+ if (TQString("image/x-xpm") == mimeType) return "xpm";
+ if (TQString("image/x-eps") == mimeType) return "eps";
+ if (TQString("image/svg+xml") == mimeType) return "svg";
+ return TQString::null;
}
-QStringList UMLViewImageExporterModel::exportAllViews(const QString &imageType, const KURL &directory, bool useFolders) const {
+TQStringList UMLViewImageExporterModel::exportAllViews(const TQString &imageType, const KURL &directory, bool useFolders) const {
UMLApp *app = UMLApp::app();
// contains all the error messages returned by exportView calls
- QStringList errors;
+ TQStringList errors;
UMLViewList views = app->getDocument()->getViewIterator();
for(UMLView *view = views.first(); view; view = views.next()) {
KURL url = directory;
url.addPath(getDiagramFileName(view, imageType, useFolders));
- QString returnString = exportView(view, imageType, url);
+ TQString returnString = exportView(view, imageType, url);
if (!returnString.isNull()) {
errors.append(view->getName() + ": " + returnString);
}
@@ -120,7 +120,7 @@ QStringList UMLViewImageExporterModel::exportAllViews(const QString &imageType,
return errors;
}
-QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imageType, const KURL &url) const {
+TQString UMLViewImageExporterModel::exportView(UMLView* view, const TQString &imageType, const KURL &url) const {
// create the needed directories
if (!prepareDirectory(url)) {
return i18n("Can not create directory: %1").arg(url.directory());
@@ -129,7 +129,7 @@ QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imag
// The fileName will be used when exporting the image. If the url isn't local,
// the fileName is the name of a temporal local file to export the image to, and then
// upload it to its destiny
- QString fileName;
+ TQString fileName;
// tmpFile needs to be unlinked before exiting the method!!!
KTempFile tmpFile;
if (url.isLocalFile()) {
@@ -139,7 +139,7 @@ QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imag
}
// check that the diagram isn't empty
- QRect rect = view->getDiagramRect();
+ TQRect rect = view->getDiagramRect();
if (rect.isEmpty()) {
tmpFile.unlink();
return i18n("Can not save an empty diagram");
@@ -160,11 +160,11 @@ QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imag
} //!isLocalFile
tmpFile.unlink();
- return QString::null;
+ return TQString::null;
}
-QString UMLViewImageExporterModel::getDiagramFileName(UMLView *view, const QString &imageType, bool useFolders /* = false */) const {
- QString name = view->getName() + '.' + imageType.lower();
+TQString UMLViewImageExporterModel::getDiagramFileName(UMLView *view, const TQString &imageType, bool useFolders /* = false */) const {
+ TQString name = view->getName() + '.' + imageType.lower();
if (!useFolders) {
return name;
@@ -194,8 +194,8 @@ bool UMLViewImageExporterModel::prepareDirectory(const KURL &url) const {
directory.setPath("");
// creates the directory and any needed parent directories
- QStringList dirs = QStringList::split(QDir::separator(), url.directory());
- for (QStringList::ConstIterator it = dirs.begin() ; it != dirs.end(); ++it ) {
+ TQStringList dirs = TQStringList::split(TQDir::separator(), url.directory());
+ for (TQStringList::ConstIterator it = dirs.begin() ; it != dirs.end(); ++it ) {
directory.addPath(*it);
if (!KIO::NetAccess::exists(directory, true, UMLApp::app())) {
@@ -209,11 +209,11 @@ bool UMLViewImageExporterModel::prepareDirectory(const KURL &url) const {
return true;
}
-bool UMLViewImageExporterModel::exportViewTo(UMLView* view, const QString &imageType, const QString &fileName) const {
+bool UMLViewImageExporterModel::exportViewTo(UMLView* view, const TQString &imageType, const TQString &fileName) const {
// remove 'blue squares' from exported picture.
view->clearSelected();
- QString imageMimeType = UMLViewImageExporterModel::imageTypeToMimeType(imageType);
+ TQString imageMimeType = UMLViewImageExporterModel::imageTypeToMimeType(imageType);
if (imageMimeType == "image/x-eps") {
if (!exportViewToEps(view, fileName, true)) {
return false;
@@ -231,7 +231,7 @@ bool UMLViewImageExporterModel::exportViewTo(UMLView* view, const QString &image
return true;
}
-bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const QString &fileName, bool isEPS) const {
+bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const TQString &fileName, bool isEPS) const {
bool exportSuccessful = true;
// print the image to a normal postscript file,
@@ -241,27 +241,27 @@ bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const QString &fi
// because we want to work with postscript
// user-coordinates, set to the resolution
// of the printer (which should be 72dpi here)
- QPrinter *printer;
+ TQPrinter *printer;
if (isEPS == false) {
- printer = new QPrinter(QPrinter::PrinterResolution);
+ printer = new TQPrinter(TQPrinter::PrinterResolution);
} else {
- printer = new QPrinter(QPrinter::ScreenResolution);
+ printer = new TQPrinter(TQPrinter::ScreenResolution);
}
printer->setOutputToFile(true);
printer->setOutputFileName(fileName);
- printer->setColorMode(QPrinter::Color);
+ printer->setColorMode(TQPrinter::Color);
// do not call printer.setup(); because we want no user
// interaction here
- QPainter *painter = new QPainter(printer);
+ TQPainter *painter = new TQPainter(printer);
// make sure the widget sizes will be according to the
// actually used printer font, important for getDiagramRect()
// and the actual painting
view->forceUpdateWidgetFontMetrics(painter);
- QRect rect = view->getDiagramRect();
+ TQRect rect = view->getDiagramRect();
painter->translate(-rect.x(),-rect.y());
view->getDiagram(rect,*painter);
@@ -282,19 +282,19 @@ bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const QString &fi
return exportSuccessful;
}
-bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRect& rect) const {
+bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& rect) const {
// now open the file and make a correct eps out of it
- QFile epsfile(fileName);
+ TQFile epsfile(fileName);
if (! epsfile.open(IO_ReadOnly)) {
return false;
}
// read
- QTextStream ts(&epsfile);
- QString fileContent = ts.read();
+ TQTextStream ts(&epsfile);
+ TQString fileContent = ts.read();
epsfile.close();
// read information
- QRegExp rx("%%BoundingBox:\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)");
+ TQRegExp rx("%%BoundingBox:\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)");
const int pos = rx.search(fileContent);
if (pos < 0) {
kError() << "UMLViewImageExporterModel::fixEPS(" << fileName
@@ -320,7 +320,7 @@ bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRect& rec
// modify content
fileContent.replace(pos,rx.cap(0).length(),
- QString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top));
+ TQString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top));
ts << fileContent;
epsfile.close();
@@ -328,14 +328,14 @@ bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRect& rec
return true;
}
-bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const QString &fileName) const {
+bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const TQString &fileName) const {
bool exportSuccesful;
- QPicture* diagram = new QPicture();
+ TQPicture* diagram = new TQPicture();
// do not call printer.setup(); because we want no user
// interaction here
- QPainter* painter = new QPainter();
+ TQPainter* painter = new TQPainter();
painter->begin( diagram );
// make sure the widget sizes will be according to the
@@ -343,11 +343,11 @@ bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const QString &fi
// and the actual painting
view->forceUpdateWidgetFontMetrics(painter);
- QRect rect = view->getDiagramRect();
+ TQRect rect = view->getDiagramRect();
painter->translate(-rect.x(),-rect.y());
view->getDiagram(rect,*painter);
painter->end();
- exportSuccesful = diagram->save(fileName, QString("SVG").ascii());
+ exportSuccesful = diagram->save(fileName, TQString("SVG").ascii());
// delete painter and printer before we try to open and fix the file
delete painter;
@@ -358,9 +358,9 @@ bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const QString &fi
return exportSuccesful;
}
-bool UMLViewImageExporterModel::exportViewToPixmap(UMLView* view, const QString &imageType, const QString &fileName) const {
- QRect rect = view->getDiagramRect();
- QPixmap diagram(rect.width(), rect.height());
+bool UMLViewImageExporterModel::exportViewToPixmap(UMLView* view, const TQString &imageType, const TQString &fileName) const {
+ TQRect rect = view->getDiagramRect();
+ TQPixmap diagram(rect.width(), rect.height());
view->getDiagram(rect, diagram);
return diagram.save(fileName, imageType.upper().ascii());
}
diff --git a/umbrello/umbrello/umlviewimageexportermodel.h b/umbrello/umbrello/umlviewimageexportermodel.h
index d69796ac..1517d2d0 100644
--- a/umbrello/umbrello/umlviewimageexportermodel.h
+++ b/umbrello/umbrello/umlviewimageexportermodel.h
@@ -12,8 +12,8 @@
#ifndef UMLVIEWIMAGEEXPORTERMODEL_H
#define UMLVIEWIMAGEEXPORTERMODEL_H
-#include <qstringlist.h>
-#include <qrect.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
// forward declarations
class UMLView;
@@ -36,40 +36,40 @@ class UMLViewImageExporterModel {
public:
/**
- * Returns a QStringList containing all the supported image types to use when exporting.
+ * Returns a TQStringList containing all the supported image types to use when exporting.
* All the types will be lower case.
*
- * @return A QStringList containing all the supported image types to use when exporting.
+ * @return A TQStringList containing all the supported image types to use when exporting.
*/
- static QStringList supportedImageTypes();
+ static TQStringList supportedImageTypes();
/**
- * Returns a QStringList containing all the supported mime types to use when exporting.
+ * Returns a TQStringList containing all the supported mime types to use when exporting.
* All the types will be lower case.
*
- * @return A QStringList containing all the supported mime types to use when exporting.
+ * @return A TQStringList containing all the supported mime types to use when exporting.
*/
- static QStringList supportedMimeTypes();
+ static TQStringList supportedMimeTypes();
/**
* Returns the mime type for an image type.
* The supported image types are those that the diagrams can be exported to.
*
* @param imageType The type of the image.
- * @return A QString with the equivalent mime type, or QString::null if
+ * @return A TQString with the equivalent mime type, or TQString::null if
* it's unknown.
*/
- static QString imageTypeToMimeType(const QString& imageType);
+ static TQString imageTypeToMimeType(const TQString& imageType);
/**
* Returns the image type for a mime type.
* The supported image types are those that the diagrams can be exported to.
*
* @param mimeType The mime type.
- * @return A lowercase QString with the equivalent image type, or QString::null
+ * @return A lowercase TQString with the equivalent image type, or TQString::null
* if it's unknown.
*/
- static QString mimeTypeToImageType(const QString& mimeType);
+ static TQString mimeTypeToImageType(const TQString& mimeType);
/**
* Constructor for UMLViewImageExporterModel.
@@ -102,10 +102,10 @@ public:
* @param directory The url of the directory where the images will be saved.
* @param useFolders If the tree structure of the views in the document must be created
* in the target directory.
- * @return A QStringList with all the error messages that occurred during export.
+ * @return A TQStringList with all the error messages that occurred during export.
* If the list is empty, all the views were exported successfully.
*/
- QStringList exportAllViews(const QString &imageType, const KURL &directory, bool useFolders) const;
+ TQStringList exportAllViews(const TQString &imageType, const KURL &directory, bool useFolders) const;
/**
* Exports the view to the url using the 'imageType' for the image.
@@ -120,9 +120,9 @@ public:
* @param imageType The type of the image the view will be exported to.
* @param url The url where the image will be saved.
* @return The message error if some problem occurred when exporting, or
- * QString::null if all went fine.
+ * TQString::null if all went fine.
*/
- QString exportView(UMLView* view, const QString &imageType, const KURL &url) const;
+ TQString exportView(UMLView* view, const TQString &imageType, const KURL &url) const;
private:
@@ -142,7 +142,7 @@ private:
* in the file name.
* @return The name of the file where the view will be exported to.
*/
- QString getDiagramFileName(UMLView *view, const QString &imageType, bool useFolders = false) const;
+ TQString getDiagramFileName(UMLView *view, const TQString &imageType, bool useFolders = false) const;
/**
* Creates, if it doesn't exist, the directory to save the file.
@@ -163,7 +163,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewTo(UMLView* view, const QString &imageType, const QString &fileName) const;
+ bool exportViewTo(UMLView* view, const TQString &imageType, const TQString &fileName) const;
/**
* Exports the view to the file 'fileName' as EPS.
@@ -175,7 +175,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewToEps(UMLView* view, const QString &fileName, bool isEPS) const;
+ bool exportViewToEps(UMLView* view, const TQString &fileName, bool isEPS) const;
/**
* Fix the file 'fileName' to be a valid EPS containing the
@@ -185,7 +185,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool fixEPS(const QString &fileName, const QRect& rect) const;
+ bool fixEPS(const TQString &fileName, const TQRect& rect) const;
/**
* Exports the view to the file 'fileName' as SVG.
@@ -195,11 +195,11 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewToSvg(UMLView* view, const QString &fileName) const;
+ bool exportViewToSvg(UMLView* view, const TQString &fileName) const;
/**
* Exports the view to the file 'fileName' as a pixmap of the specified type.
- * The valid types are those supported by QPixmap save method.
+ * The valid types are those supported by TQPixmap save method.
*
* @param view The view to export.
* @param imageType The type of the image the view will be exported to.
@@ -207,7 +207,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewToPixmap(UMLView* view, const QString &imageType, const QString &fileName) const;
+ bool exportViewToPixmap(UMLView* view, const TQString &imageType, const TQString &fileName) const;
};
diff --git a/umbrello/umbrello/umlviewlist.h b/umbrello/umbrello/umlviewlist.h
index 90d5e199..12090c9a 100644
--- a/umbrello/umbrello/umlviewlist.h
+++ b/umbrello/umbrello/umlviewlist.h
@@ -23,7 +23,7 @@
class UMLView;
-typedef QPtrList<UMLView> UMLViewList;
-typedef QPtrListIterator<UMLView> UMLViewListIt;
+typedef TQPtrList<UMLView> UMLViewList;
+typedef TQPtrListIterator<UMLView> UMLViewListIt;
#endif
diff --git a/umbrello/umbrello/umlwidget.cpp b/umbrello/umbrello/umlwidget.cpp
index 3e947cd1..29dc2a86 100644
--- a/umbrello/umbrello/umlwidget.cpp
+++ b/umbrello/umbrello/umlwidget.cpp
@@ -12,8 +12,8 @@
// own header file
#include "umlwidget.h"
// system includes
-#include <qpainter.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <kcolordialog.h>
#include <kfontdialog.h>
@@ -42,7 +42,7 @@ using namespace Uml;
UMLWidget::UMLWidget( UMLView * view, UMLObject * o, UMLWidgetController *widgetController /* = 0*/ )
- : WidgetBase(view), QCanvasRectangle( view->canvas() ),
+ : WidgetBase(view), TQCanvasRectangle( view->canvas() ),
m_pMenu(0)
{
if (widgetController) {
@@ -53,13 +53,13 @@ UMLWidget::UMLWidget( UMLView * view, UMLObject * o, UMLWidgetController *widget
init();
m_pObject = o;
if(m_pObject) {
- connect( m_pObject, SIGNAL(modified()), this, SLOT(updateWidget()) );
+ connect( m_pObject, TQT_SIGNAL(modified()), this, TQT_SLOT(updateWidget()) );
m_nId = m_pObject->getID();
}
}
UMLWidget::UMLWidget(UMLView * view, Uml::IDType id /* = Uml::id_None */, UMLWidgetController *widgetController /* = 0*/)
- : WidgetBase(view), QCanvasRectangle( view->canvas() ),
+ : WidgetBase(view), TQCanvasRectangle( view->canvas() ),
m_pMenu(0)
{
if (widgetController) {
@@ -92,7 +92,7 @@ UMLWidget& UMLWidget::operator=(const UMLWidget& other) {
setY( other.getY() );
m_Assocs = other.m_Assocs;
m_Font = other.m_Font;
- QCanvasRectangle::setSize( other.width(), other.height() );
+ TQCanvasRectangle::setSize( other.width(), other.height() );
m_bUsesDiagramFillColour = other.m_bUsesDiagramFillColour;
m_bUsesDiagramLineColour = other.m_bUsesDiagramLineColour;
m_bUsesDiagramLineWidth = other.m_bUsesDiagramLineWidth;
@@ -167,11 +167,11 @@ bool UMLWidget::operator==(const UMLWidget& other) {
*/
}
-void UMLWidget::mouseMoveEvent(QMouseEvent* me) {
+void UMLWidget::mouseMoveEvent(TQMouseEvent* me) {
m_widgetController->mouseMoveEvent(me);
}
-void UMLWidget::mousePressEvent(QMouseEvent *me) {
+void UMLWidget::mousePressEvent(TQMouseEvent *me) {
m_widgetController->mousePressEvent(me);
}
@@ -186,19 +186,19 @@ void UMLWidget::updateWidget()
update();
}
-QSize UMLWidget::calculateSize() {
- return QSize(20, 20);
+TQSize UMLWidget::calculateSize() {
+ return TQSize(20, 20);
}
void UMLWidget::constrain(int& width, int& height) {
- const QSize minSize = calculateSize();
+ const TQSize minSize = calculateSize();
if (width < minSize.width())
width = minSize.width();
if (height < minSize.height())
height = minSize.height();
}
-void UMLWidget::mouseReleaseEvent(QMouseEvent *me) {
+void UMLWidget::mouseReleaseEvent(TQMouseEvent *me) {
m_widgetController->mouseReleaseEvent(me);
}
@@ -234,21 +234,21 @@ void UMLWidget::init() {
m_pMenu = 0;
m_pDoc = UMLApp::app()->getDocument();
m_nPosX = 0;
- connect( m_pView, SIGNAL( sigRemovePopupMenu() ), this, SLOT( slotRemovePopupMenu() ) );
- connect( m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
+ connect( m_pView, TQT_SIGNAL( sigRemovePopupMenu() ), this, TQT_SLOT( slotRemovePopupMenu() ) );
+ connect( m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
- connect( m_pView, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
- connect( m_pView, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL(sigColorChanged(Uml::IDType)), this, TQT_SLOT(slotColorChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL(sigLineWidthChanged(Uml::IDType)), this, TQT_SLOT(slotLineWidthChanged(Uml::IDType)));
- // connect( m_pView, SIGNAL(sigColorChanged(int)), this, SLOT(slotColorChanged(int)));
+ // connect( m_pView, TQT_SIGNAL(sigColorChanged(int)), this, TQT_SLOT(slotColorChanged(int)));
m_pObject = NULL;
setZ(m_origZ = 2); // default for most widgets
}
void UMLWidget::slotMenuSelection(int sel) {
- QFont font;
- QColor newColour;
+ TQFont font;
+ TQColor newColour;
const Uml::Widget_Type wt = m_Type;
UMLWidget* widget = 0; // use for select the first object properties (fill, line color)
@@ -420,7 +420,7 @@ void UMLWidget::slotLineWidthChanged(Uml::IDType viewID) {
update();
}
-void UMLWidget::mouseDoubleClickEvent( QMouseEvent * me ) {
+void UMLWidget::mouseDoubleClickEvent( TQMouseEvent * me ) {
m_widgetController->mouseDoubleClickEvent(me);
}
@@ -430,7 +430,7 @@ void UMLWidget::setUseFillColour(bool fc) {
update();
}
-void UMLWidget::setLineColor(const QColor &colour) {
+void UMLWidget::setLineColor(const TQColor &colour) {
WidgetBase::setLineColor(colour);
update();
}
@@ -440,17 +440,17 @@ void UMLWidget::setLineWidth(uint width) {
update();
}
-void UMLWidget::setFillColour(const QColor &colour) {
+void UMLWidget::setFillColour(const TQColor &colour) {
m_FillColour = colour;
m_bUsesDiagramFillColour = false;
update();
}
-void UMLWidget::drawSelected(QPainter * p, int offsetX, int offsetY) {
+void UMLWidget::drawSelected(TQPainter * p, int offsetX, int offsetY) {
int w = width();
int h = height();
int s = 4;
- QBrush brush(Qt::blue);
+ TQBrush brush(Qt::blue);
p -> fillRect(offsetX, offsetY, s, s, brush);
p -> fillRect(offsetX, offsetY + h - s, s, s, brush);
p -> fillRect(offsetX + w - s, offsetY, s, s, brush);
@@ -483,7 +483,7 @@ bool UMLWidget::activate(IDChangeLog* /*ChangeLog = 0 */) {
updateComponentSize();
if (m_pView->getPaste()) {
FloatingTextWidget * ft = 0;
- QPoint point = m_pView -> getPastePoint();
+ TQPoint point = m_pView -> getPastePoint();
int x = point.x() + getX();
int y = point.y() + getY();
x = x < 0?0:x;
@@ -598,7 +598,7 @@ void UMLWidget::showProperties() {
// back it the widget
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation( false );
- ClassPropDlg *dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this);
+ ClassPropDlg *dlg = new ClassPropDlg((TQWidget*)UMLApp::app(), this);
if (dlg->exec()) {
docwindow->showDocumentation( getUMLObject() , true );
@@ -607,7 +607,7 @@ void UMLWidget::showProperties() {
dlg->close(true); //wipe from memory
}
-void UMLWidget::startPopupMenu( const QPoint &At) {
+void UMLWidget::startPopupMenu( const TQPoint &At) {
slotRemovePopupMenu();
//if in a multi- selection to a specific m_pMenu for that
@@ -637,18 +637,18 @@ void UMLWidget::startPopupMenu( const QPoint &At) {
m_pMenu->popup(At);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
}
void UMLWidget::slotRemovePopupMenu() {
if(m_pMenu) {
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-int UMLWidget::onWidget(const QPoint & p) {
+int UMLWidget::onWidget(const TQPoint & p) {
const int w = width();
const int h = height();
const int left = getX();
@@ -669,11 +669,11 @@ void UMLWidget::moveBy(int dx, int dy) {
adjustAssocs(newX, newY);
}
-void UMLWidget::setPen(QPainter & p) {
- p.setPen( QPen(m_LineColour, m_LineWidth) );
+void UMLWidget::setPen(TQPainter & p) {
+ p.setPen( TQPen(m_LineColour, m_LineWidth) );
}
-void UMLWidget::drawShape(QPainter &p ) {
+void UMLWidget::drawShape(TQPainter &p ) {
draw( p, getX(), getY() );
}
@@ -699,7 +699,7 @@ void UMLWidget::setSelected(bool _select) {
}
m_bSelected = _select;
- const QPoint pos(getX(), getY());
+ const TQPoint pos(getX(), getY());
UMLWidget *bkgnd = m_pView->getWidgetAt(pos);
if (bkgnd && bkgnd != this && _select) {
kDebug() << "UMLWidget::setSelected: setting Z to "
@@ -723,37 +723,37 @@ void UMLWidget::slotClearAllSelected()
void UMLWidget::setView(UMLView * v) {
//remove signals from old view - was probably 0 anyway
- disconnect( m_pView, SIGNAL( sigRemovePopupMenu() ), this, SLOT( slotRemovePopupMenu() ) );
- disconnect( m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
- disconnect( m_pView, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
- disconnect( m_pView, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
+ disconnect( m_pView, TQT_SIGNAL( sigRemovePopupMenu() ), this, TQT_SLOT( slotRemovePopupMenu() ) );
+ disconnect( m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
+ disconnect( m_pView, TQT_SIGNAL(sigColorChanged(Uml::IDType)), this, TQT_SLOT(slotColorChanged(Uml::IDType)));
+ disconnect( m_pView, TQT_SIGNAL(sigLineWidthChanged(Uml::IDType)), this, TQT_SLOT(slotLineWidthChanged(Uml::IDType)));
m_pView = v;
- connect( m_pView, SIGNAL( sigRemovePopupMenu() ), this, SLOT( slotRemovePopupMenu() ) );
- connect( m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
- connect( m_pView, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
- connect( m_pView, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL( sigRemovePopupMenu() ), this, TQT_SLOT( slotRemovePopupMenu() ) );
+ connect( m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
+ connect( m_pView, TQT_SIGNAL(sigColorChanged(Uml::IDType)), this, TQT_SLOT(slotColorChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL(sigLineWidthChanged(Uml::IDType)), this, TQT_SLOT(slotLineWidthChanged(Uml::IDType)));
}
void UMLWidget::setX( int x ) {
if (!m_bIgnoreSnapToGrid) {
x = m_pView->snappedX(x);
}
- QCanvasItem::setX( (double)x );
+ TQCanvasItem::setX( (double)x );
}
void UMLWidget::setY( int y ) {
if (!m_bIgnoreSnapToGrid){
y = m_pView->snappedX(y);
}
- QCanvasItem::setY( (double)y );
+ TQCanvasItem::setY( (double)y );
}
void UMLWidget::setZ(int z) {
m_origZ = getZ();
- QCanvasItem::setZ(z);
+ TQCanvasItem::setZ(z);
}
-void UMLWidget::setName(const QString &strName) {
+void UMLWidget::setName(const TQString &strName) {
if (m_pObject)
m_pObject->setName(strName);
else
@@ -762,7 +762,7 @@ void UMLWidget::setName(const QString &strName) {
adjustAssocs( getX(), getY() );
}
-QString UMLWidget::getName() const {
+TQString UMLWidget::getName() const {
if (m_pObject)
return m_pObject->getName();
return m_Text;
@@ -817,13 +817,13 @@ void UMLWidget::setSize(int width,int height) {
height = (numY + 1) * m_pView->getSnapY();
}
- QCanvasRectangle::setSize(width,height);
+ TQCanvasRectangle::setSize(width,height);
}
void UMLWidget::updateComponentSize() {
if (m_pDoc->loading())
return;
- const QSize minSize = calculateSize();
+ const TQSize minSize = calculateSize();
const int w = minSize.width();
const int h = minSize.height();
setSize(w, h);
@@ -832,10 +832,10 @@ void UMLWidget::updateComponentSize() {
void UMLWidget::setDefaultFontMetrics(UMLWidget::FontType fontType) {
setupFontType(m_Font, fontType);
- setFontMetrics(fontType, QFontMetrics(m_Font));
+ setFontMetrics(fontType, TQFontMetrics(m_Font));
}
-void UMLWidget::setupFontType(QFont &font, UMLWidget::FontType fontType) {
+void UMLWidget::setupFontType(TQFont &font, UMLWidget::FontType fontType) {
switch(fontType){
case FT_NORMAL:
font.setBold(false);
@@ -881,30 +881,30 @@ void UMLWidget::setupFontType(QFont &font, UMLWidget::FontType fontType) {
}
}
-void UMLWidget::setDefaultFontMetrics(UMLWidget::FontType fontType, QPainter &painter) {
+void UMLWidget::setDefaultFontMetrics(UMLWidget::FontType fontType, TQPainter &painter) {
setupFontType(m_Font, fontType);
painter.setFont(m_Font);
setFontMetrics(fontType, painter.fontMetrics());
}
//FIXME this is probably the source of problems with widgets not being wide enough
-QFontMetrics &UMLWidget::getFontMetrics(UMLWidget::FontType fontType) {
+TQFontMetrics &UMLWidget::getFontMetrics(UMLWidget::FontType fontType) {
if (m_pFontMetrics[fontType] == 0) {
setDefaultFontMetrics(fontType);
}
return *m_pFontMetrics[fontType];
}
-void UMLWidget::setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm) {
+void UMLWidget::setFontMetrics(UMLWidget::FontType fontType, TQFontMetrics fm) {
delete m_pFontMetrics[fontType];
- m_pFontMetrics[fontType] = new QFontMetrics(fm);
+ m_pFontMetrics[fontType] = new TQFontMetrics(fm);
}
-QFont UMLWidget::getFont() const {
+TQFont UMLWidget::getFont() const {
return m_Font;
}
-void UMLWidget::setFont( QFont font ) {
+void UMLWidget::setFont( TQFont font ) {
m_Font = font;
forceUpdateFontMetrics(0);
if (m_pDoc->loading())
@@ -912,7 +912,7 @@ void UMLWidget::setFont( QFont font ) {
update();
}
-void UMLWidget::forceUpdateFontMetrics(QPainter *painter) {
+void UMLWidget::forceUpdateFontMetrics(TQPainter *painter) {
if (painter == 0) {
for (int i = 0; i < (int)UMLWidget::FT_INVALID; ++i) {
if (m_pFontMetrics[(UMLWidget::FontType)i]!=0)
@@ -938,10 +938,10 @@ bool UMLWidget::getShowStereotype() const {
return m_bShowStereotype;
}
-void UMLWidget::moveEvent(QMoveEvent* /*me*/) {
+void UMLWidget::moveEvent(TQMoveEvent* /*me*/) {
}
-void UMLWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
+void UMLWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
/*
Call after required actions in child class.
Type must be set in the child class.
@@ -969,31 +969,31 @@ void UMLWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.setAttribute("showstereotype", m_bShowStereotype);
}
-bool UMLWidget::loadFromXMI( QDomElement & qElement ) {
+bool UMLWidget::loadFromXMI( TQDomElement & qElement ) {
WidgetBase::loadFromXMI(qElement);
- QString id = qElement.attribute( "xmi.id", "-1" );
- QString font = qElement.attribute( "font", "" );
- QString usefillcolor = qElement.attribute( "usefillcolor", "1" );
- QString x = qElement.attribute( "x", "0" );
- QString y = qElement.attribute( "y", "0" );
- QString h = qElement.attribute( "height", "0" );
- QString w = qElement.attribute( "width", "0" );
+ TQString id = qElement.attribute( "xmi.id", "-1" );
+ TQString font = qElement.attribute( "font", "" );
+ TQString usefillcolor = qElement.attribute( "usefillcolor", "1" );
+ TQString x = qElement.attribute( "x", "0" );
+ TQString y = qElement.attribute( "y", "0" );
+ TQString h = qElement.attribute( "height", "0" );
+ TQString w = qElement.attribute( "width", "0" );
/*
For the next three *color attributes, there was a mixup of american and english spelling for "color".
So first we need to keep backward compatibility and try to retrieve the *colour attribute.
Next we overwrite this value if we find a *color, otherwise the former *colour is kept.
*/
- QString fillColour = qElement.attribute( "fillcolour", "none" );
+ TQString fillColour = qElement.attribute( "fillcolour", "none" );
fillColour = qElement.attribute( "fillcolor", fillColour );
- QString usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolour", "1" );
+ TQString usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolour", "1" );
usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolor", usesDiagramFillColour );
- QString usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolour", "1" );
+ TQString usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolour", "1" );
usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolor", usesDiagramUseFillColour );
m_nId = STR2ID(id);
if( !font.isEmpty() ) {
- //QFont newFont;
+ //TQFont newFont;
m_Font.fromString(font);
//setFont(newFont);
} else {
@@ -1008,12 +1008,12 @@ bool UMLWidget::loadFromXMI( QDomElement & qElement ) {
setX( x.toInt() );
setY( y.toInt() );
if (fillColour != "none") {
- m_FillColour = QColor(fillColour);
+ m_FillColour = TQColor(fillColour);
}
- QString isinstance = qElement.attribute("isinstance", "0");
+ TQString isinstance = qElement.attribute("isinstance", "0");
m_bIsInstance = (bool)isinstance.toInt();
m_instanceName = qElement.attribute("instancename", "");
- QString showstereo = qElement.attribute("showstereotype", "0");
+ TQString showstereo = qElement.attribute("showstereotype", "0");
m_bShowStereotype = (bool)showstereo.toInt();
return true;
}
diff --git a/umbrello/umbrello/umlwidget.h b/umbrello/umbrello/umlwidget.h
index 7ed472a9..0b96d5b2 100644
--- a/umbrello/umbrello/umlwidget.h
+++ b/umbrello/umbrello/umlwidget.h
@@ -12,9 +12,9 @@
#ifndef UMLWIDGET_H
#define UMLWIDGET_H
-#include <qcanvas.h>
-#include <qdatetime.h>
-#include <qfont.h>
+#include <tqcanvas.h>
+#include <tqdatetime.h>
+#include <tqfont.h>
#include "umlnamespace.h"
#include "widgetbase.h"
@@ -40,7 +40,7 @@ class QFontMetrics;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLWidget : public WidgetBase, public QCanvasRectangle {
+class UMLWidget : public WidgetBase, public TQCanvasRectangle {
Q_OBJECT
public:
friend class UMLWidgetController;
@@ -88,17 +88,17 @@ public:
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mouseReleaseEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseReleaseEvent(QMouseEvent * me);
+ virtual void mouseReleaseEvent(TQMouseEvent * me);
/**
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mouseDoubleClickEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseDoubleClickEvent(QMouseEvent *me);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *me);
/**
* Set the status of using fill color.
@@ -117,7 +117,7 @@ public:
/**
* Overrides the method from WidgetBase.
*/
- void setLineColor(const QColor &colour);
+ void setLineColor(const TQColor &colour);
/**
* Overrides the method from WidgetBase.
@@ -129,12 +129,12 @@ public:
*
* @param colour the new fill colour
*/
- void setFillColour(const QColor &colour);
+ void setFillColour(const TQColor &colour);
/**
- * Read property of QColor m_FillColour.
+ * Read property of TQColor m_FillColour.
*/
- QColor getFillColour() const {
+ TQColor getFillColour() const {
return m_FillColour;
}
@@ -142,9 +142,9 @@ public:
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mouseMoveEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseMoveEvent(QMouseEvent* me);
+ virtual void mouseMoveEvent(TQMouseEvent* me);
/**
* Returns whether this is a line of text.
@@ -200,7 +200,7 @@ public:
* @return 0 if the given point is not in the boundaries of the widget;
* (width()+height())/2 if the point is within the boundaries.
*/
- virtual int onWidget(const QPoint & p);
+ virtual int onWidget(const TQPoint & p);
/**
* Draws the UMLWidget on the given paint device
@@ -210,24 +210,24 @@ public:
* @param offsetY y position to start the drawing.
*
*/
- virtual void draw(QPainter & p, int offsetX, int offsetY) = 0;
+ virtual void draw(TQPainter & p, int offsetX, int offsetY) = 0;
/**
* Set the pen.
*/
- void setPen(QPainter & p);
+ void setPen(TQPainter & p);
/**
* Sets the font the widget is to use.
*
* @param font Font to be set.
*/
- virtual void setFont( QFont font );
+ virtual void setFont( TQFont font );
/**
* Returns the font the widget is to use.
*/
- virtual QFont getFont() const;
+ virtual TQFont getFont() const;
/**
* Returns whether we triggered the update of position movement.
@@ -268,35 +268,35 @@ public:
* Gets the x-coordinate.
*/
int getX() const {
- return (int)QCanvasItem::x();
+ return (int)TQCanvasItem::x();
}
/**
* Gets the y-coordinate.
*/
int getY() const {
- return (int)QCanvasItem::y();
+ return (int)TQCanvasItem::y();
}
/**
* Gets the z-coordinate.
*/
int getZ() const {
- return (int)QCanvasItem::z();
+ return (int)TQCanvasItem::z();
}
/**
* Returns the height of widget.
*/
int getHeight() const {
- return QCanvasRectangle::height();
+ return TQCanvasRectangle::height();
}
/**
* Returns the width of the widget.
*/
int getWidth() const {
- return QCanvasRectangle::width();
+ return TQCanvasRectangle::width();
}
/**
@@ -386,14 +386,14 @@ public:
/**
* Write property of m_instanceName
*/
- void setInstanceName(const QString &instanceName) {
+ void setInstanceName(const TQString &instanceName) {
m_instanceName = instanceName;
}
/**
* Read property of m_instanceName
*/
- QString getInstanceName() const {
+ TQString getInstanceName() const {
return m_instanceName;
}
@@ -429,7 +429,7 @@ public:
*
* @param strName The name to be set.
*/
- virtual void setName(const QString &strName);
+ virtual void setName(const TQString &strName);
/**
* Gets the name from the corresponding UMLObject.
@@ -437,14 +437,14 @@ public:
*
* @return The currently set name.
*/
- virtual QString getName() const;
+ virtual TQString getName() const;
/**
* Starts the popup menu.
*
* @param At The Point where the diagram is to be coming up.
*/
- void startPopupMenu( const QPoint &At );
+ void startPopupMenu( const TQPoint &At );
/**
* Adjusts associations with the given co-ordinates
@@ -492,26 +492,26 @@ public:
* This behaviour is acceptable, because diagrams will always be showed on Display
* first before a special painter like a printer device is used.
*/
- void forceUpdateFontMetrics(QPainter *painter);
+ void forceUpdateFontMetrics(TQPainter *painter);
/**
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mousePressEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mousePressEvent(QMouseEvent *me);
+ virtual void mousePressEvent(TQMouseEvent *me);
/**
* Overrides the standard operation.
*
* @param me The move event.
*/
- virtual void moveEvent(QMoveEvent *me);
+ virtual void moveEvent(TQMoveEvent *me);
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
- virtual bool loadFromXMI( QDomElement & qElement );
+ virtual bool loadFromXMI( TQDomElement & qElement );
/**
* Returns the UMLWdigetController for this widget.
@@ -537,22 +537,22 @@ protected:
* @param offsetX The x-coordinate for drawing.
* @param offsetY The y-coordinate for drawing.
*/
- virtual void drawSelected(QPainter * p, int offsetX, int offsetY);
+ virtual void drawSelected(TQPainter * p, int offsetX, int offsetY);
/**
* Overrides default method.
*
* @param p Device on which the shape has to be drawn.
*/
- virtual void drawShape(QPainter &p );
+ virtual void drawShape(TQPainter &p );
/**
* Compute the minimum possible width and height.
* The default implementation returns width=20, height=20.
*
- * @return QSize(mininum_width, minimum_height)
+ * @return TQSize(mininum_width, minimum_height)
*/
- virtual QSize calculateSize();
+ virtual TQSize calculateSize();
typedef enum {
FT_NORMAL = 0,
@@ -570,13 +570,13 @@ protected:
* font metric.
*/
virtual void setDefaultFontMetrics(UMLWidget::FontType fontType);
- virtual void setDefaultFontMetrics(UMLWidget::FontType fontType, QPainter &painter);
+ virtual void setDefaultFontMetrics(UMLWidget::FontType fontType, TQPainter &painter);
/** Returns the font metric used by this object for Text which uses bold/italic fonts*/
- QFontMetrics &getFontMetrics(UMLWidget::FontType fontType);
+ TQFontMetrics &getFontMetrics(UMLWidget::FontType fontType);
/** set the font metric to use */
- void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm);
- void setupFontType(QFont &font, UMLWidget::FontType fontType);
+ void setFontMetrics(UMLWidget::FontType fontType, TQFontMetrics fm);
+ void setupFontType(TQFont &font, UMLWidget::FontType fontType);
/**
* Initializes key attributes of the class.
@@ -600,7 +600,7 @@ protected:
/**
* Color of the background of the widget
*/
- QColor m_FillColour;
+ TQColor m_FillColour;
/**
* A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram
@@ -612,12 +612,12 @@ protected:
* underlying UMLObject; if it does not, then getName() returns the local
* m_Text (notably the case for FloatingTextWidget.)
*/
- QString m_Text;
+ TQString m_Text;
/**
* The font the widget will use.
*/
- QFont m_Font;
+ TQFont m_Font;
/**
* Holds whether this widget is a component instance (i.e. on a deployment diagram)
@@ -627,7 +627,7 @@ protected:
/**
* The instance name (used if on a deployment diagram)
*/
- QString m_instanceName;
+ TQString m_instanceName;
/**
* Should the stereotype be displayed
@@ -642,7 +642,7 @@ protected:
ListPopupMenu *m_pMenu;
UMLDoc *m_pDoc; ///< shortcut for UMLApp::app()->getDocument()
bool m_bResizable;
- QFontMetrics *m_pFontMetrics[FT_INVALID];
+ TQFontMetrics *m_pFontMetrics[FT_INVALID];
/**
* It is true if the Activate Function has been called for this
diff --git a/umbrello/umbrello/umlwidgetcontroller.cpp b/umbrello/umbrello/umlwidgetcontroller.cpp
index 29ca98a1..9764e74f 100644
--- a/umbrello/umbrello/umlwidgetcontroller.cpp
+++ b/umbrello/umbrello/umlwidgetcontroller.cpp
@@ -13,8 +13,8 @@
#include "umlwidgetcontroller.h"
// qt includes
-#include <qevent.h>
-#include <qpoint.h>
+#include <tqevent.h>
+#include <tqpoint.h>
// kde includes
#include <kcursor.h>
@@ -53,7 +53,7 @@ UMLWidgetController::UMLWidgetController(UMLWidget *widget) {
UMLWidgetController::~UMLWidgetController() {
}
-void UMLWidgetController::mousePressEvent(QMouseEvent *me) {
+void UMLWidgetController::mousePressEvent(TQMouseEvent *me) {
// If there is a button pressed already ignore other press events
if (m_leftButtonDown || m_middleButtonDown || m_rightButtonDown) {
return;
@@ -115,7 +115,7 @@ void UMLWidgetController::mousePressEvent(QMouseEvent *me) {
}
}
-void UMLWidgetController::mouseMoveEvent(QMouseEvent* me) {
+void UMLWidgetController::mouseMoveEvent(TQMouseEvent* me) {
if (!m_leftButtonDown)
return;
@@ -134,7 +134,7 @@ void UMLWidgetController::mouseMoveEvent(QMouseEvent* me) {
setSelectionBounds();
}
- QPoint position = getPosition(me);
+ TQPoint position = getPosition(me);
int diffX = position.x() - m_widget->getX();
int diffY = position.y() - m_widget->getY();
@@ -188,7 +188,7 @@ void UMLWidgetController::mouseMoveEvent(QMouseEvent* me) {
updateSelectionBounds(diffX, diffY);
}
-void UMLWidgetController::mouseReleaseEvent(QMouseEvent *me) {
+void UMLWidgetController::mouseReleaseEvent(TQMouseEvent *me) {
if (me->button() != Qt::LeftButton && me->button() != Qt::RightButton) {
if (m_middleButtonDown) {
m_middleButtonDown = false;
@@ -244,12 +244,12 @@ void UMLWidgetController::mouseReleaseEvent(QMouseEvent *me) {
showPopupMenu(me);
} else if (m_leftButtonDown) {
//Cancel move/edit
- QMouseEvent move(QMouseEvent::MouseMove,
- QPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
+ TQMouseEvent move(TQMouseEvent::MouseMove,
+ TQPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
Qt::LeftButton, Qt::NoButton);
mouseMoveEvent(&move);
- QMouseEvent release(QMouseEvent::MouseButtonRelease,
- QPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
+ TQMouseEvent release(TQMouseEvent::MouseButtonRelease,
+ TQPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
Qt::LeftButton, Qt::NoButton);
mouseReleaseEvent(&release);
}
@@ -266,7 +266,7 @@ void UMLWidgetController::mouseReleaseEvent(QMouseEvent *me) {
}
}
-void UMLWidgetController::mouseDoubleClickEvent(QMouseEvent *me) {
+void UMLWidgetController::mouseDoubleClickEvent(TQMouseEvent *me) {
if (me->button() != Qt::LeftButton) {
return;
}
@@ -276,7 +276,7 @@ void UMLWidgetController::mouseDoubleClickEvent(QMouseEvent *me) {
doMouseDoubleClick(me);
}
-bool UMLWidgetController::isInResizeArea(QMouseEvent *me) {
+bool UMLWidgetController::isInResizeArea(TQMouseEvent *me) {
const int m = 10;
if (m_widget->m_bResizable &&
@@ -290,7 +290,7 @@ bool UMLWidgetController::isInResizeArea(QMouseEvent *me) {
}
}
-QCursor UMLWidgetController::getResizeCursor() {
+TQCursor UMLWidgetController::getResizeCursor() {
return KCursor::sizeFDiagCursor();
}
@@ -306,7 +306,7 @@ void UMLWidgetController::moveWidgetBy(int diffX, int diffY) {
void UMLWidgetController::constrainMovementForAllWidgets(int &/*diffX*/, int &/*diffY*/) {
}
-void UMLWidgetController::doMouseDoubleClick(QMouseEvent *) {
+void UMLWidgetController::doMouseDoubleClick(TQMouseEvent *) {
if (!m_widget || !m_widget->m_pMenu)
return;
m_widget->slotMenuSelection(ListPopupMenu::mt_Properties);
@@ -320,7 +320,7 @@ void UMLWidgetController::resetSelection() {
m_wasSelected = false;
}
-void UMLWidgetController::selectSingle(QMouseEvent *me) {
+void UMLWidgetController::selectSingle(TQMouseEvent *me) {
m_widget->m_pView->clearSelected();
//Adds the widget to the selected widgets list, but as it has been cleared
@@ -328,7 +328,7 @@ void UMLWidgetController::selectSingle(QMouseEvent *me) {
selectMultiple(me);
}
-void UMLWidgetController::selectMultiple(QMouseEvent *me) {
+void UMLWidgetController::selectMultiple(TQMouseEvent *me) {
m_widget->m_bSelected = true;
m_widget->setSelected(m_widget->m_bSelected);
m_widget->m_pView->setSelected(m_widget, me);
@@ -336,14 +336,14 @@ void UMLWidgetController::selectMultiple(QMouseEvent *me) {
m_wasSelected = true;
}
-void UMLWidgetController::deselect(QMouseEvent *me) {
+void UMLWidgetController::deselect(TQMouseEvent *me) {
m_widget->m_bSelected = false;
m_widget->setSelected(m_widget->m_bSelected);
m_widget->m_pView->setSelected(m_widget, me);
//m_wasSelected is false implicitly, no need to set it again
}
-void UMLWidgetController::saveWidgetValues(QMouseEvent *me) {
+void UMLWidgetController::saveWidgetValues(TQMouseEvent *me) {
m_pressOffsetX = me->x() - m_widget->getX();
m_pressOffsetY = me->y() - m_widget->getY();
@@ -375,7 +375,7 @@ void UMLWidgetController::updateSelectionBounds(int diffX, int diffY) {
}
}
-void UMLWidgetController::resize(QMouseEvent *me) {
+void UMLWidgetController::resize(TQMouseEvent *me) {
UMLApp::app()->getDocument()->writeToStatusBar(i18n("Hold shift or ctrl to move in X axis. Hold shift and control to move in Y axis. Right button click to cancel resize."));
m_resized = true;
@@ -480,7 +480,7 @@ int UMLWidgetController::getBiggestY(const UMLWidgetList &widgetList) {
return biggestY;
}
-QPoint UMLWidgetController::getPosition(QMouseEvent* me) {
+TQPoint UMLWidgetController::getPosition(TQMouseEvent* me) {
/*
kDebug() << "UMLWidgetController::getPosition: me->x=" << me->x()
<< " m_widget->getX=" << m_widget->getX() << ", m_oldX=" << m_oldX
@@ -513,17 +513,17 @@ QPoint UMLWidgetController::getPosition(QMouseEvent* me) {
//kDebug() << "UMLWidgetController::getPosition: got into cond.4" << endl;
newY = maxY - (m_maxSelectedY - m_widget->getY());
}
- return QPoint(newX, newY);
+ return TQPoint(newX, newY);
}
-QPoint UMLWidgetController::getPositionDifference(QMouseEvent* me) {
- QPoint newPoint = getPosition(me);
+TQPoint UMLWidgetController::getPositionDifference(TQMouseEvent* me) {
+ TQPoint newPoint = getPosition(me);
const int diffX = newPoint.x() - m_widget->getX();
const int diffY = newPoint.y() - m_widget->getY();
- return QPoint(diffX, diffY);
+ return TQPoint(diffX, diffY);
}
-void UMLWidgetController::showPopupMenu(QMouseEvent *me) {
+void UMLWidgetController::showPopupMenu(TQMouseEvent *me) {
//TODO why this condition?
if (m_widget->m_pMenu) {
return;
diff --git a/umbrello/umbrello/umlwidgetcontroller.h b/umbrello/umbrello/umlwidgetcontroller.h
index 552ea174..a21ba930 100644
--- a/umbrello/umbrello/umlwidgetcontroller.h
+++ b/umbrello/umbrello/umlwidgetcontroller.h
@@ -13,7 +13,7 @@
#define UMLWIDGETCONTROLLER_H
// qt includes
-#include <qdatetime.h>
+#include <tqdatetime.h>
// app includes
#include "umlwidgetlist.h"
@@ -104,9 +104,9 @@ public:
* it's marked to be deselected when releasing the button (provided it wasn't
* moved or resized).
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mousePressEvent(QMouseEvent *me);
+ virtual void mousePressEvent(TQMouseEvent *me);
/**
* Handles a mouse move event.
@@ -137,9 +137,9 @@ public:
* not updated always to be easy on the CPU). Finally, the canvas is resized,
* and selection bounds updated.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseMoveEvent(QMouseEvent* me);
+ virtual void mouseMoveEvent(TQMouseEvent* me);
/**
* Handles a mouse release event.
@@ -162,9 +162,9 @@ public:
* event at the same position than the cursor was when pressed. Another left
* button release is also sent.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseReleaseEvent(QMouseEvent * me);
+ virtual void mouseReleaseEvent(TQMouseEvent * me);
/**
* Handles a mouse double click event.
@@ -173,9 +173,9 @@ public:
* doMouseDoubleClick.
* @see doMouseDoubleClick
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseDoubleClickEvent(QMouseEvent *me);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *me);
protected:
@@ -189,9 +189,9 @@ protected:
* resize begins. However, parent method (that is, this method) must be
* called in the overridden method.
*
- * @param me The QMouseEvent to get the offset from.
+ * @param me The TQMouseEvent to get the offset from.
*/
- virtual void saveWidgetValues(QMouseEvent *me);
+ virtual void saveWidgetValues(TQMouseEvent *me);
/**
* Checks if the mouse is in resize area (right bottom corner), and sets
@@ -201,7 +201,7 @@ protected:
* @param me The QMouseEVent to check.
* @return true if the mouse is in resize area, false otherwise.
*/
- virtual bool isInResizeArea(QMouseEvent *me);
+ virtual bool isInResizeArea(TQMouseEvent *me);
/**
* Returns the cursor to be shown when resizing the widget.
@@ -210,7 +210,7 @@ protected:
*
* @return The cursor to be shown when resizing the widget.
*/
- virtual QCursor getResizeCursor();
+ virtual TQCursor getResizeCursor();
/**
* Resizes the widget.
@@ -274,9 +274,9 @@ protected:
* don't have an UMLObject representation) there's no need to override
* the method, it simply does nothing.
*
- * @param me The QMouseEvent which triggered the double click event.
+ * @param me The TQMouseEvent which triggered the double click event.
*/
- virtual void doMouseDoubleClick(QMouseEvent *me);
+ virtual void doMouseDoubleClick(TQMouseEvent *me);
/**
* Clears the selection, resets the toolbar and deselects the widget.
@@ -286,23 +286,23 @@ protected:
/**
* Selects the widget and clears the other selected widgets, if any.
*
- * @param me The QMouseEvent which made the selection.
+ * @param me The TQMouseEvent which made the selection.
*/
- void selectSingle(QMouseEvent *me);
+ void selectSingle(TQMouseEvent *me);
/**
* Selects the widget and adds it to the list of selected widgets.
*
- * @param me The QMouseEvent which made the selection.
+ * @param me The TQMouseEvent which made the selection.
*/
- void selectMultiple(QMouseEvent *me);
+ void selectMultiple(TQMouseEvent *me);
/**
* Deselects the widget and removes it from the list of selected widgets.
*
- * @param me The QMouseEvent which made the selection.
+ * @param me The TQMouseEvent which made the selection.
*/
- void deselect(QMouseEvent *me);
+ void deselect(TQMouseEvent *me);
/**
* Fills m_selectedWidgetsList and sets the selection bounds ((m_min/m_max)X/Y attributes).
@@ -325,9 +325,9 @@ protected:
* in resize area when pressed.
* Resizing can be constrained to an specific axis using control and shift buttons.
*
- * @param me The QMouseEvent to get the values from.
+ * @param me The TQMouseEvent to get the values from.
*/
- void resize(QMouseEvent *me);
+ void resize(TQMouseEvent *me);
/**
* Returns the smallest X position of all the widgets in the list.
@@ -367,26 +367,26 @@ protected:
* m_widget->get{X,Y}(), the previous position m_old{X,Y}, and the
* mouse press offset m_pressOffset{X,Y}.
*
- * @param me The QMouseEvent for which to get the adjusted position.
- * @return A QPoint with the adjusted position.
+ * @param me The TQMouseEvent for which to get the adjusted position.
+ * @return A TQPoint with the adjusted position.
*/
- QPoint getPosition(QMouseEvent *me);
+ TQPoint getPosition(TQMouseEvent *me);
/**
- * Returns a QPoint with the new X and Y position difference of the mouse event
+ * Returns a TQPoint with the new X and Y position difference of the mouse event
* respect to the position of the widget.
*
- * @param me The QMouseEvent to get the position to compare.
- * @return A QPoint with the position difference.
+ * @param me The TQMouseEvent to get the position to compare.
+ * @return A TQPoint with the position difference.
*/
- QPoint getPositionDifference(QMouseEvent *me);
+ TQPoint getPositionDifference(TQMouseEvent *me);
/**
* Shows the widget popup menu where the mouse event points to.
*
- * @param me The QMouseEvent which triggered the showing.
+ * @param me The TQMouseEvent which triggered the showing.
*/
- void showPopupMenu(QMouseEvent *me);
+ void showPopupMenu(TQMouseEvent *me);
/**
* Checks if the size of the widget changed respect to the size that
@@ -412,7 +412,7 @@ protected:
/**
* Timer that prevents excessive updates (be easy on the CPU).
*/
- QTime lastUpdate;
+ TQTime lastUpdate;
/**
* A list containing the selected widgets.
@@ -426,7 +426,7 @@ protected:
/**
* The text in the status bar when the cursor was pressed.
*/
- QString m_oldStatusBarMsg;
+ TQString m_oldStatusBarMsg;
/**
* The X/Y offset from the position of the cursor when it was pressed to the
diff --git a/umbrello/umbrello/umlwidgetlist.h b/umbrello/umbrello/umlwidgetlist.h
index 45a9db6b..27670a8f 100644
--- a/umbrello/umbrello/umlwidgetlist.h
+++ b/umbrello/umbrello/umlwidgetlist.h
@@ -19,11 +19,11 @@
#ifndef UMLWIDGETLIST_H
#define UMLWIDGETLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class UMLWidget;
-typedef QPtrList<UMLWidget> UMLWidgetList;
-typedef QPtrListIterator<UMLWidget> UMLWidgetListIt;
+typedef TQPtrList<UMLWidget> UMLWidgetList;
+typedef TQPtrListIterator<UMLWidget> UMLWidgetListIt;
#endif
diff --git a/umbrello/umbrello/usecase.cpp b/umbrello/umbrello/usecase.cpp
index 526f533b..3526720c 100644
--- a/umbrello/umbrello/usecase.cpp
+++ b/umbrello/umbrello/usecase.cpp
@@ -11,7 +11,7 @@
#include "usecase.h"
-UMLUseCase::UMLUseCase(const QString & name, Uml::IDType id)
+UMLUseCase::UMLUseCase(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -28,12 +28,12 @@ UMLObject* UMLUseCase::clone() const {
return clone;
}
-void UMLUseCase::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement usecaseElement = UMLObject::save("UML:UseCase", qDoc);
+void UMLUseCase::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement usecaseElement = UMLObject::save("UML:UseCase", qDoc);
qElement.appendChild(usecaseElement);
}
-bool UMLUseCase::load(QDomElement& ) {
+bool UMLUseCase::load(TQDomElement& ) {
return true;
}
diff --git a/umbrello/umbrello/usecase.h b/umbrello/umbrello/usecase.h
index 5c262b10..41ca7306 100644
--- a/umbrello/umbrello/usecase.h
+++ b/umbrello/umbrello/usecase.h
@@ -31,7 +31,7 @@ public:
* @param name The name of the object.
* @param id The id of the object.
*/
- explicit UMLUseCase(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLUseCase(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor
@@ -51,13 +51,13 @@ public:
/**
* Creates the <UML:UseCase> element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads the <UML:UseCase> element (empty.)
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
};
#endif
diff --git a/umbrello/umbrello/usecasewidget.cpp b/umbrello/umbrello/usecasewidget.cpp
index f7564036..7eb8590a 100644
--- a/umbrello/umbrello/usecasewidget.cpp
+++ b/umbrello/umbrello/usecasewidget.cpp
@@ -12,7 +12,7 @@
// own header file
#include "usecasewidget.h"
// system includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// local includes
#include "usecase.h"
@@ -27,16 +27,16 @@ UseCaseWidget::UseCaseWidget(UMLView * view, UMLUseCase *o) : UMLWidget(view, o)
UseCaseWidget::~UseCaseWidget() {}
-void UseCaseWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void UseCaseWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setUnderline(false);
font.setBold(false);
font.setItalic( m_pObject->getAbstract() );
p.setFont( font );
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
const int w = width();
const int h = height();
@@ -51,9 +51,9 @@ void UseCaseWidget::draw(QPainter & p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-QSize UseCaseWidget::calculateSize() {
+TQSize UseCaseWidget::calculateSize() {
const UMLWidget::FontType ft = ( m_pObject->getAbstract() ? FT_BOLD_ITALIC : FT_BOLD );
- const QFontMetrics &fm = UMLWidget::getFontMetrics(ft);
+ const TQFontMetrics &fm = UMLWidget::getFontMetrics(ft);
const int fontHeight = fm.lineSpacing();
const int textWidth = fm.width(getName());
int width = textWidth > UC_WIDTH?textWidth:UC_WIDTH;
@@ -61,11 +61,11 @@ QSize UseCaseWidget::calculateSize() {
width += UC_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void UseCaseWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement usecaseElement = qDoc.createElement( "usecasewidget" );
+void UseCaseWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement usecaseElement = qDoc.createElement( "usecasewidget" );
UMLWidget::saveToXMI( qDoc, usecaseElement );
qElement.appendChild( usecaseElement );
}
diff --git a/umbrello/umbrello/usecasewidget.h b/umbrello/umbrello/usecasewidget.h
index 509ff7a5..65613d1e 100644
--- a/umbrello/umbrello/usecasewidget.h
+++ b/umbrello/umbrello/usecasewidget.h
@@ -55,12 +55,12 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves this UseCase to file.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
// For loading we can use the loadFromXMI() inherited from UMLWidget.
@@ -68,7 +68,7 @@ protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
};
#endif
diff --git a/umbrello/umbrello/widget_factory.cpp b/umbrello/umbrello/widget_factory.cpp
index 5bb8eeae..ea58e128 100644
--- a/umbrello/umbrello/widget_factory.cpp
+++ b/umbrello/umbrello/widget_factory.cpp
@@ -54,7 +54,7 @@
namespace Widget_Factory {
UMLWidget *createWidget(UMLView *view, UMLObject *o) {
- QPoint pos = view->getPos();
+ TQPoint pos = view->getPos();
int y = pos.y();
Uml::Diagram_Type diagramType = view->getType();
Uml::Object_Type type = o->getBaseType();
@@ -143,7 +143,7 @@ bool validateObjType(Uml::Object_Type expected, UMLObject* &o, Uml::IDType id) {
if (o == NULL) {
kDebug() << "Widget_Factory::validateObjType: creating new object of type "
<< expected << endl;
- QString artificialName = "LOST_" + ID2STR(id);
+ TQString artificialName = "LOST_" + ID2STR(id);
o = Object_Factory::createUMLObject(expected, artificialName, NULL, false);
if (o == NULL)
return false;
@@ -161,8 +161,8 @@ bool validateObjType(Uml::Object_Type expected, UMLObject* &o, Uml::IDType id) {
return false;
}
-UMLWidget* makeWidgetFromXMI(const QString& tag,
- const QString& idStr, UMLView *view) {
+UMLWidget* makeWidgetFromXMI(const TQString& tag,
+ const TQString& idStr, UMLView *view) {
UMLWidget *widget = NULL;
// Loading of widgets which do NOT represent any UMLObject,
diff --git a/umbrello/umbrello/widget_factory.h b/umbrello/umbrello/widget_factory.h
index ed8c30b7..bfdc93aa 100644
--- a/umbrello/umbrello/widget_factory.h
+++ b/umbrello/umbrello/widget_factory.h
@@ -12,7 +12,7 @@
#ifndef WIDGET_FACTORY_H
#define WIDGET_FACTORY_H
-#include <qstring.h>
+#include <tqstring.h>
// forward declarations
class UMLView;
@@ -33,8 +33,8 @@ namespace Widget_Factory {
/**
* Create a UMLWidget according to the given XMI tag.
*/
- UMLWidget* makeWidgetFromXMI(const QString& tag,
- const QString& idStr, UMLView *view);
+ UMLWidget* makeWidgetFromXMI(const TQString& tag,
+ const TQString& idStr, UMLView *view);
} // end namespace Widget_Factory
diff --git a/umbrello/umbrello/widget_utils.cpp b/umbrello/umbrello/widget_utils.cpp
index b022d828..9f363a62 100644
--- a/umbrello/umbrello/widget_utils.cpp
+++ b/umbrello/umbrello/widget_utils.cpp
@@ -13,9 +13,9 @@
#include "widget_utils.h"
// qt/kde includes
-#include <qcanvas.h>
-#include <qbrush.h>
-#include <qpen.h>
+#include <tqcanvas.h>
+#include <tqbrush.h>
+#include <tqpen.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -55,8 +55,8 @@ UMLWidget* findWidget(Uml::IDType id,
return NULL;
}
-QIconSet iconSet(Uml::Diagram_Type dt) {
- QIconSet diagramIconSet;
+TQIconSet iconSet(Uml::Diagram_Type dt) {
+ TQIconSet diagramIconSet;
switch (dt) {
case Uml::dt_UseCase:
diagramIconSet = BarIconSet("umbrello_diagram_usecase");
@@ -92,15 +92,15 @@ QIconSet iconSet(Uml::Diagram_Type dt) {
return diagramIconSet;
}
-QCanvasRectangle *decoratePoint(const QPoint& p) {
+TQCanvasRectangle *decoratePoint(const TQPoint& p) {
const int SIZE = 4;
UMLView *currentView = UMLApp::app()->getCurrentView();
- QCanvasRectangle *rect;
- rect = new QCanvasRectangle(p.x() - SIZE / 2,
+ TQCanvasRectangle *rect;
+ rect = new TQCanvasRectangle(p.x() - SIZE / 2,
p.y() - SIZE / 2,
SIZE, SIZE, currentView->canvas());
- rect->setBrush( QBrush(Qt::blue) );
- rect->setPen( QPen(Qt::blue) );
+ rect->setBrush( TQBrush(Qt::blue) );
+ rect->setPen( TQPen(Qt::blue) );
rect->setVisible(true);
return rect;
}
diff --git a/umbrello/umbrello/widget_utils.h b/umbrello/umbrello/widget_utils.h
index 419f9d99..d904d8d7 100644
--- a/umbrello/umbrello/widget_utils.h
+++ b/umbrello/umbrello/widget_utils.h
@@ -12,8 +12,8 @@
#ifndef WIDGET_UTILS_H
#define WIDGET_UTILS_H
-#include <qiconset.h>
-#include <qpoint.h>
+#include <tqiconset.h>
+#include <tqpoint.h>
#include "umlnamespace.h"
#include "umlwidgetlist.h"
#include "messagewidgetlist.h"
@@ -43,9 +43,9 @@ UMLWidget* findWidget(Uml::IDType id,
/**
* Return the icon corresponding to the given Diagram_Type.
*/
-QIconSet iconSet(Uml::Diagram_Type dt);
+TQIconSet iconSet(Uml::Diagram_Type dt);
-QCanvasRectangle *decoratePoint(const QPoint& p);
+TQCanvasRectangle *decoratePoint(const TQPoint& p);
}
diff --git a/umbrello/umbrello/widgetbase.cpp b/umbrello/umbrello/widgetbase.cpp
index 225f5848..9d94e3f1 100644
--- a/umbrello/umbrello/widgetbase.cpp
+++ b/umbrello/umbrello/widgetbase.cpp
@@ -16,7 +16,7 @@
#include "umlobject.h"
#include "optionstate.h"
-WidgetBase::WidgetBase(UMLView *view) : QObject(view) {
+WidgetBase::WidgetBase(UMLView *view) : TQObject(view) {
init(view);
}
@@ -34,7 +34,7 @@ void WidgetBase::init(UMLView *view, Uml::Widget_Type type /* = Uml::wt_UMLWidge
kError() << "WidgetBase constructor: SERIOUS PROBLEM - m_pView is NULL" << endl;
m_bUsesDiagramLineColour = false;
m_bUsesDiagramLineWidth = false;
- m_LineColour = QColor("black");
+ m_LineColour = TQColor("black");
m_LineWidth = 0; // initialize with 0 to have valid start condition
}
}
@@ -72,20 +72,20 @@ Uml::IDType WidgetBase::getID() const {
return m_nId;
}
-QString WidgetBase::getDoc() const {
+TQString WidgetBase::getDoc() const {
if (m_pObject != NULL)
return m_pObject->getDoc();
return m_Doc;
}
-void WidgetBase::setDoc( const QString &doc ) {
+void WidgetBase::setDoc( const TQString &doc ) {
if (m_pObject != NULL)
m_pObject->setDoc( doc );
else
m_Doc = doc;
}
-void WidgetBase::setLineColor(const QColor &colour) {
+void WidgetBase::setLineColor(const TQColor &colour) {
m_LineColour = colour;
m_bUsesDiagramLineColour = false;
}
@@ -95,7 +95,7 @@ void WidgetBase::setLineWidth(uint width) {
m_bUsesDiagramLineWidth = false;
}
-void WidgetBase::saveToXMI( QDomDocument & /*qDoc*/, QDomElement & qElement ) {
+void WidgetBase::saveToXMI( TQDomDocument & /*qDoc*/, TQDomElement & qElement ) {
if (m_bUsesDiagramLineColour) {
qElement.setAttribute( "linecolor", "none" );
} else {
@@ -108,16 +108,16 @@ void WidgetBase::saveToXMI( QDomDocument & /*qDoc*/, QDomElement & qElement ) {
}
}
-bool WidgetBase::loadFromXMI( QDomElement & qElement ) {
+bool WidgetBase::loadFromXMI( TQDomElement & qElement ) {
// first load from "linecolour" and then overwrite with the "linecolor"
// attribute if that one is present. The "linecolour" name was a "typo" in
// earlier versions of Umbrello
- QString lineColor = qElement.attribute( "linecolour", "none" );
+ TQString lineColor = qElement.attribute( "linecolour", "none" );
lineColor = qElement.attribute( "linecolor", lineColor );
- QString lineWidth = qElement.attribute( "linewidth", "none" );
+ TQString lineWidth = qElement.attribute( "linewidth", "none" );
if (lineColor != "none") {
- setLineColor( QColor(lineColor) );
+ setLineColor( TQColor(lineColor) );
m_bUsesDiagramLineColour = false;
} else if (m_Type != Uml::wt_Box && m_pView != NULL) {
setLineColor( m_pView->getLineColor() );
diff --git a/umbrello/umbrello/widgetbase.h b/umbrello/umbrello/widgetbase.h
index 5051418e..d9487964 100644
--- a/umbrello/umbrello/widgetbase.h
+++ b/umbrello/umbrello/widgetbase.h
@@ -12,9 +12,9 @@
#ifndef WIDGETBASE_H
#define WIDGETBASE_H
-#include <qobject.h>
-#include <qcolor.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqcolor.h>
+#include <tqdom.h>
#include "umlnamespace.h"
@@ -27,7 +27,7 @@ class UMLObject;
* @author Oliver Kellogg <okellogg@users.sourceforge.net>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class WidgetBase : public QObject {
+class WidgetBase : public TQObject {
Q_OBJECT
public:
/**
@@ -77,7 +77,7 @@ public:
*
* @return The documentation from the UMLObject (if m_pObject is set.)
*/
- virtual QString getDoc() const;
+ virtual TQString getDoc() const;
/**
* Used by some child classes to set documentation.
@@ -85,14 +85,14 @@ public:
* @param doc The documentation to be set in the UMLObject
* (if m_pObject is set.)
*/
- virtual void setDoc( const QString &doc );
+ virtual void setDoc( const TQString &doc );
/**
* Sets the line colour
*
* @param colour the new line colour
*/
- virtual void setLineColor(const QColor &colour);
+ virtual void setLineColor(const TQColor &colour);
/**
* Sets the line width
@@ -104,7 +104,7 @@ public:
/**
* Read property of m_LineColour.
*/
- QColor getLineColor() const {
+ TQColor getLineColor() const {
return m_LineColour;
}
@@ -153,9 +153,9 @@ public:
*/
Uml::IDType getID() const;
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
- virtual bool loadFromXMI( QDomElement & qElement );
+ virtual bool loadFromXMI( TQDomElement & qElement );
protected:
/**
@@ -170,7 +170,7 @@ protected:
UMLView *m_pView;
UMLObject *m_pObject;
- QString m_Doc; ///< Only used if m_pObject is not set.
+ TQString m_Doc; ///< Only used if m_pObject is not set.
/**
* This ID is only used when the widget does not have a
@@ -182,7 +182,7 @@ protected:
/**
* Color of the lines of the widget. Is saved to XMI.
*/
- QColor m_LineColour;
+ TQColor m_LineColour;
/**
* Width of the lines of the widget. Is saved to XMI.
diff --git a/umbrello/umbrello/worktoolbar.cpp b/umbrello/umbrello/worktoolbar.cpp
index 0f27be80..ef648a49 100644
--- a/umbrello/umbrello/worktoolbar.cpp
+++ b/umbrello/umbrello/worktoolbar.cpp
@@ -13,7 +13,7 @@
#include "worktoolbar.h"
// qt/kde include files
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -26,7 +26,7 @@
#include "worktoolbar.h"
-WorkToolBar::WorkToolBar(QMainWindow *parentWindow, const char*name)
+WorkToolBar::WorkToolBar(TQMainWindow *parentWindow, const char*name)
: KToolBar(parentWindow,Qt::DockRight,false,name) {
m_CurrentButtonID = tbb_Undefined;
loadPixmaps();
@@ -44,11 +44,11 @@ WorkToolBar::WorkToolBar(QMainWindow *parentWindow, const char*name)
m_map.insert(Uml::dt_Undefined,tbb_Arrow);
slotCheckToolBar( Uml::dt_Undefined );
- connect( this, SIGNAL( released( int ) ), this, SLOT( buttonChanged (int ) ) );
+ connect( this, TQT_SIGNAL( released( int ) ), this, TQT_SLOT( buttonChanged (int ) ) );
}
WorkToolBar::~WorkToolBar() {
- disconnect(this, SIGNAL(released(int)),this,SLOT(buttonChanged(int)));
+ disconnect(this, TQT_SIGNAL(released(int)),this,TQT_SLOT(buttonChanged(int)));
}
void WorkToolBar::insertHotBtn(ToolBar_Buttons tbb) {
@@ -197,7 +197,7 @@ void WorkToolBar::buttonChanged(int b) {
view->setCursor( currentCursor() );
}
-QCursor WorkToolBar::currentCursor() {
+TQCursor WorkToolBar::currentCursor() {
return m_ToolButtons[m_CurrentButtonID].Cursor;
}
@@ -209,7 +209,7 @@ void WorkToolBar::slotResetToolBar() {
toggleButton(m_CurrentButtonID);
emit sigButtonChanged(m_CurrentButtonID);
- QCursor curs;
+ TQCursor curs;
curs.setShape(Qt::ArrowCursor);
UMLView* view = UMLApp::app()->getCurrentView();
@@ -230,8 +230,8 @@ void WorkToolBar::setDefaultTool() {
b -> animateClick();
}
-QPixmap WorkToolBar::load(const QString & fileName) {
- QPixmap pxm;
+TQPixmap WorkToolBar::load(const TQString & fileName) {
+ TQPixmap pxm;
pxm.load(fileName);
return pxm;
}
@@ -239,7 +239,7 @@ QPixmap WorkToolBar::load(const QString & fileName) {
void WorkToolBar::loadPixmaps() {
const struct ButtonInfo {
const ToolBar_Buttons tbb;
- const QString btnName;
+ const TQString btnName;
const char *pngName;
} buttonInfo[] = {
{ tbb_Object, i18n("Object"), "object.png" },
@@ -290,25 +290,25 @@ void WorkToolBar::loadPixmaps() {
{ tbb_Coll_Message, i18n("Message"), "message-asynchronous.png" }
};
KStandardDirs * dirs = KGlobal::dirs();
- QString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
+ TQString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
dataDir += "/umbrello/pics/";
const size_t n_buttonInfos = sizeof(buttonInfo) / sizeof(ButtonInfo);
m_ToolButtons.insert(tbb_Undefined,
ToolButton(i18n("UNDEFINED"),
0,
- QCursor()) );
+ TQCursor()) );
m_ToolButtons.insert(tbb_Arrow,
ToolButton(i18n("Select"),
load(dataDir + "arrow.png"),
- QCursor()) );
+ TQCursor()) );
kDebug() << "WorkToolBar::loadPixmaps: n_buttonInfos = " << n_buttonInfos << endl;
for (uint i = 0; i < n_buttonInfos; i++) {
const ButtonInfo& info = buttonInfo[i];
m_ToolButtons.insert(info.tbb,
ToolButton(info.btnName,
load(dataDir + info.pngName),
- QCursor(load(dataDir + "cursor-" + info.pngName), 9, 9)));
+ TQCursor(load(dataDir + "cursor-" + info.pngName), 9, 9)));
}
}
diff --git a/umbrello/umbrello/worktoolbar.h b/umbrello/umbrello/worktoolbar.h
index 92012dde..f5af5b2d 100644
--- a/umbrello/umbrello/worktoolbar.h
+++ b/umbrello/umbrello/worktoolbar.h
@@ -12,9 +12,9 @@
#ifndef WORKTOOLBAR_H
#define WORKTOOLBAR_H
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qcursor.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
#include <ktoolbar.h>
#include "umlnamespace.h"
@@ -48,7 +48,7 @@ public:
*
* @param parentWindow The parent of the toolbar.
*/
- WorkToolBar(QMainWindow *parentWindow, const char *name);
+ WorkToolBar(TQMainWindow *parentWindow, const char *name);
/**
* Standard deconstructor.
@@ -123,22 +123,22 @@ public:
private:
- typedef QMap<Uml::Diagram_Type,ToolBar_Buttons> OldToolMap;
+ typedef TQMap<Uml::Diagram_Type,ToolBar_Buttons> OldToolMap;
/**
* This inner class holds label, symbol, and cursor of a tool button.
*/
class ToolButton {
public:
- QString Label;
- QPixmap Symbol;
- QCursor Cursor;
- ToolButton() : Label(QString("?")), Symbol(QPixmap()), Cursor(QCursor()) { }
- ToolButton(const QString& lbl, const QPixmap& smb, const QCursor& cur) :
+ TQString Label;
+ TQPixmap Symbol;
+ TQCursor Cursor;
+ ToolButton() : Label(TQString("?")), Symbol(TQPixmap()), Cursor(TQCursor()) { }
+ ToolButton(const TQString& lbl, const TQPixmap& smb, const TQCursor& cur) :
Label(lbl), Symbol(smb), Cursor(cur) { }
};
- typedef QMap<ToolBar_Buttons, ToolButton> ToolButtonMap;
+ typedef TQMap<ToolBar_Buttons, ToolButton> ToolButtonMap;
ToolBar_Buttons m_CurrentButtonID;
OldToolMap m_map;
@@ -148,7 +148,7 @@ private:
/**
* Loads a pixmap from file
*/
- QPixmap load(const QString &fileName);
+ TQPixmap load(const TQString &fileName);
/**
* Loads toolbar icon and mouse cursor images from disk
@@ -158,7 +158,7 @@ private:
/**
* Returns the current cursor depending on m_CurrentButtonID
*/
- QCursor currentCursor();
+ TQCursor currentCursor();
/**
* Inserts the button corresponding to the tbb value given