From 479f5f799523bffbcc83dff581a2299c047c6fff Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:44:01 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kjsembed/docs/embedding/qtembed/main.cpp | 4 ++-- kjsembed/docs/embedding/qtembed/posviewimp.cpp | 8 +++---- kjsembed/docs/embedding/qtembed/posviewimp.h | 2 +- .../docs/embedding/simple-embed/embedviewimp.cpp | 28 +++++++++++----------- .../docs/embedding/simple-embed/embedviewimp.h | 8 +++---- 5 files changed, 25 insertions(+), 25 deletions(-) (limited to 'kjsembed/docs/embedding') diff --git a/kjsembed/docs/embedding/qtembed/main.cpp b/kjsembed/docs/embedding/qtembed/main.cpp index b2d7d3d1..fbf8541b 100644 --- a/kjsembed/docs/embedding/qtembed/main.cpp +++ b/kjsembed/docs/embedding/qtembed/main.cpp @@ -5,12 +5,12 @@ // // -#include +#include #include "posviewimp.h" int main ( int argc, char ** argv ) { - QApplication app( argc, argv ); + TQApplication app( argc, argv ); POSViewImp *view = new POSViewImp; app.setMainWidget(view); view->show(); diff --git a/kjsembed/docs/embedding/qtembed/posviewimp.cpp b/kjsembed/docs/embedding/qtembed/posviewimp.cpp index 7d4aebc9..a9c3c289 100644 --- a/kjsembed/docs/embedding/qtembed/posviewimp.cpp +++ b/kjsembed/docs/embedding/qtembed/posviewimp.cpp @@ -10,11 +10,11 @@ #include #include -#include -#include -#include +#include +#include +#include -POSViewImp::POSViewImp(QWidget *parent, const char *name) +POSViewImp::POSViewImp(TQWidget *parent, const char *name) :POSViewBase(parent, name) { m_part = new KJSEmbed::KJSEmbedPart(0, "kjsembed_part", this,"JSEmbed"); diff --git a/kjsembed/docs/embedding/qtembed/posviewimp.h b/kjsembed/docs/embedding/qtembed/posviewimp.h index 3fce0965..764ac813 100644 --- a/kjsembed/docs/embedding/qtembed/posviewimp.h +++ b/kjsembed/docs/embedding/qtembed/posviewimp.h @@ -15,7 +15,7 @@ namespace KJSEmbed { class POSViewImp: public POSViewBase { Q_OBJECT public: - POSViewImp( QWidget *parent = 0, const char *name = 0 ); + POSViewImp( TQWidget *parent = 0, const char *name = 0 ); public slots: void loadScript(); diff --git a/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp b/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp index a1355909..b71521d5 100644 --- a/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp +++ b/kjsembed/docs/embedding/simple-embed/embedviewimp.cpp @@ -10,12 +10,12 @@ #include "embedviewimp.h" #include -#include +#include -#include -#include +#include +#include -EmbedViewImp::EmbedViewImp(QWidget *parent, const char *name) +EmbedViewImp::EmbedViewImp(TQWidget *parent, const char *name) :EmbedView(parent, name) { m_part = new KJSEmbed::KJSEmbedPart(0, "kjsembed_part", this,"JSEmbed"); @@ -30,10 +30,10 @@ void EmbedViewImp::okClicked() { KJS::List args; KJS::Value val = m_part->callMethod("handleOk", args); - QMap personalData = KJSEmbed::convertToVariant(m_part->globalExec(), val).toMap(); - QDate birthday = personalData["birthday"].toDate(); - QColor eyecolor = personalData["eyeColor"].toColor(); - QString notes = personalData["notes"].toString(); + TQMap personalData = KJSEmbed::convertToVariant(m_part->globalExec(), val).toMap(); + TQDate birthday = personalData["birthday"].toDate(); + TQColor eyecolor = personalData["eyeColor"].toColor(); + TQString notes = personalData["notes"].toString(); kdDebug() << "birthday: " << birthday << endl; kdDebug() << "eyecolor: " << eyecolor << endl; @@ -53,23 +53,23 @@ void EmbedViewImp::consoleClicked() m_part->view()->setHidden(!m_part->view()->isHidden()); } -bool EmbedViewImp::runScript( const QString &file ) +bool EmbedViewImp::runScript( const TQString &file ) { return m_part->runFile(file, m_part->globalObject() ); } -QVariant EmbedViewImp::someValue() const +TQVariant EmbedViewImp::someValue() const { - QMap returnMap; + TQMap returnMap; returnMap["name"] = m_name->text(); returnMap["title"] = m_title->text(); returnMap["dept"] = m_dept->text(); - return QVariant(returnMap); + return TQVariant(returnMap); } -void EmbedViewImp::setSomeValue( const QVariant &val ) +void EmbedViewImp::setSomeValue( const TQVariant &val ) { - QMap map = val.toMap(); + TQMap map = val.toMap(); m_name->setText(map["name"].toString()); m_title->setText(map["title"].toString()); m_dept->setText(map["dept"].toString()); diff --git a/kjsembed/docs/embedding/simple-embed/embedviewimp.h b/kjsembed/docs/embedding/simple-embed/embedviewimp.h index c56f078c..7c678a32 100644 --- a/kjsembed/docs/embedding/simple-embed/embedviewimp.h +++ b/kjsembed/docs/embedding/simple-embed/embedviewimp.h @@ -16,17 +16,17 @@ class EmbedViewImp: public EmbedView { Q_OBJECT public: - EmbedViewImp( QWidget *parent = 0, const char *name = 0 ); + EmbedViewImp( TQWidget *parent = 0, const char *name = 0 ); - bool runScript( const QString &file ); + bool runScript( const TQString &file ); public slots: virtual void cancelClicked(); virtual void okClicked(); virtual void consoleClicked(); - QVariant someValue() const; - void setSomeValue( const QVariant &var ); + TQVariant someValue() const; + void setSomeValue( const TQVariant &var ); private: KJSEmbed::KJSEmbedPart *m_part; }; -- cgit v1.2.1