|
|
|
@ -385,9 +385,9 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
TQPainter p1;
|
|
|
|
|
p1.begin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
|
|
|
|
|
p1.fillRect(0, 0, size().width(), size().height(), tqpalette().disabled().background());
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawRect(0, 0, width(), height());
|
|
|
|
|
p1.setPen(TQPen(tqpalette().disabled().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().disabled().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawRect(0, 0, width(), height());
|
|
|
|
|
p1.end();
|
|
|
|
|
bitBlt(this, 0, 0, &pm);
|
|
|
|
@ -406,11 +406,11 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
TQPixmap anim(asize, asize);
|
|
|
|
|
TQPainter p2;
|
|
|
|
|
p2.begin(TQT_TQPAINTDEVICE(&anim), TQT_TQOBJECT(this));
|
|
|
|
|
p2.fillRect(0, 0, asize, asize, tqpalette().active().background());
|
|
|
|
|
p2.fillRect(0, 0, asize, asize, palette().active().background());
|
|
|
|
|
p2.translate(asize/2, asize/2);
|
|
|
|
|
|
|
|
|
|
d->pos = (d->pos + 10) % 360;
|
|
|
|
|
p2.setPen(TQPen(tqpalette().active().text()));
|
|
|
|
|
p2.setPen(TQPen(palette().active().text()));
|
|
|
|
|
p2.rotate(d->pos);
|
|
|
|
|
for ( int i=0 ; i<12 ; i++ )
|
|
|
|
|
{
|
|
|
|
@ -424,11 +424,11 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
TQPixmap pm(size());
|
|
|
|
|
TQPainter p1;
|
|
|
|
|
p1.begin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
|
|
|
|
|
p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.fillRect(0, 0, width(), height(), palette().active().background());
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawRect(0, 0, width(), height());
|
|
|
|
|
p1.drawPixmap(width()/2 - asize /2, asize, anim);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().text()));
|
|
|
|
|
p1.setPen(TQPen(palette().active().text()));
|
|
|
|
|
|
|
|
|
|
if (d->clearFlag == HistogramWidgetPriv::HistogramDataLoading)
|
|
|
|
|
p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
|
|
|
|
@ -448,10 +448,10 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
TQPixmap pm(size());
|
|
|
|
|
TQPainter p1;
|
|
|
|
|
p1.begin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
|
|
|
|
|
p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.fillRect(0, 0, width(), height(), palette().active().background());
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawRect(0, 0, width(), height());
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().text()));
|
|
|
|
|
p1.setPen(TQPen(palette().active().text()));
|
|
|
|
|
p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
|
|
|
|
|
i18n("Histogram\ncalculation\nfailed."));
|
|
|
|
|
p1.end();
|
|
|
|
@ -525,7 +525,7 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
TQPixmap pm(size());
|
|
|
|
|
TQPainter p1;
|
|
|
|
|
p1.begin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
|
|
|
|
|
p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
|
|
|
|
|
p1.fillRect(0, 0, width(), height(), palette().active().background());
|
|
|
|
|
|
|
|
|
|
// Drawing selection or all histogram values.
|
|
|
|
|
|
|
|
|
@ -645,35 +645,35 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
{
|
|
|
|
|
if ( x >= (int)(d->xmin * wWidth) && x <= (int)(d->xmax * wWidth) )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - y);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - y);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - y, x, 0);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - y);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - y, x, 0);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -684,9 +684,9 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
{
|
|
|
|
|
if ( x >= (int)(d->xmin * wWidth) && x <= (int)(d->xmax * wWidth) )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
|
|
|
|
|
// Witch color must be used on the foreground with all colors channel mode?
|
|
|
|
|
switch (m_colorType)
|
|
|
|
@ -717,16 +717,16 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - yr);
|
|
|
|
|
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
|
|
|
|
|
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
|
|
|
|
|
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -740,16 +740,16 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - yg);
|
|
|
|
|
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
|
|
|
|
|
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
|
|
|
|
|
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -763,16 +763,16 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - yb);
|
|
|
|
|
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
|
|
|
|
|
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
|
|
|
|
|
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -793,16 +793,16 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - yr);
|
|
|
|
|
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
|
|
|
|
|
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
|
|
|
|
|
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -816,16 +816,16 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - yg);
|
|
|
|
|
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
|
|
|
|
|
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
|
|
|
|
|
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -839,16 +839,16 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, wHeight - yb);
|
|
|
|
|
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().background(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
|
|
|
|
|
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
|
|
|
|
|
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
|
|
|
|
|
|
|
|
|
|
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
|
|
|
|
|
{
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().base(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawLine(x, wHeight, x, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -973,7 +973,7 @@ void HistogramWidget::paintEvent(TQPaintEvent*)
|
|
|
|
|
TQToolTip::add( this, tipText);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.setPen(TQPen(palette().active().foreground(), 1, TQt::SolidLine));
|
|
|
|
|
p1.drawRect(0, 0, width(), height());
|
|
|
|
|
p1.end();
|
|
|
|
|
bitBlt(this, 0, 0, &pm);
|
|
|
|
|