Implement wxNotebook::DeleteAllPages() for wxQt
See https://github.com/wxWidgets/wxWidgets/pull/1191
This commit is contained in:
committed by
Vadim Zeitlin
parent
6b11c372a1
commit
3cb395a5a5
@@ -45,6 +45,8 @@ public:
|
|||||||
int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); }
|
int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); }
|
||||||
int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); }
|
int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); }
|
||||||
|
|
||||||
|
virtual bool DeleteAllPages() wxOVERRIDE;
|
||||||
|
|
||||||
virtual QWidget *GetHandle() const;
|
virtual QWidget *GetHandle() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -169,6 +169,17 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
|
|||||||
return sizePage;
|
return sizePage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxNotebook::DeleteAllPages()
|
||||||
|
{
|
||||||
|
if ( !wxNotebookBase::DeleteAllPages() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
m_qtTabWidget->blockSignals(true);
|
||||||
|
m_qtTabWidget->clear();
|
||||||
|
m_qtTabWidget->blockSignals(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int wxNotebook::DoSetSelection(size_t page, int flags)
|
int wxNotebook::DoSetSelection(size_t page, int flags)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG(page < GetPageCount(), wxNOT_FOUND, "invalid notebook index");
|
wxCHECK_MSG(page < GetPageCount(), wxNOT_FOUND, "invalid notebook index");
|
||||||
|
Reference in New Issue
Block a user