diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/koproperty/test | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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 'lib/koproperty/test')
-rw-r--r-- | lib/koproperty/test/test.cpp | 52 | ||||
-rw-r--r-- | lib/koproperty/test/test.h | 1 |
2 files changed, 27 insertions, 26 deletions
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 <kcmdlineargs.h> #include <kiconloader.h> -#include <qpixmap.h> -#include <qstringlist.h> -#include <qdatetimeedit.h> -#include <qcursor.h> -#include <qapplication.h> +#include <tqpixmap.h> +#include <tqstringlist.h> +#include <tqdatetimeedit.h> +#include <tqcursor.h> +#include <tqapplication.h> #include <koproperty/property.h> #include <koproperty/editor.h> @@ -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<QVariant> keys; + // A valueFromList property matching strings with ints (could be any type supported by TQVariant) + TQValueList<TQVariant> 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(); |