Rename a number of old tq methods that are no longer tq specific

pull/1/head
Timothy Pearson 13 years ago
parent 44b2e94b38
commit 6cdf35ab11

@ -152,7 +152,7 @@ Amor::Amor() : DCOPObject( "AmorIface" ), TQObject()
TQT_SLOT(slotMouseClicked(const TQPoint &))); TQT_SLOT(slotMouseClicked(const TQPoint &)));
connect(mAmor, TQT_SIGNAL(dragged(const TQPoint &, bool)), connect(mAmor, TQT_SIGNAL(dragged(const TQPoint &, bool)),
TQT_SLOT(slotWidgetDragged(const TQPoint &, bool))); TQT_SLOT(slotWidgetDragged(const TQPoint &, bool)));
mAmor->resize(mTheme.tqmaximumSize()); mAmor->resize(mTheme.maximumSize());
mTimer = new TQTimer(this); mTimer = new TQTimer(this);
connect(mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); connect(mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
@ -288,7 +288,7 @@ void Amor::reset()
mPosition = mCurrAnim->hotspot().x(); mPosition = mCurrAnim->hotspot().x();
mState = Normal; mState = Normal;
mAmor->resize(mTheme.tqmaximumSize()); mAmor->resize(mTheme.maximumSize());
mCurrAnim->reset(); mCurrAnim->reset();
mTimer->start(0, true); mTimer->start(0, true);
@ -748,7 +748,7 @@ void Amor::slotOffsetChanged(int off)
// //
void Amor::slotAbout() void Amor::slotAbout()
{ {
TQString about = i18n("Amor Version %1\n\n").tqarg(AMOR_VERSION) + TQString about = i18n("Amor Version %1\n\n").arg(AMOR_VERSION) +
i18n("Amusing Misuse Of Resources\n\n") + i18n("Amusing Misuse Of Resources\n\n") +
i18n("Copyright (c) 1999 Martin R. Jones <mjones@kde.org>\n\n") + i18n("Copyright (c) 1999 Martin R. Jones <mjones@kde.org>\n\n") +
i18n("Original Author: Martin R. Jones <mjones@kde.org>\n") + i18n("Original Author: Martin R. Jones <mjones@kde.org>\n") +

@ -227,7 +227,7 @@ bool AmorThemeManager::readGroup(const TQString & seq)
mConfig->setGroup(list.at(i)); mConfig->setGroup(list.at(i));
AmorAnim *anim = new AmorAnim(*mConfig); AmorAnim *anim = new AmorAnim(*mConfig);
animList->append(anim); animList->append(anim);
mMaximumSize = mMaximumSize.expandedTo(anim->tqmaximumSize()); mMaximumSize = mMaximumSize.expandedTo(anim->maximumSize());
} }
// If no animations were available for this group, just add the base anim // If no animations were available for this group, just add the base anim
@ -238,7 +238,7 @@ bool AmorThemeManager::readGroup(const TQString & seq)
if (anim) if (anim)
{ {
animList->append(anim); animList->append(anim);
mMaximumSize = mMaximumSize.expandedTo(anim->tqmaximumSize()); mMaximumSize = mMaximumSize.expandedTo(anim->maximumSize());
entries++; entries++;
} }
} }

@ -59,7 +59,7 @@ public:
{ return (mCurrent < mSequence.count()); } { return (mCurrent < mSequence.count()); }
int totalMovement() const int totalMovement() const
{ return mTotalMovement; } { return mTotalMovement; }
TQSize tqmaximumSize() const TQSize maximumSize() const
{ return mMaximumSize; } { return mMaximumSize; }
int delay() const int delay() const
@ -103,7 +103,7 @@ public:
AmorAnim *random(const TQString & group); AmorAnim *random(const TQString & group);
TQSize tqmaximumSize() const { return mMaximumSize; } TQSize maximumSize() const { return mMaximumSize; }
protected: protected:
TQString mPath; TQString mPath;

@ -55,7 +55,7 @@ AmorBubble::AmorBubble()
mBrowser->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); // too long to fit in one line? mBrowser->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); // too long to fit in one line?
TQColorGroup clgrp = mBrowser->tqcolorGroup(); TQColorGroup clgrp = mBrowser->colorGroup();
clgrp.setColor(TQColorGroup::Text, TQt::black); clgrp.setColor(TQColorGroup::Text, TQt::black);
//Laurent TQTextBrowser didn't have this function FIX me //Laurent TQTextBrowser didn't have this function FIX me
//mBrowser->setPaperColorGroup( clgrp ); //mBrowser->setPaperColorGroup( clgrp );
@ -83,12 +83,12 @@ AmorBubble::~AmorBubble()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// Set the message to display in the bubble. Causes the tqgeometry of the // Set the message to display in the bubble. Causes the geometry of the
// widget to be recalculated. // widget to be recalculated.
// //
void AmorBubble::setMessage(const TQString& message) void AmorBubble::setMessage(const TQString& message)
{ {
mMessage = TQString( "<html>%1</html>" ).tqarg( message ); mMessage = TQString( "<html>%1</html>" ).arg( message );
// hacks because heightForWidth() doesn't work. // hacks because heightForWidth() doesn't work.
setGeometry( -1000, 0, 300, 1000 ); setGeometry( -1000, 0, 300, 1000 );
show(); show();
@ -108,7 +108,7 @@ void AmorBubble::calcGeometry()
mBound.setHeight( mBrowser->contentsHeight() ); mBound.setHeight( mBrowser->contentsHeight() );
mBound.moveBy(ARROW_WIDTH+BORDER_SIZE, BORDER_SIZE); mBound.moveBy(ARROW_WIDTH+BORDER_SIZE, BORDER_SIZE);
// initialise the default tqgeometry of the bubble // initialise the default geometry of the bubble
int w = mBound.width() + BORDER_SIZE * 2 + ARROW_WIDTH; int w = mBound.width() + BORDER_SIZE * 2 + ARROW_WIDTH;
int h = mBound.height() + BORDER_SIZE * 2; int h = mBound.height() + BORDER_SIZE * 2;
int xpos = mOriginX + BUBBLE_OFFSET; int xpos = mOriginX + BUBBLE_OFFSET;
@ -141,7 +141,7 @@ void AmorBubble::calcGeometry()
setGeometry(xpos, ypos, w, h); setGeometry(xpos, ypos, w, h);
mBrowser->setGeometry( mBound ); mBrowser->setGeometry( mBound );
// create and apply the tqshape mask // create and apply the shape mask
mMask.resize(w, h); mMask.resize(w, h);
mMask.fill(color0); mMask.fill(color0);
TQPainter maskPainter(&mMask); TQPainter maskPainter(&mMask);
@ -195,7 +195,7 @@ void AmorBubble::drawBubble(TQPainter &p)
p.drawPolygon(pointArray); p.drawPolygon(pointArray);
p.setPen(pen); p.setPen(pen);
p.tqdrawPolyline(pointArray, 0, 3); p.drawPolyline(pointArray, 0, 3);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

@ -40,7 +40,7 @@ class TQTimer;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// AmorBubble displays a message in a tqshaped window // AmorBubble displays a message in a shaped window
// //
class AmorBubble : public TQWidget class AmorBubble : public TQWidget
{ {
@ -70,7 +70,7 @@ protected:
int mOriginX; // X origin of bubble arrow int mOriginX; // X origin of bubble arrow
int mOriginY; // Y origin of bubble arrow int mOriginY; // Y origin of bubble arrow
TQRect mBound; // bounds of the text TQRect mBound; // bounds of the text
TQBitmap mMask; // tqshape mask TQBitmap mMask; // shape mask
VertPos mArrowVert; // vertical position of the arrow VertPos mArrowVert; // vertical position of the arrow
HorzPos mArrowHorz; // horizontal position of the arrow HorzPos mArrowHorz; // horizontal position of the arrow
TQTextBrowser *mBrowser; // displays the message TQTextBrowser *mBrowser; // displays the message

@ -64,7 +64,7 @@ void AmorWidget::setPixmap(const TQPixmap *pixmap)
{ {
XShapeCombineMask( x11Display(), winId(), ShapeBounding, 0, 0, XShapeCombineMask( x11Display(), winId(), ShapeBounding, 0, 0,
mPixmap->mask()->handle(), ShapeSet ); mPixmap->mask()->handle(), ShapeSet );
tqrepaint(false); repaint(false);
} }
update(); update();

@ -36,7 +36,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// AmorWidget displays a tqshaped pixmap // AmorWidget displays a shaped pixmap
// //
class AmorWidget : public TQWidget class AmorWidget : public TQWidget
{ {

@ -55,11 +55,11 @@ EyesApplet::EyesApplet(const TQString& configFile, Type t, int actions,
int EyesApplet::widthForHeight(int h) const int EyesApplet::widthForHeight(int h) const
{ {
return static_cast<int>(1.4 * h); // rectangular tqshape. return static_cast<int>(1.4 * h); // rectangular shape.
} }
int EyesApplet::heightForWidth(int w) const int EyesApplet::heightForWidth(int w) const
{ {
return static_cast<int>(w / 1.4); // rectangular tqshape. return static_cast<int>(w / 1.4); // rectangular shape.
} }
void EyesApplet::resizeEvent( TQResizeEvent*e ) void EyesApplet::resizeEvent( TQResizeEvent*e )

@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpopupmenu.h> #include <tqpopupmenu.h>
@ -54,7 +54,7 @@ FifteenApplet::FifteenApplet(const TQString& configFile, Type type, int actions,
_table = new PiecesTable(this); _table = new PiecesTable(this);
setCustomMenu(_table->popup()); setCustomMenu(_table->popup());
// setup tqlayout // setup layout
TQHBoxLayout *_layout = new TQHBoxLayout(this); TQHBoxLayout *_layout = new TQHBoxLayout(this);
_layout->add(_table); _layout->add(_table);
@ -120,7 +120,7 @@ void PiecesTable::paintCell(TQPainter *p, int row, int col)
// draw cell background // draw cell background
if(number == 16) if(number == 16)
p->setBrush(tqcolorGroup().background()); p->setBrush(colorGroup().background());
else else
p->setBrush(_colors[number-1]); p->setBrush(_colors[number-1]);
p->setPen(NoPen); p->setPen(NoPen);
@ -128,7 +128,7 @@ void PiecesTable::paintCell(TQPainter *p, int row, int col)
// draw borders // draw borders
if (height() > 40) { if (height() > 40) {
p->setPen(tqcolorGroup().text()); p->setPen(colorGroup().text());
if(col < numCols()-1) if(col < numCols()-1)
p->drawLine(x2, 0, x2, y2); // right border line p->drawLine(x2, 0, x2, y2); // right border line
@ -198,14 +198,14 @@ void PiecesTable::randomizeMap()
} }
} }
} }
tqrepaint(); repaint();
_randomized = true; _randomized = true;
} }
void PiecesTable::resetMap() void PiecesTable::resetMap()
{ {
initMap(); initMap();
tqrepaint(); repaint();
} }
void PiecesTable::chectwin() void PiecesTable::chectwin()

@ -34,8 +34,8 @@ enum ScrollBarDirtyFlags {
}; };
#define HSBEXT horizontalScrollBar()->tqsizeHint().height() #define HSBEXT horizontalScrollBar()->sizeHint().height()
#define VSBEXT verticalScrollBar()->tqsizeHint().width() #define VSBEXT verticalScrollBar()->sizeHint().width()
class QCornerSquare : public TQWidget // internal class class QCornerSquare : public TQWidget // internal class
@ -88,7 +88,7 @@ void QCornerSquare::paintEvent( TQPaintEvent * )
used by functions such as setXOffset() or maxYOffset(). used by functions such as setXOffset() or maxYOffset().
\i The \e widget coordinates. (0,0) is the top-left corner of the widget, \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 \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 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() The \link setCellHeight() cell height\endlink and \link setCellWidth()
cell width\endlink are set to 0. 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(). see TQFrame::setFrameStyle().
Note that the \a f argument is \e not \link setTableFlags() table 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. 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 w is negative, it is replaced with <code>width() - x</code>.
If \a h is negative, it is replaced with <code>height() - y</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 calling update() many times in a row will generate a single paint
event. event.
At present, QtTableView is the only widget that reimplements \link 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 clearing and then repainting one cell at at time, it can make the
screen flicker less than it would otherwise. */ 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) ) if ( !isVisible() || testWState(WState_BlockUpdates) )
return; 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 Replaints rectangle \a r. If \a erase is TRUE draws the background
using the palette's background. using the palette's background.
*/ */
@ -288,7 +288,7 @@ void QtTableView::setNumRows( int rows )
nRows = rows; nRows = rows;
if ( autoUpdate() && isVisible() && if ( autoUpdate() && isVisible() &&
( oldLastVisible != lastRowVisible() || oldTopCell != topCell() ) ) ( oldLastVisible != lastRowVisible() || oldTopCell != topCell() ) )
tqrepaint( oldTopCell != topCell() ); repaint( oldTopCell != topCell() );
} else { } else {
// Be more careful - if destructing, bad things might happen. // Be more careful - if destructing, bad things might happen.
nRows = rows; nRows = rows;
@ -328,7 +328,7 @@ void QtTableView::setNumCols( int cols )
if ( autoUpdate() && isVisible() ) { if ( autoUpdate() && isVisible() ) {
int maxCol = lastColVisible(); int maxCol = lastColVisible();
if ( maxCol >= oldCols || maxCol >= nCols ) if ( maxCol >= oldCols || maxCol >= nCols )
tqrepaint(); repaint();
} }
updateScrollBars( horRange ); updateScrollBars( horRange );
updateFrameSize(); updateFrameSize();
@ -591,7 +591,7 @@ void QtTableView::setCellWidth( int cellWidth )
updateScrollBars( horSteps | horRange ); updateScrollBars( horSteps | horRange );
if ( autoUpdate() && isVisible() ) if ( autoUpdate() && isVisible() )
tqrepaint(); repaint();
} }
@ -643,7 +643,7 @@ void QtTableView::setCellHeight( int cellHeight )
#endif #endif
cellH = (short)cellHeight; cellH = (short)cellHeight;
if ( autoUpdate() && isVisible() ) if ( autoUpdate() && isVisible() )
tqrepaint(); repaint();
updateScrollBars( verSteps | verRange ); updateScrollBars( verSteps | verRange );
} }
@ -817,7 +817,7 @@ void QtTableView::setTableFlags( uint f )
(f & Tbl_snapToVGrid) != 0 && yCellDelta != 0 ) { (f & Tbl_snapToVGrid) != 0 && yCellDelta != 0 ) {
snapToGrid( (f & Tbl_snapToHGrid) != 0, // do snapping snapToGrid( (f & Tbl_snapToHGrid) != 0, // do snapping
(f & Tbl_snapToVGrid) != 0 ); (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 ); setAutoUpdate( TRUE );
updateScrollBars(); updateScrollBars();
if ( isVisible() && (f & repaintMask) ) if ( isVisible() && (f & repaintMask) )
tqrepaint(); repaint();
} }
} }
@ -881,7 +881,7 @@ void QtTableView::clearTableFlags( uint f )
(f & Tbl_smoothVScrolling) != 0 && yCellDelta != 0 ) { (f & Tbl_smoothVScrolling) != 0 && yCellDelta != 0 ) {
snapToGrid( (f & Tbl_smoothHScrolling) != 0, // do snapping snapToGrid( (f & Tbl_smoothHScrolling) != 0, // do snapping
(f & Tbl_smoothVScrolling) != 0 ); (f & Tbl_smoothVScrolling) != 0 );
repaintMask |= Tbl_smoothScrolling; // tqrepaint table repaintMask |= Tbl_smoothScrolling; // repaint table
} }
} }
if ( f & Tbl_snapToHGrid ) { if ( f & Tbl_snapToHGrid ) {
@ -894,7 +894,7 @@ void QtTableView::clearTableFlags( uint f )
setAutoUpdate( TRUE ); setAutoUpdate( TRUE );
updateScrollBars(); // returns immediately if nothing to do updateScrollBars(); // returns immediately if nothing to do
if ( isVisible() && (f & repaintMask) ) 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 automatically whenever it has changed in some way (for example, when a
\link setTableFlags() flag\endlink is changed). \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 its internal state variables when it is changed. This can be
useful to avoid flicker during large changes and is singularly useful to avoid flicker during large changes and is singularly
useless otherwise. Disable auto-update, do the changes, re-enable 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 \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 (i.e., between events). If, for example, the user interacts with the
view when auto-update is off, strange things can happen. view when auto-update is off, strange things can happen.
Setting auto-update to TRUE does not tqrepaint the view; you must call Setting auto-update to TRUE does not repaint the view; you must call
tqrepaint() to do this. repaint() to do this.
\sa autoUpdate(), tqrepaint() \sa autoUpdate(), repaint()
*/ */
void QtTableView::setAutoUpdate( bool enable ) void QtTableView::setAutoUpdate( bool enable )
@ -963,7 +963,7 @@ void QtTableView::updateCell( int row, int col, bool erase )
TQRect uR = TQRect( xPos, yPos, TQRect uR = TQRect( xPos, yPos,
cellW ? cellW : cellWidth(col), cellW ? cellW : cellWidth(col),
cellH ? cellH : cellHeight(row) ); 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 // Note that this needs to be done regardless whether we do
// eraseInPaint or not. Reason: a subclass may implement // 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 // The subclass, however, cannot draw all pixels, just those
// inside the cells. So QtTableView is reponsible for all pixels // inside the cells. So QtTableView is reponsible for all pixels
// outside the cells. // outside the cells.
TQRect viewR = viewRect(); TQRect viewR = viewRect();
const TQColorGroup g = tqcolorGroup(); const TQColorGroup g = colorGroup();
if ( xPos <= maxX ) { if ( xPos <= maxX ) {
TQRect r = viewR; TQRect r = viewR;
@ -1426,7 +1426,7 @@ void QtTableView::resizeEvent( TQResizeEvent * )
void QtTableView::updateView() void QtTableView::updateView()
{ {
tqrepaint( viewRect() ); repaint( viewRect() );
} }
/*! /*!
@ -1443,7 +1443,7 @@ TQScrollBar *QtTableView::verticalScrollBar() const
#ifndef TQT_NO_CURSOR #ifndef TQT_NO_CURSOR
sb->setCursor( arrowCursor ); sb->setCursor( arrowCursor );
#endif #endif
sb->resize( sb->tqsizeHint() ); // height is irrelevant sb->resize( sb->sizeHint() ); // height is irrelevant
Q_CHECK_PTR(sb); Q_CHECK_PTR(sb);
sb->setTracking( FALSE ); sb->setTracking( FALSE );
sb->setFocusPolicy( TQ_NoFocus ); sb->setFocusPolicy( TQ_NoFocus );
@ -1474,7 +1474,7 @@ TQScrollBar *QtTableView::horizontalScrollBar() const
#ifndef TQT_NO_CURSOR #ifndef TQT_NO_CURSOR
sb->setCursor( arrowCursor ); sb->setCursor( arrowCursor );
#endif #endif
sb->resize( sb->tqsizeHint() ); // width is irrelevant sb->resize( sb->sizeHint() ); // width is irrelevant
sb->setFocusPolicy( TQ_NoFocus ); sb->setFocusPolicy( TQ_NoFocus );
Q_CHECK_PTR(sb); Q_CHECK_PTR(sb);
sb->setTracking( FALSE ); sb->setTracking( FALSE );
@ -1522,7 +1522,7 @@ void QtTableView::setHorScrollBar( bool on, bool update )
else else
sbDirty = sbDirty | verMask; sbDirty = sbDirty | verMask;
if ( hideScrollBar && isVisible() ) if ( hideScrollBar && isVisible() )
tqrepaint( hScrollBar->x(), hScrollBar->y(), repaint( hScrollBar->x(), hScrollBar->y(),
width() - hScrollBar->x(), hScrollBar->height() ); width() - hScrollBar->x(), hScrollBar->height() );
} }
if ( update ) if ( update )
@ -1561,7 +1561,7 @@ void QtTableView::setVerScrollBar( bool on, bool update )
else else
sbDirty = sbDirty | horMask; sbDirty = sbDirty | horMask;
if ( hideScrollBar && isVisible() ) if ( hideScrollBar && isVisible() )
tqrepaint( vScrollBar->x(), vScrollBar->y(), repaint( vScrollBar->x(), vScrollBar->y(),
vScrollBar->width(), height() - vScrollBar->y() ); vScrollBar->width(), height() - vScrollBar->y() );
} }
if ( update ) if ( update )
@ -2006,7 +2006,7 @@ void QtTableView::updateScrollBars( uint f )
if ( sbDirty & horValue ) if ( sbDirty & horValue )
hScrollBar->setValue( xOffs ); hScrollBar->setValue( xOffs );
// show scrollbar only when it has a sane tqgeometry // show scrollbar only when it has a sane geometry
if ( !hScrollBar->isVisible() ) if ( !hScrollBar->isVisible() )
hScrollBar->show(); hScrollBar->show();
} }
@ -2030,7 +2030,7 @@ void QtTableView::updateScrollBars( uint f )
if ( sbDirty & verValue ) if ( sbDirty & verValue )
vScrollBar->setValue( yOffs ); vScrollBar->setValue( yOffs );
// show scrollbar only when it has a sane tqgeometry // show scrollbar only when it has a sane geometry
if ( !vScrollBar->isVisible() ) if ( !vScrollBar->isVisible() )
vScrollBar->show(); vScrollBar->show();
} }
@ -2253,7 +2253,7 @@ void QtTableView::showOrHideScrollBars()
Call this function when the table view's total size is changed; Call this function when the table view's total size is changed;
typically because the result of cellHeight() or cellWidth() have 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() void QtTableView::updateTableSize()

@ -32,9 +32,9 @@ public:
virtual void setPalette( const TQPalette & ); virtual void setPalette( const TQPalette & );
void show(); void show();
void tqrepaint( bool erase=TRUE ); void repaint( bool erase=TRUE );
void tqrepaint( int x, int y, int w, int h, bool erase=TRUE ); void repaint( int x, int y, int w, int h, bool erase=TRUE );
void tqrepaint( const TQRect &, bool erase=TRUE ); void repaint( const TQRect &, bool erase=TRUE );
protected: protected:
QtTableView( TQWidget *parent=0, const char *name=0, WFlags f=0 ); 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 inline bool QtTableView::autoUpdate() const
{ return isUpdatesEnabled(); } { return isUpdatesEnabled(); }
inline void QtTableView::tqrepaint( bool erase ) inline void QtTableView::repaint( bool erase )
{ tqrepaint( 0, 0, width(), height(), erase ); } { repaint( 0, 0, width(), height(), erase ); }
inline void QtTableView::tqrepaint( const TQRect &r, bool erase ) inline void QtTableView::repaint( const TQRect &r, bool erase )
{ tqrepaint( r.x(), r.y(), r.width(), r.height(), erase ); } { repaint( r.x(), r.y(), r.width(), r.height(), erase ); }
inline void QtTableView::updateScrollBars() inline void QtTableView::updateScrollBars()
{ updateScrollBars( 0 ); } { updateScrollBars( 0 ); }

@ -27,7 +27,7 @@
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpopupmenu.h> #include <tqpopupmenu.h>
#include <tqlayout.h> #include <layout.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <kdebug.h> #include <kdebug.h>
@ -104,7 +104,7 @@ void MoonPAWidget::showAbout()
KStdGuiItem::ok() ); KStdGuiItem::ok() );
TQPixmap ret = DesktopIcon("kmoon"); TQPixmap ret = DesktopIcon("kmoon");
TQString text = i18n(description) + TQString::tqfromLatin1("\n\n") + TQString text = i18n(description) + TQString::fromLatin1("\n\n") +
i18n("Written by Stephan Kulow <coolo@kde.org>\n" i18n("Written by Stephan Kulow <coolo@kde.org>\n"
"\n" "\n"
"Made an applet by M G Berberich " "Made an applet by M G Berberich "
@ -136,7 +136,7 @@ void MoonPAWidget::settings()
config->writeEntry("Mask", moon->mask()); config->writeEntry("Mask", moon->mask());
config->sync(); config->sync();
} }
tqrepaint(); repaint();
} }
void MoonPAWidget::timerEvent( TQTimerEvent * ) void MoonPAWidget::timerEvent( TQTimerEvent * )
@ -144,8 +144,8 @@ void MoonPAWidget::timerEvent( TQTimerEvent * )
time_t clock; time_t clock;
time(&clock); time(&clock);
struct tm *t = localtime(&clock); struct tm *t = localtime(&clock);
moon->calctqStatus(mktime(t)); moon->calcStatus(mktime(t));
moon->tqrepaint(); moon->repaint();
} }
void MoonPAWidget::mousePressEvent( TQMouseEvent *e) void MoonPAWidget::mousePressEvent( TQMouseEvent *e)

@ -19,7 +19,7 @@
*/ */
#include <tqslider.h> #include <tqslider.h>
#include <tqlayout.h> #include <layout.h>
#include <klocale.h> #include <klocale.h>
#include <tqwhatsthis.h> #include <tqwhatsthis.h>
#include <tqvbox.h> #include <tqvbox.h>
@ -94,7 +94,7 @@ void KMoonDlg::angleChanged(int value) {
} }
void KMoonDlg::help() { void KMoonDlg::help() {
kapp->invokeHelp(TQString::tqfromLatin1("config")); kapp->invokeHelp(TQString::fromLatin1("config"));
} }
void KMoonDlg::toggleHemi() { void KMoonDlg::toggleHemi() {

@ -70,14 +70,14 @@ MoonWidget::MoonWidget(TQWidget *parent, const char *name)
time(&clock); time(&clock);
t = gmtime(&clock); t = gmtime(&clock);
// kdDebug() << "time " << t->tm_isdst << " " << timezone << " " << daylight << endl ; // kdDebug() << "time " << t->tm_isdst << " " << timezone << " " << daylight << endl ;
calctqStatus(mktime(t)); calcStatus(mktime(t));
} }
MoonWidget::~MoonWidget() MoonWidget::~MoonWidget()
{ {
} }
void MoonWidget::calctqStatus( time_t time ) void MoonWidget::calcStatus( time_t time )
{ {
uint lun = 0; uint lun = 0;
time_t last_new = 0; time_t last_new = 0;
@ -217,14 +217,14 @@ void MoonWidget::calctqStatus( time_t time )
} }
renderGraphic(); renderGraphic();
tqrepaint(); repaint();
} }
TQImage MoonWidget::loadMoon(int index) TQImage MoonWidget::loadMoon(int index)
{ {
if (index == 0) // the new moon has the wrong filename if (index == 0) // the new moon has the wrong filename
index = 29; index = 29;
TQString filename = TQString("kmoon/pics/moon%1.png").tqarg(index); TQString filename = TQString("kmoon/pics/moon%1.png").arg(index);
TQString path = locate("data", filename); TQString path = locate("data", filename);
if (path.isNull()) if (path.isNull())
kdFatal() << "cound't find " << filename << ". Exiting.\n"; kdFatal() << "cound't find " << filename << ". Exiting.\n";
@ -238,21 +238,21 @@ void MoonWidget::setAngle(int value)
{ {
_angle = value; _angle = value;
renderGraphic(); renderGraphic();
tqrepaint(); repaint();
} }
void MoonWidget::setNorthHemi(bool n) void MoonWidget::setNorthHemi(bool n)
{ {
_north = n; _north = n;
renderGraphic(); renderGraphic();
tqrepaint(); repaint();
} }
void MoonWidget::setMask(bool value) void MoonWidget::setMask(bool value)
{ {
_mask = value; _mask = value;
renderGraphic(); renderGraphic();
tqrepaint(); repaint();
} }
void MoonWidget::paintEvent(TQPaintEvent *) void MoonWidget::paintEvent(TQPaintEvent *)
@ -263,7 +263,7 @@ void MoonWidget::paintEvent(TQPaintEvent *)
void MoonWidget::resizeEvent(TQResizeEvent *) void MoonWidget::resizeEvent(TQResizeEvent *)
{ {
renderGraphic(); renderGraphic();
tqrepaint(); repaint();
} }
void MoonWidget::renderGraphic() void MoonWidget::renderGraphic()

@ -37,7 +37,7 @@ public:
MoonWidget(TQWidget *parent = 0, const char *name = 0); MoonWidget(TQWidget *parent = 0, const char *name = 0);
~MoonWidget(); ~MoonWidget();
void calctqStatus( time_t time ); void calcStatus( time_t time );
int angle() const { return _angle; } int angle() const { return _angle; }
void setAngle(int angle); void setAngle(int angle);

@ -30,7 +30,7 @@ KImageNumber::KImageNumber(const TQString& font, TQWidget* parent,const char* na
m_value(0) m_value(0)
{ {
fontPix = new TQPixmap(font); fontPix = new TQPixmap(font);
resize(tqsizeHint()); resize(sizeHint());
} }
KImageNumber::~KImageNumber() KImageNumber::~KImageNumber()
@ -47,7 +47,7 @@ void KImageNumber::paintEvent(TQPaintEvent*)
data.sprintf("%06.1f", m_value); data.sprintf("%06.1f", m_value);
for(unsigned int i=0; i < data.length(); i++) { for(unsigned int i=0; i < data.length(); i++) {
int wl = data.tqat(i).latin1() - '0'; int wl = data.at(i).latin1() - '0';
if(data.at(i) == '.') if(data.at(i) == '.')
wl = 10; wl = 10;
bitBlt(this, i*each, 0, fontPix, wl*each, 0, each, fontPix->height()); bitBlt(this, i*each, 0, fontPix, wl*each, 0, each, fontPix->height());
@ -57,7 +57,7 @@ void KImageNumber::paintEvent(TQPaintEvent*)
void KImageNumber::setValue(double v) void KImageNumber::setValue(double v)
{ {
m_value = v; m_value = v;
tqrepaint(false); repaint(false);
} }
double KImageNumber::value() const double KImageNumber::value() const
@ -65,7 +65,7 @@ double KImageNumber::value() const
return m_value; return m_value;
} }
TQSize KImageNumber::tqsizeHint() const TQSize KImageNumber::sizeHint() const
{ {
int w = fontPix->width(); int w = fontPix->width();
int each = w/11; int each = w/11;

@ -40,7 +40,7 @@ public:
virtual ~KImageNumber(); virtual ~KImageNumber();
void paintEvent(TQPaintEvent*); void paintEvent(TQPaintEvent*);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
double value() const; double value() const;
public slots: public slots:

@ -15,12 +15,12 @@ TQString int2time(int time)
{ {
TQString str; TQString str;
if (time / 60) if (time / 60)
str.append(i18n("%1 min").tqarg(time / 60)); str.append(i18n("%1 min").arg(time / 60));
if (time % 60) if (time % 60)
if (str.isEmpty()) if (str.isEmpty())
str.append(i18n("%1 s").tqarg(time % 60)); str.append(i18n("%1 s").arg(time % 60));
else else
str.append(i18n(" %1 s").tqarg(time % 60)); str.append(i18n(" %1 s").arg(time % 60));
return str; return str;
} }

@ -8,7 +8,7 @@
#include <klocale.h> #include <klocale.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include "timeedit.h" #include "timeedit.h"
#include "timeedit.moc" #include "timeedit.moc"
@ -52,24 +52,24 @@ void WrappingSpinBox::stepDown()
TimeEdit::TimeEdit(TQWidget* parent, const char* name) TimeEdit::TimeEdit(TQWidget* parent, const char* name)
: TQWidget(parent, name) : TQWidget(parent, name)
{ {
tqlayout = new TQHBoxLayout(this); layout = new TQHBoxLayout(this);
minuteBox = new TQSpinBox(0, 300, 1, this); minuteBox = new TQSpinBox(0, 300, 1, this);
// minuteBox->setFixedSize(minuteBox->tqsizeHint()); // minuteBox->setFixedSize(minuteBox->sizeHint());
TQLabel* min = new TQLabel(i18n(" min"), this); TQLabel* min = new TQLabel(i18n(" min"), this);
min->setFixedSize(min->tqsizeHint()); min->setFixedSize(min->sizeHint());
secondBox = new WrappingSpinBox(0, 59, 1, this); secondBox = new WrappingSpinBox(0, 59, 1, this);
secondBox->setWrapping(true); secondBox->setWrapping(true);
// secondBox->setFixedSize(secondBox->tqsizeHint()); // secondBox->setFixedSize(secondBox->sizeHint());
TQLabel* sec = new TQLabel(i18n(" sec"),this); TQLabel* sec = new TQLabel(i18n(" sec"),this);
sec->setFixedSize(sec->tqsizeHint()); sec->setFixedSize(sec->sizeHint());
tqlayout->addWidget(minuteBox); layout->addWidget(minuteBox);
tqlayout->addWidget(min); layout->addWidget(min);
tqlayout->addWidget(secondBox); layout->addWidget(secondBox);
tqlayout->addWidget(sec); layout->addWidget(sec);
connect(minuteBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinBoxValueChanged(int)) ); connect(minuteBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinBoxValueChanged(int)) );
connect(secondBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinBoxValueChanged(int)) ); connect(secondBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinBoxValueChanged(int)) );

@ -67,7 +67,7 @@ signals:
protected: protected:
TQSpinBox *minuteBox; TQSpinBox *minuteBox;
WrappingSpinBox *secondBox; WrappingSpinBox *secondBox;
TQBoxLayout* tqlayout; TQBoxLayout* layout;
}; };
#endif #endif

@ -24,7 +24,7 @@
#include <assert.h> #include <assert.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlayout.h> #include <layout.h>
#include <tqhbox.h> #include <tqhbox.h>
#include <tqvbox.h> #include <tqvbox.h>
#include <tqlineedit.h> #include <tqlineedit.h>
@ -207,7 +207,7 @@ void TopLevel::resizeEvent ( TQResizeEvent * )
teaNotReadyPixmap = loadSizedIcon("tea_not_ready", width()); teaNotReadyPixmap = loadSizedIcon("tea_not_ready", width());
teaAnim1Pixmap = loadSizedIcon("tea_anim1", width()); teaAnim1Pixmap = loadSizedIcon("tea_anim1", width());
teaAnim2Pixmap = loadSizedIcon("tea_anim2", width()); teaAnim2Pixmap = loadSizedIcon("tea_anim2", width());
tqrepaint(); repaint();
} }
/** Handle mousePressEvent */ /** Handle mousePressEvent */
@ -302,7 +302,7 @@ void TopLevel::timerEvent(TQTimerEvent *)
menu->setItemChecked(current_selected, true); menu->setItemChecked(current_selected, true);
} }
TQString teaMessage = i18n("The %1 is now ready!").tqarg(current_name); TQString teaMessage = i18n("The %1 is now ready!").arg(current_name);
// invoke action // invoke action
if (useNotify) { if (useNotify) {
KNotifyClient::event(winId(), "tea", teaMessage); KNotifyClient::event(winId(), "tea", teaMessage);
@ -317,7 +317,7 @@ void TopLevel::timerEvent(TQTimerEvent *)
teaMessage, teaAnim1Pixmap, this, "popup", 0); teaMessage, teaAnim1Pixmap, this, "popup", 0);
// FIXME: does auto-deletion work without timeout? // FIXME: does auto-deletion work without timeout?
setToolTip(teaMessage); setToolTip(teaMessage);
tqrepaint(); repaint();
} else { } else {
// timer not yet run out; just update tray-icon (if configured)... // timer not yet run out; just update tray-icon (if configured)...
if (useTrayVis) { if (useTrayVis) {
@ -325,18 +325,18 @@ void TopLevel::timerEvent(TQTimerEvent *)
if (pDone - percentDone > 8) { if (pDone - percentDone > 8) {
// update icon not every second, but only if somewhat noticable // update icon not every second, but only if somewhat noticable
percentDone = pDone; percentDone = pDone;
tqrepaint(); repaint();
} }
} }
// ...and Tooltip // ...and Tooltip
TQString min = int2time(seconds); TQString min = int2time(seconds);
setToolTip(i18n("%1 left for %2").tqarg(min).tqarg(current_name)); setToolTip(i18n("%1 left for %2").arg(min).arg(current_name));
} }
} else { } else {
// no tea is steeping; just animate icon // no tea is steeping; just animate icon
if (ready) { if (ready) {
firstFrame = !firstFrame; firstFrame = !firstFrame;
tqrepaint(); repaint();
} }
} }
} }
@ -447,7 +447,7 @@ void TopLevel::start()
ready = false; ready = false;
enable_menuEntries(); // disable "start", enable "stop" enable_menuEntries(); // disable "start", enable "stop"
tqrepaint(); repaint();
} }
} }
@ -467,7 +467,7 @@ void TopLevel::stop()
} }
setToolTip(i18n("The Tea Cooker"), true); setToolTip(i18n("The Tea Cooker"), true);
tqrepaint(); repaint();
} }
/* open dialog to start an 'anonymous' tea */ /* open dialog to start an 'anonymous' tea */
@ -487,10 +487,10 @@ void TopLevel::anonymous()
prop_box->addWidget(propright); prop_box->addWidget(propright);
anon_time = new TimeEdit(propright); anon_time = new TimeEdit(propright);
anon_time->setFixedHeight(anon_time->tqsizeHint().height()); anon_time->setFixedHeight(anon_time->sizeHint().height());
anon_time->setValue(DEFAULT_TEA_TIME); anon_time->setValue(DEFAULT_TEA_TIME);
TQLabel *l = new TQLabel(anon_time, i18n("Tea time:"), propleft); TQLabel *l = new TQLabel(anon_time, i18n("Tea time:"), propleft);
l->setFixedSize(l->tqsizeHint()); l->setFixedSize(l->sizeHint());
top_box->addStretch(); top_box->addStretch();
@ -688,28 +688,28 @@ void TopLevel::config()
btn_new = new TQPushButton(TQString(), listgroup_widget); btn_new = new TQPushButton(TQString(), listgroup_widget);
TQToolTip::add(btn_new, i18n("New")); TQToolTip::add(btn_new, i18n("New"));
btn_new->setPixmap(SmallIcon("filenew")); btn_new->setPixmap(SmallIcon("filenew"));
btn_new->setMinimumSize(btn_new->tqsizeHint() * 1.2); btn_new->setMinimumSize(btn_new->sizeHint() * 1.2);
connect(btn_new, TQT_SIGNAL(clicked()), TQT_SLOT(newButtonClicked())); connect(btn_new, TQT_SIGNAL(clicked()), TQT_SLOT(newButtonClicked()));
hbox->addWidget(btn_new); hbox->addWidget(btn_new);
btn_del = new TQPushButton(TQString(), listgroup_widget); btn_del = new TQPushButton(TQString(), listgroup_widget);
TQToolTip::add(btn_del, i18n("Delete")); TQToolTip::add(btn_del, i18n("Delete"));
btn_del->setIconSet(SmallIconSet("editdelete")); btn_del->setIconSet(SmallIconSet("editdelete"));
btn_del->setMinimumSize(btn_new->tqsizeHint() * 1.2); btn_del->setMinimumSize(btn_new->sizeHint() * 1.2);
connect(btn_del, TQT_SIGNAL(clicked()), TQT_SLOT(delButtonClicked())); connect(btn_del, TQT_SIGNAL(clicked()), TQT_SLOT(delButtonClicked()));
hbox->addWidget(btn_del); hbox->addWidget(btn_del);
btn_up = new TQPushButton(TQString(), listgroup_widget); btn_up = new TQPushButton(TQString(), listgroup_widget);
TQToolTip::add(btn_up, i18n("Up")); TQToolTip::add(btn_up, i18n("Up"));
btn_up->setIconSet(SmallIconSet("up")); btn_up->setIconSet(SmallIconSet("up"));
btn_up->setMinimumSize(btn_up->tqsizeHint() * 1.2); btn_up->setMinimumSize(btn_up->sizeHint() * 1.2);
connect(btn_up, TQT_SIGNAL(clicked()), TQT_SLOT(upButtonClicked())); connect(btn_up, TQT_SIGNAL(clicked()), TQT_SLOT(upButtonClicked()));
hbox->addWidget(btn_up); hbox->addWidget(btn_up);
btn_down = new TQPushButton(TQString(), listgroup_widget); btn_down = new TQPushButton(TQString(), listgroup_widget);
TQToolTip::add(btn_down, i18n("Down")); TQToolTip::add(btn_down, i18n("Down"));
btn_down->setIconSet(SmallIconSet("down")); btn_down->setIconSet(SmallIconSet("down"));
btn_down->setMinimumSize(btn_down->tqsizeHint() * 1.2); btn_down->setMinimumSize(btn_down->sizeHint() * 1.2);
connect(btn_down, TQT_SIGNAL(clicked()), TQT_SLOT(downButtonClicked())); connect(btn_down, TQT_SIGNAL(clicked()), TQT_SLOT(downButtonClicked()));
hbox->addWidget(btn_down); hbox->addWidget(btn_down);
@ -721,21 +721,21 @@ void TopLevel::config()
rightside->addWidget(editgroup, 0, 0); rightside->addWidget(editgroup, 0, 0);
TQHBox *propbox = new TQHBox(editgroup); TQHBox *propbox = new TQHBox(editgroup);
// FIXME: - must enforce correct vertical tqalignment of each label-editor pair // FIXME: - must enforce correct vertical alignment of each label-editor pair
// (better use one HBox for each label-editor pair?) // (better use one HBox for each label-editor pair?)
TQVBox *propleft = new TQVBox(propbox); TQVBox *propleft = new TQVBox(propbox);
TQVBox *propright = new TQVBox(propbox); TQVBox *propright = new TQVBox(propbox);
nameEdit = new TQLineEdit(propright); nameEdit = new TQLineEdit(propright);
nameEdit->setFixedHeight(nameEdit->tqsizeHint().height()); nameEdit->setFixedHeight(nameEdit->sizeHint().height());
nameEdit->tqsetAlignment(TQLineEdit::AlignLeft); nameEdit->setAlignment(TQLineEdit::AlignLeft);
TQLabel *l = new TQLabel(nameEdit, i18n("Name:"), propleft); TQLabel *l = new TQLabel(nameEdit, i18n("Name:"), propleft);
l->setFixedSize(l->tqsizeHint()); l->setFixedSize(l->sizeHint());
connect(nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(nameEditTextChanged(const TQString&)) ); connect(nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(nameEditTextChanged(const TQString&)) );
timeEdit = new TimeEdit(propright); timeEdit = new TimeEdit(propright);
timeEdit->setFixedHeight(timeEdit->tqsizeHint().height()); timeEdit->setFixedHeight(timeEdit->sizeHint().height());
l = new TQLabel(timeEdit, i18n("Tea time:"), propleft); l = new TQLabel(timeEdit, i18n("Tea time:"), propleft);
l->setFixedSize(l->tqsizeHint()); l->setFixedSize(l->sizeHint());
connect(timeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinBoxValueChanged(int))); connect(timeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinBoxValueChanged(int)));
/* bottom - timeout actions */ /* bottom - timeout actions */
@ -751,15 +751,15 @@ void TopLevel::config()
eventEnable = new TQCheckBox(i18n("Event"), actiongroup); eventEnable = new TQCheckBox(i18n("Event"), actiongroup);
popupEnable = new TQCheckBox(i18n("Popup"), actiongroup); popupEnable = new TQCheckBox(i18n("Popup"), actiongroup);
eventEnable->setFixedHeight(eventEnable->tqsizeHint().height()); eventEnable->setFixedHeight(eventEnable->sizeHint().height());
popupEnable->setFixedHeight(popupEnable->tqsizeHint().height()); popupEnable->setFixedHeight(popupEnable->sizeHint().height());
TQHBox *actionbox = new TQHBox(actiongroup); TQHBox *actionbox = new TQHBox(actiongroup);
actionEnable = new TQCheckBox(actionbox); actionEnable = new TQCheckBox(actionbox);
// FIXME: add text to this line: // FIXME: add text to this line:
// TQLabel *actionLabel = new TQLabel(i18n("Execute: "), actiongroup); // TQLabel *actionLabel = new TQLabel(i18n("Execute: "), actiongroup);
actionEdit = new TQLineEdit(actionbox); actionEdit = new TQLineEdit(actionbox);
actionEdit->setFixedHeight(actionEdit->tqsizeHint().height()); actionEdit->setFixedHeight(actionEdit->sizeHint().height());
TQToolTip::add(actionEdit, i18n("Enter command here; '%t' will be replaced with name of steeping tea")); TQToolTip::add(actionEdit, i18n("Enter command here; '%t' will be replaced with name of steeping tea"));
connect(actionEnable, TQT_SIGNAL(toggled(bool)), TQT_SLOT(actionEnableToggled(bool))); connect(actionEnable, TQT_SIGNAL(toggled(bool)), TQT_SLOT(actionEnableToggled(bool)));
rightside->addStretch(); rightside->addStretch();

@ -9,7 +9,7 @@
#include <time.h> #include <time.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <tqlayout.h> #include <layout.h>
#include <tqslider.h> #include <tqslider.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <klocale.h> #include <klocale.h>
@ -60,7 +60,7 @@ KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name )
tl1->addLayout(tl11); tl1->addLayout(tl11);
TQLabel *label = new TQLabel( i18n("Speed:"), this ); TQLabel *label = new TQLabel( i18n("Speed:"), this );
label->setMinimumSize(label->tqsizeHint()); label->setMinimumSize(label->sizeHint());
tl11->addStretch(1); tl11->addStretch(1);
tl11->addWidget(label); tl11->addWidget(label);
@ -85,7 +85,7 @@ KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name )
button = bbox->addButton(KStdGuiItem::cancel()); button = bbox->addButton(KStdGuiItem::cancel());
connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) ); connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) );
bbox->tqlayout(); bbox->layout();
tl->addWidget(bbox); tl->addWidget(bbox);
tl->freeze(); tl->freeze();
@ -203,7 +203,7 @@ void KSpriteSaver::initialise()
{ {
mCanvas = new TQCanvas(); mCanvas = new TQCanvas();
TQPixmap pm( locate("sprite", "bg.png") ); TQPixmap pm( locate("sprite", "bg.png") );
mCanvas->tqsetBackgroundPixmap( pm ); mCanvas->setBackgroundPixmap( pm );
mCanvas->resize( width(), height() ); mCanvas->resize( width(), height() );
mView = new TQCanvasView(mCanvas); mView = new TQCanvasView(mCanvas);
mView->viewport()->setBackgroundColor( black ); mView->viewport()->setBackgroundColor( black );

@ -21,7 +21,7 @@
#include "weatherservice_stub.h" #include "weatherservice_stub.h"
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqlayout.h> #include <layout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqobjectlist.h> #include <tqobjectlist.h>
@ -112,19 +112,19 @@ void dockwidget::showWeather()
"<th><nobr>" + i18n( "Rel. Humidity:" ) + "</nobr></th><td><nobr>%4</nobr></td></nobr></tr>" "<th><nobr>" + i18n( "Rel. Humidity:" ) + "</nobr></th><td><nobr>%4</nobr></td></nobr></tr>"
"<tr><th><nobr>" + i18n( "Wind Speed:" ) + "</nobr></th><td><nobr>%5</nobr></td>") "<tr><th><nobr>" + i18n( "Wind Speed:" ) + "</nobr></th><td><nobr>%5</nobr></td>")
.tqarg(temp).tqarg(dewPoint).tqarg(pressure).tqarg(relHumidity).tqarg(wind); .arg(temp).arg(dewPoint).arg(pressure).arg(relHumidity).arg(wind);
if ( !heatIndex.isEmpty() ) if ( !heatIndex.isEmpty() )
tip += TQString("<th><nobr>" + i18n( "Heat Index:" ) + "</nobr></th><td><nobr>%1</nobr></td>").tqarg(heatIndex); tip += TQString("<th><nobr>" + i18n( "Heat Index:" ) + "</nobr></th><td><nobr>%1</nobr></td>").arg(heatIndex);
else if ( !windChill.isEmpty() ) else if ( !windChill.isEmpty() )
tip += TQString("<th><nobr>" + i18n( "Wind Chill:" ) + "</nobr></th><td><nobr>%1</nobr></td>").tqarg(windChill); tip += TQString("<th><nobr>" + i18n( "Wind Chill:" ) + "</nobr></th><td><nobr>%1</nobr></td>").arg(windChill);
else else
tip += "<td>&nbsp;</td><td>&nbsp;</td>"; tip += "<td>&nbsp;</td><td>&nbsp;</td>";
tip += "</tr>"; tip += "</tr>";
tip += TQString("<tr><th><nobr>" + i18n( "Sunrise:" ) + "</nobr></th><td><nobr>%1</nobr></td>" + tip += TQString("<tr><th><nobr>" + i18n( "Sunrise:" ) + "</nobr></th><td><nobr>%1</nobr></td>" +
"<th><nobr>" + i18n( "Sunset:" ) + "</nobr></th><td><nobr>%2</nobr></td>") "<th><nobr>" + i18n( "Sunset:" ) + "</nobr></th><td><nobr>%2</nobr></td>")
.tqarg(sunRiseTime).tqarg(sunSetTime); .arg(sunRiseTime).arg(sunSetTime);
tip += "</tr></table>"; tip += "</tr></table>";
@ -184,12 +184,12 @@ void dockwidget::initDock()
mainLayout->setMargin(0); mainLayout->setMargin(0);
mainLayout->addWidget(m_button, 0, TQt::AlignCenter); mainLayout->addWidget(m_button, 0, TQt::AlignCenter);
TQBoxLayout *tqlayout = new TQBoxLayout(mainLayout, TQBoxLayout::TopToBottom); TQBoxLayout *layout = new TQBoxLayout(mainLayout, TQBoxLayout::TopToBottom);
tqlayout->setSpacing(0); layout->setSpacing(0);
tqlayout->setMargin(0); layout->setMargin(0);
tqlayout->addWidget(m_lblTemp); layout->addWidget(m_lblTemp);
tqlayout->addWidget(m_lblWind); layout->addWidget(m_lblWind);
tqlayout->addWidget(m_lblPres); layout->addWidget(m_lblPres);
mainLayout->addSpacing(8); mainLayout->addSpacing(8);
@ -210,21 +210,21 @@ void dockwidget::resizeView( const TQSize &size )
if ( m_mode == ShowAll ) if ( m_mode == ShowAll )
{ {
if ( h <= 128 ) // left to right tqlayout if ( h <= 128 ) // left to right layout
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::LeftToRight); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::LeftToRight);
m_lblTemp->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblTemp->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
m_lblWind->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblWind->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
m_lblPres->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblPres->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
} }
else // top to bottom else // top to bottom
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::TopToBottom); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::TopToBottom);
TQFontMetrics fm(m_font); TQFontMetrics fm(m_font);
h = 128 - (3 * fm.height()); // 3 lines of text below the button h = 128 - (3 * fm.height()); // 3 lines of text below the button
m_lblTemp->tqsetAlignment(TQt::AlignCenter); m_lblTemp->setAlignment(TQt::AlignCenter);
m_lblWind->tqsetAlignment(TQt::AlignCenter); m_lblWind->setAlignment(TQt::AlignCenter);
m_lblPres->tqsetAlignment(TQt::AlignCenter); m_lblPres->setAlignment(TQt::AlignCenter);
} }
m_button->setFixedSize(h, h); m_button->setFixedSize(h, h);
} }
@ -232,15 +232,15 @@ void dockwidget::resizeView( const TQSize &size )
{ {
if ( h <= 32 ) // left to right if ( h <= 32 ) // left to right
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::LeftToRight); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::LeftToRight);
m_lblTemp->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblTemp->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
} }
else // top to bottom else // top to bottom
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::TopToBottom); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::TopToBottom);
TQFontMetrics fm(m_font); TQFontMetrics fm(m_font);
h = TQMIN(128, h) - fm.height(); h = TQMIN(128, h) - fm.height();
m_lblTemp->tqsetAlignment(TQt::AlignCenter); m_lblTemp->setAlignment(TQt::AlignCenter);
} }
m_button->setFixedSize(h, h); m_button->setFixedSize(h, h);
} }
@ -259,21 +259,21 @@ void dockwidget::resizeView( const TQSize &size )
{ {
if ( w <= 128 ) // top to bottom if ( w <= 128 ) // top to bottom
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::TopToBottom); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::TopToBottom);
m_lblTemp->tqsetAlignment(TQt::AlignCenter); m_lblTemp->setAlignment(TQt::AlignCenter);
m_lblWind->tqsetAlignment(TQt::AlignCenter); m_lblWind->setAlignment(TQt::AlignCenter);
m_lblPres->tqsetAlignment(TQt::AlignCenter); m_lblPres->setAlignment(TQt::AlignCenter);
TQFontMetrics fm(m_font); TQFontMetrics fm(m_font);
h = h - (3 * fm.height()); // 3 lines of text below the button h = h - (3 * fm.height()); // 3 lines of text below the button
h = TQMIN(w, h); h = TQMIN(w, h);
} }
else // left to right tqlayout else // left to right layout
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::LeftToRight); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::LeftToRight);
m_lblTemp->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblTemp->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
m_lblWind->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblWind->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
m_lblPres->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblPres->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
} }
m_button->setFixedSize(h, h); m_button->setFixedSize(h, h);
} }
@ -281,15 +281,15 @@ void dockwidget::resizeView( const TQSize &size )
{ {
if ( w <= 128 ) // top to bottom if ( w <= 128 ) // top to bottom
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::TopToBottom); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::TopToBottom);
m_lblTemp->tqsetAlignment(TQt::AlignCenter); m_lblTemp->setAlignment(TQt::AlignCenter);
h = w; h = w;
} }
else // left to right tqlayout else // left to right layout
{ {
static_cast<TQBoxLayout*>(tqlayout())->setDirection(TQBoxLayout::LeftToRight); static_cast<TQBoxLayout*>(layout())->setDirection(TQBoxLayout::LeftToRight);
m_lblTemp->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter); m_lblTemp->setAlignment(TQt::AlignAuto | TQt::AlignVCenter);
h = static_cast<int>(w * 0.33); h = static_cast<int>(w * 0.33);
} }
@ -310,7 +310,7 @@ int dockwidget::widthForHeight(int h)
if ( m_mode == ShowAll ) if ( m_mode == ShowAll )
{ {
if ( h <= 128 ) // left to right tqlayout if ( h <= 128 ) // left to right layout
{ {
int pixelSize = h/3 - 3; int pixelSize = h/3 - 3;
pixelSize = TQMIN(pixelSize, fi.pixelSize()); // don't make it too large pixelSize = TQMIN(pixelSize, fi.pixelSize()); // don't make it too large
@ -337,7 +337,7 @@ int dockwidget::widthForHeight(int h)
} }
else if ( m_mode == ShowTempOnly ) else if ( m_mode == ShowTempOnly )
{ {
if ( h <= 32 ) // left to right tqlayout if ( h <= 32 ) // left to right layout
{ {
int pixelSize = h - 3; int pixelSize = h - 3;
pixelSize = TQMIN(pixelSize, fi.pixelSize()); // don't make it too large pixelSize = TQMIN(pixelSize, fi.pixelSize()); // don't make it too large

@ -24,7 +24,7 @@
#include <tqbuttongroup.h> #include <tqbuttongroup.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <kaboutdata.h> #include <kaboutdata.h>
#include <kapplication.h> #include <kapplication.h>
@ -54,12 +54,12 @@ KCMWeather::KCMWeather( TQWidget *parent, const char *name )
{ {
mWeatherService = new WeatherService_stub( "KWeatherService", mWeatherService = new WeatherService_stub( "KWeatherService",
"WeatherService" ); "WeatherService" );
TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); TQVBoxLayout *layout = new TQVBoxLayout( this );
mWidget = new prefsDialogData( this ); mWidget = new prefsDialogData( this );
mWidget->m_reportLocation->setFocus(); mWidget->m_reportLocation->setFocus();
tqlayout->addWidget( mWidget ); layout->addWidget( mWidget );
tqlayout->addStretch(); layout->addStretch();
fillStationList(); fillStationList();
load(); load();

@ -21,7 +21,7 @@
without including the source code for TQt in the source distribution. without including the source code for TQt in the source distribution.
*/ */
#include <tqlayout.h> #include <layout.h>
#include <kaboutdata.h> #include <kaboutdata.h>
#include <kdebug.h> #include <kdebug.h>
@ -41,13 +41,13 @@ extern "C"
KCMWeatherService::KCMWeatherService( TQWidget *parent, const char *name ) KCMWeatherService::KCMWeatherService( TQWidget *parent, const char *name )
: KCModule( parent, name ) : KCModule( parent, name )
{ {
TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); TQVBoxLayout *layout = new TQVBoxLayout( this );
mWidget = new ServiceConfigWidget( this ); mWidget = new ServiceConfigWidget( this );
// not needed, as a change immediately changes the service // not needed, as a change immediately changes the service
//connect(mWidget, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); //connect(mWidget, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
tqlayout->addWidget( mWidget ); layout->addWidget( mWidget );
KAboutData *about = new KAboutData( "kcmweatherservice", KAboutData *about = new KAboutData( "kcmweatherservice",
I18N_NOOP( "KWeather Configure Dialog" ), I18N_NOOP( "KWeather Configure Dialog" ),
0, 0, KAboutData::License_GPL, 0, 0, KAboutData::License_GPL,

@ -31,7 +31,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqpalette.h> #include <palette.h>
#include "kweather.h" #include "kweather.h"
#include "reportview.h" #include "reportview.h"
@ -86,7 +86,7 @@ kweather::~kweather()
void kweather::initContextMenu() void kweather::initContextMenu()
{ {
mContextMenu = new KPopupMenu(this); mContextMenu = new KPopupMenu(this);
mContextMenu->insertTitle(i18n("KWeather - %1").tqarg( reportLocation ), -1, 0); mContextMenu->insertTitle(i18n("KWeather - %1").arg( reportLocation ), -1, 0);
mContextMenu->insertItem(SmallIcon("viewmag"), i18n("Show &Report"), mContextMenu->insertItem(SmallIcon("viewmag"), i18n("Show &Report"),
this, TQT_SLOT(doReport()), 0, -1, 1); this, TQT_SLOT(doReport()), 0, -1, 1);
mContextMenu->insertItem(SmallIcon("reload"), i18n("&Update Now"), mContextMenu->insertItem(SmallIcon("reload"), i18n("&Update Now"),
@ -171,7 +171,7 @@ void kweather::preferences()
/** The help handler */ /** The help handler */
void kweather::help() void kweather::help()
{ {
kapp->invokeHelp(TQString(), TQString::tqfromLatin1("kweather")); kapp->invokeHelp(TQString(), TQString::fromLatin1("kweather"));
} }
/** Display the current weather report. */ /** Display the current weather report. */

@ -147,7 +147,7 @@ bool MetarParser::parseCover(const TQString &s)
{ {
if (CoverRegExp.search(s) > -1) if (CoverRegExp.search(s) > -1)
{ {
kdDebug(12006) << "Cover: " << TQString(CoverRegExp.tqcapturedTexts().join("-")) kdDebug(12006) << "Cover: " << TQString(CoverRegExp.capturedTexts().join("-"))
<< endl; << endl;
TQString sCode = CoverRegExp.cap(1); TQString sCode = CoverRegExp.cap(1);
@ -170,22 +170,22 @@ bool MetarParser::parseCover(const TQString &s)
if (sCode == "FEW") if (sCode == "FEW")
{ {
skycondition = i18n( "Few clouds at %1" ).tqarg(sClouds); skycondition = i18n( "Few clouds at %1" ).arg(sClouds);
weatherInfo.clouds += 2; weatherInfo.clouds += 2;
} }
else if (sCode == "SCT") else if (sCode == "SCT")
{ {
skycondition = i18n( "Scattered clouds at %1" ).tqarg(sClouds); skycondition = i18n( "Scattered clouds at %1" ).arg(sClouds);
weatherInfo.clouds += 4; weatherInfo.clouds += 4;
} }
else if (sCode == "BKN") else if (sCode == "BKN")
{ {
skycondition = i18n( "Broken clouds at %1" ).tqarg(sClouds); skycondition = i18n( "Broken clouds at %1" ).arg(sClouds);
weatherInfo.clouds += 8; weatherInfo.clouds += 8;
} }
else if (sCode == "OVC") else if (sCode == "OVC")
{ {
skycondition = i18n( "Overcast clouds at %1" ).tqarg(sClouds); skycondition = i18n( "Overcast clouds at %1" ).arg(sClouds);
weatherInfo.clouds += 64; weatherInfo.clouds += 64;
} }
else if ((sCode == "CLR") || (sCode == "SKC") || (sCode == "CAVOK")) else if ((sCode == "CLR") || (sCode == "SKC") || (sCode == "CAVOK"))
@ -211,7 +211,7 @@ bool MetarParser::parseCurrent(const TQString &s)
TQString sCode = CurrentRegExp.cap(2); TQString sCode = CurrentRegExp.cap(2);
TQString intensity, descriptor, phenomena, currentWeather; TQString intensity, descriptor, phenomena, currentWeather;
kdDebug(12006) << "Current: " << TQString(CurrentRegExp.tqcapturedTexts().join("-")) << endl; kdDebug(12006) << "Current: " << TQString(CurrentRegExp.capturedTexts().join("-")) << endl;
// Decode the intensity // Decode the intensity
if (sIntensity == "+") if (sIntensity == "+")
@ -343,7 +343,7 @@ bool MetarParser::parseCurrent(const TQString &s)
else if (sCode.contains("DS")) else if (sCode.contains("DS"))
phenomena = i18n("Dust Storm"); phenomena = i18n("Dust Storm");
if (currentWeather.isEmpty()) currentWeather = i18n("%1 is the intensity, %2 is the descriptor and %3 is the phenomena", "%1 %2 %3").tqarg(intensity).tqarg(descriptor).tqarg(phenomena); if (currentWeather.isEmpty()) currentWeather = i18n("%1 is the intensity, %2 is the descriptor and %3 is the phenomena", "%1 %2 %3").arg(intensity).arg(descriptor).arg(phenomena);
if (!currentWeather.isEmpty()) if (!currentWeather.isEmpty())
weatherInfo.qsCurrentList << currentWeather; weatherInfo.qsCurrentList << currentWeather;
@ -358,7 +358,7 @@ bool MetarParser::parseTemperature(const TQString &s)
{ {
if (TempRegExp.search(s) > -1) if (TempRegExp.search(s) > -1)
{ {
kdDebug(12006) << "Temp: " << TQString(TempRegExp.tqcapturedTexts().join("-")) kdDebug(12006) << "Temp: " << TQString(TempRegExp.capturedTexts().join("-"))
<< endl; << endl;
float fTemp = TempRegExp.cap(2).toFloat(); float fTemp = TempRegExp.cap(2).toFloat();
@ -379,7 +379,7 @@ bool MetarParser::parseTemperatureTenths(const TQString &s)
{ {
if (TempTenRegExp.search(s) > -1) if (TempTenRegExp.search(s) > -1)
{ {
kdDebug(12006) << "Temp Tenths: " << TQString(TempTenRegExp.tqcapturedTexts().join("-")) kdDebug(12006) << "Temp Tenths: " << TQString(TempTenRegExp.capturedTexts().join("-"))
<< endl; << endl;
float temperature = TempTenRegExp.cap( 1 ).toFloat() / 10; float temperature = TempTenRegExp.cap( 1 ).toFloat() / 10;
@ -473,7 +473,7 @@ bool MetarParser::parseDate(const TQString &s)
{ {
if (DateRegExp.search(s) > -1) if (DateRegExp.search(s) > -1)
{ {
kdDebug(12006) << "Date: " << TQString(DateRegExp.tqcapturedTexts().join("-")) kdDebug(12006) << "Date: " << TQString(DateRegExp.capturedTexts().join("-"))
<< endl; << endl;
TQString dateString = DateRegExp.cap(1); TQString dateString = DateRegExp.cap(1);
TQString day, month, year; TQString day, month, year;
@ -496,7 +496,7 @@ bool MetarParser::parseTime(const TQString &s)
{ {
if (TimeRegExp.search(s) > -1) if (TimeRegExp.search(s) > -1)
{ {
kdDebug(12006) << "Time: " << TQString(TimeRegExp.tqcapturedTexts().join("-")) kdDebug(12006) << "Time: " << TQString(TimeRegExp.capturedTexts().join("-"))
<< endl; << endl;
TQString hour, minute, dateString; TQString hour, minute, dateString;
@ -521,7 +521,7 @@ bool MetarParser::parseVisibility(TQStringList::ConstIterator it)
{ {
fVisibility = VisRegExp.cap(1).toFloat(); fVisibility = VisRegExp.cap(1).toFloat();
kdDebug(12006) << "Visibility: " << TQString(VisRegExp.tqcapturedTexts().join("-")) kdDebug(12006) << "Visibility: " << TQString(VisRegExp.capturedTexts().join("-"))
<< endl; << endl;
} }
@ -564,7 +564,7 @@ bool MetarParser::parsePressure( const TQString &s)
TQString type = PressRegExp.cap(1); TQString type = PressRegExp.cap(1);
float fPressure = PressRegExp.cap(2).toFloat(); float fPressure = PressRegExp.cap(2).toFloat();
kdDebug(12006) << "Pressure: " << TQString(PressRegExp.tqcapturedTexts().join("-")) kdDebug(12006) << "Pressure: " << TQString(PressRegExp.capturedTexts().join("-"))
<< endl; << endl;
if (m_units == KLocale::Metric) if (m_units == KLocale::Metric)
@ -643,7 +643,7 @@ bool MetarParser::parseWindSpeed(const TQString &s)
float gustSpeed = WindRegExp.cap(3).toFloat(); float gustSpeed = WindRegExp.cap(3).toFloat();
TQString sWindUnit = WindRegExp.cap(4); TQString sWindUnit = WindRegExp.cap(4);
kdDebug(12006) << "Wind: " << WindRegExp.tqcapturedTexts().join("-") kdDebug(12006) << "Wind: " << WindRegExp.capturedTexts().join("-")
<< endl; << endl;
if (m_units == KLocale::Metric) if (m_units == KLocale::Metric)

@ -60,7 +60,7 @@ class MetarParser
public: public:
MetarParser(StationDatabase *stationDB, MetarParser(StationDatabase *stationDB,
KLocale::MeasureSystem units = KLocale::Imperial, KLocale::MeasureSystem units = KLocale::Imperial,
TQDate date = TQDate::tqcurrentDate(), TQDate date = TQDate::currentDate(),
TQTime time = TQTime::currentTime(), TQTime time = TQTime::currentTime(),
unsigned int localUTCOffset = KRFCDate::localUTCOffset()); unsigned int localUTCOffset = KRFCDate::localUTCOffset());

@ -21,7 +21,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
@ -85,7 +85,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
@ -102,7 +102,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>MinimumExpanding</enum> <enum>MinimumExpanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
@ -129,7 +129,7 @@
<property name="title"> <property name="title">
<string>Panel Display Options</string> <string>Panel Display Options</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="exclusive"> <property name="exclusive">
@ -228,7 +228,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>294</width> <width>294</width>
<height>16</height> <height>16</height>
@ -256,7 +256,7 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>252</width> <width>252</width>
<height>0</height> <height>0</height>
@ -284,7 +284,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout1</cstring> <cstring>layout1</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -318,7 +318,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>170</width> <width>170</width>
<height>20</height> <height>20</height>

@ -72,7 +72,7 @@ void reportView::render(){
TQString textColor = KGlobalSettings::textColor().name(); TQString textColor = KGlobalSettings::textColor().name();
TQString baseColor = KGlobalSettings::baseColor().name(); TQString baseColor = KGlobalSettings::baseColor().name();
TQColorGroup cg = tqpalette().active(); TQColorGroup cg = palette().active();
TQString bgColor = cg.background().name(); TQString bgColor = cg.background().name();
TQString hlColor = cg.highlight().name(); TQString hlColor = cg.highlight().name();
TQString hlTextColor = cg.highlightedText().name(); TQString hlTextColor = cg.highlightedText().name();
@ -93,7 +93,7 @@ void reportView::render(){
TQStringList cover = m_weatherService->cover(m_locationCode ); TQStringList cover = m_weatherService->cover(m_locationCode );
TQStringList weather = m_weatherService->weather(m_locationCode ); TQStringList weather = m_weatherService->weather(m_locationCode );
setCaption(i18n("Weather Report - %1").tqarg( locationName ) ); setCaption(i18n("Weather Report - %1").arg( locationName ) );
TQString weatherText = "<ul>\n"; TQString weatherText = "<ul>\n";
@ -114,24 +114,24 @@ void reportView::render(){
TQString contents = TQString contents =
"<html><head><style type=\"text/css\">" + "<html><head><style type=\"text/css\">" +
TQString("body { font-family: \"%1\"; font-size: %2pt; color: %3; background-color: %4; }\n") TQString("body { font-family: \"%1\"; font-size: %2pt; color: %3; background-color: %4; }\n")
.tqarg(fntFamily).tqarg(fntSize).tqarg(textColor).tqarg(baseColor) + .arg(fntFamily).arg(fntSize).arg(textColor).arg(baseColor) +
TQString("div.headerTitle { background-color: %1; color: %2; padding: 4px; font-size: 120%; border: solid %3 1px; }\n") TQString("div.headerTitle { background-color: %1; color: %2; padding: 4px; font-size: 120%; border: solid %3 1px; }\n")
.tqarg(hlColor).tqarg(hlTextColor).tqarg(textColor) + .arg(hlColor).arg(hlTextColor).arg(textColor) +
TQString("div.headerMsg { background-color: %1; color: %2; border-bottom: solid %3 1px; " TQString("div.headerMsg { background-color: %1; color: %2; border-bottom: solid %3 1px; "
"border-left: solid %4 1px; border-right: solid %5 1px; margin-bottom: 1em; padding: 2px; }\n") "border-left: solid %4 1px; border-right: solid %5 1px; margin-bottom: 1em; padding: 2px; }\n")
.tqarg(bgColor).tqarg(textColor).tqarg(textColor).tqarg(textColor).tqarg(textColor) + .arg(bgColor).arg(textColor).arg(textColor).arg(textColor).arg(textColor) +
TQString("</style><title></title></head><body dir=\"%1\">").tqarg( TQApplication::reverseLayout()?"rtl":"ltr") + TQString("</style><title></title></head><body dir=\"%1\">").arg( TQApplication::reverseLayout()?"rtl":"ltr") +
"<div class=\"headerTitle\"><b>" + i18n( "Weather Report - %1 - %2" ).tqarg( locationName ).tqarg( countryName ) + "<div class=\"headerTitle\"><b>" + i18n( "Weather Report - %1 - %2" ).arg( locationName ).arg( countryName ) +
"</b></div>\n"; "</b></div>\n";
if ( ! date.isEmpty() ) if ( ! date.isEmpty() )
contents += "<div class=\"headerMsg\"><b>" + i18n( "Latest data from %1" ).tqarg(date) + "</b></div>\n"; contents += "<div class=\"headerMsg\"><b>" + i18n( "Latest data from %1" ).arg(date) + "</b></div>\n";
contents += TQString( contents += TQString(
"<table><tr><td width=\"60\" style=\"text-align: center; border: dotted %1 1px;\">" "<table><tr><td width=\"60\" style=\"text-align: center; border: dotted %1 1px;\">"
"<img width=\"64\" height=\"64\" src=\"%2\" /></td>" "<img width=\"64\" height=\"64\" src=\"%2\" /></td>"
"<td style=\"vertical-align: top\">%3</td></tr>") "<td style=\"vertical-align: top\">%3</td></tr>")
.tqarg(bgColor).tqarg(KURL(icon).url()).tqarg(weatherText) + .arg(bgColor).arg(KURL(icon).url()).arg(weatherText) +
"</table><table>" + "</table><table>" +
TQString("<tr><th style=\"text-align: right\">" + i18n( "Temperature:" ) TQString("<tr><th style=\"text-align: right\">" + i18n( "Temperature:" )
+ "</th><td>%1</td>" + "</th><td>%1</td>"
@ -145,15 +145,15 @@ void reportView::render(){
+ "</th><td>%4</td></tr>" + "</th><td>%4</td></tr>"
"<tr><th style=\"text-align: right\">" + i18n( "Wind Speed:" ) "<tr><th style=\"text-align: right\">" + i18n( "Wind Speed:" )
+ "</th><td>%5</td>") + "</th><td>%5</td>")
.tqarg(temp).tqarg(dewPoint).tqarg(pressure).tqarg(relHumidity) .arg(temp).arg(dewPoint).arg(pressure).arg(relHumidity)
.tqarg(wind) + "<td width=\"50\">&nbsp;</td>"; .arg(wind) + "<td width=\"50\">&nbsp;</td>";
if (!heatIndex.isEmpty()) if (!heatIndex.isEmpty())
contents += TQString("<th style=\"text-align: right\">" contents += TQString("<th style=\"text-align: right\">"
+ i18n( "Heat Index:" ) + "</th><td>%1</td>").tqarg(heatIndex); + i18n( "Heat Index:" ) + "</th><td>%1</td>").arg(heatIndex);
else if (!windChill.isEmpty()) else if (!windChill.isEmpty())
contents += TQString("<th style=\"text-align: right\">" contents += TQString("<th style=\"text-align: right\">"
+ i18n( "Wind Chill:" ) + "</th><td>%1</td>").tqarg(windChill); + i18n( "Wind Chill:" ) + "</th><td>%1</td>").arg(windChill);
else else
contents += "<td>&nbsp;</td><td>&nbsp;</td>"; contents += "<td>&nbsp;</td><td>&nbsp;</td>";
contents += "</tr>"; contents += "</tr>";
@ -162,7 +162,7 @@ void reportView::render(){
+ i18n( "Sunrise:" ) + "</th><td>%1</td>" + + i18n( "Sunrise:" ) + "</th><td>%1</td>" +
"<td width=\"50\">&nbsp;</td><th style=\"text-align: right\">" "<td width=\"50\">&nbsp;</td><th style=\"text-align: right\">"
+ i18n( "Sunset:" ) + "</th><td>%2</td>") + i18n( "Sunset:" ) + "</th><td>%2</td>")
.tqarg(sunRiseTime).tqarg(sunSetTime); .arg(sunRiseTime).arg(sunSetTime);
contents += "</tr></table></body></html>"; contents += "</tr></table></body></html>";

@ -60,7 +60,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>86</height> <height>86</height>
@ -121,7 +121,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>85</height> <height>85</height>
@ -169,7 +169,7 @@
</widget> </widget>
<widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3"> <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>tqlayout1</cstring> <cstring>layout1</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">

@ -194,7 +194,7 @@ void ServiceConfigWidget::loadLocations()
parseStationEntry( entryIt.data(), station, uid ); parseStationEntry( entryIt.data(), station, uid );
new StationItem( stateItem, station, uid ); new StationItem( stateItem, station, uid );
mStationMap.insert( uid, TQString( "%1, %2" ) mStationMap.insert( uid, TQString( "%1, %2" )
.tqarg( station ).tqarg( *stateIt ) ); .arg( station ).arg( *stateIt ) );
} }
} }
} }

@ -61,7 +61,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>

@ -37,7 +37,7 @@ class Sun
*/ */
Sun( const TQString &latitude, Sun( const TQString &latitude,
const TQString &longitude, const TQString &longitude,
TQDate date = TQDate::tqcurrentDate(), TQDate date = TQDate::currentDate(),
const int localUTCOffset = KRFCDate::localUTCOffset() ); const int localUTCOffset = KRFCDate::localUTCOffset() );
TQTime computeRiseTime(); TQTime computeRiseTime();

@ -25,7 +25,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqfont.h> #include <tqfont.h>
#include <tqlayout.h> #include <layout.h>
#include <tqscrollview.h> #include <tqscrollview.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <klocale.h> #include <klocale.h>

@ -28,7 +28,7 @@
#include <kparts/browserextension.h> #include <kparts/browserextension.h>
#include <tqdict.h> #include <tqdict.h>
#include <dcopobject.h> #include <dcopobject.h>
#include <tqlayout.h> #include <layout.h>
#include <tqtimer.h> #include <tqtimer.h>
class dockwidget; class dockwidget;

@ -124,14 +124,14 @@ void WeatherButton::slotIconChanged( int group )
return; return;
generateIcons(); generateIcons();
tqrepaint( false ); repaint( false );
} }
void WeatherButton::enterEvent( TQEvent *e ) void WeatherButton::enterEvent( TQEvent *e )
{ {
m_highlight = true; m_highlight = true;
tqrepaint( false ); repaint( false );
TQButton::enterEvent( e ); TQButton::enterEvent( e );
} }
@ -139,7 +139,7 @@ void WeatherButton::leaveEvent( TQEvent *e )
{ {
m_highlight = false; m_highlight = false;
tqrepaint( false ); repaint( false );
TQButton::enterEvent( e ); TQButton::enterEvent( e );
} }

@ -18,7 +18,7 @@ email : geiseri@msoe.edu
#include "config.h" #include "config.h"
#include <tqfile.h> #include <tqfile.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqtextstream.h> #include <textstream.h>
#include <kglobal.h> #include <kglobal.h>
#include <klocale.h> #include <klocale.h>
#include <kdebug.h> #include <kdebug.h>
@ -65,7 +65,7 @@ WeatherLib::Data::Data()
void WeatherLib::Data::clear() void WeatherLib::Data::clear()
{ {
age = TQDateTime::tqcurrentDateTime(); age = TQDateTime::currentDateTime();
downloading = false; downloading = false;
updated = false; updated = false;
job = 0; job = 0;
@ -135,7 +135,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job)
kdDebug( 12006 ) << "Parse: " << s << endl; kdDebug( 12006 ) << "Parse: " << s << endl;
MetarParser parser(m_StationDb, KGlobal::locale()->measureSystem()); MetarParser parser(m_StationDb, KGlobal::locale()->measureSystem());
d->wi = parser.processData(d->wi.reportLocation, s); d->wi = parser.processData(d->wi.reportLocation, s);
d->age = TQDateTime::tqcurrentDateTime().addSecs(1800); d->age = TQDateTime::currentDateTime().addSecs(1800);
emit fileUpdate(d->wi.reportLocation); emit fileUpdate(d->wi.reportLocation);
d->updated = true; d->updated = true;
} }
@ -144,7 +144,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job)
// File error // File error
kdDebug( 12006 ) << "File empty error..." << endl; kdDebug( 12006 ) << "File empty error..." << endl;
KPassivePopup::message( i18n("KWeather Error!"), KPassivePopup::message( i18n("KWeather Error!"),
i18n("The temp file %1 was empty.").tqarg(d->target->name()), 0L,"error" ); i18n("The temp file %1 was empty.").arg(d->target->name()), 0L,"error" );
d->updated = false; d->updated = false;
} }
} }
@ -153,7 +153,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job)
// File error // File error
kdDebug( 12006 ) << "File read error..." << endl; kdDebug( 12006 ) << "File read error..." << endl;
KPassivePopup::message( i18n("KWeather Error!"), KPassivePopup::message( i18n("KWeather Error!"),
i18n("Could not read the temp file %1.").tqarg(d->target->name()), 0L,"error" ); i18n("Could not read the temp file %1.").arg(d->target->name()), 0L,"error" );
d->updated = false; d->updated = false;
} }
delete d->target; delete d->target;
@ -322,7 +322,7 @@ void WeatherLib::update(const TQString &stationID)
// Only grab new data if its more than 50 minutes old // Only grab new data if its more than 50 minutes old
Data *d = findData(stationID); Data *d = findData(stationID);
TQDateTime timeout = TQDateTime::tqcurrentDateTime(); TQDateTime timeout = TQDateTime::currentDateTime();
kdDebug (12006) << "Current Time: " << KGlobal::locale()->formatDateTime(timeout, false, false) << kdDebug (12006) << "Current Time: " << KGlobal::locale()->formatDateTime(timeout, false, false) <<
" Update at: " << KGlobal::locale()->formatDateTime(d->age, false, false) << endl; " Update at: " << KGlobal::locale()->formatDateTime(d->age, false, false) << endl;

@ -103,7 +103,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>41</width> <width>41</width>
<height>31</height> <height>31</height>
@ -119,7 +119,7 @@
Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string> Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter|AlignLeft</set> <set>WordBreak|AlignVCenter|AlignLeft</set>
</property> </property>
<property name="wordwrap" stdset="0"> <property name="wordwrap" stdset="0">
@ -151,7 +151,7 @@ Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -179,7 +179,7 @@ Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>

@ -25,7 +25,7 @@
/* /*
** Bug reports and questions can be sent to kde-devel@kde.org ** Bug reports and questions can be sent to kde-devel@kde.org
*/ */
#include <tqlayout.h> #include <layout.h>
#include <kapplication.h> #include <kapplication.h>

@ -26,7 +26,7 @@
** Bug reports and questions can be sent to kde-devel@kde.org ** Bug reports and questions can be sent to kde-devel@kde.org
*/ */
#include <tqfile.h> #include <tqfile.h>
#include <tqtextstream.h> #include <textstream.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tqpainter.h> #include <tqpainter.h>

@ -71,7 +71,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -88,7 +88,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -177,7 +177,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -213,7 +213,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>

@ -121,9 +121,9 @@ void FlagList::save(KConfig *config)
int cnt=0; int cnt=0;
for ( ; it.current(); ++it) for ( ; it.current(); ++it)
{ {
config->writeEntry(TQString("Flag_%1_Color").tqarg(cnt), it.current()->color()); config->writeEntry(TQString("Flag_%1_Color").arg(cnt), it.current()->color());
config->writeEntry(TQString("Flag_%1_Latitude").tqarg(cnt), it.current()->latitude()); config->writeEntry(TQString("Flag_%1_Latitude").arg(cnt), it.current()->latitude());
config->writeEntry(TQString("Flag_%1_Longitude").tqarg(cnt), it.current()->longitude()); config->writeEntry(TQString("Flag_%1_Longitude").arg(cnt), it.current()->longitude());
cnt++; cnt++;
} }
} }
@ -136,9 +136,9 @@ void FlagList::load(KConfig *config)
for (int i=0; i<num; ++i) for (int i=0; i<num; ++i)
{ {
addFlag(new Flag(config->readDoubleNumEntry(TQString("Flag_%1_Longitude").tqarg(i)), addFlag(new Flag(config->readDoubleNumEntry(TQString("Flag_%1_Longitude").arg(i)),
config->readDoubleNumEntry(TQString("Flag_%1_Latitude").tqarg(i)), config->readDoubleNumEntry(TQString("Flag_%1_Latitude").arg(i)),
config->readColorEntry(TQString("Flag_%1_Color").tqarg(i)))); config->readColorEntry(TQString("Flag_%1_Color").arg(i))));
} }
} }

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** $Id$ ** $Id$
** **
** Implementing your own tqlayout: flow example ** Implementing your own layout: flow example
** **
** Copyright (C) 1996 by Trolltech AS. All rights reserved. ** Copyright (C) 1996 by Trolltech AS. All rights reserved.
** **
@ -76,9 +76,9 @@ bool SimpleFlow::hasHeightForWidth() const
return TRUE; return TRUE;
} }
TQSize SimpleFlow::tqsizeHint() const TQSize SimpleFlow::sizeHint() const
{ {
return tqminimumSize(); return minimumSize();
} }
TQSizePolicy::ExpandData SimpleFlow::expanding() const TQSizePolicy::ExpandData SimpleFlow::expanding() const
@ -116,29 +116,29 @@ int SimpleFlow::doLayout( const TQRect &r, bool testonly )
TQLayoutItem *o; TQLayoutItem *o;
while ( (o=it.current()) != 0 ) { while ( (o=it.current()) != 0 ) {
++it; ++it;
int nextX = x + o->tqsizeHint().width() + spacing(); int nextX = x + o->sizeHint().width() + spacing();
if ( nextX - spacing() > r.right() && h > 0 ) { if ( nextX - spacing() > r.right() && h > 0 ) {
x = r.x(); x = r.x();
y = y + h + spacing(); y = y + h + spacing();
nextX = x + o->tqsizeHint().width() + spacing(); nextX = x + o->sizeHint().width() + spacing();
h = 0; h = 0;
} }
if ( !testonly ) if ( !testonly )
o->setGeometry( TQRect( TQPoint( x, y ), o->tqsizeHint() ) ); o->setGeometry( TQRect( TQPoint( x, y ), o->sizeHint() ) );
x = nextX; x = nextX;
h = TQMAX( h, o->tqsizeHint().height() ); h = TQMAX( h, o->sizeHint().height() );
} }
return y + h - r.y(); return y + h - r.y();
} }
TQSize SimpleFlow::tqminimumSize() const TQSize SimpleFlow::minimumSize() const
{ {
TQSize s(0,0); TQSize s(0,0);
TQPtrListIterator<TQLayoutItem> it(list); TQPtrListIterator<TQLayoutItem> it(list);
TQLayoutItem *o; TQLayoutItem *o;
while ( (o=it.current()) != 0 ) { while ( (o=it.current()) != 0 ) {
++it; ++it;
s = s.expandedTo( o->tqminimumSize() ); s = s.expandedTo( o->minimumSize() );
} }
return s; return s;
} }
@ -155,7 +155,7 @@ int SimpleFlow::count() const {
\reimp \reimp
*/ */
TQLayoutItem* SimpleFlow::itemAt(int index) const { TQLayoutItem* SimpleFlow::itemAt(int index) const {
return index >= 0 && index < list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(list).tqat(index)) : 0; return index >= 0 && index < list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(list).at(index)) : 0;
} }
/*! /*!
@ -164,8 +164,8 @@ TQLayoutItem* SimpleFlow::itemAt(int index) const {
TQLayoutItem* SimpleFlow::takeAt(int index) { TQLayoutItem* SimpleFlow::takeAt(int index) {
if (index < 0 || index >= list.count()) if (index < 0 || index >= list.count())
return 0; return 0;
TQLayoutItem *item = list.tqat(index); TQLayoutItem *item = list.at(index);
list.remove(list.tqat(index)); list.remove(list.at(index));
delete item; delete item;
invalidate(); invalidate();

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** $Id$ ** $Id$
** **
** Definition of simple flow tqlayout for custom tqlayout example ** Definition of simple flow layout for custom layout example
** **
** Created : 979899 ** Created : 979899
** **
@ -15,7 +15,7 @@
#ifndef FLOW_H #ifndef FLOW_H
#define FLOW_H #define FLOW_H
#include <tqlayout.h> #include <layout.h>
#include <tqptrlist.h> #include <tqptrlist.h>
class SimpleFlow : public TQLayout class SimpleFlow : public TQLayout
@ -37,8 +37,8 @@ public:
void addItem( TQLayoutItem *item); void addItem( TQLayoutItem *item);
bool hasHeightForWidth() const; bool hasHeightForWidth() const;
int heightForWidth( int ) const; int heightForWidth( int ) const;
TQSize tqsizeHint() const; TQSize sizeHint() const;
TQSize tqminimumSize() const; TQSize minimumSize() const;
TQLayoutIterator iterator(); TQLayoutIterator iterator();
TQSizePolicy::ExpandData expanding() const; TQSizePolicy::ExpandData expanding() const;

@ -29,7 +29,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqwidget.h> #include <tqwidget.h>

@ -63,7 +63,7 @@ TQPtrList<MapTheme> MapLoader::themes()
TQStringList MapLoader::maps(const TQString &theme) TQStringList MapLoader::maps(const TQString &theme)
{ {
return KGlobal::dirs()->findAllResources("data", TQString("kworldclock/maps/%1/*.jpg").tqarg(theme)); return KGlobal::dirs()->findAllResources("data", TQString("kworldclock/maps/%1/*.jpg").arg(theme));
} }
@ -101,7 +101,7 @@ void MapLoader::load(unsigned int width, const TQString &theme, unsigned int hei
size = 800; size = 800;
} }
else else
image = TQImage(locate("data", TQString("kworldclock/maps/%1/%2.jpg").tqarg(theme).tqarg(size))); image = TQImage(locate("data", TQString("kworldclock/maps/%1/%2.jpg").arg(theme).arg(size)));
if (height == 0) if (height == 0)
height = width/2; height = width/2;

@ -143,7 +143,7 @@ MapWidget::MapWidget(bool applet, bool restore, TQWidget *parent, const char *na
_cityIndicator->setIndent(0); _cityIndicator->setIndent(0);
_cityIndicator->setAutoMask(false); _cityIndicator->setAutoMask(false);
_cityIndicator->setLineWidth(1); _cityIndicator->setLineWidth(1);
_cityIndicator->tqsetAlignment(TQLabel::AlignAuto | TQLabel::AlignTop); _cityIndicator->setAlignment(TQLabel::AlignAuto | TQLabel::AlignTop);
_cityIndicator->setAutoResize(true); _cityIndicator->setAutoResize(true);
_cityIndicator->setFrameStyle(TQFrame::Box | TQFrame::Plain); _cityIndicator->setFrameStyle(TQFrame::Box | TQFrame::Plain);
_cityIndicator->setPalette(TQToolTip::palette()); _cityIndicator->setPalette(TQToolTip::palette());
@ -366,7 +366,7 @@ TQString MapWidget::cityTime(const TQString &city)
time_t t = time(NULL); time_t t = time(NULL);
TQDateTime dt; TQDateTime dt;
dt.setTime_t(t); dt.setTime_t(t);
result.append(TQString("%1, %2").tqarg(KGlobal::locale()->formatTime(dt.time(), true)).tqarg(KGlobal::locale()->formatDate(dt.date(), true))); result.append(TQString("%1, %2").arg(KGlobal::locale()->formatTime(dt.time(), true)).arg(KGlobal::locale()->formatDate(dt.date(), true)));
if (initial_TZ != 0) if (initial_TZ != 0)
setenv("TZ", initial_TZ, 1); setenv("TZ", initial_TZ, 1);
@ -563,13 +563,13 @@ TQPixmap MapWidget::calculatePixmap()
if (gmt_position >= greenwich) if (gmt_position >= greenwich)
{ {
p.tqdrawPixmap(gmt_position-greenwich, 0, map, 0, 0, map.width()-gmt_position+greenwich); p.drawPixmap(gmt_position-greenwich, 0, map, 0, 0, map.width()-gmt_position+greenwich);
p.tqdrawPixmap(0,0, map, map.width()-gmt_position+greenwich, 0, gmt_position-greenwich); p.drawPixmap(0,0, map, map.width()-gmt_position+greenwich, 0, gmt_position-greenwich);
} }
else else
{ {
p.tqdrawPixmap(0,0, map, greenwich-gmt_position, 0, map.width()+gmt_position-greenwich); p.drawPixmap(0,0, map, greenwich-gmt_position, 0, map.width()+gmt_position-greenwich);
p.tqdrawPixmap(map.width()+gmt_position-greenwich, 0, map, 0, 0, greenwich-gmt_position); p.drawPixmap(map.width()+gmt_position-greenwich, 0, map, 0, 0, greenwich-gmt_position);
} }
return pm; return pm;

@ -32,7 +32,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqcombobox.h> #include <tqcombobox.h>
@ -122,7 +122,7 @@ void ZoneClock::editClock()
_name = _dlg->ClockCaption->text().append(":"); _name = _dlg->ClockCaption->text().append(":");
_nameLabel->setText(_dlg->ClockCaption->text().append(":")); _nameLabel->setText(_dlg->ClockCaption->text().append(":"));
updateTime(); updateTime();
tqlayout()->tqinvalidate(); layout()->invalidate();
emit changed(); emit changed();
} }
@ -152,7 +152,7 @@ void ZoneClock::updateTime()
time_t t = time(NULL); time_t t = time(NULL);
TQDateTime dt; TQDateTime dt;
dt.setTime_t(t); dt.setTime_t(t);
_timeLabel->setText(TQString("%1, %2").tqarg(KGlobal::locale()->formatTime(dt.time(), true)).tqarg(KGlobal::locale()->formatDate(dt.date(), true))); _timeLabel->setText(TQString("%1, %2").arg(KGlobal::locale()->formatTime(dt.time(), true)).arg(KGlobal::locale()->formatDate(dt.date(), true)));
if (initial_TZ != 0) if (initial_TZ != 0)
setenv("TZ", initial_TZ, 1); setenv("TZ", initial_TZ, 1);
@ -218,8 +218,8 @@ void ZoneClockPanel::realign()
int w = 0; int w = 0;
TQPtrListIterator<ZoneClock> it(_clocks); TQPtrListIterator<ZoneClock> it(_clocks);
for ( ; it.current(); ++it) for ( ; it.current(); ++it)
if (it.current()->tqsizeHint().width() > w) if (it.current()->sizeHint().width() > w)
w = it.current()->tqsizeHint().width(); w = it.current()->sizeHint().width();
it.toFirst(); it.toFirst();
for ( ; it.current(); ++it) for ( ; it.current(); ++it)
it.current()->setFixedWidth(w); it.current()->setFixedWidth(w);
@ -266,8 +266,8 @@ void ZoneClockPanel::save(KConfig *config)
{ {
TQString n = it.current()->name(); TQString n = it.current()->name();
n = n.left(n.length()-1); n = n.left(n.length()-1);
config->writeEntry(TQString("Clock_%1_Name").tqarg(cnt), n); config->writeEntry(TQString("Clock_%1_Name").arg(cnt), n);
config->writeEntry(TQString("Clock_%1_Zone").tqarg(cnt), it.current()->zone()); config->writeEntry(TQString("Clock_%1_Zone").arg(cnt), it.current()->zone());
cnt++; cnt++;
} }
} }
@ -281,7 +281,7 @@ void ZoneClockPanel::load(KConfig *config)
for (int i=0; i<num; ++i) for (int i=0; i<num; ++i)
{ {
addClock(config->readEntry(TQString("Clock_%1_Zone").tqarg(i)), config->readEntry(TQString("Clock_%1_Name").tqarg(i))); addClock(config->readEntry(TQString("Clock_%1_Zone").arg(i)), config->readEntry(TQString("Clock_%1_Name").arg(i)));
} }
} }

Loading…
Cancel
Save