diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 06:10:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 06:10:56 +0000 |
commit | 769e63d24adf5c844137484f06a972fcce732d6a (patch) | |
tree | 5185797dcb3ff4b1b3cb71d367123bf89eb2410f /src/viewarea.cpp | |
parent | 0a8af92185eac74d48da1225e6053a0d66c078f5 (diff) | |
download | kmplayer-769e63d24adf5c844137484f06a972fcce732d6a.tar.gz kmplayer-769e63d24adf5c844137484f06a972fcce732d6a.zip |
TQt4 port kmplayer
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmplayer@1238840 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/viewarea.cpp')
-rw-r--r-- | src/viewarea.cpp | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/src/viewarea.cpp b/src/viewarea.cpp index de384d7..10f015c 100644 --- a/src/viewarea.cpp +++ b/src/viewarea.cpp @@ -22,12 +22,12 @@ #include <stdlib.h> #include <math.h> -#include <qapplication.h> -#include <qwidgetstack.h> -#include <qslider.h> -#include <qcursor.h> -#include <qimage.h> -#include <qmap.h> +#include <tqapplication.h> +#include <tqwidgetstack.h> +#include <tqslider.h> +#include <tqcursor.h> +#include <tqimage.h> +#include <tqmap.h> #include <kactioncollection.h> #include <kstaticdeleter.h> @@ -56,12 +56,12 @@ extern const char * playlist_xpm[]; //------------------------------------------------------------------------- namespace KMPlayer { - typedef QMap <QString, ImageDataPtrW> ImageDataMap; + typedef TQMap <TQString, ImageDataPtrW> ImageDataMap; static KStaticDeleter <ImageDataMap> imageCacheDeleter; static ImageDataMap * image_data_map; } -ImageData::ImageData( const QString & img) : +ImageData::ImageData( const TQString & img) : image (0L), url (img) { //if (img.isEmpty ()) @@ -77,12 +77,12 @@ ImageData::~ImageData() { } #ifdef HAVE_CAIRO -static void copyImage (Surface *s, int w, int h, QImage *img, cairo_surface_t *similar) { +static void copyImage (Surface *s, int w, int h, TQImage *img, cairo_surface_t *similar) { int iw = img->width (); int ih = img->height (); if (img->depth () < 24) { - QImage qi = img->convertDepth (32, 0); + TQImage qi = img->convertDepth (32, 0); *img = qi; } cairo_surface_t *sf = cairo_image_surface_create_for_data ( @@ -114,11 +114,11 @@ bool CachedImage::isEmpty () { return !data || !data->image; } -void CachedImage::setUrl (const QString & url) { +void CachedImage::setUrl (const TQString & url) { if (url.isEmpty ()) { data = ImageDataPtr (new ImageData (url)); } else { - ImageDataMap::iterator i = image_data_map->find (url); + ImageDataMap::iterator i = image_data_map->tqfind (url); if (i == image_data_map->end ()) { data = ImageDataPtr (new ImageData (url)); image_data_map->insert (url, ImageDataPtrW (data)); @@ -144,8 +144,8 @@ public: SurfacePtr createSurface (NodePtr owner, const SRect & rect); IRect toScreen (Single x, Single y, Single w, Single h); void resize (const SRect & rect); - void repaint (); - void repaint (const SRect &rect); + void tqrepaint (); + void tqrepaint (const SRect &rect); void video (); NodePtrW current_video; @@ -181,14 +181,14 @@ KDE_NO_EXPORT void ViewSurface::resize (const SRect &r) { #endif /*if (rect == nrect) ;//return; - SRect pr = rect.unite (nrect); // for repaint + SRect pr = rect.unite (nrect); // for tqrepaint rect = nrect;*/ } KDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single h) { Matrix matrix (0, 0, xscale, yscale); matrix.translate (bounds.x (), bounds.y ()); - for (SurfacePtr s = parentNode(); s; s = s->parentNode()) { + for (SurfacePtr s = tqparentNode(); s; s = s->tqparentNode()) { matrix.transform(Matrix (0, 0, s->xscale, s->yscale)); matrix.translate (s->bounds.x (), s->bounds.y ()); } @@ -197,14 +197,14 @@ KDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single } KDE_NO_EXPORT -void ViewSurface::repaint (const SRect &r) { +void ViewSurface::tqrepaint (const SRect &r) { markDirty (); view_widget->scheduleRepaint (toScreen (r.x (), r.y (), r.width (), r.height ())); - //kdDebug() << "Surface::repaint x:" << (int)x << " y:" << (int)y << " w:" << (int)w << " h:" << (int)h << endl; + //kdDebug() << "Surface::tqrepaint x:" << (int)x << " y:" << (int)y << " w:" << (int)w << " h:" << (int)h << endl; } KDE_NO_EXPORT -void ViewSurface::repaint () { +void ViewSurface::tqrepaint () { markDirty (); view_widget->scheduleRepaint (toScreen (0, 0, bounds.width (), bounds.height ())); } @@ -258,7 +258,7 @@ class KMPLAYER_NO_EXPORT CairoPaintVisitor : public Visitor { public: cairo_t * cr; CairoPaintVisitor (cairo_surface_t * cs, Matrix m, - const IRect & rect, QColor c=QColor(), bool toplevel=false); + const IRect & rect, TQColor c=TQColor(), bool toplevel=false); ~CairoPaintVisitor (); using Visitor::visit; void visit (Node * n); @@ -281,7 +281,7 @@ public: KDE_NO_CDTOR_EXPORT CairoPaintVisitor::CairoPaintVisitor (cairo_surface_t * cs, Matrix m, - const IRect & rect, QColor c, bool top) + const IRect & rect, TQColor c, bool top) : clip (rect), cairo_surface (cs), matrix (m), toplevel (top) { cr = cairo_create (cs); if (toplevel) { @@ -327,7 +327,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::traverseRegion (SMIL::RegionBase * reg) { if (c->data) c->data->accept (this); } - // finally visit children, accounting for z-order FIXME optimize + // finally visit tqchildren, accounting for z-order FIXME optimize NodeRefList sorted; for (NodePtr n = reg->firstChild (); n; n = n->nextSibling ()) { if (n->id != SMIL::id_node_region) @@ -550,7 +550,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Transition *trans) { case SMIL::Transition::SubHorizontal: phi = 0; break; - default: // Vertical + default: //Qt::Vertical phi = -M_PI / 2; break; } @@ -707,31 +707,31 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) { matrix.getXYWH (x, y, w, h); if (!s->surface) { //kdDebug() << "new txt surface " << td->text << endl; - /* QTextEdit * edit = new QTextEdit; + /* TQTextEdit * edit = new TQTextEdit; edit->setReadOnly (true); - edit->setHScrollBarMode (QScrollView::AlwaysOff); - edit->setVScrollBarMode (QScrollView::AlwaysOff); - edit->setFrameShape (QFrame::NoFrame); - edit->setFrameShadow (QFrame::Plain); + edit->setHScrollBarMode (TQScrollView::AlwaysOff); + edit->setVScrollBarMode (TQScrollView::AlwaysOff); + edit->setFrameShape (TQFrame::NoFrame); + edit->setFrameShadow (TQFrame::Plain); edit->setGeometry (0, 0, w, h); if (edit->length () == 0) edit->setText (text); if (w0 > 0) font.setPointSize (int (1.0 * w * font_size / w0)); edit->setFont (font); - QRect rect = p.clipRegion (QPainter::CoordPainter).boundingRect (); - rect = rect.intersect (QRect (xoff, yoff, w, h)); - QPixmap pix = QPixmap::grabWidget (edit, rect.x () - (int) xoff, + TQRect rect = p.clipRegion (TQPainter::CoordPainter).boundingRect (); + rect = rect.intersect (TQRect (xoff, yoff, w, h)); + TQPixmap pix = TQPixmap::grabWidget (edit, rect.x () - (int) xoff, rect.y () - (int) yoff, rect.width (), rect.height ());*/ float scale = 1.0 * w / rect.width (); // TODO: make an image cairo_set_font_size (cr, scale * td->font_size); cairo_font_extents_t txt_fnt; cairo_font_extents (cr, &txt_fnt); - QString str = td->text; + TQString str = td->text; struct Line { - Line (const QString & ln) : txt (ln), next(0) {} - QString txt; + Line (const TQString & ln) : txt (ln), next(0) {} + TQString txt; cairo_text_extents_t txt_ext; Single xoff; Line * next; @@ -741,13 +741,13 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) { int line_count = 0; Single min_xoff = w; while (!str.isEmpty ()) { - int len = str.find (QChar ('\n')); + int len = str.tqfind (TQChar ('\n')); bool skip_cr = false; - if (len > 1 && str[len-1] == QChar ('\r')) { + if (len > 1 && str[len-1] == TQChar ('\r')) { --len; skip_cr = true; } - QString para = len > -1 ? str.left (len) : str; + TQString para = len > -1 ? str.left (len) : str; Line * line = new Line (para); ++line_count; if (!lines) @@ -764,7 +764,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) { int br_pos = int (line->txt.length () * frag); //educated guess while (br_pos > 0) { line->txt.truncate (br_pos); - br_pos = line->txt.findRev (QChar (' ')); + br_pos = line->txt.tqfindRev (TQChar (' ')); if (br_pos < 1) break; line->txt.truncate (br_pos); @@ -853,7 +853,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Brush * brush) { SRect rect = s->bounds; Single x, y, w = rect.width(), h = rect.height(); matrix.getXYWH (x, y, w, h); - unsigned int color = QColor (brush->param ("color")).rgb (); + unsigned int color = TQColor (brush->param ("color")).rgb (); if (brush->active_trans) { cur_media = brush; cur_pat = NULL; @@ -1129,7 +1129,7 @@ public: void visit (SMIL::MediaType * n); void visit (SMIL::Anchor *); void visit (SMIL::Area *); - QCursor cursor; + TQCursor cursor; }; } // namespace @@ -1143,17 +1143,17 @@ KDE_NO_EXPORT void MouseVisitor::visit (Node * n) { kdDebug () << "Mouse event ignored for " << n->nodeName () << endl; } -KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Layout * layout) { - if (layout->surface ()) { +KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Layout * tqlayout) { + if (tqlayout->surface ()) { Matrix m = matrix; - SRect rect = layout->region_surface->bounds; + SRect rect = tqlayout->region_surface->bounds; matrix = Matrix (rect.x(), rect.y(), - layout->region_surface->xscale, layout->region_surface->yscale); + tqlayout->region_surface->xscale, tqlayout->region_surface->yscale); matrix.transform (m); NodePtr node_save = node; - node = layout; - for (NodePtr r = layout->firstChild (); r; r = r->nextSibling ()) { + node = tqlayout; + for (NodePtr r = tqlayout->firstChild (); r; r = r->nextSibling ()) { if (r->id == SMIL::id_node_region) r->accept (this); if (!node->active ()) @@ -1232,7 +1232,7 @@ static void followLink (SMIL::LinkingBase * link) { else kdError() << "In document jumps smil not found" << endl; } else - for (NodePtr p = link->parentNode (); p; p = p->parentNode ()) { + for (NodePtr p = link->tqparentNode (); p; p = p->tqparentNode ()) { if (n->mrl () && n->mrl ()->opener == p) { p->setState (Node::state_deferred); p->mrl ()->setParam (StringPool::attr_src, link->href, 0L); @@ -1251,7 +1251,7 @@ KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Anchor * anchor) { } KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Area * area) { - NodePtr n = area->parentNode (); + NodePtr n = area->tqparentNode (); if (n->id >= SMIL::id_node_first_mediatype && n->id < SMIL::id_node_last_mediatype) { SMIL::MediaType * mt = convertNode <SMIL::MediaType> (n); @@ -1338,22 +1338,22 @@ KDE_NO_EXPORT void MouseVisitor::visit (SMIL::MediaType * mediatype) { //----------------------------------------------------------------------------- -KDE_NO_CDTOR_EXPORT ViewArea::ViewArea (QWidget * parent, View * view) - : QWidget (parent, "kde_kmplayer_viewarea", WResizeNoErase | WRepaintNoErase), - m_parent (parent), +KDE_NO_CDTOR_EXPORT ViewArea::ViewArea (TQWidget * tqparent, View * view) + : TQWidget (tqparent, "kde_kmplayer_viewarea", WResizeNoErase | WRepaintNoErase), + m_parent (tqparent), m_view (view), m_collection (new KActionCollection (this)), surface (new ViewSurface (this)), m_mouse_invisible_timer (0), - m_repaint_timer (0), + m_tqrepaint_timer (0), m_fullscreen_scale (100), scale_lbl_id (-1), scale_slider_id (-1), m_fullscreen (false), m_minimal (false) { - setEraseColor (QColor (0, 0, 0)); + setEraseColor (TQColor (0, 0, 0)); setAcceptDrops (true); - new KAction (i18n ("Fullscreen"), KShortcut (Qt::Key_F), this, SLOT (accelActivated ()), m_collection, "view_fullscreen_toggle"); + new KAction (i18n ("Fullscreen"), KShortcut (TQt::Key_F), TQT_TQOBJECT(this), TQT_SLOT (accelActivated ()), m_collection, "view_fullscreen_toggle"); setMouseTracking (true); if (!image_data_map) imageCacheDeleter.setObject (image_data_map, new ImageDataMap); @@ -1363,11 +1363,11 @@ KDE_NO_CDTOR_EXPORT ViewArea::~ViewArea () { } KDE_NO_EXPORT void ViewArea::fullScreen () { - killTimers (); - m_mouse_invisible_timer = m_repaint_timer = 0; + TQT_TQOBJECT(this)->killTimers (); + m_mouse_invisible_timer = m_tqrepaint_timer = 0; if (m_fullscreen) { showNormal (); - reparent (m_parent, 0, QPoint (0, 0), true); + reparent (m_parent, 0, TQPoint (0, 0), true); static_cast <KDockWidget *> (m_parent)->setWidget (this); for (unsigned i = 0; i < m_collection->count (); ++i) m_collection->action (i)->setEnabled (false); @@ -1376,20 +1376,20 @@ KDE_NO_EXPORT void ViewArea::fullScreen () { m_view->controlPanel ()->popupMenu ()->removeItem (scale_slider_id); scale_lbl_id = scale_slider_id = -1; } - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (playlist_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm))); } else { - m_topwindow_rect = topLevelWidget ()->geometry (); - reparent (0L, 0, qApp->desktop()->screenGeometry(this).topLeft(), true); + m_topwindow_rect = tqtopLevelWidget ()->tqgeometry (); + reparent (0L, 0, tqApp->desktop()->screenGeometry(this).topLeft(), true); showFullScreen (); for (unsigned i = 0; i < m_collection->count (); ++i) m_collection->action (i)->setEnabled (true); - QPopupMenu * menu = m_view->controlPanel ()->popupMenu (); - QLabel * lbl = new QLabel (i18n ("Scale:"), menu); + TQPopupMenu * menu = m_view->controlPanel ()->popupMenu (); + TQLabel * lbl = new TQLabel (i18n ("Scale:"), menu); scale_lbl_id = menu->insertItem (lbl, -1, 4); - QSlider * slider = new QSlider (50, 150, 10, m_fullscreen_scale, Qt::Horizontal, menu); - connect (slider, SIGNAL (valueChanged (int)), this, SLOT (scale (int))); + TQSlider * slider = new TQSlider (50, 150, 10, m_fullscreen_scale, Qt::Horizontal, menu); + connect (slider, TQT_SIGNAL (valueChanged (int)), this, TQT_SLOT (scale (int))); scale_slider_id = menu->insertItem (slider, -1, 5); - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (normal_window_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (normal_window_xpm))); } m_fullscreen = !m_fullscreen; m_view->controlPanel()->popupMenu ()->setItemChecked (ControlPanel::menu_fullscreen, m_fullscreen); @@ -1413,26 +1413,26 @@ KDE_NO_EXPORT void ViewArea::fullScreen () { void ViewArea::minimalMode () { m_minimal = !m_minimal; - killTimers (); - m_mouse_invisible_timer = m_repaint_timer = 0; + TQT_TQOBJECT(this)->killTimers (); + m_mouse_invisible_timer = m_tqrepaint_timer = 0; if (m_minimal) { m_view->setViewOnly (); m_view->setControlPanelMode (KMPlayer::View::CP_AutoHide); m_view->setNoInfoMessages (true); - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (normal_window_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (normal_window_xpm))); } else { m_view->setControlPanelMode (KMPlayer::View::CP_Show); m_view->setNoInfoMessages (false); - m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (QIconSet (QPixmap (playlist_xpm))); + m_view->controlPanel ()->button (ControlPanel::button_playlist)->setIconSet (TQIconSet (TQPixmap (playlist_xpm))); } - m_topwindow_rect = topLevelWidget ()->geometry (); + m_topwindow_rect = tqtopLevelWidget ()->tqgeometry (); } KDE_NO_EXPORT void ViewArea::accelActivated () { m_view->controlPanel()->popupMenu ()->activateItemAt (m_view->controlPanel()->popupMenu ()->indexOf (ControlPanel::menu_fullscreen)); } -KDE_NO_EXPORT void ViewArea::mousePressEvent (QMouseEvent * e) { +KDE_NO_EXPORT void ViewArea::mousePressEvent (TQMouseEvent * e) { if (surface->node) { MouseVisitor visitor (event_pointer_clicked, e->x(), e->y()); surface->node->accept (&visitor); @@ -1440,14 +1440,14 @@ KDE_NO_EXPORT void ViewArea::mousePressEvent (QMouseEvent * e) { e->accept (); } -KDE_NO_EXPORT void ViewArea::mouseDoubleClickEvent (QMouseEvent *) { +KDE_NO_EXPORT void ViewArea::mouseDoubleClickEvent (TQMouseEvent *) { m_view->fullScreen (); // screensaver stuff } -KDE_NO_EXPORT void ViewArea::mouseMoveEvent (QMouseEvent * e) { +KDE_NO_EXPORT void ViewArea::mouseMoveEvent (TQMouseEvent * e) { if (e->state () == Qt::NoButton) { int vert_buttons_pos = height () - m_view->statusBarHeight (); - int cp_height = m_view->controlPanel ()->maximumSize ().height (); + int cp_height = m_view->controlPanel ()->tqmaximumSize ().height (); m_view->delayedShowButtons (e->y() > vert_buttons_pos-cp_height && e->y() < vert_buttons_pos); } @@ -1481,22 +1481,22 @@ KDE_NO_EXPORT void ViewArea::syncVisual (const IRect & rect) { if (surface->node) surface->node->accept (&visitor); #else - repaint (QRect(rect.x, rect.y, rect.w, rect.h), false); + tqrepaint (TQRect(rect.x, rect.y, rect.w, rect.h), false); #endif - if (m_repaint_timer) { - killTimer (m_repaint_timer); - m_repaint_timer = 0; + if (m_tqrepaint_timer) { + killTimer (m_tqrepaint_timer); + m_tqrepaint_timer = 0; } //XFlush (qt_xdisplay ()); } -KDE_NO_EXPORT void ViewArea::paintEvent (QPaintEvent * pe) { +KDE_NO_EXPORT void ViewArea::paintEvent (TQPaintEvent * pe) { #ifdef HAVE_CAIRO if (surface->node) scheduleRepaint (IRect (pe->rect ().x (), pe->rect ().y (), pe->rect ().width (), pe->rect ().height ())); else #endif - QWidget::paintEvent (pe); + TQWidget::paintEvent (pe); } KDE_NO_EXPORT void ViewArea::scale (int val) { @@ -1510,7 +1510,7 @@ KDE_NO_EXPORT void ViewArea::updateSurfaceBounds () { h -= m_view->controlPanel ()->isVisible () ? (m_view->controlPanelMode () == View::CP_Only ? h - : (Single) m_view->controlPanel()->maximumSize ().height ()) + : (Single) m_view->controlPanel()->tqmaximumSize ().height ()) : Single (0); surface->resize (SRect (x, y, w, h)); Mrl *mrl = surface->node ? surface->node->mrl () : NULL; @@ -1538,14 +1538,14 @@ KDE_NO_EXPORT void ViewArea::updateSurfaceBounds () { scheduleRepaint (IRect (0, 0, width (), height ())); } -KDE_NO_EXPORT void ViewArea::resizeEvent (QResizeEvent *) { +KDE_NO_EXPORT void ViewArea::resizeEvent (TQResizeEvent *) { if (!m_view->controlPanel ()) return; Single x, y, w = width (), h = height (); Single hsb = m_view->statusBarHeight (); Single hcp = m_view->controlPanel ()->isVisible () ? (m_view->controlPanelMode () == View::CP_Only ? h-hsb - : (Single) m_view->controlPanel()->maximumSize ().height ()) + : (Single) m_view->controlPanel()->tqmaximumSize ().height ()) : Single (0); Single wws = w; // move controlpanel over video when autohiding and playing @@ -1593,18 +1593,18 @@ void ViewArea::setAudioVideoGeometry (const IRect &rect, unsigned int * bg_color h = hfw; } } - m_av_geometry = QRect (x, y, w, h); - QRect wrect = m_view->widgetStack ()->geometry (); - if (m_av_geometry != wrect && - !(m_av_geometry.width() <= 0 && + m_av_tqgeometry = TQRect (x, y, w, h); + TQRect wrect = m_view->widgetStack ()->tqgeometry (); + if (m_av_tqgeometry != wrect && + !(m_av_tqgeometry.width() <= 0 && wrect.width() <= 1 && wrect.height() <= 1)) { m_view->widgetStack ()->setGeometry (x, y, w, h); - wrect.unite (m_av_geometry); + wrect.unite (m_av_tqgeometry); scheduleRepaint (IRect (wrect.x (), wrect.y (), wrect.width (), wrect.height ())); } if (bg_color) - if (QColor (QRgb (*bg_color)) != (m_view->viewer ()->paletteBackgroundColor ())) { - m_view->viewer()->setCurrentBackgroundColor (QColor (QRgb (*bg_color))); + if (TQColor (TQRgb (*bg_color)) != (m_view->viewer ()->paletteBackgroundColor ())) { + m_view->viewer()->setCurrentBackgroundColor (TQColor (TQRgb (*bg_color))); scheduleRepaint (IRect (x, y, w, h)); } } @@ -1625,19 +1625,19 @@ KDE_NO_EXPORT SurfacePtr ViewArea::getSurface (NodePtr node) { return 0L; } -KDE_NO_EXPORT void ViewArea::showEvent (QShowEvent *) { +KDE_NO_EXPORT void ViewArea::showEvent (TQShowEvent *) { resizeEvent (0L); } -KDE_NO_EXPORT void ViewArea::dropEvent (QDropEvent * de) { +KDE_NO_EXPORT void ViewArea::dropEvent (TQDropEvent * de) { m_view->dropEvent (de); } -KDE_NO_EXPORT void ViewArea::dragEnterEvent (QDragEnterEvent* dee) { +KDE_NO_EXPORT void ViewArea::dragEnterEvent (TQDragEnterEvent* dee) { m_view->dragEnterEvent (dee); } -KDE_NO_EXPORT void ViewArea::contextMenuEvent (QContextMenuEvent * e) { +KDE_NO_EXPORT void ViewArea::contextMenuEvent (TQContextMenuEvent * e) { m_view->controlPanel ()->popupMenu ()->exec (e->globalPos ()); } @@ -1651,40 +1651,40 @@ KDE_NO_EXPORT void ViewArea::mouseMoved () { } KDE_NO_EXPORT void ViewArea::scheduleRepaint (const IRect &rect) { - if (m_repaint_timer) { - m_repaint_rect = m_repaint_rect.unite (rect); + if (m_tqrepaint_timer) { + m_tqrepaint_rect = m_tqrepaint_rect.unite (rect); } else { - m_repaint_rect = rect; - m_repaint_timer = startTimer (10); // 100 per sec should do + m_tqrepaint_rect = rect; + m_tqrepaint_timer = startTimer (10); // 100 per sec should do } } -KDE_NO_EXPORT void ViewArea::timerEvent (QTimerEvent * e) { +KDE_NO_EXPORT void ViewArea::timerEvent (TQTimerEvent * e) { if (e->timerId () == m_mouse_invisible_timer) { killTimer (m_mouse_invisible_timer); m_mouse_invisible_timer = 0; if (m_fullscreen) setCursor (BlankCursor); - } else if (e->timerId () == m_repaint_timer) { - killTimer (m_repaint_timer); - m_repaint_timer = 0; - //repaint (m_repaint_rect, false); - syncVisual (m_repaint_rect.intersect (IRect (0, 0, width (), height ()))); + } else if (e->timerId () == m_tqrepaint_timer) { + killTimer (m_tqrepaint_timer); + m_tqrepaint_timer = 0; + //tqrepaint (m_tqrepaint_rect, false); + syncVisual (m_tqrepaint_rect.intersect (IRect (0, 0, width (), height ()))); } else { - kdError () << "unknown timer " << e->timerId () << " " << m_repaint_timer << endl; + kdError () << "unknown timer " << e->timerId () << " " << m_tqrepaint_timer << endl; killTimer (e->timerId ()); } } -KDE_NO_EXPORT void ViewArea::closeEvent (QCloseEvent * e) { +KDE_NO_EXPORT void ViewArea::closeEvent (TQCloseEvent * e) { //kdDebug () << "closeEvent" << endl; if (m_fullscreen) { fullScreen (); - if (!m_parent->topLevelWidget ()->isVisible ()) - m_parent->topLevelWidget ()->show (); + if (!m_parent->tqtopLevelWidget ()->isVisible ()) + m_parent->tqtopLevelWidget ()->show (); e->ignore (); } else - QWidget::closeEvent (e); + TQWidget::closeEvent (e); } |