From 9aa2a73641f4d386c9667ac946cebfabca872940 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:04:33 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- src/ktechlab.cpp | 76 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'src/ktechlab.cpp') diff --git a/src/ktechlab.cpp b/src/ktechlab.cpp index 00e6c6c..69041cb 100644 --- a/src/ktechlab.cpp +++ b/src/ktechlab.cpp @@ -275,13 +275,13 @@ void KTechlab::overlayToolBarScreenshot() return; } - TQPtrListIterator toolBarIterator(); + TQPtrListIterator toolBarIterator(); // TQWidget * toolsWidget = toolBar( "toolsToolBar" ); // TQWidget * debugWidget = toolBar( "debugTB" ); - KToolBar * toolsWidget = static_cast(TQT_TQWIDGET(child( "toolsToolBar", "KToolBar" ))); - KToolBar * debugWidget = static_cast(TQT_TQWIDGET(child( "debugTB", "KToolBar" ))); + TDEToolBar * toolsWidget = static_cast(TQT_TQWIDGET(child( "toolsToolBar", "TDEToolBar" ))); + TDEToolBar * debugWidget = static_cast(TQT_TQWIDGET(child( "debugTB", "TDEToolBar" ))); if ( !toolsWidget && !debugWidget ) return; @@ -410,7 +410,7 @@ void KTechlab::slotUpdateTabWidget() void KTechlab::setupActions() { - KActionCollection *ac = actionCollection(); + TDEActionCollection *ac = actionCollection(); KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), ac ); KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), ac ); @@ -429,16 +429,16 @@ void KTechlab::setupActions() KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotOptionsPreferences()), ac ); //BEGIN New file popup - KToolBarPopupAction *p = new KToolBarPopupAction( i18n("&New"), "filenew", KStdAccel::shortcut(KStdAccel::New), TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), ac, "newfile_popup" ); + TDEToolBarPopupAction *p = new TDEToolBarPopupAction( i18n("&New"), "filenew", TDEStdAccel::shortcut(TDEStdAccel::New), TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), ac, "newfile_popup" ); p->popupMenu()->insertTitle( i18n("New File") ); - (new KAction( i18n("Assembly"), "source", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewAssembly()), ac, "newfile_asm" ))->plug( p->popupMenu() ); - (new KAction( i18n("C source"), "source_c", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewC()), ac, "newfile_c" ))->plug( p->popupMenu() ); - (new KAction( i18n("Circuit"), "ktechlab_circuit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewCircuit()), ac, "newfile_circuit" ))->plug( p->popupMenu() ); - (new KAction( i18n("FlowCode"), "ktechlab_flowcode", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewFlowCode()), ac, "newfile_flowcode" ))->plug( p->popupMenu() ); + (new TDEAction( i18n("Assembly"), "source", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewAssembly()), ac, "newfile_asm" ))->plug( p->popupMenu() ); + (new TDEAction( i18n("C source"), "source_c", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewC()), ac, "newfile_c" ))->plug( p->popupMenu() ); + (new TDEAction( i18n("Circuit"), "ktechlab_circuit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewCircuit()), ac, "newfile_circuit" ))->plug( p->popupMenu() ); + (new TDEAction( i18n("FlowCode"), "ktechlab_flowcode", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewFlowCode()), ac, "newfile_flowcode" ))->plug( p->popupMenu() ); #ifdef MECHANICS - (new KAction( i18n("Mechanics"), "ktechlab_mechanics", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewMechanics()), ac, "newfile_mechanics" ))->plug( p->popupMenu() ); + (new TDEAction( i18n("Mechanics"), "ktechlab_mechanics", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewMechanics()), ac, "newfile_mechanics" ))->plug( p->popupMenu() ); #endif - (new KAction( "Microbe", "ktechlab_microbe", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewMicrobe()), ac, "newfile_microbe" ))->plug( p->popupMenu() ); + (new TDEAction( "Microbe", "ktechlab_microbe", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileNewMicrobe()), ac, "newfile_microbe" ))->plug( p->popupMenu() ); //END New File popup @@ -448,29 +448,29 @@ void KTechlab::setupActions() //BEGIN Project Actions ProjectManager *pm = ProjectManager::self(this); - new KAction( i18n("New Project.."), "window_new", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotNewProject()), ac, "project_new" ); - new KAction( i18n("Open Project..."), "project_open", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotOpenProject()), ac, "project_open" ); -// m_recentProjects = new KRecentFilesAction( i18n("Open &Recent Project..."), 0, ProjectManager::self(), TQT_SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" ); + new TDEAction( i18n("New Project.."), "window_new", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotNewProject()), ac, "project_new" ); + new TDEAction( i18n("Open Project..."), "project_open", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotOpenProject()), ac, "project_open" ); +// m_recentProjects = new TDERecentFilesAction( i18n("Open &Recent Project..."), 0, ProjectManager::self(), TQT_SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" ); m_recentProjects = new RecentFilesAction( "Recent Projects", i18n("Open &Recent Project..."), TQT_TQOBJECT(ProjectManager::self()), TQT_SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" ); - new KAction( i18n("Export to Makefile..."), "fileexport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotExportToMakefile()), ac, "project_export_makefile" ); - new KAction( i18n("Create Subproject..."), 0, 0, TQT_TQOBJECT(pm), TQT_SLOT(slotCreateSubproject()), ac, "project_create_subproject" ); - new KAction( i18n("Add Existing File..."), "fileopen", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotAddFile()), ac, "project_add_existing_file" ); - new KAction( i18n("Add Current File..."), "fileimport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotAddCurrentFile()), ac, "project_add_current_file" ); -// new KAction( i18n("Project Options"), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotProjectOptions()), ac, "project_options" ); - new KAction( i18n("Close Project"), "fileclose", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotCloseProject()), ac, "project_close" ); - new KAction( i18n("Remove from Project"), "editdelete", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotRemoveSelected()), ac, "project_remove_selected" ); - new KAction( i18n("Insert Existing File..."), "fileopen", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectAddExistingFile()), ac, "subproject_add_existing_file" ); - new KAction( i18n("Insert Current File..."), "fileimport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectAddCurrentFile()),ac, "subproject_add_current_file" ); - new KAction( i18n("Linker Options..."), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectLinkerOptions()), ac, "project_item_linker_options" ); - new KAction( i18n("Build..."), "launch", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemBuild()), ac, "project_item_build" ); - new KAction( i18n("Upload..."), "convert_to_pic", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemUpload()), ac, "project_item_upload" ); - new KAction( i18n("Processing Options..."), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemProcessingOptions()), ac, "project_item_processing_options" ); + new TDEAction( i18n("Export to Makefile..."), "fileexport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotExportToMakefile()), ac, "project_export_makefile" ); + new TDEAction( i18n("Create Subproject..."), 0, 0, TQT_TQOBJECT(pm), TQT_SLOT(slotCreateSubproject()), ac, "project_create_subproject" ); + new TDEAction( i18n("Add Existing File..."), "fileopen", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotAddFile()), ac, "project_add_existing_file" ); + new TDEAction( i18n("Add Current File..."), "fileimport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotAddCurrentFile()), ac, "project_add_current_file" ); +// new TDEAction( i18n("Project Options"), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotProjectOptions()), ac, "project_options" ); + new TDEAction( i18n("Close Project"), "fileclose", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotCloseProject()), ac, "project_close" ); + new TDEAction( i18n("Remove from Project"), "editdelete", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotRemoveSelected()), ac, "project_remove_selected" ); + new TDEAction( i18n("Insert Existing File..."), "fileopen", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectAddExistingFile()), ac, "subproject_add_existing_file" ); + new TDEAction( i18n("Insert Current File..."), "fileimport", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectAddCurrentFile()),ac, "subproject_add_current_file" ); + new TDEAction( i18n("Linker Options..."), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotSubprojectLinkerOptions()), ac, "project_item_linker_options" ); + new TDEAction( i18n("Build..."), "launch", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemBuild()), ac, "project_item_build" ); + new TDEAction( i18n("Upload..."), "convert_to_pic", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemUpload()), ac, "project_item_upload" ); + new TDEAction( i18n("Processing Options..."), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotItemProcessingOptions()), ac, "project_item_processing_options" ); //END Project Actions - new KAction( i18n("Split View Left/Right"), "view_right", TQt::CTRL|TQt::SHIFT|TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotViewSplitLeftRight()), ac, "view_split_leftright" ); - new KAction( i18n("Split View Top/Bottom"), "view_bottom", TQt::CTRL|TQt::SHIFT|TQt::Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotViewSplitTopBottom()), ac, "view_split_topbottom" ); + new TDEAction( i18n("Split View Left/Right"), "view_right", TQt::CTRL|TQt::SHIFT|TQt::Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotViewSplitLeftRight()), ac, "view_split_leftright" ); + new TDEAction( i18n("Split View Top/Bottom"), "view_bottom", TQt::CTRL|TQt::SHIFT|TQt::Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotViewSplitTopBottom()), ac, "view_split_topbottom" ); - KToggleAction * ta = new KToggleAction( i18n("Run Simulation"), "player_play", TQt::Key_F10, 0, 0, ac, "simulation_run" ); + TDEToggleAction * ta = new TDEToggleAction( i18n("Run Simulation"), "player_play", TQt::Key_F10, 0, 0, ac, "simulation_run" ); ta->setChecked(true); connect( ta, TQT_SIGNAL(toggled(bool )), Simulator::self(), TQT_SLOT(slotSetSimulating(bool )) ); #if defined(TDE_MAKE_VERSION) @@ -554,7 +554,7 @@ void KTechlab::slotTabReceivedDropEvent( TQWidget *widget, TQDropEvent *e ) } e->accept(true); - KPopupMenu dropMenu; + TDEPopupMenu dropMenu; dropMenu.insertItem( TDEGlobal::iconLoader()->loadIcon( "goto", KIcon::Small ), i18n("&Insert Into"), 0 ); dropMenu.insertItem( TDEGlobal::iconLoader()->loadIcon( "editcopy", KIcon::Small ), i18n("&Copy Into"), 1 ); dropMenu.insertSeparator(); @@ -587,9 +587,9 @@ void KTechlab::slotDragContextActivated( int id ) } -KAction * KTechlab::action( const TQString & name ) const +TDEAction * KTechlab::action( const TQString & name ) const { - KAction * action = actionCollection()->action(name); + TDEAction * action = actionCollection()->action(name); if ( !action ) kdError() << k_funcinfo << "No such action: " << name << endl; return action; @@ -598,7 +598,7 @@ KAction * KTechlab::action( const TQString & name ) const void KTechlab::saveProperties( TDEConfig *conf ) { - // Dumbass KMainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?! + // Dumbass TDEMainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?! conf->setGroup("UI"); conf->writeEntry( "Width", width() ); conf->writeEntry( "Height", height() ); @@ -643,7 +643,7 @@ void KTechlab::saveProperties( TDEConfig *conf ) //END Open Views State saveSession( conf, "KateMDI" ); - // Piss off KMainWindow + // Piss off TDEMainWindow conf->setGroup("KateMDI"); int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); @@ -695,7 +695,7 @@ void KTechlab::readProperties( TDEConfig *conf ) finishRestore(); - // Dumbass KMainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?! + // Dumbass TDEMainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?! conf->setGroup("UI"); resize( conf->readNumEntry( "Width", 800 ), conf->readNumEntry( "Height", 500 ) ); KWin::setState( winId(), conf->readLongNumEntry( "WinState", NET::Max ) ); @@ -799,7 +799,7 @@ void KTechlab::slotTabContext( TQWidget* widget,const TQPoint & pos ) { // Shamelessly stolen from KDevelop... - KPopupMenu * tabMenu = new KPopupMenu; + TDEPopupMenu * tabMenu = new TDEPopupMenu; tabMenu->insertTitle( (dynamic_cast(widget))->caption() ); //Find the document on whose tab the user clicked @@ -1150,7 +1150,7 @@ void KTechlab::slotFileQuit() { // close the first window, the list makes the next one the first again. // This ensures that queryClose() is called on each window to ask for closing - KMainWindow* w; + TDEMainWindow* w; if(memberList) { for( w=memberList->first(); w!=0; w=memberList->next() ) -- cgit v1.2.1