From 8f1624dd9a394be19ccf9d63e4de0a0558831ca3 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 20:31:54 +0000 Subject: TQt4 port kpicosim This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpicosim@1238884 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/kserialview.h | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'src/kserialview.h') diff --git a/src/kserialview.h b/src/kserialview.h index 1a21dbc..c474607 100755 --- a/src/kserialview.h +++ b/src/kserialview.h @@ -23,39 +23,40 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "kport.h" class KSerialWindow : public KTextEdit { Q_OBJECT + TQ_OBJECT public: - KSerialWindow( QWidget *parent ) : KTextEdit( parent ) { + KSerialWindow( TQWidget *tqparent ) : KTextEdit( tqparent ) { setWrapColumnOrWidth( 80 ) ; // Serial window is a terminal - setWrapPolicy( QTextEdit::Anywhere ) ; - setWordWrap( QTextEdit::FixedColumnWidth ) ; + setWrapPolicy( TQTextEdit::Anywhere ) ; + setWordWrap( TQTextEdit::FixedColumnWidth ) ; setFont( KGlobalSettings::fixedFont() ) ; // Use default fixed font } virtual ~KSerialWindow() {} ; protected: - virtual void keyPressEvent( QKeyEvent *e ) + virtual void keyPressEvent( TQKeyEvent *e ) { emit keyPressed( e->ascii() ) ; } - virtual void mousePressEvent( QMouseEvent *e ) { + virtual void mousePressEvent( TQMouseEvent *e ) { } - virtual void mouseReleaseEvent( QMouseEvent *e ) {} - virtual QPopupMenu *createPopupMenu( const QPoint &pos ) + virtual void mouseReleaseEvent( TQMouseEvent *e ) {} + virtual TQPopupMenu *createPopupMenu( const TQPoint &pos ) { - QPopupMenu *menu = new QPopupMenu( this ) ; - menu->insertItem( "clear view", this, SLOT( clearView() ) ) ; + TQPopupMenu *menu = new TQPopupMenu( this ) ; + menu->insertItem( "clear view", this, TQT_SLOT( clearView() ) ) ; return menu ; } public slots: @@ -68,11 +69,12 @@ class KSerialWindow : public KTextEdit } ; -class KSerialView : public QWidget +class KSerialView : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KSerialView( CPicoBlaze *cpu, QWidget *parent ); + KSerialView( CPicoBlaze *cpu, TQWidget *tqparent ); ~KSerialView(); KPort * rxPort, * txPort, * statusPort ; @@ -95,15 +97,15 @@ class KSerialView : public QWidget CPicoBlaze * m_cpu ; KLineEdit *txPortID, *rxPortID, *statusPortID ; - QCheckBox *m_statusBits[ 8 ] ; + TQCheckBox *m_statusBits[ 8 ] ; - QColor m_backgroundColor ; - QPushButton *m_clearButton ; + TQColor m_backgroundColor ; + TQPushButton *m_clearButton ; public slots: - void updateTxId( const QString & ) ; - void updateRxId( const QString & ) ; - void updateStatusId( const QString & ) ; + void updateTxId( const TQString & ) ; + void updateRxId( const TQString & ) ; + void updateStatusId( const TQString & ) ; void txFlagsChanged( bool en ) ; }; -- cgit v1.2.1