Automated update from Qt3

pull/1/head
Timothy Pearson 11 years ago
parent 63d62f785a
commit cff522f986

@ -452,6 +452,7 @@ protected:
void contentsDropEvent( TQDropEvent *e );
#endif
void bufferedPaintEvent( TQPaintEvent* );
void resizeEvent( TQResizeEvent* e );
void keyPressEvent( TQKeyEvent *e );
void focusInEvent( TQFocusEvent *e );

@ -214,6 +214,7 @@ public:
TQIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem,
*startDragItem, *pressedItem, *selectAnchor, *renamingItem;
TQRect *rubber;
TQPixmap *backBuffer;
TQTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer,
*fullRedrawTimer;
int rastX, rastY, spacing;
@ -2800,6 +2801,7 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f )
d->currentItem = 0;
d->highlightedItem = 0;
d->rubber = 0;
d->backBuffer = 0;
d->scrollTimer = 0;
d->startDragItem = 0;
d->tmpCurrentItem = 0;
@ -2953,6 +2955,8 @@ TQIconView::~TQIconView()
delete item;
item = tmp;
}
delete d->backBuffer;
d->backBuffer = 0;
delete d->fm;
d->fm = 0;
#ifndef QT_NO_TOOLTIP
@ -4972,6 +4976,47 @@ void TQIconView::contentsDropEvent( TQDropEvent *e )
}
#endif
/*!
This function grabs all paintevents that otherwise would have been
processed by the TQScrollView::viewportPaintEvent(). Here we use a
doublebuffer to reduce 'on-paint' flickering on TQIconView
(and of course its children).
\sa TQScrollView::viewportPaintEvent(), TQIconView::drawContents()
*/
void TQIconView::bufferedPaintEvent( TQPaintEvent* pe )
{
TQWidget* vp = viewport();
TQRect r = pe->rect() & vp->rect();
int ex = r.x() + contentsX();
int ey = r.y() + contentsY();
int ew = r.width();
int eh = r.height();
if ( !d->backBuffer )
d->backBuffer = new TQPixmap(vp->size());
if ( d->backBuffer->size() != vp->size() ) {
// Resize function (with hysteresis). Uses a good compromise between memory
// consumption and speed (number) of resizes.
float newWidth = (float)vp->width();
float newHeight = (float)vp->height();
if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() )
{
newWidth *= 1.1892;
newHeight *= 1.1892;
d->backBuffer->resize( (int)newWidth, (int)newHeight );
} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() )
d->backBuffer->resize( (int)newWidth, (int)newHeight );
}
TQPainter p;
p.begin(d->backBuffer, vp);
drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh);
p.end();
bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh);
}
/*!
\reimp
*/
@ -5756,7 +5801,7 @@ bool TQIconView::eventFilter( TQObject * o, TQEvent * e )
if ( !d->rubber )
drawDragShapes( d->oldDragPos );
}
viewportPaintEvent( (TQPaintEvent*)e );
bufferedPaintEvent( (TQPaintEvent*)e );
if ( d->dragging ) {
if ( !d->rubber )
drawDragShapes( d->oldDragPos );

@ -545,7 +545,7 @@ public:
TQThreadInstance::setCurrentThread(this);
// thread should be running and not finished for the lifetime
// of the application (even if QCoreApplication goes away)
// of the application (even if TQCoreApplication goes away)
d->running = true;
d->finished = false;
d->eventLoop = NULL;

@ -1135,7 +1135,7 @@ bool TQProcess::canReadLineStderr() const
This function always returns immediately. The data you
pass to writeToStdin() is copied into an internal memory buffer in
TQProcess, and when control goes back to the event loop, TQProcess will
starting transferring data from this buffer to the running process. <EFBFBD>
starting transferring data from this buffer to the running process.  
Sometimes the data will be transferred in several payloads, depending on
how much data is read at a time by the process itself. When TQProcess has
transferred all the data from its memory buffer to the running process, it

Loading…
Cancel
Save