@ -66,24 +66,24 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
bigBox = new TQVBoxLayout ( boxParent , KDialog : : marginHint ( ) , KDialog : : spacingHint ( ) ) ;
bigBox = new TQVBoxLayout ( boxParent , KDialog : : marginHint ( ) , KDialog : : spacingHint ( ) ) ;
LineEdit = new EditAction ( i18n ( " Values " ) , 0 , this , SLOT( slotEnter ( ) ) , actionCollection ( ) , " lineedit " ) ;
LineEdit = new EditAction ( i18n ( " Values " ) , 0 , this , TQ_ SLOT( slotEnter ( ) ) , actionCollection ( ) , " lineedit " ) ;
HistoryBox = new ComboAction ( i18n ( " History " ) , 0 , 0 , 0 , actionCollection ( ) , " history " ) ;
HistoryBox = new ComboAction ( i18n ( " History " ) , 0 , 0 , 0 , actionCollection ( ) , " history " ) ;
keypadAct = new TDEToggleAction ( i18n ( " Show Keypad " ) , " Ctrl+K " , 0 , 0 , actionCollection ( ) , " keypad " ) ;
keypadAct = new TDEToggleAction ( i18n ( " Show Keypad " ) , " Ctrl+K " , 0 , 0 , actionCollection ( ) , " keypad " ) ;
connect ( keypadAct , SIGNAL( toggled ( bool ) ) , SLOT( toggleKeypad ( bool ) ) ) ;
connect ( keypadAct , TQ_ SIGNAL( toggled ( bool ) ) , TQ_ SLOT( toggleKeypad ( bool ) ) ) ;
keypad = new MathKeypad ( dummy , " Keypad " ) ;
keypad = new MathKeypad ( dummy , " Keypad " ) ;
topLayout - > addWidget ( keypad ) ;
topLayout - > addWidget ( keypad ) ;
connect ( keypad , SIGNAL( closing ( ) ) , this , SLOT( keypadClosing ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( closing ( ) ) , this , TQ_ SLOT( keypadClosing ( ) ) ) ;
connect ( keypad , SIGNAL( insertChar ( const TQString & ) ) , this , SLOT( insertChar ( const TQString & ) ) ) ;
connect ( keypad , TQ_ SIGNAL( insertChar ( const TQString & ) ) , this , TQ_ SLOT( insertChar ( const TQString & ) ) ) ;
connect ( keypad , SIGNAL( add ( ) ) , this , SLOT( slotAdd ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( add ( ) ) , this , TQ_ SLOT( slotAdd ( ) ) ) ;
connect ( keypad , SIGNAL( subtract ( ) ) , this , SLOT( slotSubtract ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( subtract ( ) ) , this , TQ_ SLOT( slotSubtract ( ) ) ) ;
connect ( keypad , SIGNAL( multiply ( ) ) , this , SLOT( slotMultiply ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( multiply ( ) ) , this , TQ_ SLOT( slotMultiply ( ) ) ) ;
connect ( keypad , SIGNAL( divide ( ) ) , this , SLOT( slotDivide ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( divide ( ) ) , this , TQ_ SLOT( slotDivide ( ) ) ) ;
connect ( keypad , SIGNAL( enter ( ) ) , this , SLOT( slotEnter ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( enter ( ) ) , this , TQ_ SLOT( slotEnter ( ) ) ) ;
connect ( keypad , SIGNAL( backspace ( ) ) , this , SLOT( slotKeypadBackspace ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( backspace ( ) ) , this , TQ_ SLOT( slotKeypadBackspace ( ) ) ) ;
connect ( keypad , SIGNAL( eex ( ) ) , this , SLOT( slotEEX ( ) ) ) ;
connect ( keypad , TQ_ SIGNAL( eex ( ) ) , this , TQ_ SLOT( slotEEX ( ) ) ) ;
keypad - > hide ( ) ;
keypad - > hide ( ) ;
TQStringList options ( i18n ( " Degrees " ) ) ;
TQStringList options ( i18n ( " Degrees " ) ) ;
@ -106,45 +106,45 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
formulae - > setItems ( defaultFormulae ) ;
formulae - > setItems ( defaultFormulae ) ;
formulae - > setCurrentItem ( - 1 ) ;
formulae - > setCurrentItem ( - 1 ) ;
( void ) KStdAction : : quit ( this , SLOT( close ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : quit ( this , TQ_ SLOT( close ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : open ( this , SLOT( slotOpen ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : open ( this , TQ_ SLOT( slotOpen ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : preferences ( this , SLOT( slotConfigure ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : preferences ( this , TQ_ SLOT( slotConfigure ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : undo ( this , SLOT( slotRestoreStack ( ) ) , actionCollection ( ) ) - > setText ( i18n ( " Restore stack levels " ) ) ;
( void ) KStdAction : : undo ( this , TQ_ SLOT( slotRestoreStack ( ) ) , actionCollection ( ) ) - > setText ( i18n ( " Restore stack levels " ) ) ;
( void ) KStdAction : : configureToolbars ( this , SLOT( configureToolBars ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : configureToolbars ( this , TQ_ SLOT( configureToolBars ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : keyBindings ( this , SLOT( keyBindings ( ) ) , actionCollection ( ) ) ;
( void ) KStdAction : : keyBindings ( this , TQ_ SLOT( keyBindings ( ) ) , actionCollection ( ) ) ;
( void ) new TDEAction ( i18n ( " +/- " ) , " Alt+- " , this , SLOT( slotNegative ( ) ) , actionCollection ( ) , " +/- " ) ;
( void ) new TDEAction ( i18n ( " +/- " ) , " Alt+- " , this , TQ_ SLOT( slotNegative ( ) ) , actionCollection ( ) , " +/- " ) ;
( void ) new TDEAction ( " x! " , " Alt+! " , this , SLOT( slotFactorial ( ) ) , actionCollection ( ) , " factorial " ) ;
( void ) new TDEAction ( " x! " , " Alt+! " , this , TQ_ SLOT( slotFactorial ( ) ) , actionCollection ( ) , " factorial " ) ;
( void ) new TDEAction ( " 1/x " , " Alt+i " , this , SLOT( slotInverse ( ) ) , actionCollection ( ) , " 1/x " ) ;
( void ) new TDEAction ( " 1/x " , " Alt+i " , this , TQ_ SLOT( slotInverse ( ) ) , actionCollection ( ) , " 1/x " ) ;
( void ) new TDEAction ( " 10^x " , 0 , this , SLOT( slotRaiseTen ( ) ) , actionCollection ( ) , " 10^x " ) ;
( void ) new TDEAction ( " 10^x " , 0 , this , TQ_ SLOT( slotRaiseTen ( ) ) , actionCollection ( ) , " 10^x " ) ;
( void ) new TDEAction ( " e^x " , " Alt+E " , this , SLOT( slotRaiseE ( ) ) , actionCollection ( ) , " e^x " ) ;
( void ) new TDEAction ( " e^x " , " Alt+E " , this , TQ_ SLOT( slotRaiseE ( ) ) , actionCollection ( ) , " e^x " ) ;
( void ) new TDEAction ( " Mod " , " Alt+M " , this , SLOT( slotModulo ( ) ) , actionCollection ( ) , " modulo " ) ;
( void ) new TDEAction ( " Mod " , " Alt+M " , this , TQ_ SLOT( slotModulo ( ) ) , actionCollection ( ) , " modulo " ) ;
( void ) new TDEAction ( " Ln " , " Alt+L " , this , SLOT( slotLn ( ) ) , actionCollection ( ) , " ln " ) ;
( void ) new TDEAction ( " Ln " , " Alt+L " , this , TQ_ SLOT( slotLn ( ) ) , actionCollection ( ) , " ln " ) ;
( void ) new TDEAction ( " % " , " Alt+% " , this , SLOT( slotPercent ( ) ) , actionCollection ( ) , " percent " ) ;
( void ) new TDEAction ( " % " , " Alt+% " , this , TQ_ SLOT( slotPercent ( ) ) , actionCollection ( ) , " percent " ) ;
( void ) new TDEAction ( " Sqrt " , " Alt+R " , this , SLOT( slotSqrt ( ) ) , actionCollection ( ) , " sqrt " ) ;
( void ) new TDEAction ( " Sqrt " , " Alt+R " , this , TQ_ SLOT( slotSqrt ( ) ) , actionCollection ( ) , " sqrt " ) ;
( void ) new TDEAction ( " x^2 " , " Alt+Shift+S " , this , SLOT( slotSquared ( ) ) , actionCollection ( ) , " x^2 " ) ;
( void ) new TDEAction ( " x^2 " , " Alt+Shift+S " , this , TQ_ SLOT( slotSquared ( ) ) , actionCollection ( ) , " x^2 " ) ;
( void ) new TDEAction ( " y^x " , " Alt+^ " , this , SLOT( slotPower ( ) ) , actionCollection ( ) , " y^x " ) ;
( void ) new TDEAction ( " y^x " , " Alt+^ " , this , TQ_ SLOT( slotPower ( ) ) , actionCollection ( ) , " y^x " ) ;
InvButton = new TDEToggleAction ( " Inv " , " Ctrl+I " , 0 , 0 , actionCollection ( ) , " inverse " ) ;
InvButton = new TDEToggleAction ( " Inv " , " Ctrl+I " , 0 , 0 , actionCollection ( ) , " inverse " ) ;
HypButton = new TDEToggleAction ( " Hyp " , " Ctrl+H " , 0 , 0 , actionCollection ( ) , " hyperbolic " ) ;
HypButton = new TDEToggleAction ( " Hyp " , " Ctrl+H " , 0 , 0 , actionCollection ( ) , " hyperbolic " ) ;
// bitwise
// bitwise
( void ) new TDEAction ( i18n ( " And " ) , " Alt+A " , this , SLOT( slotAnd ( ) ) , actionCollection ( ) , " bitwise_and " ) ;
( void ) new TDEAction ( i18n ( " And " ) , " Alt+A " , this , TQ_ SLOT( slotAnd ( ) ) , actionCollection ( ) , " bitwise_and " ) ;
( void ) new TDEAction ( i18n ( " Or " ) , " Alt+O " , this , SLOT( slotOr ( ) ) , actionCollection ( ) , " bitwise_or " ) ;
( void ) new TDEAction ( i18n ( " Or " ) , " Alt+O " , this , TQ_ SLOT( slotOr ( ) ) , actionCollection ( ) , " bitwise_or " ) ;
( void ) new TDEAction ( i18n ( " XOr " ) , " Alt+X " , this , SLOT( slotXOr ( ) ) , actionCollection ( ) , " bitwise_xor " ) ;
( void ) new TDEAction ( i18n ( " XOr " ) , " Alt+X " , this , TQ_ SLOT( slotXOr ( ) ) , actionCollection ( ) , " bitwise_xor " ) ;
( void ) new TDEAction ( i18n ( " Left Shift " ) , " back " , 0 , this , SLOT( slotLsh ( ) ) , actionCollection ( ) , " bitwise_lsh " ) ;
( void ) new TDEAction ( i18n ( " Left Shift " ) , " back " , 0 , this , TQ_ SLOT( slotLsh ( ) ) , actionCollection ( ) , " bitwise_lsh " ) ;
( void ) new TDEAction ( i18n ( " Right Shift " ) , " forward " , 0 , this , SLOT( slotRsh ( ) ) , actionCollection ( ) , " bitwise_rsh " ) ;
( void ) new TDEAction ( i18n ( " Right Shift " ) , " forward " , 0 , this , TQ_ SLOT( slotRsh ( ) ) , actionCollection ( ) , " bitwise_rsh " ) ;
// trig
// trig
( void ) new TDEAction ( " Sin " , " Alt+S " , this , SLOT( slotSine ( ) ) , actionCollection ( ) , " sin " ) ;
( void ) new TDEAction ( " Sin " , " Alt+S " , this , TQ_ SLOT( slotSine ( ) ) , actionCollection ( ) , " sin " ) ;
( void ) new TDEAction ( " Cos " , " Alt+C " , this , SLOT( slotCosine ( ) ) , actionCollection ( ) , " cos " ) ;
( void ) new TDEAction ( " Cos " , " Alt+C " , this , TQ_ SLOT( slotCosine ( ) ) , actionCollection ( ) , " cos " ) ;
( void ) new TDEAction ( " Tan " , " Alt+T " , this , SLOT( slotTangent ( ) ) , actionCollection ( ) , " tan " ) ;
( void ) new TDEAction ( " Tan " , " Alt+T " , this , TQ_ SLOT( slotTangent ( ) ) , actionCollection ( ) , " tan " ) ;
// edit
// edit
( void ) new TDEAction ( i18n ( " &Revert Stack Changes " ) , 0 , this , SLOT( slotRevert ( ) ) , actionCollection ( ) , " revert " ) ;
( void ) new TDEAction ( i18n ( " &Revert Stack Changes " ) , 0 , this , TQ_ SLOT( slotRevert ( ) ) , actionCollection ( ) , " revert " ) ;
( void ) new TDEAction ( i18n ( " &Drop " ) , 0 , this , SLOT( slotDrop ( ) ) , actionCollection ( ) , " drop " ) ;
( void ) new TDEAction ( i18n ( " &Drop " ) , 0 , this , TQ_ SLOT( slotDrop ( ) ) , actionCollection ( ) , " drop " ) ;
setStandardToolBarMenuEnabled ( true ) ;
setStandardToolBarMenuEnabled ( true ) ;
statusBar ( ) ;
statusBar ( ) ;
@ -154,14 +154,14 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
applyMainWindowSettings ( TDEGlobal : : config ( ) , " TopLevelWindow " ) ;
applyMainWindowSettings ( TDEGlobal : : config ( ) , " TopLevelWindow " ) ;
// signals and slots connections
// signals and slots connections
connect ( baseGroup , SIGNAL( activated ( int ) ) , this , SLOT( slotBaseChanged ( int ) ) ) ;
connect ( baseGroup , TQ_ SIGNAL( activated ( int ) ) , this , TQ_ SLOT( slotBaseChanged ( int ) ) ) ;
connect ( angGroup , SIGNAL( activated ( int ) ) , this , SLOT( slotAngleChanged ( int ) ) ) ;
connect ( angGroup , TQ_ SIGNAL( activated ( int ) ) , this , TQ_ SLOT( slotAngleChanged ( int ) ) ) ;
connect ( formulae , SIGNAL( activated ( const TQString & ) ) , this , SLOT( runFormula ( const TQString & ) ) ) ;
connect ( formulae , TQ_ SIGNAL( activated ( const TQString & ) ) , this , TQ_ SLOT( runFormula ( const TQString & ) ) ) ;
connect ( HistoryBox - > combo ( ) , SIGNAL( activated ( const TQString & ) ) , this , SLOT( slotPushHighlighted ( const TQString & ) ) ) ;
connect ( HistoryBox - > combo ( ) , TQ_ SIGNAL( activated ( const TQString & ) ) , this , TQ_ SLOT( slotPushHighlighted ( const TQString & ) ) ) ;
connect ( LineEdit - > edit ( ) , SIGNAL( backspacePressed ( ) ) , this , SLOT( slotBackspace ( ) ) ) ;
connect ( LineEdit - > edit ( ) , TQ_ SIGNAL( backspacePressed ( ) ) , this , TQ_ SLOT( slotBackspace ( ) ) ) ;
pi = asin ( 1L ) * 2L ;
pi = asin ( 1L ) * 2L ;
variables [ " pi " ] = pi ;
variables [ " pi " ] = pi ;
@ -270,7 +270,7 @@ void Mathemagics::updateStack()
level - > edit ( ) - > setText ( format ( * Stack - > at ( i - 1 ) ) ) ;
level - > edit ( ) - > setText ( format ( * Stack - > at ( i - 1 ) ) ) ;
}
}
TQTimer : : singleShot ( 100 , this , SLOT( scrollToBottom ( ) ) ) ;
TQTimer : : singleShot ( 100 , this , TQ_ SLOT( scrollToBottom ( ) ) ) ;
}
}
void Mathemagics : : enter ( )
void Mathemagics : : enter ( )
@ -1091,9 +1091,9 @@ void Mathemagics::slotConfigure()
if ( optionDialog = = 0 )
if ( optionDialog = = 0 )
return ;
return ;
connect ( optionDialog , SIGNAL( hidden ( ) ) , this , SLOT( slotConfigureHide ( ) ) ) ;
connect ( optionDialog , TQ_ SIGNAL( hidden ( ) ) , this , TQ_ SLOT( slotConfigureHide ( ) ) ) ;
connect ( optionDialog , SIGNAL( valueChanged ( ) ) , this , SLOT( slotUpdateConfiguration ( ) ) ) ;
connect ( optionDialog , TQ_ SIGNAL( valueChanged ( ) ) , this , TQ_ SLOT( slotUpdateConfiguration ( ) ) ) ;
connect ( optionDialog , SIGNAL( clearHistory ( ) ) , this , SLOT( clearHistory ( ) ) ) ;
connect ( optionDialog , TQ_ SIGNAL( clearHistory ( ) ) , this , TQ_ SLOT( clearHistory ( ) ) ) ;
}
}
optionDialog - > show ( ) ;
optionDialog - > show ( ) ;
@ -1101,7 +1101,7 @@ void Mathemagics::slotConfigure()
void Mathemagics : : slotConfigureHide ( )
void Mathemagics : : slotConfigureHide ( )
{
{
TQTimer : : singleShot ( 0 , this , SLOT( slotConfigureDestroy ( ) ) ) ;
TQTimer : : singleShot ( 0 , this , TQ_ SLOT( slotConfigureDestroy ( ) ) ) ;
}
}
void Mathemagics : : slotConfigureDestroy ( )
void Mathemagics : : slotConfigureDestroy ( )
@ -1153,8 +1153,8 @@ void Mathemagics::recreateStackLevels()
for ( int i = numStackLevels ; i > 0 ; - - i )
for ( int i = numStackLevels ; i > 0 ; - - i )
{
{
StackLevel * level = new StackLevel ( i , boxParent ) ;
StackLevel * level = new StackLevel ( i , boxParent ) ;
connect ( level , SIGNAL( buttonPressed ( int ) ) , this , SLOT( slotRoll ( int ) ) ) ;
connect ( level , TQ_ SIGNAL( buttonPressed ( int ) ) , this , TQ_ SLOT( slotRoll ( int ) ) ) ;
connect ( level , SIGNAL( returnPressed ( int ) ) , this , SLOT( slotUpdateStackLevel ( int ) ) ) ;
connect ( level , TQ_ SIGNAL( returnPressed ( int ) ) , this , TQ_ SLOT( slotUpdateStackLevel ( int ) ) ) ;
bigBox - > addWidget ( level ) ;
bigBox - > addWidget ( level ) ;
stackLevels . prepend ( level ) ;
stackLevels . prepend ( level ) ;
@ -1853,7 +1853,7 @@ void Mathemagics::configureToolBars()
saveMainWindowSettings ( TDEGlobal : : config ( ) , " TopLevelWindow " ) ;
saveMainWindowSettings ( TDEGlobal : : config ( ) , " TopLevelWindow " ) ;
KEditToolbar dlg ( actionCollection ( ) ) ;
KEditToolbar dlg ( actionCollection ( ) ) ;
connect ( & dlg , SIGNAL( newToolbarConfig ( ) ) , SLOT( newToolBarConfig ( ) ) ) ;
connect ( & dlg , TQ_ SIGNAL( newToolbarConfig ( ) ) , TQ_ SLOT( newToolBarConfig ( ) ) ) ;
if ( dlg . exec ( ) )
if ( dlg . exec ( ) )
createGUI ( ) ;
createGUI ( ) ;
@ -1885,10 +1885,10 @@ int EditAction::plug(TQWidget *w, int index)
KParanoidLine * comboBox = new KParanoidLine ( toolBar , " search edit " ) ;
KParanoidLine * comboBox = new KParanoidLine ( toolBar , " search edit " ) ;
toolBar - > insertWidget ( id , 70 , comboBox , index ) ;
toolBar - > insertWidget ( id , 70 , comboBox , index ) ;
if ( m_receiver )
if ( m_receiver )
connect ( comboBox , SIGNAL( returnPressed ( ) ) , m_receiver , m_member ) ;
connect ( comboBox , TQ_ SIGNAL( returnPressed ( ) ) , m_receiver , m_member ) ;
addContainer ( toolBar , id ) ;
addContainer ( toolBar , id ) ;
connect ( toolBar , SIGNAL( destroyed ( ) ) , this , SLOT( slotDestroyed ( ) ) ) ;
connect ( toolBar , TQ_ SIGNAL( destroyed ( ) ) , this , TQ_ SLOT( slotDestroyed ( ) ) ) ;
toolBar - > setItemAutoSized ( id , true ) ;
toolBar - > setItemAutoSized ( id , true ) ;
m_combo = comboBox ;
m_combo = comboBox ;
emit plugged ( ) ;
emit plugged ( ) ;
@ -1946,10 +1946,10 @@ int ComboAction::plug(TQWidget *w, int index)
TQComboBox * comboBox = new TQComboBox ( toolBar , " search edit " ) ;
TQComboBox * comboBox = new TQComboBox ( toolBar , " search edit " ) ;
toolBar - > insertWidget ( id , 70 , comboBox , index ) ;
toolBar - > insertWidget ( id , 70 , comboBox , index ) ;
if ( m_receiver )
if ( m_receiver )
connect ( comboBox , SIGNAL( returnPressed ( ) ) , m_receiver , m_member ) ;
connect ( comboBox , TQ_ SIGNAL( returnPressed ( ) ) , m_receiver , m_member ) ;
addContainer ( toolBar , id ) ;
addContainer ( toolBar , id ) ;
connect ( toolBar , SIGNAL( destroyed ( ) ) , this , SLOT( slotDestroyed ( ) ) ) ;
connect ( toolBar , TQ_ SIGNAL( destroyed ( ) ) , this , TQ_ SLOT( slotDestroyed ( ) ) ) ;
toolBar - > setItemAutoSized ( id , true ) ;
toolBar - > setItemAutoSized ( id , true ) ;
m_combo = comboBox ;
m_combo = comboBox ;
emit plugged ( ) ;
emit plugged ( ) ;