Split single/multi line behaviour in Qt wxTextCtrl
Introduce wxQtEdit class and wxQtMultiLineEdit and wxQtSingleLineEdit derived classes instead of using ifs in many wxTextCtrl methods, making the code more clear and maintainable. Also fix some wxTextCtrl-related unit test failures with wxQt and disable some other ones which still don't pass. Closes https://github.com/wxWidgets/wxWidgets/pull/1039
This commit is contained in:
committed by
Vadim Zeitlin
parent
3b6fcbab6d
commit
0fbf87d11b
@@ -8,9 +8,8 @@
|
||||
#ifndef _WX_QT_TEXTCTRL_H_
|
||||
#define _WX_QT_TEXTCTRL_H_
|
||||
|
||||
class QLineEdit;
|
||||
class QTextEdit;
|
||||
class QScrollArea;
|
||||
class wxQtEdit;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase
|
||||
{
|
||||
@@ -25,6 +24,8 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = wxTextCtrlNameStr);
|
||||
|
||||
virtual ~wxTextCtrl();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString &value = wxEmptyString,
|
||||
@@ -71,8 +72,7 @@ protected:
|
||||
virtual QScrollArea *QtGetScrollBarsContainer() const;
|
||||
|
||||
private:
|
||||
QLineEdit *m_qtLineEdit;
|
||||
QTextEdit *m_qtTextEdit;
|
||||
wxQtEdit *m_qtEdit;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS( wxTextCtrl );
|
||||
};
|
||||
|
Reference in New Issue
Block a user