summaryrefslogtreecommitdiffstats
path: root/src/VButton.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 20:48:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 20:48:12 +0000
commite0e4bf64073ac54a136c2b42b5530687b246f24a (patch)
tree2f68d9a750bb8349928a2020d9640d63040e4af4 /src/VButton.cpp
parentf2c25668ebf4de0e17c6558c1d8e3051057b55fd (diff)
downloadkvkbd-e0e4bf64073ac54a136c2b42b5530687b246f24a.tar.gz
kvkbd-e0e4bf64073ac54a136c2b42b5530687b246f24a.zip
TQt4 port kvkbd
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvkbd@1239029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/VButton.cpp')
-rw-r--r--src/VButton.cpp48
1 files changed, 24 insertions, 24 deletions
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 <qvbox.h>
-#include <qfont.h>
+#include <tqvbox.h>
+#include <tqfont.h>
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;