Improve specific listctrl wxQT, thanks @seandpagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
47547703f7
commit
3b12797953
@ -182,12 +182,6 @@ public:
|
||||
void SetImageList(wxImageList *imageList, int which);
|
||||
void AssignImageList(wxImageList *imageList, int which);
|
||||
|
||||
// are we in report mode?
|
||||
bool InReportView() const;
|
||||
|
||||
// are we in virtual report mode?
|
||||
bool IsVirtual() const;
|
||||
|
||||
// refresh items selectively (only useful for virtual list controls)
|
||||
void RefreshItem(long item);
|
||||
void RefreshItems(long itemFrom, long itemTo);
|
||||
|
@ -142,6 +142,10 @@ long wxListbook::GetListCtrlFlags() const
|
||||
{
|
||||
flags |= wxLC_LIST;
|
||||
}
|
||||
|
||||
#ifdef __WXQT__
|
||||
flags |= wxLC_NO_HEADER;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Use single selection in any case.
|
||||
|
@ -129,6 +129,11 @@ bool wxListCtrl::Create(wxWindow *parent,
|
||||
{
|
||||
m_qtTreeWidget = new wxQtTreeWidget( parent, this );
|
||||
|
||||
if (style & wxLC_NO_HEADER)
|
||||
m_qtTreeWidget->setHeaderHidden(true);
|
||||
|
||||
m_qtTreeWidget->setRootIsDecorated(false);
|
||||
|
||||
return QtCreateControl( parent, id, pos, size, style, validator, name );
|
||||
}
|
||||
|
||||
@ -311,7 +316,7 @@ bool wxListCtrl::SetItem(wxListItem& info)
|
||||
{
|
||||
if (info.m_image >= 0)
|
||||
{
|
||||
wxImageList *imglst = GetImageList(wxIMAGE_LIST_SMALL);
|
||||
wxImageList *imglst = GetImageList(wxIMAGE_LIST_NORMAL);
|
||||
wxCHECK_MSG(imglst, false, "invalid listctrl imagelist");
|
||||
const wxBitmap* bitmap = imglst->GetBitmapPtr(info.m_image);
|
||||
if (bitmap != NULL)
|
||||
@ -649,16 +654,6 @@ void wxListCtrl::AssignImageList(wxImageList *imageList, int which)
|
||||
m_ownsImageListState = true;
|
||||
}
|
||||
|
||||
bool wxListCtrl::InReportView() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxListCtrl::IsVirtual() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxListCtrl::RefreshItem(long WXUNUSED(item))
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user