diff options
Diffstat (limited to 'src/MainWidget.cpp')
-rw-r--r-- | src/MainWidget.cpp | 224 |
1 files changed, 112 insertions, 112 deletions
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 <kiconloader.h> #include <khelpmenu.h> -#include <qtooltip.h> +#include <tqtooltip.h> #include <math.h> -#include <qfont.h> -#include <qfontdialog.h> +#include <tqfont.h> +#include <tqfontdialog.h> #include <kconfig.h> #include <kapplication.h> @@ -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;a<R2LEN;a++ ) { @@ -159,7 +159,7 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch //v->setShiftText ( 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;a<R3LEN;a++ ) { @@ -212,14 +212,14 @@ MainWidget::MainWidget ( KAboutData *about, bool tren, QWidget *parent, const ch v->move ( 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(); |