Merge branch 'textctrl_qt' of https://github.com/oneeyeman1/wxWidgets
Implement support for wxTE_PASSWORD and MarkDirty()/DiscardEdits() in wxQt. See https://github.com/wxWidgets/wxWidgets/pull/1026
This commit is contained in:
commit
a1adc2efa4
@ -121,6 +121,8 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
{
|
||||
m_qtLineEdit = new wxQtLineEdit( parent, this );
|
||||
m_qtTextEdit = NULL;
|
||||
if ( style & wxTE_PASSWORD )
|
||||
m_qtLineEdit->setEchoMode( QLineEdit::Password );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -161,15 +163,26 @@ int wxTextCtrl::GetNumberOfLines() const
|
||||
|
||||
bool wxTextCtrl::IsModified() const
|
||||
{
|
||||
return false;
|
||||
if ( IsSingleLine() )
|
||||
return m_qtLineEdit->isModified();
|
||||
else
|
||||
return m_qtTextEdit->isWindowModified();
|
||||
}
|
||||
|
||||
void wxTextCtrl::MarkDirty()
|
||||
{
|
||||
if ( IsSingleLine() )
|
||||
return m_qtLineEdit->setModified( true );
|
||||
else
|
||||
return m_qtTextEdit->setWindowModified( true );
|
||||
}
|
||||
|
||||
void wxTextCtrl::DiscardEdits()
|
||||
{
|
||||
if ( IsSingleLine() )
|
||||
return m_qtLineEdit->setModified( false );
|
||||
else
|
||||
return m_qtTextEdit->setWindowModified( false );
|
||||
}
|
||||
|
||||
bool wxTextCtrl::SetStyle(long WXUNUSED(start), long WXUNUSED(end), const wxTextAttr& WXUNUSED(style))
|
||||
|
Loading…
Reference in New Issue
Block a user