Originally Posted by
wysota
By "closest" I understand it's not exactly what you wanted. What functionality are you missing exactly?
OK, I am getting to it now... current code is this:
void QfwSummaryView
::drawItems( QPainter * painter,
int numItems,
{
for ( int idx = 0; idx < numItems; idx++ ) {
QfwSummarizableItem* item = dynamic_cast<QfwSummarizableItem*>( items[ idx ] );
if ( item ) {
painter->save();
item->drawSummary( painter );
painter->restore();
}
}
}
void QfwSummaryView::drawItems( QPainter * painter,
int numItems,
QGraphicsItem* items[],
const QStyleOptionGraphicsItem options[] )
{
for ( int idx = 0; idx < numItems; idx++ ) {
QfwSummarizableItem* item = dynamic_cast<QfwSummarizableItem*>( items[ idx ] );
if ( item ) {
painter->save();
item->drawSummary( painter );
painter->restore();
}
}
}
To copy to clipboard, switch view to plain text mode
See the attached screen dump, I have 2 tracks with multiple curves, each curve shares the same Y axis, but they have their own X axis. The Y axis is long that require scroll bar, so the idea is to have 2 views: the bottom view is to draw those curves, the top view is to draw "legend" along with X axis min value and max value....
I am currently using the same QGraphicsScene, there is a boundingRect problem, for instance the area plot (in the right track) has narrow width, but the "legend" at the top is wider, yet exposure is controlled by the real object's boundingRect...
So, I think I need to have two scenes, can someone gives me a simple UML class diagram, as well as how to keep then in sync?
Bookmarks