예제 #1
0
LegendItem::LegendItem()
{
    setRenderHint( QwtPlotItem::RenderAntialiased );

    QColor color( Qt::white );

    setTextPen( color );
#if 1
    setBorderPen( color );

    QColor c( Qt::gray );
    c.setAlpha( 200 );

    setBackgroundBrush( c );
#endif
}
예제 #2
0
    JLegendItem()
    {
        setRenderHint(QwtPlotItem::RenderAntialiased);
        setAlignment(Qt::AlignTop | Qt::AlignRight);

        setTextPen(QColor(200, 200, 200, 150));
        setBorderPen(QColor(150, 150, 150, 50));
        setBackgroundBrush(QColor(150, 150, 150, 20));
        setBorderRadius(3);
        setMargin(2);
        setSpacing(10);
        setItemMargin(0);

        QFont _font = font();
        _font.setPointSize(8);
        setFont(_font);
    }
예제 #3
0
void LegendItem::setBackgroundOpacity(int alpha)
{
    setBorderPen(QPen(QColor(0, 0, 0, alpha)));
    setBackgroundBrush(QColor(255, 255, 255, alpha));
}