diff --git a/src/DragWidget.cpp b/src/DragWidget.cpp index 5a65130..c9118ad 100644 --- a/src/DragWidget.cpp +++ b/src/DragWidget.cpp @@ -1,8 +1,8 @@ #include "DragWidget.h" -DragWidget::DragWidget(QWidget *parent, const char *name, WFlags f) : QWidget(parent,name,f) +DragWidget::DragWidget(TQWidget *tqparent, const char *name, WFlags f) : TQWidget(tqparent,name,f) { - dragP=QPoint(0,0); + dragP=TQPoint(0,0); drag=false; } @@ -11,25 +11,25 @@ DragWidget::~DragWidget() } -void DragWidget::mousePressEvent(QMouseEvent *e) +void DragWidget::mousePressEvent(TQMouseEvent *e) { dragP=e->pos(); gpress=e->globalPos(); drag=true; } -void DragWidget::mouseReleaseEvent(QMouseEvent *) +void DragWidget::mouseReleaseEvent(TQMouseEvent *) { drag=false; } -void DragWidget::mouseMoveEvent(QMouseEvent *e) +void DragWidget::mouseMoveEvent(TQMouseEvent *e) { if (!drag) { return; } - QPoint curr(e->globalPos().x()-dragP.x(),e->globalPos().y()-dragP.y()); - QWidget::move(curr); + TQPoint curr(e->globalPos().x()-dragP.x(),e->globalPos().y()-dragP.y()); + TQWidget::move(curr); } diff --git a/src/DragWidget.h b/src/DragWidget.h index 9d24583..8b797b3 100644 --- a/src/DragWidget.h +++ b/src/DragWidget.h @@ -1,14 +1,15 @@ #ifndef KVKBDDRAGWIDGET_H #define KVKBDDRAGWIDGET_H -#include -#include -#include +#include +#include +#include -class DragWidget : public QWidget +class DragWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - DragWidget(QWidget *parent=0, const char *name="", WFlags f=0); + DragWidget(TQWidget *tqparent=0, const char *name="", WFlags f=0); virtual ~DragWidget(); private: @@ -16,11 +17,11 @@ private: bool drag; protected: - void mouseMoveEvent ( QMouseEvent * e ); - void mousePressEvent ( QMouseEvent * e ); - void mouseReleaseEvent ( QMouseEvent * e ); - QPoint dragP; - QPoint gpress; + void mouseMoveEvent ( TQMouseEvent * e ); + void mousePressEvent ( TQMouseEvent * e ); + void mouseReleaseEvent ( TQMouseEvent * e ); + TQPoint dragP; + TQPoint gpress; }; diff --git a/src/MainWidget.cpp b/src/MainWidget.cpp index 3c3a6fd..4c5b621 100644 --- a/src/MainWidget.cpp +++ b/src/MainWidget.cpp @@ -30,10 +30,10 @@ #include #include -#include +#include #include -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ bool shutting=false; -MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const char * name, WFlags f ) : ResizableDragWidget ( parent,name,f ), stand_alone(tren) +MainWidget::MainWidget ( KAboutData *about, bool tren, TQWidget *tqparent, const char * name, WFlags f ) : ResizableDragWidget ( tqparent,name,f ), stand_alone(tren) { @@ -56,20 +56,20 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch display=qt_xdisplay(); - //QString k1= "`1234567890-="; - //QString k1s = "~!@#$%^&*()_+"; + //TQString k1= "`1234567890-="; + //TQString k1s = "~!@#$%^&*()_+"; unsigned int kc1[R1LEN] = {49,10,11,12,13,14,15,16,17,18,19,20,21}; - //QString k2= "qwertyuiop"; - //QString k2s = "QWERTYUIOP"; + //TQString k2= "qwertyuiop"; + //TQString k2s = "TQWERTYUIOP"; unsigned int kc2[R2LEN] = {24,25,26,27,28,29,30,31,32,33}; - //QString k3= "asdfghjkl"; //;'"; - //QString k3s="ASDFGHJKL"; + //TQString k3= "asdfghjkl"; //;'"; + //TQString k3s="ASDFGHJKL"; unsigned int kc3[R3LEN] = {38,39,40,41,42,43,44,45,46}; //,{47,48}; - //QString k4="zxcvbnm"; //,./"; - //QString k4s="ZXCVBNM"; + //TQString k4="zxcvbnm"; //,./"; + //TQString k4s="ZXCVBNM"; unsigned int kc4[R4LEN] = {52,53,54,55,56,57,58};//59,60,61}; int stx=15; @@ -85,39 +85,39 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch esc->setText ( "Esc" ); esc->res(); other_keys.append(esc); - connect ( esc,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( esc,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); for ( int a=0;a<4;a++ ) { VButton *f = new VButton ( this,"" ); f->setKeyCode ( 67+a ); - f->setText ( "F"+QString ( "%1" ).arg ( a+1 ) ); + f->setText ( "F"+TQString ( "%1" ).arg ( a+1 ) ); f->move ( stx+esc->width() + ( 35*a ) +20,sty ); f->res(); other_keys.append(f); - connect ( f,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( f,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); } for ( int a=0;a<4;a++ ) { VButton *f = new VButton ( this,"" ); f->setKeyCode ( 71+a ); - f->setText ( "F"+QString ( "%1" ).arg ( a+5 ) ); + f->setText ( "F"+TQString ( "%1" ).arg ( a+5 ) ); f->move ( stx+esc->width() + ( 35*a ) +40+ ( 4*35 ),sty ); f->res(); other_keys.append(f); - connect ( f,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( f,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); } for ( int a=0;a<4;a++ ) { VButton *f = new VButton ( this,"" ); f->setKeyCode ( 75+a ); if ( a>1 ) f->setKeyCode ( 93+a ); - f->setText ( "F"+QString ( "%1" ).arg ( a+9 ) ); + f->setText ( "F"+TQString ( "%1" ).arg ( a+9 ) ); f->move ( stx+esc->width() + ( 35*a ) +45+ ( 8*35 ) +10,sty ); f->res(); other_keys.append(f); - connect ( f,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( f,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); } //ROW 1 @@ -126,7 +126,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch VButton *v = new VButton ( this,"" ); v->setKeyCode ( kc1[a] ); v->move ( stx+ ( 35*a ),sty+35 ); - connect ( v,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( v ); v->res(); //caps_btns.append ( v ); @@ -139,7 +139,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch bksp->setText ( "Bksp" ); bksp->res(); other_keys.append(bksp); - connect ( bksp,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( bksp,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); //ROW 2 VButton *tab = new VButton ( this,"" ); @@ -149,7 +149,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch tab->setText ( "Tab" ); tab->res(); other_keys.append(tab); - connect ( tab,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( tab,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); for ( int a=0;asetShiftText ( k2s.mid ( a,1 ) ); v->move ( stx+tab->width() +5+ ( 35*a ),sty+35+35 ); v->res(); - connect ( v,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( v ); } @@ -169,7 +169,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch //lbr->setText ( "[" ); //lbr->setShiftText ( "{" ); lbr->res(); - connect ( lbr,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( lbr,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( lbr ); VButton *rbr = new VButton ( this,"" ); @@ -178,7 +178,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch //rbr->setText ( "]" ); //rbr->setShiftText ( "}" ); rbr->res(); - connect ( rbr,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( rbr,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( rbr ); VButton *bksl = new VButton ( this,"" ); @@ -188,7 +188,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch //bksl->setText ( "\\" ); //bksl->setShiftText ( "|" ); bksl->res(); - connect ( bksl,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( bksl,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( bksl ); //ROW 3 @@ -200,8 +200,8 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch caps->setToggleButton ( true ); caps->res(); other_keys.append(caps); - connect ( caps,SIGNAL ( clicked() ),this,SLOT ( toggleCaps() ) ); - connect ( caps,SIGNAL ( keyClick ( unsigned int ) ),this,SLOT ( keyPress ( unsigned int ) ) ); + connect ( caps,TQT_SIGNAL ( clicked() ),this,TQT_SLOT ( toggleCaps() ) ); + connect ( caps,TQT_SIGNAL ( keyClick ( unsigned int ) ),this,TQT_SLOT ( keyPress ( unsigned int ) ) ); for ( int a=0;amove ( stx+caps->width() +5+ ( 35*a ),sty+ ( 3*35 ) ); btns.append ( v ); v->res(); - connect ( v,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); } VButton *smcl = new VButton ( this,"" ); smcl->setKeyCode ( 47 ); smcl->move ( stx+ ( R3LEN *35 ) +caps->width() +5,sty+ ( 3*35 ) ); //smcl->setText ( ";" ); //smcl->setShiftText ( ":" ); - connect ( smcl,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( smcl,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( smcl ); smcl->res(); @@ -228,7 +228,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch sngq->move ( stx+ ( ( R3LEN +1 ) *35 ) +caps->width() +5,sty+ ( 3*35 ) ); //sngq->setText ( "'" ); //sngq->setShiftText ( "\"" ); - connect ( sngq,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( sngq,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( sngq ); sngq->res(); @@ -237,7 +237,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch enter->move ( stx+ ( ( R3LEN +2 ) *35 ) +caps->width() +5,sty+ ( 3*35 ) ); enter->resize ( 50,30 ); enter->setText ( "Enter" ); - connect ( enter,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( enter,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); other_keys.append(enter); enter->res(); @@ -248,7 +248,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch lshft->resize ( 80,30 ); lshft->setText ( "Shift" ); lshft->setToggleButton ( true ); - connect ( lshft,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( toggleShift() ) ); + connect ( lshft,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleShift() ) ); mod_keys.append ( lshft ); lshft->res(); @@ -261,7 +261,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch v->move ( stx+35+16+35+ ( 35*a ),sty+ ( 4*35 ) ); btns.append ( v ); v->res(); - connect ( v,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); } VButton *sm = new VButton ( this,"" ); @@ -269,7 +269,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch sm->move ( stx+ ( R4LEN *35 ) +lshft->width() +5,sty+ ( 4*35 ) ); //sm->setText ( "," ); //sm->setShiftText ( "<" ); - connect ( sm,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( sm,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( sm ); sm->res(); @@ -278,7 +278,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch gr->move ( stx+ ( ( R4LEN +1 ) *35 ) +lshft->width() +5,sty+ ( 4*35 ) ); //gr->setText ( "." ); //gr->setShiftText ( ">" ); - connect ( gr,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( gr,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( gr ); gr->res(); @@ -287,7 +287,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch sl->move ( stx+ ( ( R4LEN +2 ) *35 ) +lshft->width() +5,sty+ ( 4*35 ) ); //sl->setText ( "/" ); //sl->setShiftText ( "?" ); - connect ( sl,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( sl,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); btns.append ( sl ); sl->res(); @@ -297,7 +297,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch rshft->resize ( 68,30 ); rshft->setText ( "Shift" ); rshft->setToggleButton ( true ); - connect ( rshft,SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( toggleShift() ) ); + connect ( rshft,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleShift() ) ); mod_keys.append ( rshft ); rshft->res(); @@ -337,7 +337,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch space->setKeyCode ( 65 ); space->resize ( 5*35+28,30 ); space->move ( 5+lalt->x() +lalt->width(),sty+ ( 5*35 ) ); - connect ( space, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( space, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); space->res(); other_keys.append(space); @@ -357,7 +357,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch mnu->setText ( "Menu" ); mnu->setKeyCode ( 117 ); mnu->setToggleButton ( false ); - connect ( mnu, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( mnu, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); other_keys.append(mnu); mnu->res(); @@ -376,10 +376,10 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch quit = new VButton ( this,"quit" ); quit->resize ( 15,30 ); quit->move ( 525,15 ); - quit->setPaletteBackgroundColor ( Qt::red ); + quit->setPaletteBackgroundColor ( TQt::red ); quit->res(); other_keys.append(quit); - connect ( quit,SIGNAL ( clicked() ),this, SLOT ( quitClicked() ) ); + connect ( quit,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( quitClicked() ) ); extent = new VButton(this,"extent"); extent->resize( 15,65 ); @@ -387,21 +387,21 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch extent->setText(">>"); extent->res(); other_keys.append(extent); - connect (extent, SIGNAL( clicked() ) , this, SLOT ( toggleNumericPad() ) ); + connect (extent, TQT_SIGNAL( clicked() ) , this, TQT_SLOT ( toggleNumericPad() ) ); - QTimer *t = new QTimer ( this ); - connect ( t, SIGNAL ( timeout() ), this, SLOT ( queryModState() ) ); + TQTimer *t = new TQTimer ( this ); + connect ( t, TQT_SIGNAL ( timeout() ), this, TQT_SLOT ( queryModState() ) ); t->start ( 500, FALSE ); - setPaletteBackgroundColor ( Qt::black ); - setFocusPolicy ( NoFocus ); + setPaletteBackgroundColor ( TQt::black ); + setFocusPolicy ( TQ_NoFocus ); int padx= 550; - QString txt[9] = {"Ho\nme","▲","Pg\nUp","◄"," ","►","End","▼","Pg\nDn"}; - QString nump[9] = {"7","8","9","4","5","6","1","2","3"}; + TQString txt[9] = {"Ho\nme","▲","Pg\nUp","◄"," ","►","End","▼","Pg\nDn"}; + TQString nump[9] = {"7","8","9","4","5","6","1","2","3"}; int val=0; int nval[9] = {16,17,18,13,14,15,10,11,12}; int cval[9] = {79,80,81,83,84,85,87,88,89}; @@ -411,10 +411,10 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch v->move(padx+(b*35),sty+(a*35)); v->res(); v->setKeyCode(nval[val],cval[val]); - v->setText(QString::fromUtf8(txt[val])); - v->setShiftText(QString::fromUtf8(nump[val])); + v->setText(TQString::fromUtf8(txt[val])); + v->setShiftText(TQString::fromUtf8(nump[val])); numl_keys.append(v); - connect ( v, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( v, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); val++; } } @@ -427,7 +427,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch ins->setShiftText("0"); numl_keys.append(ins); - connect ( ins, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( ins, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); del = new NumpadVButton(this,"del"); del->resize(30,30); @@ -437,7 +437,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch del->setShiftText("."); del->setKeyCode(60,91); numl_keys.append(del); - connect ( del, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( del, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); numl = new VButton(this,"numlock"); @@ -447,8 +447,8 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch numl->setText("Num\nLock"); numl->setToggleButton ( true ); other_keys.append(numl); - connect ( numl, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); - connect ( numl, SIGNAL ( clicked() ), this, SLOT ( toggleNumlock() ) ); + connect ( numl, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); + connect ( numl, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( toggleNumlock() ) ); div = new VButton(this,"div"); @@ -457,7 +457,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch div->setText("/"); div->setKeyCode(112); other_keys.append(div); - connect ( div, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( div, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); mul = new VButton(this,"mul"); mul->move(padx+(2*35),sty+(1*35)); @@ -465,7 +465,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch mul->setText("*"); mul->setKeyCode(63); other_keys.append(mul); - connect ( mul, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( mul, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); ent = new VButton(this,"enter1"); ent->resize(30,65); @@ -474,7 +474,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch ent->setText("Ent"); ent->setKeyCode(36); other_keys.append(ent); - connect ( ent, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( ent, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); plu = new VButton(this,"plus"); plu->resize(30,65); @@ -483,7 +483,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch plu->setText("+"); plu->setKeyCode(86); other_keys.append(plu); - connect ( plu, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( plu, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); min = new VButton(this,"minus"); min->resize(30,30); @@ -492,7 +492,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch min->setKeyCode(82); other_keys.append(min); min->res(); - connect ( min, SIGNAL ( keyClick ( unsigned int ) ), this, SLOT ( keyPress ( unsigned int ) ) ); + connect ( min, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); if (!stand_alone){ tray = new KbdTray ( this ); @@ -504,19 +504,19 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch m->setCheckable ( true ); KHelpMenu *h = new KHelpMenu ( tray, about ); - m->insertItem ( "Font ...", this, SLOT ( chooseFont() ) ); + m->insertItem ( "Font ...", this, TQT_SLOT ( chooseFont() ) ); - mnu_autores = m->insertItem( "Auto resize font",this, SLOT ( toggleFontAutoRes() ) ); + mnu_autores = m->insertItem( "Auto resize font",this, TQT_SLOT ( toggleFontAutoRes() ) ); bool fnt_autores = cfg->readBoolEntry("autoresfont",true); m->setItemChecked(mnu_autores, fnt_autores); - mnu_dock = m->insertItem ( "Dock widget", this, SLOT ( showDock() ) ); + mnu_dock = m->insertItem ( "Dock widget", this, TQT_SLOT ( showDock() ) ); bool show_dock = cfg->readBoolEntry("showdock",false); m->setItemChecked(mnu_dock, show_dock); - //m->insertItem("Configure", this, SLOT(config())); + //m->insertItem("Configure", this, TQT_SLOT(config())); m->insertSeparator(); m->insertItem ( "Help", h->menu() ); @@ -532,7 +532,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch } - QFont fnt = cfg->readFontEntry("KvkbdFont"); + TQFont fnt = cfg->readFontEntry("KvkbdFont"); m->setItemChecked(mnu_autores, fnt_autores); setFont(fnt); @@ -540,13 +540,13 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch popup_menu = new VButton ( this,"popupmenu" ); popup_menu->resize ( 15,30 ); popup_menu->move ( 525,15+35 ); - //popup_menu->setPaletteBackgroundColor ( Qt::green ); + //popup_menu->setPaletteBackgroundColor ( TQt::green ); popup_menu->res(); - popup_menu->setPixmap(QIconSet(SmallIcon("configure")).pixmap()); + popup_menu->setPixmap(TQIconSet(SmallIcon("configure")).pixmap()); other_keys.append(popup_menu); - connect ( popup_menu,SIGNAL ( clicked() ),this, SLOT ( showConfigMenu() ) ); + connect ( popup_menu,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( showConfigMenu() ) ); } else{ @@ -572,22 +572,22 @@ bool MainWidget::close(bool alsoDelete) { shutting=true; saveState(); - return QWidget::close(alsoDelete); + return TQWidget::close(alsoDelete); } void MainWidget::restorePosition() { - QDesktopWidget *desktop = QApplication::desktop(); - QRect screen_geom = desktop->screenGeometry(); + TQDesktopWidget *desktop = TQApplication::desktop(); + TQRect screen_geom = desktop->screenGeometry(); int d_width=550; int d_height=235; - QRect dflt_geom(screen_geom.width()-d_width,screen_geom.height()-d_height,d_width,d_height); + TQRect dflt_geom(screen_geom.width()-d_width,screen_geom.height()-d_height,d_width,d_height); KConfig *cfg = 0; cfg = KApplication::kApplication()->config(); if (cfg){ - QRect geom = cfg->readRectEntry("geometry"); + TQRect geom = cfg->readRectEntry("geometry"); if (!geom.isNull() && geom.isValid()) { dflt_geom=geom; } @@ -603,23 +603,23 @@ void MainWidget::saveState() cfg->sync(); } } -void MainWidget::hideEvent ( QHideEvent * ) +void MainWidget::hideEvent ( TQHideEvent * ) { KConfig *cfg = 0; cfg = KApplication::kApplication()->config(); if (cfg){ - cfg->writeEntry("geometry",geometry()); + cfg->writeEntry("geometry",tqgeometry()); cfg->sync(); } } -void MainWidget::resizeEvent(QResizeEvent * e) +void MainWidget::resizeEvent(TQResizeEvent * e) { if (nresize) return; - const QSize sz = e->size(); + const TQSize sz = e->size(); //512 x 243 //spc x -> 5, spc y->7 // btn x ->30 , btny -> 28 @@ -669,8 +669,8 @@ void MainWidget::showConfigMenu() void MainWidget::updateFont() { if (tray->contextMenu()->isItemChecked(mnu_autores)){ - QFont fnt = this->font(); - fnt.setWeight(QFont::Bold); + TQFont fnt = this->font(); + fnt.setWeight(TQFont::Bold); //double rs = (100.0/700.0)*width(); double rp = (8.0/600.0)*width(); //fnt.setStretch(rs); @@ -684,13 +684,13 @@ void MainWidget::toggleNumericPad() if (extent_visible){ extent_visible=false; - QWidget::resize ( (int)sdxs, height() ); + TQWidget::resize ( (int)sdxs, height() ); extent->setText(">>"); } else{ extent_visible=true; extent->setText("<<"); - QWidget::resize ( (int)sdxb, height() ); + TQWidget::resize ( (int)sdxb, height() ); } nresize=false; } @@ -704,7 +704,7 @@ void MainWidget::chooseFont() } bool ok; - QFont font = QFontDialog::getFont( + TQFont font = TQFontDialog::getFont( &ok, this->font(), this ); if ( ok ) { // font is set to the font the user selected @@ -882,15 +882,15 @@ void MainWidget::setupText(VButton& v) long ret = keysym2ucs(keysym_l); - QString btn_text(QChar((uint)ret)); + TQString btn_text(TQChar((uint)ret)); v.setText(btn_text); - QString btn_upper(btn_text.upper()); + TQString btn_upper(btn_text.upper()); if (btn_upper==btn_text) { ret = keysym2ucs(keysym_u); - QChar c((uint)ret); + TQChar c((uint)ret); if (c=='&') v.setShiftText("&&"); else @@ -903,7 +903,7 @@ void MainWidget::setupText(VButton& v) void MainWidget::mappingNotify(XMappingEvent *) { - //QTimer::singleShot( 1000, this, SLOT(test()) ); + //TQTimer::singleShot( 1000, this, TQT_SLOT(test()) ); //if (e)XRefreshKeyboardMapping(e); //int index=0; @@ -920,28 +920,28 @@ void MainWidget::mappingNotify(XMappingEvent *) } KbdDock::KbdDock ( MainWidget *m ) - : DragWidget ( 0, "Dock", WStyle_Customize | Qt::WX11BypassWM |WStyle_NormalBorder ), mainWidget ( m ) + : DragWidget ( 0, "Dock", WStyle_Customize | TQt::WX11BypassWM |WStyle_NormalBorder ), mainWidget ( m ) { - setFocusPolicy ( NoFocus ); + setFocusPolicy ( TQ_NoFocus ); icn=UserIcon ( "dock" ); resize ( 96,47 ); - QToolTip::add ( this, "Toggle keyboard visibility" ); + TQToolTip::add ( this, "Toggle keyboard visibility" ); } -void KbdDock::paintEvent ( QPaintEvent * ) +void KbdDock::paintEvent ( TQPaintEvent * ) { - QPainter p ( this ); + TQPainter p ( this ); p.drawPixmap ( 0,0,icn ); } KbdDock::~KbdDock() {} -void KbdDock::mouseReleaseEvent ( QMouseEvent *e ) +void KbdDock::mouseReleaseEvent ( TQMouseEvent *e ) { - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); int x = abs(p.x()-gpress.x()); int y = abs(p.y()-gpress.y()); @@ -988,7 +988,7 @@ void KbdDock::mouseReleaseEvent ( QMouseEvent *e ) * * This software is in the public domain. Share and enjoy! * - * AUTOMATICALLY GENERATED FILE, DO NOT EDIT !!! (unicode/convmap.pl) + * AUTOMATICALLY GENERATED FILE, DO NOT EDIT !!! (tqunicode/convmap.pl) */ @@ -1205,7 +1205,7 @@ struct codepair { { 0x05da, 0x063a }, /* Arabic_ghain غ ARABIC LETTER GHAIN */ { 0x05e0, 0x0640 }, /* Arabic_tatweel ـ ARABIC TATWEEL */ { 0x05e1, 0x0641 }, /* Arabic_feh ف ARABIC LETTER FEH */ - { 0x05e2, 0x0642 }, /* Arabic_qaf ق ARABIC LETTER QAF */ + { 0x05e2, 0x0642 }, /* Arabic_qaf ق ARABIC LETTER TQAF */ { 0x05e3, 0x0643 }, /* Arabic_kaf ك ARABIC LETTER KAF */ { 0x05e4, 0x0644 }, /* Arabic_lam ل ARABIC LETTER LAM */ { 0x05e5, 0x0645 }, /* Arabic_meem م ARABIC LETTER MEEM */ @@ -1409,16 +1409,16 @@ struct codepair { /* 0x08b5 toprightsummation ? ??? */ /* 0x08b6 botrightsummation ? ??? */ /* 0x08b7 rightmiddlesummation ? ??? */ - { 0x08bc, 0x2264 }, /* lessthanequal ≤ LESS-THAN OR EQUAL TO */ - { 0x08bd, 0x2260 }, /* notequal ≠ NOT EQUAL TO */ - { 0x08be, 0x2265 }, /* greaterthanequal ≥ GREATER-THAN OR EQUAL TO */ + { 0x08bc, 0x2264 }, /* lessthanequal ≤ LESS-THAN OR ETQUAL TO */ + { 0x08bd, 0x2260 }, /* notequal ≠ NOT ETQUAL TO */ + { 0x08be, 0x2265 }, /* greaterthanequal ≥ GREATER-THAN OR ETQUAL TO */ { 0x08bf, 0x222b }, /* integral ∫ INTEGRAL */ { 0x08c0, 0x2234 }, /* therefore ∴ THEREFORE */ { 0x08c1, 0x221d }, /* variation ∝ PROPORTIONAL TO */ { 0x08c2, 0x221e }, /* infinity ∞ INFINITY */ { 0x08c5, 0x2207 }, /* nabla ∇ NABLA */ { 0x08c8, 0x223c }, /* approximate ∼ TILDE OPERATOR */ - { 0x08c9, 0x2243 }, /* similarequal ≃ ASYMPTOTICALLY EQUAL TO */ + { 0x08c9, 0x2243 }, /* similarequal ≃ ASYMPTOTICALLY ETQUAL TO */ { 0x08cd, 0x21d4 }, /* ifonlyif ⇔ LEFT RIGHT DOUBLE ARROW */ { 0x08ce, 0x21d2 }, /* implies ⇒ RIGHTWARDS DOUBLE ARROW */ { 0x08cf, 0x2261 }, /* identical ≡ IDENTICAL TO */ @@ -1497,10 +1497,10 @@ struct codepair { { 0x0acd, 0x25b7 }, /* rightopentriangle ▷ WHITE RIGHT-POINTING TRIANGLE */ { 0x0ace, 0x25cb }, /* emopencircle ○ WHITE CIRCLE */ { 0x0acf, 0x25af }, /* emopenrectangle ▯ WHITE VERTICAL RECTANGLE */ - { 0x0ad0, 0x2018 }, /* leftsinglequotemark ‘ LEFT SINGLE QUOTATION MARK */ - { 0x0ad1, 0x2019 }, /* rightsinglequotemark ’ RIGHT SINGLE QUOTATION MARK */ - { 0x0ad2, 0x201c }, /* leftdoublequotemark “ LEFT DOUBLE QUOTATION MARK */ - { 0x0ad3, 0x201d }, /* rightdoublequotemark ” RIGHT DOUBLE QUOTATION MARK */ + { 0x0ad0, 0x2018 }, /* leftsinglequotemark ‘ LEFT SINGLE TQUOTATION MARK */ + { 0x0ad1, 0x2019 }, /* rightsinglequotemark ’ RIGHT SINGLE TQUOTATION MARK */ + { 0x0ad2, 0x201c }, /* leftdoublequotemark “ LEFT DOUBLE TQUOTATION MARK */ + { 0x0ad3, 0x201d }, /* rightdoublequotemark ” RIGHT DOUBLE TQUOTATION MARK */ { 0x0ad4, 0x211e }, /* prescription ℞ PRESCRIPTION TAKE */ { 0x0ad6, 0x2032 }, /* minutes ′ PRIME */ { 0x0ad7, 0x2033 }, /* seconds ″ DOUBLE PRIME */ @@ -1539,8 +1539,8 @@ struct codepair { { 0x0afa, 0x2315 }, /* telephonerecorder ⌕ TELEPHONE RECORDER */ { 0x0afb, 0x2117 }, /* phonographcopyright ℗ SOUND RECORDING COPYRIGHT */ { 0x0afc, 0x2038 }, /* caret ‸ CARET */ - { 0x0afd, 0x201a }, /* singlelowquotemark ‚ SINGLE LOW-9 QUOTATION MARK */ - { 0x0afe, 0x201e }, /* doublelowquotemark „ DOUBLE LOW-9 QUOTATION MARK */ + { 0x0afd, 0x201a }, /* singlelowquotemark ‚ SINGLE LOW-9 TQUOTATION MARK */ + { 0x0afe, 0x201e }, /* doublelowquotemark „ DOUBLE LOW-9 TQUOTATION MARK */ /* 0x0aff cursor ? ??? */ { 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */ { 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */ @@ -1552,7 +1552,7 @@ struct codepair { { 0x0bc4, 0x230a }, /* downstile ⌊ LEFT FLOOR */ { 0x0bc6, 0x005f }, /* underbar _ LOW LINE */ { 0x0bca, 0x2218 }, /* jot ∘ RING OPERATOR */ - { 0x0bcc, 0x2395 }, /* quad ⎕ APL FUNCTIONAL SYMBOL QUAD */ + { 0x0bcc, 0x2395 }, /* quad ⎕ APL FUNCTIONAL SYMBOL TQUAD */ { 0x0bce, 0x22a4 }, /* uptack ⊤ DOWN TACK */ { 0x0bcf, 0x25cb }, /* circle ○ WHITE CIRCLE */ { 0x0bd3, 0x2308 }, /* upstile ⌈ LEFT CEILING */ @@ -1585,7 +1585,7 @@ struct codepair { { 0x0cf4, 0x05e4 }, /* hebrew_pe פ HEBREW LETTER PE */ { 0x0cf5, 0x05e5 }, /* hebrew_finalzade ץ HEBREW LETTER FINAL TSADI */ { 0x0cf6, 0x05e6 }, /* hebrew_zade צ HEBREW LETTER TSADI */ - { 0x0cf7, 0x05e7 }, /* hebrew_qoph ק HEBREW LETTER QOF */ + { 0x0cf7, 0x05e7 }, /* hebrew_qoph ק HEBREW LETTER TQOF */ { 0x0cf8, 0x05e8 }, /* hebrew_resh ר HEBREW LETTER RESH */ { 0x0cf9, 0x05e9 }, /* hebrew_shin ש HEBREW LETTER SHIN */ { 0x0cfa, 0x05ea }, /* hebrew_taw ת HEBREW LETTER TAV */ @@ -1803,14 +1803,14 @@ long MainWidget::keysym2ucs(KeySym keysym) return -1; } -KbdTray::KbdTray(QWidget *parent, const char *name) : KSystemTray(parent,name) +KbdTray::KbdTray(TQWidget *tqparent, const char *name) : KSystemTray(tqparent,name) { } -void KbdTray::mousePressEvent(QMouseEvent *e) +void KbdTray::mousePressEvent(TQMouseEvent *e) { - if (e->button()==LeftButton) { - QWidget *p = parentWidget(); + if (e->button()==Qt::LeftButton) { + TQWidget *p = tqparentWidget(); if (p){ if (p->isShown()){ p->hide(); diff --git a/src/MainWidget.h b/src/MainWidget.h index 0eb87ac..3df3089 100644 --- a/src/MainWidget.h +++ b/src/MainWidget.h @@ -21,14 +21,14 @@ #define KVKBDMAINWIDGET_H -#include -#include -#include +#include +#include +#include #include #include #include -#include -#include +#include +#include #include "resizabledragwidget.h" #include "VButton.h" @@ -41,8 +41,9 @@ class KbdTray; class MainWidget : public ResizableDragWidget { Q_OBJECT + TQ_OBJECT public: - MainWidget(KAboutData *about=0, bool tren=false, QWidget *parent=0,const char *name="", WFlags f=WStyle_Customize | Qt::WX11BypassWM |WStyle_NormalBorder); + MainWidget(KAboutData *about=0, bool tren=false, TQWidget *tqparent=0,const char *name="", WFlags f=WStyle_Customize | TQt::WX11BypassWM |WStyle_NormalBorder); void mappingNotify(XMappingEvent *e); void finishInit(); bool close ( bool alsoDelete ); @@ -68,8 +69,8 @@ public slots: void saveState(); protected: - void resizeEvent(QResizeEvent *e); - void hideEvent ( QHideEvent *e ); + void resizeEvent(TQResizeEvent *e); + void hideEvent ( TQHideEvent *e ); private: @@ -105,10 +106,10 @@ private: NumpadVButton *ins; NumpadVButton *del; - QValueList btns; - QValueList mod_keys; - QValueList other_keys; - QValueList numl_keys; + TQValueList btns; + TQValueList mod_keys; + TQValueList other_keys; + TQValueList numl_keys; void send_key(unsigned int keycode, bool press, bool release); @@ -134,21 +135,22 @@ private: class KbdDock : public DragWidget { Q_OBJECT + TQ_OBJECT public: KbdDock(MainWidget *m); ~KbdDock(); - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); private: - QPixmap icn; + TQPixmap icn; MainWidget *mainWidget; protected: - void mouseReleaseEvent(QMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); }; @@ -156,10 +158,10 @@ class KbdTray : public KSystemTray { public: - KbdTray( QWidget* parent = 0, const char* name = 0 ); + KbdTray( TQWidget* tqparent = 0, const char* name = 0 ); protected: - void mousePressEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *); }; diff --git a/src/VButton.cpp b/src/VButton.cpp index 33ef1f5..9453c30 100644 --- a/src/VButton.cpp +++ b/src/VButton.cpp @@ -1,15 +1,15 @@ #include "VButton.h" -#include -#include +#include +#include double VButton::pw=550.0; double VButton::ph=235.0; -VButton::VButton(QWidget *parent, const char *name): QPushButton (parent,name) +VButton::VButton(TQWidget *tqparent, const char *name): TQPushButton (tqparent,name) { - //connect(this,SIGNAL(clicked()),this,SLOT(sendKey())); - setFocusPolicy(NoFocus); + //connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(sendKey())); + setFocusPolicy(TQ_NoFocus); resize(30,30); press=false; @@ -21,42 +21,42 @@ VButton::~VButton() void VButton::shiftPressed(bool press) { if (press==true){ - QString tu=l.upper(); + TQString tu=l.upper(); if (tu.compare(l)==0){ - //QPushButton::setText(tu); - QPushButton::setText(u); + //TQPushButton::setText(tu); + TQPushButton::setText(u); } else{ - QPushButton::setText(tu); + TQPushButton::setText(tu); } } else{ - QPushButton::setText(l); + TQPushButton::setText(l); } } void VButton::capsPressed(bool press) { if (press==true){ - QString tu=l.upper(); + TQString tu=l.upper(); if (tu.compare(l)==0){ - QPushButton::setText(tu); + TQPushButton::setText(tu); } else{ - QPushButton::setText(u); + TQPushButton::setText(u); } } else{ - QPushButton::setText(l); + TQPushButton::setText(l); } } -void VButton::setText(const QString& text) +void VButton::setText(const TQString& text) { - QPushButton::setText(text); + TQPushButton::setText(text); l=text; } -void VButton::setShiftText(const QString& text) +void VButton::setShiftText(const TQString& text) { u=text; } @@ -87,26 +87,26 @@ void VButton::reposition(int width, int height) } void VButton::res() { - orig_size=geometry(); + orig_size=tqgeometry(); } -void VButton::mousePressEvent(QMouseEvent * e) +void VButton::mousePressEvent(TQMouseEvent * e) { press=true; - QPushButton::mousePressEvent(e); + TQPushButton::mousePressEvent(e); sendKey(); startTimer(500); } -void VButton::mouseReleaseEvent(QMouseEvent * e) +void VButton::mouseReleaseEvent(TQMouseEvent * e) { press=false; - QPushButton::mouseReleaseEvent(e); - killTimers(); + TQPushButton::mouseReleaseEvent(e); + TQT_TQOBJECT(this)->killTimers(); inrpt=false; } -void VButton::timerEvent(QTimerEvent *) +void VButton::timerEvent(TQTimerEvent *) { if (!press){ inrpt=false; diff --git a/src/VButton.h b/src/VButton.h index 1c82877..06d22b6 100644 --- a/src/VButton.h +++ b/src/VButton.h @@ -1,19 +1,20 @@ #ifndef VBUTTON_H #define VBUTTON_H -#include -#include +#include +#include -class VButton : public QPushButton +class VButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - VButton(QWidget *parent=0, const char *name=0); + VButton(TQWidget *tqparent=0, const char *name=0); ~VButton(); void setKeyCode(unsigned int keycode); unsigned int getKeyCode(); - void setText(const QString& text); - void setShiftText(const QString& text); + void setText(const TQString& text); + void setShiftText(const TQString& text); void capsPressed(bool press); @@ -28,18 +29,18 @@ private: protected: unsigned int keycode; - QString u; - QString l; - QRect orig_size; - void timerEvent ( QTimerEvent * ); + TQString u; + TQString l; + TQRect orig_size; + void timerEvent ( TQTimerEvent * ); public slots: void sendKey(); void shiftPressed(bool press); protected slots: - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); signals: void keyClick(unsigned int keycode); diff --git a/src/main.cpp b/src/main.cpp index 01c5148..8cf881c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -66,7 +66,7 @@ void findAloneWindow() for (i = 0; i < numkids; ++i) { XFetchName(dipsy, kids[i], &win_name); - QString c(win_name); + TQString c(win_name); if (c=="kvkbdalone") { @@ -109,12 +109,12 @@ public: c << "state()"; return c; } - bool process(const QCString &fun, const QByteArray &data, - QCString &replyType, QByteArray &replyData) { + bool process(const TQCString &fun, const TQByteArray &data, + TQCString &replyType, TQByteArray &replyData) { - QDataStream io(replyData,IO_WriteOnly); - replyType="QCString"; + TQDataStream io(replyData,IO_WriteOnly); + replyType="TQCString"; MainWidget *main = (MainWidget *)mainWidget(); if (main) { if (fun == "show()") { @@ -154,16 +154,16 @@ public: }; -class KvkbdApp : public QApplication +class KvkbdApp : public TQApplication { public: - KvkbdApp(int argc, char** argv, bool gui):QApplication(argc,argv,gui){ + KvkbdApp(int argc, char** argv, bool gui):TQApplication(argc,argv,gui){ }; bool x11EventFilter ( XEvent *event ) { if (event->type == DestroyNotify) { - QApplication::exit(); + TQApplication::exit(); } else if (event->type == MappingNotify) { diff --git a/src/numpadvbutton.cpp b/src/numpadvbutton.cpp index 37ea883..7f0a072 100644 --- a/src/numpadvbutton.cpp +++ b/src/numpadvbutton.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ #include "numpadvbutton.h" -NumpadVButton::NumpadVButton(QWidget *parent, const char *name) - : VButton(parent, name) +NumpadVButton::NumpadVButton(TQWidget *tqparent, const char *name) + : VButton(tqparent, name) { } @@ -33,11 +33,11 @@ NumpadVButton::~NumpadVButton() void NumpadVButton::numlockPressed(bool press) { if (press==true){ - QPushButton::setText(u); + TQPushButton::setText(u); VButton::setKeyCode(numlock_code); } else{ - QPushButton::setText(l); + TQPushButton::setText(l); VButton::setKeyCode(cursor_code); } } diff --git a/src/numpadvbutton.h b/src/numpadvbutton.h index ff0457f..e908758 100644 --- a/src/numpadvbutton.h +++ b/src/numpadvbutton.h @@ -28,8 +28,9 @@ class NumpadVButton : public VButton { Q_OBJECT + TQ_OBJECT public: - NumpadVButton(QWidget *parent = 0, const char *name = 0); + NumpadVButton(TQWidget *tqparent = 0, const char *name = 0); ~NumpadVButton(); void numlockPressed(bool press); void setKeyCode(unsigned int keycode, unsigned int n_keycode); diff --git a/src/resizabledragwidget.cpp b/src/resizabledragwidget.cpp index 0a3510b..637dd87 100644 --- a/src/resizabledragwidget.cpp +++ b/src/resizabledragwidget.cpp @@ -18,12 +18,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "resizabledragwidget.h" -#include +#include #include "kmessagebox.h" -#include "qpainter.h" +#include "tqpainter.h" -ResizableDragWidget::ResizableDragWidget(QWidget *parent, const char *name, WFlags f) - : DragWidget(parent,name,f) +ResizableDragWidget::ResizableDragWidget(TQWidget *tqparent, const char *name, WFlags f) + : DragWidget(tqparent,name,f) { rsz=false; @@ -34,29 +34,29 @@ ResizableDragWidget::~ResizableDragWidget() { } -void ResizableDragWidget::mousePressEvent(QMouseEvent * e) +void ResizableDragWidget::mousePressEvent(TQMouseEvent * e) { - QPoint pos = e->pos(); + TQPoint pos = e->pos(); if (pos.x()>width()-20 && pos.x()height()-20 && pos.y()pos().x(),height()-e->pos().y()); + dragP=TQPoint(width()-e->pos().x(),height()-e->pos().y()); } else { DragWidget::mousePressEvent(e); } } -void ResizableDragWidget::mouseMoveEvent(QMouseEvent * e) +void ResizableDragWidget::mouseMoveEvent(TQMouseEvent * e) { if (!rsz){ DragWidget::mouseMoveEvent(e); return; } - QPoint curr(e->globalPos().x(),e->globalPos().y()); - QPoint pos = QWidget::pos(); - //QPoint curr(e->globalPos().x()-dragP.x(),e->globalPos().y()-dragP.y()); + TQPoint curr(e->globalPos().x(),e->globalPos().y()); + TQPoint pos = TQWidget::pos(); + //TQPoint curr(e->globalPos().x()-dragP.x(),e->globalPos().y()-dragP.y()); int nw = curr.x()-pos.x()+dragP.x(); int nh = curr.y()-pos.y()+dragP.y(); @@ -64,7 +64,7 @@ void ResizableDragWidget::mouseMoveEvent(QMouseEvent * e) } -void ResizableDragWidget::mouseReleaseEvent(QMouseEvent * e) +void ResizableDragWidget::mouseReleaseEvent(TQMouseEvent * e) { if (!rsz){ DragWidget::mouseReleaseEvent(e); @@ -74,16 +74,16 @@ void ResizableDragWidget::mouseReleaseEvent(QMouseEvent * e) rsz=false; } -void ResizableDragWidget::paintEvent(QPaintEvent *) +void ResizableDragWidget::paintEvent(TQPaintEvent *) { - QPainter p(this); + TQPainter p(this); for (int a=0;a<20;a+=5){ - p.setPen(QColor(170,0,0)); + p.setPen(TQColor(170,0,0)); p.drawLine(width()-20+a,height()-2,width()-2,height()-20+a); - p.setPen(QColor(200,0,0)); + p.setPen(TQColor(200,0,0)); p.drawLine(width()-19+a,height()-2,width()-2,height()-19+a); } diff --git a/src/resizabledragwidget.h b/src/resizabledragwidget.h index c610d85..cd9be3c 100644 --- a/src/resizabledragwidget.h +++ b/src/resizabledragwidget.h @@ -28,17 +28,18 @@ class ResizableDragWidget : public DragWidget { Q_OBJECT + TQ_OBJECT public: - ResizableDragWidget(QWidget *parent, const char *name, WFlags f); + ResizableDragWidget(TQWidget *tqparent, const char *name, WFlags f); ~ResizableDragWidget(); private: bool rsz; protected: - virtual void mouseMoveEvent ( QMouseEvent * e ); - virtual void mousePressEvent ( QMouseEvent * e ); - virtual void mouseReleaseEvent ( QMouseEvent * e ); - virtual void paintEvent ( QPaintEvent *e ); + virtual void mouseMoveEvent ( TQMouseEvent * e ); + virtual void mousePressEvent ( TQMouseEvent * e ); + virtual void mouseReleaseEvent ( TQMouseEvent * e ); + virtual void paintEvent ( TQPaintEvent *e ); }; #endif