diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/uml.cpp | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/uml.cpp')
-rw-r--r-- | umbrello/umbrello/uml.cpp | 312 |
1 files changed, 156 insertions, 156 deletions
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(); } |