summaryrefslogtreecommitdiffstats
path: root/fifteenapplet
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:42 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:42 -0600
commit6cdf35ab11c322f33feca5baf090ef56068b6049 (patch)
treeca493b21887096329578b1c02530fd4ca9388cfc /fifteenapplet
parent44b2e94b380d4e5ec1539874823ffc06f05515cb (diff)
downloadtdetoys-6cdf35ab11c322f33feca5baf090ef56068b6049.tar.gz
tdetoys-6cdf35ab11c322f33feca5baf090ef56068b6049.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'fifteenapplet')
-rw-r--r--fifteenapplet/fifteenapplet.cpp12
-rw-r--r--fifteenapplet/qttableview.cpp66
-rw-r--r--fifteenapplet/qttableview.h14
3 files changed, 46 insertions, 46 deletions
diff --git a/fifteenapplet/fifteenapplet.cpp b/fifteenapplet/fifteenapplet.cpp
index 498f93d..1409c4f 100644
--- a/fifteenapplet/fifteenapplet.cpp
+++ b/fifteenapplet/fifteenapplet.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
#include <time.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpainter.h>
#include <tqpopupmenu.h>
@@ -54,7 +54,7 @@ FifteenApplet::FifteenApplet(const TQString& configFile, Type type, int actions,
_table = new PiecesTable(this);
setCustomMenu(_table->popup());
- // setup tqlayout
+ // setup layout
TQHBoxLayout *_layout = new TQHBoxLayout(this);
_layout->add(_table);
@@ -120,7 +120,7 @@ void PiecesTable::paintCell(TQPainter *p, int row, int col)
// draw cell background
if(number == 16)
- p->setBrush(tqcolorGroup().background());
+ p->setBrush(colorGroup().background());
else
p->setBrush(_colors[number-1]);
p->setPen(NoPen);
@@ -128,7 +128,7 @@ void PiecesTable::paintCell(TQPainter *p, int row, int col)
// draw borders
if (height() > 40) {
- p->setPen(tqcolorGroup().text());
+ p->setPen(colorGroup().text());
if(col < numCols()-1)
p->drawLine(x2, 0, x2, y2); // right border line
@@ -198,14 +198,14 @@ void PiecesTable::randomizeMap()
}
}
}
- tqrepaint();
+ repaint();
_randomized = true;
}
void PiecesTable::resetMap()
{
initMap();
- tqrepaint();
+ repaint();
}
void PiecesTable::chectwin()
diff --git a/fifteenapplet/qttableview.cpp b/fifteenapplet/qttableview.cpp
index 4aded39..1c9656b 100644
--- a/fifteenapplet/qttableview.cpp
+++ b/fifteenapplet/qttableview.cpp
@@ -34,8 +34,8 @@ enum ScrollBarDirtyFlags {
};
-#define HSBEXT horizontalScrollBar()->tqsizeHint().height()
-#define VSBEXT verticalScrollBar()->tqsizeHint().width()
+#define HSBEXT horizontalScrollBar()->sizeHint().height()
+#define VSBEXT verticalScrollBar()->sizeHint().width()
class QCornerSquare : public TQWidget // internal class
@@ -88,7 +88,7 @@ void QCornerSquare::paintEvent( TQPaintEvent * )
used by functions such as setXOffset() or maxYOffset().
\i The \e widget coordinates. (0,0) is the top-left corner of the widget,
- \e including the frame. They are used by functions such as tqrepaint().
+ \e including the frame. They are used by functions such as repaint().
\i The \e view coordinates. (0,0) is the top-left corner of the view, \e
excluding the frame. This is the least-used coordinate system; it is used by
@@ -135,7 +135,7 @@ void QCornerSquare::paintEvent( TQPaintEvent * )
The \link setCellHeight() cell height\endlink and \link setCellWidth()
cell width\endlink are set to 0.
- Frame line tqshapes (TQFrame::HLink and TQFrame::VLine) are disallowed;
+ Frame line shapes (TQFrame::HLink and TQFrame::VLine) are disallowed;
see TQFrame::setFrameStyle().
Note that the \a f argument is \e not \link setTableFlags() table
@@ -207,7 +207,7 @@ void QtTableView::show()
/*!
- \overload void QtTableView::tqrepaint( bool erase )
+ \overload void QtTableView::repaint( bool erase )
Repaints the entire view.
*/
@@ -221,16 +221,16 @@ void QtTableView::show()
If \a w is negative, it is replaced with <code>width() - x</code>.
If \a h is negative, it is replaced with <code>height() - y</code>.
- Doing a tqrepaint() usually is faster than doing an update(), but
+ Doing a repaint() usually is faster than doing an update(), but
calling update() many times in a row will generate a single paint
event.
At present, QtTableView is the only widget that reimplements \link
- TQWidget::tqrepaint() tqrepaint()\endlink. It does this because by
+ TQWidget::repaint() repaint()\endlink. It does this because by
clearing and then repainting one cell at at time, it can make the
screen flicker less than it would otherwise. */
-void QtTableView::tqrepaint( int x, int y, int w, int h, bool erase )
+void QtTableView::repaint( int x, int y, int w, int h, bool erase )
{
if ( !isVisible() || testWState(WState_BlockUpdates) )
return;
@@ -249,7 +249,7 @@ void QtTableView::tqrepaint( int x, int y, int w, int h, bool erase )
}
/*!
- \overload void QtTableView::tqrepaint( const TQRect &r, bool erase )
+ \overload void QtTableView::repaint( const TQRect &r, bool erase )
Replaints rectangle \a r. If \a erase is TRUE draws the background
using the palette's background.
*/
@@ -288,7 +288,7 @@ void QtTableView::setNumRows( int rows )
nRows = rows;
if ( autoUpdate() && isVisible() &&
( oldLastVisible != lastRowVisible() || oldTopCell != topCell() ) )
- tqrepaint( oldTopCell != topCell() );
+ repaint( oldTopCell != topCell() );
} else {
// Be more careful - if destructing, bad things might happen.
nRows = rows;
@@ -328,7 +328,7 @@ void QtTableView::setNumCols( int cols )
if ( autoUpdate() && isVisible() ) {
int maxCol = lastColVisible();
if ( maxCol >= oldCols || maxCol >= nCols )
- tqrepaint();
+ repaint();
}
updateScrollBars( horRange );
updateFrameSize();
@@ -591,7 +591,7 @@ void QtTableView::setCellWidth( int cellWidth )
updateScrollBars( horSteps | horRange );
if ( autoUpdate() && isVisible() )
- tqrepaint();
+ repaint();
}
@@ -643,7 +643,7 @@ void QtTableView::setCellHeight( int cellHeight )
#endif
cellH = (short)cellHeight;
if ( autoUpdate() && isVisible() )
- tqrepaint();
+ repaint();
updateScrollBars( verSteps | verRange );
}
@@ -817,7 +817,7 @@ void QtTableView::setTableFlags( uint f )
(f & Tbl_snapToVGrid) != 0 && yCellDelta != 0 ) {
snapToGrid( (f & Tbl_snapToHGrid) != 0, // do snapping
(f & Tbl_snapToVGrid) != 0 );
- repaintMask |= Tbl_snapToGrid; // tqrepaint table
+ repaintMask |= Tbl_snapToGrid; // repaint table
}
}
@@ -825,7 +825,7 @@ void QtTableView::setTableFlags( uint f )
setAutoUpdate( TRUE );
updateScrollBars();
if ( isVisible() && (f & repaintMask) )
- tqrepaint();
+ repaint();
}
}
@@ -881,7 +881,7 @@ void QtTableView::clearTableFlags( uint f )
(f & Tbl_smoothVScrolling) != 0 && yCellDelta != 0 ) {
snapToGrid( (f & Tbl_smoothHScrolling) != 0, // do snapping
(f & Tbl_smoothVScrolling) != 0 );
- repaintMask |= Tbl_smoothScrolling; // tqrepaint table
+ repaintMask |= Tbl_smoothScrolling; // repaint table
}
}
if ( f & Tbl_snapToHGrid ) {
@@ -894,7 +894,7 @@ void QtTableView::clearTableFlags( uint f )
setAutoUpdate( TRUE );
updateScrollBars(); // returns immediately if nothing to do
if ( isVisible() && (f & repaintMask) )
- tqrepaint();
+ repaint();
}
}
@@ -916,20 +916,20 @@ void QtTableView::clearTableFlags( uint f )
automatically whenever it has changed in some way (for example, when a
\link setTableFlags() flag\endlink is changed).
- If \a enable is FALSE, the view does NOT tqrepaint itself or update
+ If \a enable is FALSE, the view does NOT repaint itself or update
its internal state variables when it is changed. This can be
useful to avoid flicker during large changes and is singularly
useless otherwise. Disable auto-update, do the changes, re-enable
- auto-update and call tqrepaint().
+ auto-update and call repaint().
\warning Do not leave the view in this state for a long time
(i.e., between events). If, for example, the user interacts with the
view when auto-update is off, strange things can happen.
- Setting auto-update to TRUE does not tqrepaint the view; you must call
- tqrepaint() to do this.
+ Setting auto-update to TRUE does not repaint the view; you must call
+ repaint() to do this.
- \sa autoUpdate(), tqrepaint()
+ \sa autoUpdate(), repaint()
*/
void QtTableView::setAutoUpdate( bool enable )
@@ -963,7 +963,7 @@ void QtTableView::updateCell( int row, int col, bool erase )
TQRect uR = TQRect( xPos, yPos,
cellW ? cellW : cellWidth(col),
cellH ? cellH : cellHeight(row) );
- tqrepaint( uR.intersect(viewRect()), erase );
+ repaint( uR.intersect(viewRect()), erase );
}
@@ -1379,13 +1379,13 @@ void QtTableView::paintEvent( TQPaintEvent *e )
// Note that this needs to be done regardless whether we do
// eraseInPaint or not. Reason: a subclass may implement
- // flicker-freeness and encourage the use of tqrepaint(FALSE).
+ // flicker-freeness and encourage the use of repaint(FALSE).
// The subclass, however, cannot draw all pixels, just those
// inside the cells. So QtTableView is reponsible for all pixels
// outside the cells.
TQRect viewR = viewRect();
- const TQColorGroup g = tqcolorGroup();
+ const TQColorGroup g = colorGroup();
if ( xPos <= maxX ) {
TQRect r = viewR;
@@ -1426,7 +1426,7 @@ void QtTableView::resizeEvent( TQResizeEvent * )
void QtTableView::updateView()
{
- tqrepaint( viewRect() );
+ repaint( viewRect() );
}
/*!
@@ -1443,7 +1443,7 @@ TQScrollBar *QtTableView::verticalScrollBar() const
#ifndef TQT_NO_CURSOR
sb->setCursor( arrowCursor );
#endif
- sb->resize( sb->tqsizeHint() ); // height is irrelevant
+ sb->resize( sb->sizeHint() ); // height is irrelevant
Q_CHECK_PTR(sb);
sb->setTracking( FALSE );
sb->setFocusPolicy( TQ_NoFocus );
@@ -1474,7 +1474,7 @@ TQScrollBar *QtTableView::horizontalScrollBar() const
#ifndef TQT_NO_CURSOR
sb->setCursor( arrowCursor );
#endif
- sb->resize( sb->tqsizeHint() ); // width is irrelevant
+ sb->resize( sb->sizeHint() ); // width is irrelevant
sb->setFocusPolicy( TQ_NoFocus );
Q_CHECK_PTR(sb);
sb->setTracking( FALSE );
@@ -1522,7 +1522,7 @@ void QtTableView::setHorScrollBar( bool on, bool update )
else
sbDirty = sbDirty | verMask;
if ( hideScrollBar && isVisible() )
- tqrepaint( hScrollBar->x(), hScrollBar->y(),
+ repaint( hScrollBar->x(), hScrollBar->y(),
width() - hScrollBar->x(), hScrollBar->height() );
}
if ( update )
@@ -1561,7 +1561,7 @@ void QtTableView::setVerScrollBar( bool on, bool update )
else
sbDirty = sbDirty | horMask;
if ( hideScrollBar && isVisible() )
- tqrepaint( vScrollBar->x(), vScrollBar->y(),
+ repaint( vScrollBar->x(), vScrollBar->y(),
vScrollBar->width(), height() - vScrollBar->y() );
}
if ( update )
@@ -2006,7 +2006,7 @@ void QtTableView::updateScrollBars( uint f )
if ( sbDirty & horValue )
hScrollBar->setValue( xOffs );
- // show scrollbar only when it has a sane tqgeometry
+ // show scrollbar only when it has a sane geometry
if ( !hScrollBar->isVisible() )
hScrollBar->show();
}
@@ -2030,7 +2030,7 @@ void QtTableView::updateScrollBars( uint f )
if ( sbDirty & verValue )
vScrollBar->setValue( yOffs );
- // show scrollbar only when it has a sane tqgeometry
+ // show scrollbar only when it has a sane geometry
if ( !vScrollBar->isVisible() )
vScrollBar->show();
}
@@ -2253,7 +2253,7 @@ void QtTableView::showOrHideScrollBars()
Call this function when the table view's total size is changed;
typically because the result of cellHeight() or cellWidth() have changed.
- This function does not tqrepaint the widget.
+ This function does not repaint the widget.
*/
void QtTableView::updateTableSize()
diff --git a/fifteenapplet/qttableview.h b/fifteenapplet/qttableview.h
index 081ed64..5333376 100644
--- a/fifteenapplet/qttableview.h
+++ b/fifteenapplet/qttableview.h
@@ -32,9 +32,9 @@ public:
virtual void setPalette( const TQPalette & );
void show();
- void tqrepaint( bool erase=TRUE );
- void tqrepaint( int x, int y, int w, int h, bool erase=TRUE );
- void tqrepaint( const TQRect &, bool erase=TRUE );
+ void repaint( bool erase=TRUE );
+ void repaint( int x, int y, int w, int h, bool erase=TRUE );
+ void repaint( const TQRect &, bool erase=TRUE );
protected:
QtTableView( TQWidget *parent=0, const char *name=0, WFlags f=0 );
@@ -235,11 +235,11 @@ inline TQRect QtTableView::cellUpdateRect() const
inline bool QtTableView::autoUpdate() const
{ return isUpdatesEnabled(); }
-inline void QtTableView::tqrepaint( bool erase )
-{ tqrepaint( 0, 0, width(), height(), erase ); }
+inline void QtTableView::repaint( bool erase )
+{ repaint( 0, 0, width(), height(), erase ); }
-inline void QtTableView::tqrepaint( const TQRect &r, bool erase )
-{ tqrepaint( r.x(), r.y(), r.width(), r.height(), erase ); }
+inline void QtTableView::repaint( const TQRect &r, bool erase )
+{ repaint( r.x(), r.y(), r.width(), r.height(), erase ); }
inline void QtTableView::updateScrollBars()
{ updateScrollBars( 0 ); }