[scribus-dev] Short question about access level of DrawObj_*() functions
Elvis Stansvik
elvstone at gmail.com
Sun Aug 7 08:35:50 UTC 2011
Hi folks,
What's the purpose of e.g. DrawObj_Decoration() being public in
PageItem but protected in PageItem_TextFrame?
My cells return a PageItem_TextFrame* representing their content, and
during table painting I'd like to do:
PageItem_TextFrame* cellFrame = cell.textFrame();
cellFrame->DrawObj(p, QRectF());
cellFrame->DrawObj_Decoration(p);
but instead I have to do something like
PageItem_TextFrame* cellFrame = cell.textFrame();
cellFrame->DrawObj(p, QRectF());
dynamic_cast<PageItem*>(cellFrame)->DrawObj_Decoration(p);
since DrawObj_Decoration() is protected in PageItem_TextFrame.
I see no way of painting decorations of a page item without working
through a base class pointer.
Thoughts?
Elvis
More information about the scribus-dev
mailing list