@ -275,13 +275,13 @@ void KTechlab::overlayToolBarScreenshot()
return ;
}
TQPtrListIterator < K ToolBar> toolBarIterator ( ) ;
TQPtrListIterator < TDE ToolBar> toolBarIterator ( ) ;
// TQWidget * toolsWidget = toolBar( "toolsToolBar" );
// TQWidget * debugWidget = toolBar( "debugTB" );
KToolBar * toolsWidget = static_cast < K ToolBar* > ( TQT_TQWIDGET ( child ( " toolsToolBar " , " K ToolBar" ) ) ) ;
KToolBar * debugWidget = static_cast < K ToolBar* > ( TQT_TQWIDGET ( child ( " debugTB " , " K ToolBar" ) ) ) ;
TDEToolBar * toolsWidget = static_cast < TDE ToolBar* > ( TQT_TQWIDGET ( child ( " toolsToolBar " , " TDE ToolBar" ) ) ) ;
TDEToolBar * debugWidget = static_cast < TDE ToolBar* > ( TQT_TQWIDGET ( child ( " debugTB " , " TDE ToolBar" ) ) ) ;
if ( ! toolsWidget & & ! debugWidget )
return ;
@ -410,7 +410,7 @@ void KTechlab::slotUpdateTabWidget()
void KTechlab : : setupActions ( )
{
K ActionCollection * ac = actionCollection ( ) ;
TDE ActionCollection * 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 K ToolBarPopupAction( i18n ( " &New " ) , " filenew " , KStdAccel: : shortcut ( K StdAccel: : New ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNew ( ) ) , ac , " newfile_popup " ) ;
TDEToolBarPopupAction * p = new TDE ToolBarPopupAction( i18n ( " &New " ) , " filenew " , TDEStdAccel: : shortcut ( TDE StdAccel: : New ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNew ( ) ) , ac , " newfile_popup " ) ;
p - > popupMenu ( ) - > insertTitle ( i18n ( " New File " ) ) ;
( new K Action( i18n ( " Assembly " ) , " source " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewAssembly ( ) ) , ac , " newfile_asm " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new K Action( i18n ( " C source " ) , " source_c " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewC ( ) ) , ac , " newfile_c " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new K Action( i18n ( " Circuit " ) , " ktechlab_circuit " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewCircuit ( ) ) , ac , " newfile_circuit " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new K Action( i18n ( " FlowCode " ) , " ktechlab_flowcode " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewFlowCode ( ) ) , ac , " newfile_flowcode " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new TDE Action( i18n ( " Assembly " ) , " source " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewAssembly ( ) ) , ac , " newfile_asm " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new TDE Action( i18n ( " C source " ) , " source_c " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewC ( ) ) , ac , " newfile_c " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new TDE Action( i18n ( " Circuit " ) , " ktechlab_circuit " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewCircuit ( ) ) , ac , " newfile_circuit " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new TDE Action( i18n ( " FlowCode " ) , " ktechlab_flowcode " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewFlowCode ( ) ) , ac , " newfile_flowcode " ) ) - > plug ( p - > popupMenu ( ) ) ;
# ifdef MECHANICS
( new K Action( i18n ( " Mechanics " ) , " ktechlab_mechanics " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewMechanics ( ) ) , ac , " newfile_mechanics " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new TDE Action( i18n ( " Mechanics " ) , " ktechlab_mechanics " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewMechanics ( ) ) , ac , " newfile_mechanics " ) ) - > plug ( p - > popupMenu ( ) ) ;
# endif
( new K Action( " Microbe " , " ktechlab_microbe " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotFileNewMicrobe ( ) ) , ac , " newfile_microbe " ) ) - > plug ( p - > popupMenu ( ) ) ;
( new TDE Action( " 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 K Action( i18n ( " New Project.. " ) , " window_new " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotNewProject ( ) ) , ac , " project_new " ) ;
new K Action( i18n ( " Open Project... " ) , " project_open " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotOpenProject ( ) ) , ac , " project_open " ) ;
// m_recentProjects = new K RecentFilesAction( i18n("Open &Recent Project..."), 0, ProjectManager::self(), TQT_SLOT(slotOpenProject(const KURL&)), ac, "project_open_recent" );
new TDE Action( i18n ( " New Project.. " ) , " window_new " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotNewProject ( ) ) , ac , " project_new " ) ;
new TDE Action( i18n ( " Open Project... " ) , " project_open " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotOpenProject ( ) ) , ac , " project_open " ) ;
// m_recentProjects = new TDE RecentFilesAction( 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 K Action( i18n ( " Export to Makefile... " ) , " fileexport " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotExportToMakefile ( ) ) , ac , " project_export_makefile " ) ;
new K Action( i18n ( " Create Subproject... " ) , 0 , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotCreateSubproject ( ) ) , ac , " project_create_subproject " ) ;
new K Action( i18n ( " Add Existing File... " ) , " fileopen " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotAddFile ( ) ) , ac , " project_add_existing_file " ) ;
new K Action( i18n ( " Add Current File... " ) , " fileimport " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotAddCurrentFile ( ) ) , ac , " project_add_current_file " ) ;
// new K Action( i18n("Project Options"), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotProjectOptions()), ac, "project_options" );
new K Action( i18n ( " Close Project " ) , " fileclose " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotCloseProject ( ) ) , ac , " project_close " ) ;
new K Action( i18n ( " Remove from Project " ) , " editdelete " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotRemoveSelected ( ) ) , ac , " project_remove_selected " ) ;
new K Action( i18n ( " Insert Existing File... " ) , " fileopen " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotSubprojectAddExistingFile ( ) ) , ac , " subproject_add_existing_file " ) ;
new K Action( i18n ( " Insert Current File... " ) , " fileimport " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotSubprojectAddCurrentFile ( ) ) , ac , " subproject_add_current_file " ) ;
new K Action( i18n ( " Linker Options... " ) , " configure " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotSubprojectLinkerOptions ( ) ) , ac , " project_item_linker_options " ) ;
new K Action( i18n ( " Build... " ) , " launch " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotItemBuild ( ) ) , ac , " project_item_build " ) ;
new K Action( i18n ( " Upload... " ) , " convert_to_pic " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotItemUpload ( ) ) , ac , " project_item_upload " ) ;
new K Action( i18n ( " Processing Options... " ) , " configure " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotItemProcessingOptions ( ) ) , ac , " project_item_processing_options " ) ;
new TDE Action( i18n ( " Export to Makefile... " ) , " fileexport " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotExportToMakefile ( ) ) , ac , " project_export_makefile " ) ;
new TDE Action( i18n ( " Create Subproject... " ) , 0 , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotCreateSubproject ( ) ) , ac , " project_create_subproject " ) ;
new TDE Action( i18n ( " Add Existing File... " ) , " fileopen " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotAddFile ( ) ) , ac , " project_add_existing_file " ) ;
new TDE Action( i18n ( " Add Current File... " ) , " fileimport " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotAddCurrentFile ( ) ) , ac , " project_add_current_file " ) ;
// new TDE Action( i18n("Project Options"), "configure", 0, TQT_TQOBJECT(pm), TQT_SLOT(slotProjectOptions()), ac, "project_options" );
new TDE Action( i18n ( " Close Project " ) , " fileclose " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotCloseProject ( ) ) , ac , " project_close " ) ;
new TDE Action( i18n ( " Remove from Project " ) , " editdelete " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotRemoveSelected ( ) ) , ac , " project_remove_selected " ) ;
new TDE Action( i18n ( " Insert Existing File... " ) , " fileopen " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotSubprojectAddExistingFile ( ) ) , ac , " subproject_add_existing_file " ) ;
new TDE Action( i18n ( " Insert Current File... " ) , " fileimport " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotSubprojectAddCurrentFile ( ) ) , ac , " subproject_add_current_file " ) ;
new TDE Action( i18n ( " Linker Options... " ) , " configure " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotSubprojectLinkerOptions ( ) ) , ac , " project_item_linker_options " ) ;
new TDE Action( i18n ( " Build... " ) , " launch " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotItemBuild ( ) ) , ac , " project_item_build " ) ;
new TDE Action( i18n ( " Upload... " ) , " convert_to_pic " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotItemUpload ( ) ) , ac , " project_item_upload " ) ;
new TDE Action( i18n ( " Processing Options... " ) , " configure " , 0 , TQT_TQOBJECT ( pm ) , TQT_SLOT ( slotItemProcessingOptions ( ) ) , ac , " project_item_processing_options " ) ;
//END Project Actions
new K Action( 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 K Action( 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 TDE Action( 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 TDE Action( 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 K ToggleAction( i18n ( " Run Simulation " ) , " player_play " , TQt : : Key_F10 , 0 , 0 , ac , " simulation_run " ) ;
TDEToggleAction * ta = new TDE ToggleAction( 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 ) ;
K PopupMenu dropMenu ;
TDE PopupMenu 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 )
}
K Action * KTechlab : : action ( const TQString & name ) const
TDE Action * KTechlab : : action ( const TQString & name ) const
{
K Action * action = actionCollection ( ) - > action ( name ) ;
TDE Action * 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 K MainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?!
// Dumbass TDE MainWindow - 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 K MainWindow
// Piss off TDE MainWindow
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 K MainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?!
// Dumbass TDE MainWindow - 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 K PopupMenu;
TDEPopupMenu * tabMenu = new TDE PopupMenu;
tabMenu - > insertTitle ( ( dynamic_cast < ViewContainer * > ( 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
K MainWindow* w ;
TDE MainWindow* w ;
if ( memberList )
{
for ( w = memberList - > first ( ) ; w ! = 0 ; w = memberList - > next ( ) )