Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kmultiedit.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of KDWinutils, KDAB's MFC to Qt migration tool.
4**
5** Copyright (C) 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6** All rights reserved.
7**
8** This file is intended solely for use by the migration tools and services
9** provided by Klarälvdalens Datakonsult AB.
10**
11** Any other use or distribution of this software that is not otherwise agreed
12** upon in writing and signed by an authorized representative of Klarälvdalens
13** Datakonsult AB, KDAB (USA) LLC, KDAB (Deutschland) GmbH & Co. K.G.,
14** KDAB (France) SAS, KDAB (UK), Ltd., or any future subsidiary of Klarälvdalens
15** Datakonsult AB is hereby prohibited.
16**
17** Contact info@kdab.com if any conditions stated above are unclear to you.
18**
19****************************************************************************/
20
21#pragma once
22
23#include "../corelib/kstring.h"
25
26class QTextEdit;
27
29
39{
40public:
42 QTextEdit *widget() const;
44 void setWidget(QTextEdit *lineEdit);
45
47 operator KString() const;
48
50 void SetWindowText(const KString &str);
51
53 void GetWindowText(KString &str) const;
54
56 void Clear();
57
59 void Copy();
60
62 void Cut();
63
65 void Paste();
66
68 void SetReadOnly(bool bReadOnly = true);
69
71 bool CanUndo() const;
72
73private:
74 QTextEdit *m_widget = nullptr;
75};
76
The KMultiEdit class is used to replace DDX_Control edit data exchange, for multi line edit.
Definition kmultiedit.h:39
void setWidget(QTextEdit *lineEdit)
void SetWindowText(const KString &str)
Change the text of the line edit.
void GetWindowText(KString &str) const
Get the text of the line edit.
void Copy()
Call this function to copy the current selection.
void SetReadOnly(bool bReadOnly=true)
Calls this function to set the read-only state of an edit control.
void Cut()
Call this function to delete (cut) the current selection.
bool CanUndo() const
Call this function to determine if the last edit operation can be undone.
void Clear()
Call this function to delete (clear) the current selection (if any) in the edit control.
QTextEdit * widget() const
void Paste()
Call this function to insert the data from the Clipboard into the KEdit at the insertion point.
The KString class provides a Unicode character string.
Definition kstring.h:45
#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