From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- lib/koproperty/test/test.cpp | 52 ++++++++++++++++++++++---------------------- lib/koproperty/test/test.h | 1 + 2 files changed, 27 insertions(+), 26 deletions(-) (limited to 'lib/koproperty/test') diff --git a/lib/koproperty/test/test.cpp b/lib/koproperty/test/test.cpp index 2c7c7561..df0ec956 100644 --- a/lib/koproperty/test/test.cpp +++ b/lib/koproperty/test/test.cpp @@ -23,11 +23,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -44,15 +44,15 @@ Test::Test() const bool readOnly = args->isSet("ro"); // setXMLFile("testui.rc"); - QFont f; + TQFont f; f.setPixelSize(f.pixelSize()*2/3); setFont(f); /* First, create the Set which will hold the properties. */ Property *p = 0; - m_set = new Set(this, "test"); + m_set = new Set(TQT_TQOBJECT(this), "test"); m_set->setReadOnly(readOnly); - QCString group; + TQCString group; if (!flat) { group = "SimpleGroup"; m_set->setGroupDescription(group, "Simple Group"); @@ -62,22 +62,22 @@ Test::Test() m_set->addProperty(new Property("Int", 2, "Int"), group); m_set->addProperty(new Property("Double", 3.1415,"Double"), group); - m_set->addProperty(new Property("Bool", QVariant(true, 4), "Bool"), group); - m_set->addProperty(p = new Property("3 States", QVariant(), "3 States", "", Boolean), group); + m_set->addProperty(new Property("Bool", TQVariant(true, 4), "Bool"), group); + m_set->addProperty(p = new Property("3 States", TQVariant(), "3 States", "", Boolean), group); p->setOption("3rdState", "None"); - m_set->addProperty(p = new Property("Date", QDate::currentDate(),"Date"), group); + m_set->addProperty(p = new Property("Date", TQDate::tqcurrentDate(),"Date"), group); p->setIcon("date"); - m_set->addProperty(new Property("Time", QTime::currentTime(),"Time"), group); - m_set->addProperty(new Property("DateTime", QDateTime::currentDateTime(),"Date/Time"), group); + m_set->addProperty(new Property("Time", TQTime::currentTime(),"Time"), group); + m_set->addProperty(new Property("DateTime", TQDateTime::tqcurrentDateTime(),"Date/Time"), group); - QStringList list;//keys + TQStringList list;//keys list << "myitem" << "otheritem" << "3rditem"; - QStringList name_list; //strings + TQStringList name_list; //strings name_list << "My Item" << "Other Item" << "Third Item"; m_set->addProperty(new Property("List", list, name_list, "otheritem", "List"), group); - // A valueFromList property matching strings with ints (could be any type supported by QVariant) - QValueList keys; + // A valueFromList property matching strings with ints (could be any type supported by TQVariant) + TQValueList keys; keys.append(1); keys.append(2); keys.append(3); @@ -89,9 +89,9 @@ Test::Test() group = "ComplexGroup"; m_set->setGroupDescription(group, "Complex Group"); } - m_set->addProperty(new Property("Rect", this->geometry(),"Rect"), group); - m_set->addProperty(new Property("Point", QPoint(3,4), "Point"), group); - m_set->addProperty(new Property("Size", QPoint(3,4), "Size"), group); + m_set->addProperty(new Property("Rect", this->tqgeometry(),"Rect"), group); + m_set->addProperty(new Property("Point", TQPoint(3,4), "Point"), group); + m_set->addProperty(new Property("Size", TQPoint(3,4), "Size"), group); // Appearance if (!flat) { @@ -99,22 +99,22 @@ Test::Test() m_set->setGroupDescription(group, "Appearance Group"); m_set->setGroupIcon(group, "appearance"); } - m_set->addProperty(new Property("Color", this->paletteBackgroundColor(),"Color"), group); - QPixmap pm(DesktopIcon("network")); + m_set->addProperty(new Property("Color", TQColor(this->paletteBackgroundColor()),"Color"), group); + TQPixmap pm(DesktopIcon("network")); m_set->addProperty(p = new Property("Pixmap", pm,"Pixmap"), group); p->setIcon("kpaint"); - m_set->addProperty(p = new Property("Font", this->font(),"Font"), group); + m_set->addProperty(p = new Property("Font", TQFont(this->font()),"Font"), group); p->setIcon("fonts"); - m_set->addProperty(new Property("Cursor", QCursor(Qt::WaitCursor),"Cursor"), group); + m_set->addProperty(new Property("Cursor", TQCursor(TQt::WaitCursor),"Cursor"), group); m_set->addProperty(new Property("LineStyle", 3, "Line Style", "", LineStyle), group); - m_set->addProperty(new Property("SizePolicy", sizePolicy(), "Size Policy"), group); + m_set->addProperty(new Property("SizePolicy", tqsizePolicy(), "Size Policy"), group); // kdDebug() << m_set->groupNames() << endl; Editor *edit = new Editor(this,true/*autosync*/); setCentralWidget(edit); edit->changeSet(m_set); - resize(400,qApp->desktop()->height()-200); + resize(400,tqApp->desktop()->height()-200); move(x(),5); edit->setFocus(); } diff --git a/lib/koproperty/test/test.h b/lib/koproperty/test/test.h index cef6e97a..b0a278c8 100644 --- a/lib/koproperty/test/test.h +++ b/lib/koproperty/test/test.h @@ -36,6 +36,7 @@ class Test : public KMainWindow { Q_OBJECT + TQ_OBJECT public: Test(); virtual ~Test(); -- cgit v1.2.1