43 explicit KText(
const wchar_t *text);
44 explicit KText(
const char *text);
72 operator QString()
const;
73 operator std::string()
const;
74 operator std::wstring()
const;
82#ifdef KDWINUTILS_WITHMFC
84 explicit KText(
const CString &text);
86 operator CString()
const;
98 [[deprecated(
"Use explicit conversion methods")]]
const char *
constData()
const;
105 template <
typename T,
typename... Ts>
116 QString value()
const;
117 void setValue(
const QString &text);
121 QWidget *m_widget =
nullptr;
static QString FormatString(T &&format, Ts... args)
Creates a QString by passing a format string and arguments, like CString::Format.
Definition kstring.h:374
Class used as member for DDX_Text data exchange.
Definition ktext.h:40
QWidget * widget() const
Returns the widget associated with this KText.
void setValidator(QValidator *validator)
Sets a validator to the widget associated with this KText.
KText & operator=(const QString &text)
KText & Format(T &&format, Ts... args)
Writes formatted data to the widget in the same way that sprintf_s formats data into a C-style charac...
Definition ktext.h:106
void setWidget(QWidget *label)
Sets the widget associated with this KText.
KText & operator=(const KText &other)=delete
const char * constData() const
Converts to a const char * implicitly.
std::wstring toStdWString() const
int Compare(const QString &other) const
Compares two strings (case-sensitive).
KText & operator=(const CString &text)
KText & operator=(const char *text)
KText(const KText &other)=delete
KText(const wchar_t *text)
KText & operator=(const wchar_t *text)
CString toCString() const
std::string toStdString() const
QString toQString() const
KText(const CString &text)
#define KDWINUTILS_EXPORT
Definition kdwinutils_export.h:31
#define KDWINUTILS_BEGIN_NAMESPACE
Definition kdwinutils_global.h:27
#define KDWINUTILS_END_NAMESPACE
Definition kdwinutils_global.h:28