diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:49:52 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:49:52 +0000 |
commit | cfc42a28c327b96c6a2afee92af3bac1a479eb8a (patch) | |
tree | e3219edf5f827eaa4db3feb509a17846a1a5a752 /fifteenapplet | |
parent | a73fc4d7e66fe0824313aa4e9a650c4cddef6e9f (diff) | |
download | tdetoys-cfc42a28c327b96c6a2afee92af3bac1a479eb8a.tar.gz tdetoys-cfc42a28c327b96c6a2afee92af3bac1a479eb8a.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1157650 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'fifteenapplet')
-rw-r--r-- | fifteenapplet/fifteenapplet.cpp | 38 | ||||
-rw-r--r-- | fifteenapplet/fifteenapplet.h | 24 | ||||
-rw-r--r-- | fifteenapplet/qttableview.cpp | 148 | ||||
-rw-r--r-- | fifteenapplet/qttableview.h | 30 |
4 files changed, 120 insertions, 120 deletions
diff --git a/fifteenapplet/fifteenapplet.cpp b/fifteenapplet/fifteenapplet.cpp index d55221a..46e3549 100644 --- a/fifteenapplet/fifteenapplet.cpp +++ b/fifteenapplet/fifteenapplet.cpp @@ -24,9 +24,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <stdlib.h> #include <time.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qpopupmenu.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpopupmenu.h> #include <klocale.h> #include <kglobal.h> @@ -38,7 +38,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kfifteenapplet"); return new FifteenApplet(configFile, KPanelApplet::Normal, @@ -46,8 +46,8 @@ extern "C" } } -FifteenApplet::FifteenApplet(const QString& configFile, Type type, int actions, - QWidget *parent, const char *name) +FifteenApplet::FifteenApplet(const TQString& configFile, Type type, int actions, + TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name), _aboutData(0) { // setup table @@ -55,7 +55,7 @@ FifteenApplet::FifteenApplet(const QString& configFile, Type type, int actions, setCustomMenu(_table->popup()); // setup layout - QHBoxLayout *_layout = new QHBoxLayout(this); + TQHBoxLayout *_layout = new TQHBoxLayout(this); _layout->add(_table); srand(time(0)); @@ -87,12 +87,12 @@ void FifteenApplet::about() dialog.exec(); } -PiecesTable::PiecesTable(QWidget* parent, const char* name ) +PiecesTable::PiecesTable(TQWidget* parent, const char* name ) : QtTableView(parent, name), _activeRow(-1), _activeCol(-1), _randomized(false) { - _menu = new QPopupMenu(this); - _menu->insertItem(i18n("R&andomize Pieces"), this, SLOT(randomizeMap())); - _menu->insertItem(i18n("&Reset Pieces"), this, SLOT(resetMap())); + _menu = new TQPopupMenu(this); + _menu->insertItem(i18n("R&andomize Pieces"), this, TQT_SLOT(randomizeMap())); + _menu->insertItem(i18n("&Reset Pieces"), this, TQT_SLOT(resetMap())); _menu->adjustSize(); // setup table view setFrameStyle(StyledPanel | Sunken); @@ -107,7 +107,7 @@ PiecesTable::PiecesTable(QWidget* parent, const char* name ) initColors(); } -void PiecesTable::paintCell(QPainter *p, int row, int col) +void PiecesTable::paintCell(TQPainter *p, int row, int col) { int w = cellWidth(); int h = cellHeight(); @@ -142,15 +142,15 @@ void PiecesTable::paintCell(QPainter *p, int row, int col) p->setPen(white); else p->setPen(black); - p->drawText(0, 0, x2, y2, AlignHCenter | AlignVCenter, QString::number(number)); + p->drawText(0, 0, x2, y2, AlignHCenter | AlignVCenter, TQString::number(number)); } -void PiecesTable::resizeEvent(QResizeEvent *e) +void PiecesTable::resizeEvent(TQResizeEvent *e) { QtTableView::resizeEvent(e); // set font - QFont f = font(); + TQFont f = font(); if (height() > 50) f.setPixelSize(8); else if (height() > 40) @@ -171,7 +171,7 @@ void PiecesTable::initColors() _colors.resize(numRows() * numCols()); for (int r = 0; r < numRows(); r++) for (int c = 0; c < numCols(); c++) - _colors[c + r *numCols()] = QColor(255 - 70 * c,255 - 70 * r, 150); + _colors[c + r *numCols()] = TQColor(255 - 70 * c,255 - 70 * r, 150); } void PiecesTable::initMap() @@ -185,7 +185,7 @@ void PiecesTable::initMap() void PiecesTable::randomizeMap() { - QMemArray<int> positions; + TQMemArray<int> positions; positions.fill(0, 16); for (unsigned int i = 0; i < 16; i++) { @@ -221,7 +221,7 @@ void PiecesTable::checkwin() KMessageBox::information(this, i18n("Congratulations!\nYou win the game!"), i18n("Fifteen Pieces")); } -void PiecesTable::mousePressEvent(QMouseEvent* e) +void PiecesTable::mousePressEvent(TQMouseEvent* e) { QtTableView::mousePressEvent(e); @@ -293,7 +293,7 @@ void PiecesTable::mousePressEvent(QMouseEvent* e) } } -void PiecesTable::mouseMoveEvent(QMouseEvent* e) +void PiecesTable::mouseMoveEvent(TQMouseEvent* e) { QtTableView::mouseMoveEvent(e); diff --git a/fifteenapplet/fifteenapplet.h b/fifteenapplet/fifteenapplet.h index 21f431c..fc8ea13 100644 --- a/fifteenapplet/fifteenapplet.h +++ b/fifteenapplet/fifteenapplet.h @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define __fifteenapplet_h__ #include "qttableview.h" -#include <qmemarray.h> +#include <tqmemarray.h> #include <kpanelapplet.h> @@ -37,15 +37,15 @@ class PiecesTable : public QtTableView Q_OBJECT public: - PiecesTable(QWidget* parent = 0, const char* name = 0); - QPopupMenu* popup() { return _menu; } + PiecesTable(TQWidget* parent = 0, const char* name = 0); + TQPopupMenu* popup() { return _menu; } protected: - void resizeEvent(QResizeEvent*); - void mousePressEvent(QMouseEvent*); - void mouseMoveEvent(QMouseEvent*); + void resizeEvent(TQResizeEvent*); + void mousePressEvent(TQMouseEvent*); + void mouseMoveEvent(TQMouseEvent*); - void paintCell(QPainter *, int row, int col); + void paintCell(TQPainter *, int row, int col); void initMap(); void initColors(); @@ -56,9 +56,9 @@ protected slots: void resetMap(); private: - QMemArray<int> _map; - QMemArray<QColor> _colors; - QPopupMenu *_menu; + TQMemArray<int> _map; + TQMemArray<TQColor> _colors; + TQPopupMenu *_menu; int _activeRow, _activeCol; bool _randomized; }; @@ -68,8 +68,8 @@ class FifteenApplet : public KPanelApplet Q_OBJECT public: - FifteenApplet(const QString& configFile, Type t = Stretch, int actions = 0, - QWidget *parent = 0, const char *name = 0); + FifteenApplet(const TQString& configFile, Type t = Stretch, int actions = 0, + TQWidget *parent = 0, const char *name = 0); int widthForHeight(int height) const; int heightForWidth(int width) const; diff --git a/fifteenapplet/qttableview.cpp b/fifteenapplet/qttableview.cpp index 7f044d2..1a283ed 100644 --- a/fifteenapplet/qttableview.cpp +++ b/fifteenapplet/qttableview.cpp @@ -15,9 +15,9 @@ #include "qttableview.h" #include "qttableview.moc" #ifndef QT_NO_QTTABLEVIEW -#include "qscrollbar.h" -#include "qpainter.h" -#include "qdrawutil.h" +#include "tqscrollbar.h" +#include "tqpainter.h" +#include "tqdrawutil.h" #include <limits.h> enum ScrollBarDirtyFlags { @@ -41,16 +41,16 @@ enum ScrollBarDirtyFlags { class QCornerSquare : public QWidget // internal class { public: - QCornerSquare( QWidget *, const char* = 0 ); - void paintEvent( QPaintEvent * ); + QCornerSquare( TQWidget *, const char* = 0 ); + void paintEvent( TQPaintEvent * ); }; -QCornerSquare::QCornerSquare( QWidget *parent, const char *name ) - : QWidget( parent, name ) +QCornerSquare::QCornerSquare( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { } -void QCornerSquare::paintEvent( QPaintEvent * ) +void QCornerSquare::paintEvent( TQPaintEvent * ) { } @@ -113,9 +113,9 @@ void QCornerSquare::paintEvent( QPaintEvent * ) \warning Experience has shown that use of this widget tends to cause more bugs than expected and our analysis indicates that the widget's - very flexibility is the problem. If QScrollView or QListBox can + very flexibility is the problem. If TQScrollView or TQListBox can easily be made to do the job you need, we recommend subclassing - those widgets rather than QtTableView. In addition, QScrollView makes + those widgets rather than QtTableView. In addition, TQScrollView makes it easy to have child widgets inside tables, which QtTableView doesn't support at all. @@ -126,7 +126,7 @@ void QCornerSquare::paintEvent( QPaintEvent * ) /*! Constructs a table view. The \a parent, \a name and \f arguments - are passed to the QFrame constructor. + are passed to the TQFrame constructor. The \link setTableFlags() table flags\endlink are all cleared (set to 0). Set \c Tbl_autoVScrollBar or \c Tbl_autoHScrollBar to get automatic scroll @@ -135,17 +135,17 @@ void QCornerSquare::paintEvent( QPaintEvent * ) The \link setCellHeight() cell height\endlink and \link setCellWidth() cell width\endlink are set to 0. - Frame line shapes (QFrame::HLink and QFrame::VLine) are disallowed; - see QFrame::setFrameStyle(). + 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 - flags \endlink but rather \link QWidget::QWidget() widget + flags \endlink but rather \link TQWidget::TQWidget() widget flags. \endlink */ -QtTableView::QtTableView( QWidget *parent, const char *name, WFlags f ) - : QFrame( parent, name, f ) +QtTableView::QtTableView( TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f ) { nRows = nCols = 0; // zero rows/cols xCellOffs = yCellOffs = 0; // zero offset @@ -179,21 +179,21 @@ QtTableView::~QtTableView() /*! \internal - Reimplements QWidget::setBackgroundColor() for binary compatibility. + Reimplements TQWidget::setBackgroundColor() for binary compatibility. \sa setPalette() */ -void QtTableView::setBackgroundColor( const QColor &c ) +void QtTableView::setBackgroundColor( const TQColor &c ) { - QWidget::setBackgroundColor( c ); + TQWidget::setBackgroundColor( c ); } /*!\reimp */ -void QtTableView::setPalette( const QPalette &p ) +void QtTableView::setPalette( const TQPalette &p ) { - QWidget::setPalette( p ); + TQWidget::setPalette( p ); } /*!\reimp @@ -202,7 +202,7 @@ void QtTableView::setPalette( const QPalette &p ) void QtTableView::show() { showOrHideScrollBars(); - QWidget::show(); + TQWidget::show(); } @@ -226,7 +226,7 @@ void QtTableView::show() event. At present, QtTableView is the only widget that reimplements \link - QWidget::repaint() repaint()\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. */ @@ -238,10 +238,10 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) w = width() - x; if ( h < 0 ) h = height() - y; - QRect r( x, y, w, h ); + TQRect r( x, y, w, h ); if ( r.isEmpty() ) return; // nothing to do - QPaintEvent e( r ); + TQPaintEvent e( r ); if ( erase && backgroundMode() != NoBackground ) eraseInPaint = TRUE; // erase when painting paintEvent( &e ); @@ -249,7 +249,7 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) } /*! - \overload void QtTableView::repaint( const QRect &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. */ @@ -730,7 +730,7 @@ int QtTableView::totalHeight() <dt> Tbl_autoHScrollBar <dd> The table has a horizontal scroll bar if - and only if - the table is wider than the view. <dt> Tbl_autoScrollBars <dd> - The union of the previous two flags. - <dt> Tbl_clipCellPainting <dd> - The table uses QPainter::setClipRect() to + <dt> Tbl_clipCellPainting <dd> - The table uses TQPainter::setClipRect() to make sure that paintCell() will not draw outside the cell boundaries. <dt> Tbl_cutCellsV <dd> - The table will never show part of a @@ -960,7 +960,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) return; if ( !rowYPos( row, &yPos ) ) return; - QRect uR = QRect( xPos, yPos, + TQRect uR = TQRect( xPos, yPos, cellW ? cellW : cellWidth(col), cellH ? cellH : cellHeight(row) ); repaint( uR.intersect(viewRect()), erase ); @@ -968,7 +968,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) /*! - \fn QRect QtTableView::cellUpdateRect() const + \fn TQRect QtTableView::cellUpdateRect() const This function should be called only from the paintCell() function in subclasses. It returns the portion of a cell that actually needs to be @@ -982,9 +982,9 @@ void QtTableView::updateCell( int row, int col, bool erase ) frame, in \e widget coordinates. */ -QRect QtTableView::viewRect() const +TQRect QtTableView::viewRect() const { - return QRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); + return TQRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); } @@ -1127,7 +1127,7 @@ void QtTableView::snapToGrid( bool horizontal, bool vertical ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table horizontally to offset \a val without updating the scroll bar. @@ -1148,7 +1148,7 @@ void QtTableView::horSbValue( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly horizontally even if \c Tbl_snapToHGrid is set. */ @@ -1168,7 +1168,7 @@ void QtTableView::horSbSliding( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::horSbSlidingDone( ) @@ -1181,7 +1181,7 @@ void QtTableView::horSbSlidingDone( ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table vertically to offset \a val without updating the scroll bar. @@ -1202,7 +1202,7 @@ void QtTableView::verSbValue( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly vertically even if \c Tbl_snapToVGrid is set. */ @@ -1222,7 +1222,7 @@ void QtTableView::verSbSliding( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::verSbSlidingDone( ) @@ -1240,18 +1240,18 @@ void QtTableView::verSbSlidingDone( ) do so for each cell. */ -void QtTableView::setupPainter( QPainter * ) +void QtTableView::setupPainter( TQPainter * ) { } /*! - \fn void QtTableView::paintCell( QPainter *p, int row, int col ) + \fn void QtTableView::paintCell( TQPainter *p, int row, int col ) This pure virtual function is called to paint the single cell at \a (row,col) using \a p, which is open when paintCell() is called and must remain open. - The coordinate system is \link QPainter::translate() translated \endlink + The coordinate system is \link TQPainter::translate() translated \endlink so that the origin is at the top-left corner of the cell to be painted, i.e. \e cell coordinates. Do not scale or shear the coordinate system (or if you do, restore the transformation matrix before you @@ -1269,16 +1269,16 @@ void QtTableView::setupPainter( QPainter * ) Calls paintCell() for the cells that needs to be repainted. */ -void QtTableView::paintEvent( QPaintEvent *e ) +void QtTableView::paintEvent( TQPaintEvent *e ) { - QRect updateR = e->rect(); // update rectangle + TQRect updateR = e->rect(); // update rectangle if ( sbDirty ) { bool e = eraseInPaint; updateScrollBars(); eraseInPaint = e; } - QPainter paint( this ); + TQPainter paint( this ); if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ? drawFrame( &paint ); @@ -1312,11 +1312,11 @@ void QtTableView::paintEvent( QPaintEvent *e ) int xPos = maxX+1; // in case the while() is empty int nextX; int nextY; - QRect winR = viewRect(); - QRect cellR; - QRect cellUR; + TQRect winR = viewRect(); + TQRect cellR; + TQRect cellUR; #ifndef QT_NO_TRANSFORMATIONS - QWMatrix matrix; + TQWMatrix matrix; #endif while ( yPos <= maxY && row < nRows ) { @@ -1384,22 +1384,22 @@ void QtTableView::paintEvent( QPaintEvent *e ) // inside the cells. So QtTableView is reponsible for all pixels // outside the cells. - QRect viewR = viewRect(); - const QColorGroup g = colorGroup(); + TQRect viewR = viewRect(); + const TQColorGroup g = colorGroup(); if ( xPos <= maxX ) { - QRect r = viewR; + TQRect r = viewR; r.setLeft( xPos ); r.setBottom( yPos<maxY?yPos:maxY ); - if ( inherits( "QMultiLineEdit" ) ) + if ( inherits( "TQMultiLineEdit" ) ) paint.fillRect( r.intersect( updateR ), g.base() ); else paint.eraseRect( r.intersect( updateR ) ); } if ( yPos <= maxY ) { - QRect r = viewR; + TQRect r = viewR; r.setTop( yPos ); - if ( inherits( "QMultiLineEdit" ) ) + if ( inherits( "TQMultiLineEdit" ) ) paint.fillRect( r.intersect( updateR ), g.base() ); else paint.eraseRect( r.intersect( updateR ) ); @@ -1408,7 +1408,7 @@ void QtTableView::paintEvent( QPaintEvent *e ) /*!\reimp */ -void QtTableView::resizeEvent( QResizeEvent * ) +void QtTableView::resizeEvent( TQResizeEvent * ) { updateScrollBars( horValue | verValue | horSteps | horGeometry | horRange | verSteps | verGeometry | verRange ); @@ -1435,11 +1435,11 @@ void QtTableView::updateView() values; use findRow() to translate to cell numbers. */ -QScrollBar *QtTableView::verticalScrollBar() const +TQScrollBar *QtTableView::verticalScrollBar() const { QtTableView *that = (QtTableView*)this; // semantic const if ( !vScrollBar ) { - QScrollBar *sb = new QScrollBar( QScrollBar::Vertical, that ); + TQScrollBar *sb = new TQScrollBar( TQScrollBar::Vertical, that ); #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif @@ -1447,12 +1447,12 @@ QScrollBar *QtTableView::verticalScrollBar() const Q_CHECK_PTR(sb); sb->setTracking( FALSE ); sb->setFocusPolicy( NoFocus ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(verSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(verSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(verSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(verSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(verSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(verSbSlidingDone())); sb->hide(); that->vScrollBar = sb; return sb; @@ -1466,11 +1466,11 @@ QScrollBar *QtTableView::verticalScrollBar() const values; use findCol() to translate to cell numbers. */ -QScrollBar *QtTableView::horizontalScrollBar() const +TQScrollBar *QtTableView::horizontalScrollBar() const { QtTableView *that = (QtTableView*)this; // semantic const if ( !hScrollBar ) { - QScrollBar *sb = new QScrollBar( QScrollBar::Horizontal, that ); + TQScrollBar *sb = new TQScrollBar( TQScrollBar::Horizontal, that ); #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif @@ -1478,12 +1478,12 @@ QScrollBar *QtTableView::horizontalScrollBar() const sb->setFocusPolicy( NoFocus ); Q_CHECK_PTR(sb); sb->setTracking( FALSE ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(horSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(horSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(horSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(horSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(horSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(horSbSlidingDone())); sb->hide(); that->hScrollBar = sb; return sb; @@ -1787,10 +1787,10 @@ bool QtTableView::colXPos( int col, int *xPos ) const Moves the visible area of the table right by \a xPixels and down by \a yPixels pixels. Both may be negative. - \warning You might find that QScrollView offers a higher-level of + \warning You might find that TQScrollView offers a higher-level of functionality than using QtTableView and this function. - This function is \e not the same as QWidget::scroll(); in particular, + This function is \e not the same as TQWidget::scroll(); in particular, the signs of \a xPixels and \a yPixels have the reverse semantics. \sa setXOffset(), setYOffset(), setOffset(), setTopCell(), @@ -1799,7 +1799,7 @@ bool QtTableView::colXPos( int col, int *xPos ) const void QtTableView::scroll( int xPixels, int yPixels ) { - QWidget::scroll( -xPixels, -yPixels, contentsRect() ); + TQWidget::scroll( -xPixels, -yPixels, contentsRect() ); } @@ -2058,7 +2058,7 @@ void QtTableView::updateFrameSize() if ( autoUpdate() ) { int fh = frameRect().height(); int fw = frameRect().width(); - setFrameRect( QRect(0,0,rw,rh) ); + setFrameRect( TQRect(0,0,rw,rh) ); if ( rw != fw ) update( QMIN(fw,rw) - frameWidth() - 2, 0, frameWidth()+4, rh ); diff --git a/fifteenapplet/qttableview.h b/fifteenapplet/qttableview.h index c5a540d..9acf017 100644 --- a/fifteenapplet/qttableview.h +++ b/fifteenapplet/qttableview.h @@ -16,7 +16,7 @@ #define QTTABLEVIEW_H #ifndef QT_H -#include "qframe.h" +#include "tqframe.h" #endif // QT_H #ifndef QT_NO_QTTABLEVIEW @@ -29,16 +29,16 @@ class QtTableView : public QFrame { Q_OBJECT public: - virtual void setBackgroundColor( const QColor & ); - virtual void setPalette( const QPalette & ); + virtual void setBackgroundColor( const TQColor & ); + virtual void setPalette( const TQPalette & ); void show(); void repaint( bool erase=TRUE ); void repaint( int x, int y, int w, int h, bool erase=TRUE ); - void repaint( const QRect &, bool erase=TRUE ); + void repaint( const TQRect &, bool erase=TRUE ); protected: - QtTableView( QWidget *parent=0, const char *name=0, WFlags f=0 ); + QtTableView( TQWidget *parent=0, const char *name=0, WFlags f=0 ); ~QtTableView(); int numRows() const; @@ -87,8 +87,8 @@ protected: bool rowIsVisible( int row ) const; bool colIsVisible( int col ) const; - QScrollBar *verticalScrollBar() const; - QScrollBar *horizontalScrollBar() const; + TQScrollBar *verticalScrollBar() const; + TQScrollBar *horizontalScrollBar() const; private slots: void horSbValue( int ); @@ -99,11 +99,11 @@ private slots: void verSbSlidingDone(); protected: - virtual void paintCell( QPainter *, int row, int col ) = 0; - virtual void setupPainter( QPainter * ); + virtual void paintCell( TQPainter *, int row, int col ) = 0; + virtual void setupPainter( TQPainter * ); - void paintEvent( QPaintEvent * ); - void resizeEvent( QResizeEvent * ); + void paintEvent( TQPaintEvent * ); + void resizeEvent( TQResizeEvent * ); int findRow( int yPos ) const; int findCol( int xPos ) const; @@ -164,8 +164,8 @@ private: uint tFlags; QRect cellUpdateR; - QScrollBar *vScrollBar; - QScrollBar *hScrollBar; + TQScrollBar *vScrollBar; + TQScrollBar *hScrollBar; QCornerSquare *cornerSquare; private: // Disabled copy constructor and operator= @@ -230,7 +230,7 @@ inline uint QtTableView::tableFlags() const inline bool QtTableView::testTableFlags( uint f ) const { return (tFlags & f) != 0; } -inline QRect QtTableView::cellUpdateRect() const +inline TQRect QtTableView::cellUpdateRect() const { return cellUpdateR; } inline bool QtTableView::autoUpdate() const @@ -239,7 +239,7 @@ inline bool QtTableView::autoUpdate() const inline void QtTableView::repaint( bool erase ) { repaint( 0, 0, width(), height(), erase ); } -inline void QtTableView::repaint( const QRect &r, bool erase ) +inline void QtTableView::repaint( const TQRect &r, bool erase ) { repaint( r.x(), r.y(), r.width(), r.height(), erase ); } inline void QtTableView::updateScrollBars() |