diff options
Diffstat (limited to 'tdeiconedit/tdeicongrid.cpp')
-rw-r--r-- | tdeiconedit/tdeicongrid.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/tdeiconedit/tdeicongrid.cpp b/tdeiconedit/tdeicongrid.cpp index b441035b..85a81751 100644 --- a/tdeiconedit/tdeicongrid.cpp +++ b/tdeiconedit/tdeicongrid.cpp @@ -112,12 +112,12 @@ KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, _corner = new TQFrame(this); _corner->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised); - _hruler = new KRuler(Qt::Horizontal, this); + _hruler = new KRuler(TQt::Horizontal, this); _hruler->setEndLabel(i18n("width")); _hruler->setOffset( -2 ); _hruler->setRange(0, 1000); - _vruler = new KRuler(Qt::Vertical, this); + _vruler = new KRuler(TQt::Vertical, this); _vruler->setEndLabel(i18n("height")); _vruler->setOffset( -2 ); _vruler->setRange(0, 1000); @@ -127,12 +127,12 @@ KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, TQWhatsThis::add( _hruler, str ); TQWhatsThis::add( _vruler, str ); - connect(_grid, TQT_SIGNAL(scalingchanged(int)), TQT_SLOT(scalingChange(int))); - connect(_grid, TQT_SIGNAL(sizechanged(int, int)), TQT_SLOT(sizeChange(int, int))); - connect(_grid, TQT_SIGNAL(needPainting()), TQT_SLOT(paintGrid())); - connect( _grid, TQT_SIGNAL(xposchanged(int)), _hruler, TQT_SLOT(slotNewValue(int)) ); - connect( _grid, TQT_SIGNAL(yposchanged(int)), _vruler, TQT_SLOT(slotNewValue(int)) ); - connect(viewport, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(moving(int, int))); + connect(_grid, TQ_SIGNAL(scalingchanged(int)), TQ_SLOT(scalingChange(int))); + connect(_grid, TQ_SIGNAL(sizechanged(int, int)), TQ_SLOT(sizeChange(int, int))); + connect(_grid, TQ_SIGNAL(needPainting()), TQ_SLOT(paintGrid())); + connect( _grid, TQ_SIGNAL(xposchanged(int)), _hruler, TQ_SLOT(slotNewValue(int)) ); + connect( _grid, TQ_SIGNAL(yposchanged(int)), _vruler, TQ_SLOT(slotNewValue(int)) ); + connect(viewport, TQ_SIGNAL(contentsMoving(int, int)), TQ_SLOT(moving(int, int))); setSizes(); TQResizeEvent e(size(), size()); @@ -319,8 +319,8 @@ TDEIconEditGrid::TDEIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *p setNumCols(32); fill(TRANSPARENT); - connect( kapp->clipboard(), TQT_SIGNAL(dataChanged()), TQT_SLOT(checkClipboard())); - connect( h, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(updatePreviewPixmap() )); + connect( tdeApp->clipboard(), TQ_SIGNAL(dataChanged()), TQ_SLOT(checkClipboard())); + connect( h, TQ_SIGNAL(commandExecuted()), this, TQ_SLOT(updatePreviewPixmap() )); createCursors(); TDEIconEditProperties *props = TDEIconEditProperties::self(); @@ -710,7 +710,7 @@ void TDEIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e) void TDEIconEditGrid::mousePressEvent( TQMouseEvent *e ) { - if(!e || (e->button() != Qt::LeftButton)) + if(!e || (e->button() != TQt::LeftButton)) return; int row = findRow( e->pos().y() ); @@ -886,7 +886,7 @@ void TDEIconEditGrid::mouseMoveEvent( TQMouseEvent *e ) void TDEIconEditGrid::mouseReleaseEvent( TQMouseEvent *e ) { - if(!e || (e->button() != Qt::LeftButton)) + if(!e || (e->button() != TQt::LeftButton)) return; int row = findRow( e->pos().y() ); @@ -916,8 +916,8 @@ void TDEIconEditGrid::mouseReleaseEvent( TQMouseEvent *e ) selected = cell; update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize); update(col*cellsize,row*cellsize, cellsize, cellsize); - //updateCell( prevSel/numCols(), prevSel%numCols(), FALSE ); - //updateCell( row, col, FALSE ); + //updateCell( prevSel/numCols(), prevSel%numCols(), false ); + //updateCell( row, col, false ); *((uint*)img->scanLine(row) + col) = colorAt(cell); p = *img; //} @@ -973,8 +973,8 @@ void TDEIconEditGrid::mouseReleaseEvent( TQMouseEvent *e ) update((prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize); update(col*cellsize,row*cellsize, cellsize, cellsize); emit colorSelected(currentcolor); - //updateCell( prevSel/numCols(), prevSel%numCols(), FALSE ); - //updateCell( row, col, FALSE ); + //updateCell( prevSel/numCols(), prevSel%numCols(), false ); + //updateCell( row, col, false ); } break; @@ -1035,7 +1035,7 @@ void TDEIconEditGrid::load( TQImage *image) setColor((y*numCols())+x, *l, false); } //kdDebug(4640) << "Row: " << y << endl; - kapp->processEvents(200); + tdeApp->processEvents(200); } updateColors(); @@ -1118,7 +1118,7 @@ TQImage TDEIconEditGrid::clipboardImage(bool &ok) { TQCString format = fileFormats.current(); TQCString type = "image/" + format.lower(); - if (kapp->clipboard()->data()->provides(type ) ) + if (tdeApp->clipboard()->data()->provides(type ) ) { oneIsSupported = true; } @@ -1130,7 +1130,7 @@ TQImage TDEIconEditGrid::clipboardImage(bool &ok) return TQImage(); } - TQImage image = kapp->clipboard()->image(); + TQImage image = tdeApp->clipboard()->image(); ok = !image.isNull(); if ( ok ) { @@ -1213,7 +1213,7 @@ TQImage TDEIconEditGrid::getSelection(bool cut) void TDEIconEditGrid::editCopy(bool cut) { - kapp->clipboard()->setImage(getSelection(cut)); + tdeApp->clipboard()->setImage(getSelection(cut)); isselecting = false; } @@ -1909,7 +1909,7 @@ void TDEIconEditGrid::drawPointArray(TQPointArray a, DrawAction action) int x = a[i].x(); int y = a[i].y(); - if(img->valid(x, y) && TQT_TQRECT_OBJECT(a.boundingRect()).contains(a[ i ])) + if(img->valid(x, y) && a.boundingRect().contains(a[ i ])) { //kdDebug(4640) << "x: " << x << " - y: " << y << endl; switch( action ) @@ -1922,7 +1922,7 @@ void TDEIconEditGrid::drawPointArray(TQPointArray a, DrawAction action) //int cell = y * numCols() + x; //setColor( cell, currentcolor, false ); doupdate = true; - //updateCell( y, x, FALSE ); + //updateCell( y, x, false ); macro->addCommand( dc ); break; } @@ -1993,7 +1993,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) if ( !dst->create(src->width(), src->height(), 8, 256) ) { kdWarning() << "OImage: destination image not valid" << endl; - return FALSE; + return false; } int ncols = 256; @@ -2153,7 +2153,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) #undef MAX_B #undef INDEXOF - return TRUE; + return true; } // this doesn't work the way it should but the way KPixmap does. |