Originally Posted by
Uwe
Of course you have to subclass QwtPlotFilter and implement the color method.
Uwe
Entschuldigung, but i still don't quite sure how to use it (
in header file i included:
{
public:
QColor MyPrintFilter
::color(const QColor &c, Item item
) const {
if ( !(options() & PrintBackground))
{
switch(item)
{
case MajorGrid:
return Qt::darkGray;
case MinorGrid:
return Qt::gray;
case Curve:
return Qt::black;
default:;
}
}
return c;
}
};
class MyPrintFilter : public QwtPlotPrintFilter
{
public:
QColor MyPrintFilter::color(const QColor &c, Item item) const
{
if ( !(options() & PrintBackground))
{
switch(item)
{
case MajorGrid:
return Qt::darkGray;
case MinorGrid:
return Qt::gray;
case Curve:
return Qt::black;
default:;
}
}
return c;
}
};
To copy to clipboard, switch view to plain text mode
and then created filter using this type. But nothing still happens(
UPD: Oh, i got it working. The line was to thin to see the difference at first look.
Thank you, Uwe!
Bookmarks