![]() |
KDWinUtils
Helper library for MFC to Qt migration
|
The KEdit class is used to replace DDX_Control edit data exchange. More...
#include <kedit.h>
Public Member Functions | |
| 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. | |
| void | Copy () |
| Call this function to copy the current selection. | |
| void | Cut () |
| Call this function to delete (cut) the current selection. | |
| uint | GetLimitText () const |
| Call this member function to get the text limit for this KEdit object. | |
| bool | GetModify () const |
| Call this function to determine whether the contents of an edit control have been modified. | |
| int | GetSel () const |
| Gets the first character position of the current selection in an edit control. | |
| void | GetSel (int &nStartChar, int &nEndChar) const |
| Gets the first and last character positions of the current selection in an edit control. | |
| void | GetWindowText (KString &str) const |
| Get the text of the line edit. | |
| operator KString () const | |
| void | Paste () |
| Call this function to insert the data from the Clipboard into the KEdit at the insertion point. | |
| void | SetLimitText (unsigned int nMax) |
| Sets the maximum amount of text this KEdit can contain. | |
| void | SetModify (bool bModified=true) |
| Call this function to set or clear the modified flag for an edit control. | |
| void | SetReadOnly (bool bReadOnly=true) |
| Calls this function to set the read-only state of an edit control. | |
| void | SetSel (int nStartChar, int nEndChar=-1) |
| Selects a range of characters in an edit control [start, end[. | |
| void | setWidget (QLineEdit *lineEdit) |
| void | SetWindowText (const KString &str) |
| Change the text of the line edit. | |
| QLineEdit * | widget () const |
The KEdit class is used to replace DDX_Control edit data exchange.
This class is the equivalent of CEdit in MFC. It is a proxy for the widget, and can be used to set and get the value. It can only support single line edit (QLineEdit).
| bool KEdit::CanUndo | ( | ) | const |
Call this function to determine if the last edit operation can be undone.
| void KEdit::Clear | ( | ) |
Call this function to delete (clear) the current selection (if any) in the edit control.
| void KEdit::Copy | ( | ) |
Call this function to copy the current selection.
| void KEdit::Cut | ( | ) |
Call this function to delete (cut) the current selection.
| uint KEdit::GetLimitText | ( | ) | const |
Call this member function to get the text limit for this KEdit object.
| bool KEdit::GetModify | ( | ) | const |
Call this function to determine whether the contents of an edit control have been modified.
| int KEdit::GetSel | ( | ) | const |
Gets the first character position of the current selection in an edit control.
| void KEdit::GetSel | ( | int & | nStartChar, |
| int & | nEndChar ) const |
Gets the first and last character positions of the current selection in an edit control.
| void KEdit::GetWindowText | ( | KString & | str | ) | const |
Get the text of the line edit.
| KEdit::operator KString | ( | ) | const |
Returns the string of the line edit.
| void KEdit::Paste | ( | ) |
Call this function to insert the data from the Clipboard into the KEdit at the insertion point.
| void KEdit::SetLimitText | ( | unsigned int | nMax | ) |
Sets the maximum amount of text this KEdit can contain.
| void KEdit::SetModify | ( | bool | bModified = true | ) |
Call this function to set or clear the modified flag for an edit control.
| void KEdit::SetReadOnly | ( | bool | bReadOnly = true | ) |
Calls this function to set the read-only state of an edit control.
| void KEdit::SetSel | ( | int | nStartChar, |
| int | nEndChar = -1 ) |
Selects a range of characters in an edit control [start, end[.
If the parameters are (0, -1), all the text is selected. If the second parameter is -1, any current selection is removed.
| void KEdit::setWidget | ( | QLineEdit * | lineEdit | ) |
Sets the widget the class is proxying.
| void KEdit::SetWindowText | ( | const KString & | str | ) |
Change the text of the line edit.
| QLineEdit * KEdit::widget | ( | ) | const |
Returns the underlying widget the class is proxying.