summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/spring.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/formeditor/spring.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/formeditor/spring.cpp')
-rw-r--r--kexi/formeditor/spring.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kexi/formeditor/spring.cpp b/kexi/formeditor/spring.cpp
index e09cc2d7..4bea0294 100644
--- a/kexi/formeditor/spring.cpp
+++ b/kexi/formeditor/spring.cpp
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qsizepolicy.h>
-#include <qpainter.h>
-#include <qdom.h>
-#include <qvariant.h>
+#include <tqsizepolicy.h>
+#include <tqpainter.h>
+#include <tqdom.h>
+#include <tqvariant.h>
#include <kdebug.h>
@@ -33,54 +33,54 @@
#include "spring.h"
-Spring::Spring(QWidget *parent, const char *name)
- : QWidget(parent, name)
+Spring::Spring(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
m_edit = true;
- m_orient = Horizontal;
- setSizeType((SizeType)QSizePolicy::Expanding);
+ m_orient =Qt::Horizontal;
+ setSizeType((SizeType)TQSizePolicy::Expanding);
}
void
-Spring::setOrientation(Orientation orient)
+Spring::setOrientation(Qt::Orientation orient)
{
SizeType type = sizeType();
m_orient = orient;
setSizeType(type);
- repaint();
+ tqrepaint();
}
Spring::SizeType
Spring::sizeType() const
{
- if(m_orient == Vertical)
- return (SizeType)sizePolicy().verData();
+ if(m_orient ==Qt::Vertical)
+ return (SizeType)tqsizePolicy().verData();
else
- return (SizeType)sizePolicy().horData();
+ return (SizeType)tqsizePolicy().horData();
}
void
Spring::setSizeType(SizeType size)
{
- if(m_orient == Vertical)
- setSizePolicy(QSizePolicy::Minimum, (QSizePolicy::SizeType)size);
+ if(m_orient ==Qt::Vertical)
+ tqsetSizePolicy(TQSizePolicy::Minimum, (TQSizePolicy::SizeType)size);
else
- setSizePolicy( (QSizePolicy::SizeType)size, QSizePolicy::Minimum);
+ tqsetSizePolicy( (TQSizePolicy::SizeType)size, TQSizePolicy::Minimum);
}
void
-Spring::paintEvent(QPaintEvent *ev)
+Spring::paintEvent(TQPaintEvent *ev)
{
if(!m_edit)
return;
- QPainter p(this);
+ TQPainter p(this);
if(!ev->erased())
p.eraseRect(0,0,width(), height());
- p.setPen(QPen(Qt::white, 1));
- p.setRasterOp(Qt::XorROP);
- QPointArray pa(4);
- if(m_orient == Vertical) {
+ p.setPen(TQPen(TQt::white, 1));
+ p.setRasterOp(TQt::XorROP);
+ TQPointArray pa(4);
+ if(m_orient ==Qt::Vertical) {
uint part = (height()+16) / 16;
if (part<3)
part=3;
@@ -113,7 +113,7 @@ Spring::paintEvent(QPaintEvent *ev)
}
bool
-Spring::isPropertyVisible(const QCString &name)
+Spring::isPropertyVisible(const TQCString &name)
{
if((name == "name") || (name == "sizeType") || (name == "orientation") || (name == "geometry"))
return true;
@@ -123,10 +123,10 @@ Spring::isPropertyVisible(const QCString &name)
void
-Spring::saveSpring(KFormDesigner::ObjectTreeItem *item, QDomElement &parentNode, QDomDocument &domDoc, bool insideGridLayout)
+Spring::saveSpring(KFormDesigner::ObjectTreeItem *item, TQDomElement &tqparentNode, TQDomDocument &domDoc, bool insideGridLayout)
{
- QDomElement tclass = domDoc.createElement("spacer");
- parentNode.appendChild(tclass);
+ TQDomElement tclass = domDoc.createElement("spacer");
+ tqparentNode.appendChild(tclass);
if(insideGridLayout)
{
@@ -141,13 +141,13 @@ Spring::saveSpring(KFormDesigner::ObjectTreeItem *item, QDomElement &parentNode,
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "name", item->widget()->property("name"), item->widget());
- if(parentNode.tagName() == "widget")
+ if(tqparentNode.tagName() == "widget")
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "geometry", item->widget()->property("geometry"), item->widget());
- if(!item->widget()->sizeHint().isValid())
- KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeHint", item->widget()->property("size"), item->widget());
+ if(!item->widget()->tqsizeHint().isValid())
+ KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "tqsizeHint", item->widget()->property("size"), item->widget());
else
- KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeHint", item->widget()->property("sizeHint"), item->widget());
+ KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "tqsizeHint", item->widget()->property("tqsizeHint"), item->widget());
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "orientation", item->widget()->property("orientation"), item->widget());
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeType", item->widget()->property("sizeType"), item->widget());