|
|
@ -102,7 +102,8 @@ void KCalcDisplay::slotCut(void)
|
|
|
|
|
|
|
|
|
|
|
|
void KCalcDisplay::slotCopy(void)
|
|
|
|
void KCalcDisplay::slotCopy(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString txt = TQLabel::text();
|
|
|
|
TQString txt = (_num_base == NB_DECIMAL && KCalcSettings::copyToBufNoLocale()) ?
|
|
|
|
|
|
|
|
_display_amount.toTQString(KCalcSettings::precision(), _fixed_precision) : TQLabel::text();
|
|
|
|
if (_num_base == NB_HEX)
|
|
|
|
if (_num_base == NB_HEX)
|
|
|
|
txt.prepend( "0x" );
|
|
|
|
txt.prepend( "0x" );
|
|
|
|
(TQApplication::clipboard())->setText(txt, TQClipboard::Clipboard);
|
|
|
|
(TQApplication::clipboard())->setText(txt, TQClipboard::Clipboard);
|
|
|
@ -142,6 +143,8 @@ void KCalcDisplay::slotPaste(bool bClipboard)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // _num_base == NB_DECIMAL && ! tmp_str.startsWith("0x", false)
|
|
|
|
else // _num_base == NB_DECIMAL && ! tmp_str.startsWith("0x", false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
tmp_str.replace(" ", "").replace(",", "."); //Normalization from the most localized numbers
|
|
|
|
|
|
|
|
|
|
|
|
setAmount(KNumber(tmp_str));
|
|
|
|
setAmount(KNumber(tmp_str));
|
|
|
|
if (_beep && _display_amount == KNumber::NotDefined)
|
|
|
|
if (_beep && _display_amount == KNumber::NotDefined)
|
|
|
|
KNotifyClient::beep();
|
|
|
|
KNotifyClient::beep();
|
|
|
|