Fixes the numerical streaming value for FLineEdit and FLabel

This commit is contained in:
Markus Gans 2019-11-16 21:48:59 +01:00
parent 4540a6f455
commit 7ba294c496
5 changed files with 32 additions and 204 deletions

View File

@ -67,13 +67,6 @@ FLabel& FLabel::operator = (const FString& s)
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const FString& s)
{
setText(text + s);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (fc::SpecialCharacter c)
{
@ -88,87 +81,6 @@ FLabel& FLabel::operator << (const wchar_t c)
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const uInt16 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const sInt16 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const uInt32 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const sInt32 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const uInt64 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const sInt64 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const float num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const double num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLabel& FLabel::operator << (const lDouble num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
const FLabel& FLabel::operator >> (FString& s)
{

View File

@ -72,13 +72,6 @@ FLineEdit& FLineEdit::operator = (const FString& s)
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const FString& s)
{
setText(text + s);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (fc::SpecialCharacter c)
{
@ -93,87 +86,6 @@ FLineEdit& FLineEdit::operator << (const wchar_t c)
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const uInt16 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const sInt16 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const uInt32 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const sInt32 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const uInt64 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const sInt64 num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const float num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const double num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
FLineEdit& FLineEdit::operator << (const lDouble num)
{
FString num_str;
num_str << num;
setText(text + num_str);
return *this;
}
//----------------------------------------------------------------------
const FLineEdit& FLineEdit::operator >> (FString& s)
{

View File

@ -85,18 +85,10 @@ class FLabel : public FWidget
// Overloaded operators
FLabel& operator = (const FString&);
FLabel& operator << (const FString&);
template <typename typeT>
FLabel& operator << (const typeT&);
FLabel& operator << (fc::SpecialCharacter);
FLabel& operator << (const wchar_t);
FLabel& operator << (const uInt16);
FLabel& operator << (const sInt16);
FLabel& operator << (const uInt32);
FLabel& operator << (const sInt32);
FLabel& operator << (const uInt64);
FLabel& operator << (const sInt64);
FLabel& operator << (const float);
FLabel& operator << (const double);
FLabel& operator << (const lDouble);
const FLabel& operator >> (FString&);
// Accessors
@ -166,6 +158,16 @@ class FLabel : public FWidget
};
// FLabel inline functions
//----------------------------------------------------------------------
template <typename typeT>
inline FLabel& FLabel::operator << (const typeT& s)
{
FString str{};
str << s;
setText(text + str);
return *this;
}
//----------------------------------------------------------------------
inline const FString FLabel::getClassName() const
{ return "FLabel"; }

View File

@ -101,18 +101,10 @@ class FLineEdit : public FWidget
// Overloaded operators
FLineEdit& operator = (const FString&);
FLineEdit& operator << (const FString&);
template <typename typeT>
FLineEdit& operator << (const typeT&);
FLineEdit& operator << (fc::SpecialCharacter);
FLineEdit& operator << (const wchar_t);
FLineEdit& operator << (const uInt16);
FLineEdit& operator << (const sInt16);
FLineEdit& operator << (const uInt32);
FLineEdit& operator << (const sInt32);
FLineEdit& operator << (const uInt64);
FLineEdit& operator << (const sInt64);
FLineEdit& operator << (const float);
FLineEdit& operator << (const double);
FLineEdit& operator << (const lDouble);
const FLineEdit& operator >> (FString&);
// Accessors
@ -235,6 +227,16 @@ class FLineEdit : public FWidget
// FLineEdit inline functions
//----------------------------------------------------------------------
template <typename typeT>
inline FLineEdit& FLineEdit::operator << (const typeT& s)
{
FString str{};
str << s;
setText(text + str);
return *this;
}
//----------------------------------------------------------------------
inline const FString FLineEdit::getClassName() const
{ return "FLineEdit"; }

View File

@ -44,17 +44,17 @@ typedef unsigned char uChar;
typedef unsigned short uShort;
typedef unsigned int uInt;
typedef unsigned long uLong;
typedef uint8_t uInt8;
typedef uint16_t uInt16;
typedef uint32_t uInt32;
typedef uint64_t uInt64;
typedef std::uint8_t uInt8;
typedef std::uint16_t uInt16;
typedef std::uint32_t uInt32;
typedef std::uint64_t uInt64;
typedef signed int sInt;
typedef signed long sLong;
typedef int8_t sInt8;
typedef int16_t sInt16;
typedef int32_t sInt32;
typedef int64_t sInt64;
typedef std::int8_t sInt8;
typedef std::int16_t sInt16;
typedef std::int32_t sInt32;
typedef std::int64_t sInt64;
typedef long double lDouble;