@ -95,20 +95,20 @@ Krecipes::Krecipes()
// allow the view to change the statusbar and caption
// allow the view to change the statusbar and caption
connect ( m_view , SIGNAL( signalChangeStatusbar ( const TQString & ) ) ,
connect ( m_view , TQ_ SIGNAL( signalChangeStatusbar ( const TQString & ) ) ,
this , SLOT( changeStatusbar ( const TQString & ) ) ) ;
this , TQ_ SLOT( changeStatusbar ( const TQString & ) ) ) ;
connect ( m_view , SIGNAL( signalChangeCaption ( const TQString & ) ) ,
connect ( m_view , TQ_ SIGNAL( signalChangeCaption ( const TQString & ) ) ,
this , SLOT( changeCaption ( const TQString & ) ) ) ;
this , TQ_ SLOT( changeCaption ( const TQString & ) ) ) ;
connect ( m_view , SIGNAL( panelShown ( KrePanel , bool ) ) , SLOT( updateActions ( KrePanel , bool ) ) ) ;
connect ( m_view , TQ_ SIGNAL( panelShown ( KrePanel , bool ) ) , TQ_ SLOT( updateActions ( KrePanel , bool ) ) ) ;
connect ( m_view , SIGNAL( panelShown ( KrePanel , bool ) ) , SLOT( updateActions ( KrePanel , bool ) ) ) ;
connect ( m_view , TQ_ SIGNAL( panelShown ( KrePanel , bool ) ) , TQ_ SLOT( updateActions ( KrePanel , bool ) ) ) ;
connect ( m_view , SIGNAL( recipeSelected ( bool ) ) , SLOT( recipeSelected ( bool ) ) ) ;
connect ( m_view , TQ_ SIGNAL( recipeSelected ( bool ) ) , TQ_ SLOT( recipeSelected ( bool ) ) ) ;
// Enable/Disable the Save Button (Initialize disabled, and connect signal)
// Enable/Disable the Save Button (Initialize disabled, and connect signal)
connect ( m_view , SIGNAL( enableSaveOption ( bool ) ) , this , SLOT( enableSaveOption ( bool ) ) ) ;
connect ( m_view , TQ_ SIGNAL( enableSaveOption ( bool ) ) , this , TQ_ SLOT( enableSaveOption ( bool ) ) ) ;
enableSaveOption ( false ) ; // Disables saving initially
enableSaveOption ( false ) ; // Disables saving initially
recipeSelected ( false ) ; //nothing is selected initially
recipeSelected ( false ) ; //nothing is selected initially
@ -163,74 +163,74 @@ void Krecipes::recipeSelected( bool selected )
void Krecipes : : setupActions ( )
void Krecipes : : setupActions ( )
{
{
printAction = KStdAction : : print ( this , SLOT( filePrint ( ) ) , actionCollection ( ) ) ;
printAction = KStdAction : : print ( this , TQ_ SLOT( filePrint ( ) ) , actionCollection ( ) ) ;
reloadAction = new TDEAction ( i18n ( " Reloa&d " ) , " reload " , Key_F5 , m_view , SLOT( reloadDisplay ( ) ) , actionCollection ( ) , " reload_action " ) ;
reloadAction = new TDEAction ( i18n ( " Reloa&d " ) , " reload " , Key_F5 , m_view , TQ_ SLOT( reloadDisplay ( ) ) , actionCollection ( ) , " reload_action " ) ;
editAction = new TDEAction ( i18n ( " &Edit Recipe " ) , " edit " , CTRL + Key_E ,
editAction = new TDEAction ( i18n ( " &Edit Recipe " ) , " edit " , CTRL + Key_E ,
m_view , SLOT( editRecipe ( ) ) ,
m_view , TQ_ SLOT( editRecipe ( ) ) ,
actionCollection ( ) , " edit_action " ) ;
actionCollection ( ) , " edit_action " ) ;
( void ) new TDEAction ( i18n ( " &Measurement Converter " ) , " " , CTRL + Key_M ,
( void ) new TDEAction ( i18n ( " &Measurement Converter " ) , " " , CTRL + Key_M ,
this , SLOT( conversionToolSlot ( ) ) ,
this , TQ_ SLOT( conversionToolSlot ( ) ) ,
actionCollection ( ) , " converter_action " ) ;
actionCollection ( ) , " converter_action " ) ;
TDEConfig * config = TDEGlobal : : config ( ) ;
TDEConfig * config = TDEGlobal : : config ( ) ;
config - > setGroup ( " Advanced " ) ;
config - > setGroup ( " Advanced " ) ;
if ( config - > readBoolEntry ( " UnhideMergeTools " , false ) ) {
if ( config - > readBoolEntry ( " UnhideMergeTools " , false ) ) {
( void ) new TDEAction ( i18n ( " &Merge Similar Categories... " ) , " categories " , CTRL + Key_M ,
( void ) new TDEAction ( i18n ( " &Merge Similar Categories... " ) , " categories " , CTRL + Key_M ,
this , SLOT( mergeSimilarCategories ( ) ) ,
this , TQ_ SLOT( mergeSimilarCategories ( ) ) ,
actionCollection ( ) , " merge_categories_action " ) ;
actionCollection ( ) , " merge_categories_action " ) ;
( void ) new TDEAction ( i18n ( " &Merge Similar Ingredients... " ) , " ingredients " , CTRL + Key_M ,
( void ) new TDEAction ( i18n ( " &Merge Similar Ingredients... " ) , " ingredients " , CTRL + Key_M ,
this , SLOT( mergeSimilarIngredients ( ) ) ,
this , TQ_ SLOT( mergeSimilarIngredients ( ) ) ,
actionCollection ( ) , " merge_ingredients_action " ) ;
actionCollection ( ) , " merge_ingredients_action " ) ;
}
}
TDEAction * action = KStdAction : : openNew ( this , SLOT( fileNew ( ) ) , actionCollection ( ) ) ;
TDEAction * action = KStdAction : : openNew ( this , TQ_ SLOT( fileNew ( ) ) , actionCollection ( ) ) ;
action - > setText ( i18n ( " &New Recipe " ) ) ;
action - > setText ( i18n ( " &New Recipe " ) ) ;
saveAction = KStdAction : : save ( this , SLOT( fileSave ( ) ) , actionCollection ( ) ) ;
saveAction = KStdAction : : save ( this , TQ_ SLOT( fileSave ( ) ) , actionCollection ( ) ) ;
KStdAction : : quit ( kapp , SLOT( quit ( ) ) , actionCollection ( ) ) ;
KStdAction : : quit ( kapp , TQ_ SLOT( quit ( ) ) , actionCollection ( ) ) ;
m_toolbarAction = KStdAction : : showToolbar ( this , SLOT( optionsShowToolbar ( ) ) , actionCollection ( ) ) ;
m_toolbarAction = KStdAction : : showToolbar ( this , TQ_ SLOT( optionsShowToolbar ( ) ) , actionCollection ( ) ) ;
m_statusbarAction = KStdAction : : showStatusbar ( this , SLOT( optionsShowStatusbar ( ) ) , actionCollection ( ) ) ;
m_statusbarAction = KStdAction : : showStatusbar ( this , TQ_ SLOT( optionsShowStatusbar ( ) ) , actionCollection ( ) ) ;
KStdAction : : keyBindings ( this , SLOT( optionsConfigureKeys ( ) ) , actionCollection ( ) ) ;
KStdAction : : keyBindings ( this , TQ_ SLOT( optionsConfigureKeys ( ) ) , actionCollection ( ) ) ;
KStdAction : : configureToolbars ( this , SLOT( optionsConfigureToolbars ( ) ) , actionCollection ( ) ) ;
KStdAction : : configureToolbars ( this , TQ_ SLOT( optionsConfigureToolbars ( ) ) , actionCollection ( ) ) ;
KStdAction : : preferences ( this , SLOT( optionsPreferences ( ) ) , actionCollection ( ) ) ;
KStdAction : : preferences ( this , TQ_ SLOT( optionsPreferences ( ) ) , actionCollection ( ) ) ;
( void ) new TDEAction ( i18n ( " Import from File... " ) , CTRL + Key_I ,
( void ) new TDEAction ( i18n ( " Import from File... " ) , CTRL + Key_I ,
this , SLOT( import ( ) ) ,
this , TQ_ SLOT( import ( ) ) ,
actionCollection ( ) , " import_action " ) ;
actionCollection ( ) , " import_action " ) ;
( void ) new TDEAction ( i18n ( " Import from Database... " ) , 0 ,
( void ) new TDEAction ( i18n ( " Import from Database... " ) , 0 ,
this , SLOT( kreDBImport ( ) ) ,
this , TQ_ SLOT( kreDBImport ( ) ) ,
actionCollection ( ) , " import_db_action " ) ;
actionCollection ( ) , " import_db_action " ) ;
exportAction = new TDEAction ( i18n ( " Export... " ) , 0 ,
exportAction = new TDEAction ( i18n ( " Export... " ) , 0 ,
this , SLOT( fileExport ( ) ) ,
this , TQ_ SLOT( fileExport ( ) ) ,
actionCollection ( ) , " export_action " ) ;
actionCollection ( ) , " export_action " ) ;
copyToClipboardAction = new TDEAction ( i18n ( " &Copy to Clipboard " ) , " edit-copy " ,
copyToClipboardAction = new TDEAction ( i18n ( " &Copy to Clipboard " ) , " edit-copy " ,
CTRL + Key_C ,
CTRL + Key_C ,
this , SLOT( fileToClipboard ( ) ) ,
this , TQ_ SLOT( fileToClipboard ( ) ) ,
actionCollection ( ) , " copy_to_clipboard_action " ) ;
actionCollection ( ) , " copy_to_clipboard_action " ) ;
( void ) new TDEAction ( i18n ( " Page Setup... " ) , 0 ,
( void ) new TDEAction ( i18n ( " Page Setup... " ) , 0 ,
this , SLOT( pageSetupSlot ( ) ) ,
this , TQ_ SLOT( pageSetupSlot ( ) ) ,
actionCollection ( ) , " page_setup_action " ) ;
actionCollection ( ) , " page_setup_action " ) ;
( void ) new TDEAction ( i18n ( " Print Setup... " ) , 0 ,
( void ) new TDEAction ( i18n ( " Print Setup... " ) , 0 ,
this , SLOT( printSetupSlot ( ) ) ,
this , TQ_ SLOT( printSetupSlot ( ) ) ,
actionCollection ( ) , " print_setup_action " ) ;
actionCollection ( ) , " print_setup_action " ) ;
( void ) new TDEAction ( i18n ( " Backup... " ) , " krecipes_file " , 0 ,
( void ) new TDEAction ( i18n ( " Backup... " ) , " krecipes_file " , 0 ,
this , SLOT( backupSlot ( ) ) ,
this , TQ_ SLOT( backupSlot ( ) ) ,
actionCollection ( ) , " backup_action " ) ;
actionCollection ( ) , " backup_action " ) ;
( void ) new TDEAction ( i18n ( " Restore... " ) , 0 ,
( void ) new TDEAction ( i18n ( " Restore... " ) , 0 ,
this , SLOT( restoreSlot ( ) ) ,
this , TQ_ SLOT( restoreSlot ( ) ) ,
actionCollection ( ) , " restore_action " ) ;
actionCollection ( ) , " restore_action " ) ;
updateActions ( SelectP , true ) ;
updateActions ( SelectP , true ) ;
@ -651,7 +651,7 @@ void Krecipes::optionsConfigureToolbars()
# endif
# endif
KEditToolbar dlg ( actionCollection ( ) ) ;
KEditToolbar dlg ( actionCollection ( ) ) ;
connect ( & dlg , SIGNAL( newToolbarConfig ( ) ) , this , SLOT( newToolbarConfig ( ) ) ) ;
connect ( & dlg , TQ_ SIGNAL( newToolbarConfig ( ) ) , this , TQ_ SLOT( newToolbarConfig ( ) ) ) ;
dlg . exec ( ) ;
dlg . exec ( ) ;
}
}