diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-17 22:17:08 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-17 22:17:08 +0000 |
commit | f138d74fe16092003b06f5bde9663841929cde7f (patch) | |
tree | e9c497a0e59bc7d34264ac9404740d2ea76f3de4 /kttsd/kttsjobmgr | |
parent | 3a3c4b256baee79bdcfe72c5e01b9ded9b525900 (diff) | |
download | tdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.tar.gz tdeaccessibility-f138d74fe16092003b06f5bde9663841929cde7f.zip |
TQt4 port kdeaccessibility
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1237325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kttsd/kttsjobmgr')
-rw-r--r-- | kttsd/kttsjobmgr/kttsjobmgr.cpp | 34 | ||||
-rw-r--r-- | kttsd/kttsjobmgr/kttsjobmgr.h | 11 |
2 files changed, 24 insertions, 21 deletions
diff --git a/kttsd/kttsjobmgr/kttsjobmgr.cpp b/kttsd/kttsjobmgr/kttsjobmgr.cpp index 4d80bb4..097d594 100644 --- a/kttsd/kttsjobmgr/kttsjobmgr.cpp +++ b/kttsd/kttsjobmgr/kttsjobmgr.cpp @@ -65,10 +65,10 @@ KttsJobMgrFactory::~KttsJobMgrFactory() s_instance = 0; } -TQObject *KttsJobMgrFactory::createObject(TQObject *parent, const char *name, const char*, +TQObject *KttsJobMgrFactory::createObject(TQObject *tqparent, const char *name, const char*, const TQStringList& ) { - TQObject *obj = new KttsJobMgrPart((TQWidget*)parent, name); + TQObject *obj = new KttsJobMgrPart((TQWidget*)tqparent, name); emit objectCreated(obj); return obj; } @@ -86,10 +86,10 @@ KAboutData *KttsJobMgrFactory::aboutData() return about; } -KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : +KttsJobMgrPart::KttsJobMgrPart(TQWidget *tqparent, const char *name) : DCOPStub("kttsd", "KSpeech"), DCOPObject("kttsjobmgr_kspeechsink"), - KParts::ReadOnlyPart(parent, name) + KParts::ReadOnlyPart(TQT_TQOBJECT(tqparent), name) { // Initialize some variables. m_selectOnTextSet = false; @@ -101,12 +101,12 @@ KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : KGlobal::locale()->insertCatalogue("kttsd"); // Create a TQVBox to host everything. - TQVBox* vBox = new TQVBox(parent); + TQVBox* vBox = new TQVBox(tqparent); vBox->setMargin(6); // Create a splitter to contain the Job List View and the current sentence. TQSplitter* splitter = new TQSplitter(vBox); - splitter->setOrientation(TQSplitter::Vertical); + splitter->setOrientation(Qt::Vertical); // Create Job List View widget. m_jobListView = new KListView(splitter, "joblistview"); @@ -163,7 +163,7 @@ KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : hbox3->setSpacing(6); // Do not let button box stretch vertically. - m_buttonBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); + m_buttonBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); // All the buttons with "job_" at start of their names will be enabled/disabled when a job is // selected in the Job List View. @@ -274,7 +274,7 @@ KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) : // Create a label for current sentence. TQLabel* currentSentenceLabel = new TQLabel(sentenceVBox); - currentSentenceLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); + currentSentenceLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); currentSentenceLabel->setText(i18n("Current Sentence")); // Create a box to contain the current sentence. @@ -490,7 +490,7 @@ void KttsJobMgrPart::slot_job_change_talker() { TQString talkerID = item->text(jlvcTalkerID); TQStringList talkerIDs = m_talkerCodesToTalkerIDs.values(); - int ndx = talkerIDs.findIndex(talkerID); + int ndx = talkerIDs.tqfindIndex(talkerID); TQString talkerCode; if (ndx >= 0) talkerCode = m_talkerCodesToTalkerIDs.keys()[ndx]; SelectTalkerDlg dlg(widget(), "selecttalkerdialog", i18n("Select Talker"), talkerCode, true); @@ -506,7 +506,7 @@ void KttsJobMgrPart::slot_job_change_talker() void KttsJobMgrPart::slot_speak_clipboard() { // Get the clipboard object. - QClipboard *cb = kapp->clipboard(); + TQClipboard *cb = kapp->tqclipboard(); // Copy text from the clipboard. @@ -518,7 +518,7 @@ void KttsJobMgrPart::slot_speak_clipboard() { if (supportsMarkup(NULL, KSpeech::mtHtml)) { - TQByteArray d = data->encodedData("text/html"); + TQByteArray d = data->tqencodedData("text/html"); text = TQString(d); } } @@ -526,7 +526,7 @@ void KttsJobMgrPart::slot_speak_clipboard() { if (supportsMarkup(NULL, KSpeech::mtSsml)) { - TQByteArray d = data->encodedData("text/ssml"); + TQByteArray d = data->tqencodedData("text/ssml"); text = TQString(d); } } @@ -632,7 +632,7 @@ int KttsJobMgrPart::getCurrentJobPartCount() */ TQListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum) { - return m_jobListView->findItem(TQString::number(jobNum), jlvcJobNum); + return m_jobListView->tqfindItem(TQString::number(jobNum), jlvcJobNum); } /** @@ -746,7 +746,7 @@ void KttsJobMgrPart::autoSelectInJobListView() TQString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const TQString& talkerCode) { // If in the cache, return that. - if (m_talkerCodesToTalkerIDs.contains(talkerCode)) + if (m_talkerCodesToTalkerIDs.tqcontains(talkerCode)) return m_talkerCodesToTalkerIDs[talkerCode]; else { @@ -952,7 +952,7 @@ ASYNC KttsJobMgrPart::textFinished(const TQCString&, const uint jobNum) // Update sentence pointer, since signal may not be emitted for final CR. refreshJob(jobNum); } - m_currentSentence->setText(TQString::null); + m_currentSentence->setText(TQString()); } /** @@ -1013,8 +1013,8 @@ ASYNC KttsJobMgrPart::textRemoved(const TQCString&, const uint jobNum) autoSelectInJobListView(); } -KttsJobMgrBrowserExtension::KttsJobMgrBrowserExtension(KttsJobMgrPart *parent) - : KParts::BrowserExtension(parent, "KttsJobMgrBrowserExtension") +KttsJobMgrBrowserExtension::KttsJobMgrBrowserExtension(KttsJobMgrPart *tqparent) + : KParts::BrowserExtension(tqparent, "KttsJobMgrBrowserExtension") { } diff --git a/kttsd/kttsjobmgr/kttsjobmgr.h b/kttsd/kttsjobmgr/kttsjobmgr.h index 6274723..216531d 100644 --- a/kttsd/kttsjobmgr/kttsjobmgr.h +++ b/kttsd/kttsjobmgr/kttsjobmgr.h @@ -37,12 +37,13 @@ class KTextEdit; class KttsJobMgrFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: KttsJobMgrFactory() {}; virtual ~KttsJobMgrFactory(); - virtual TQObject* createObject(TQObject* parent = 0, const char* name = 0, - const char* classname = "TQObject", + virtual TQObject* createObject(TQObject* tqparent = 0, const char* name = 0, + const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); static KInstance *instance(); @@ -58,8 +59,9 @@ class KttsJobMgrPart: virtual public KSpeechSink { Q_OBJECT + TQ_OBJECT public: - KttsJobMgrPart(TQWidget *parent, const char *name); + KttsJobMgrPart(TQWidget *tqparent, const char *name); virtual ~KttsJobMgrPart(); protected: @@ -288,9 +290,10 @@ private: class KttsJobMgrBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT friend class KttsJobMgrPart; public: - KttsJobMgrBrowserExtension(KttsJobMgrPart *parent); + KttsJobMgrBrowserExtension(KttsJobMgrPart *tqparent); virtual ~KttsJobMgrBrowserExtension(); }; |