diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/snippet | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/snippet')
-rw-r--r-- | parts/snippet/snippet_part.cpp | 10 | ||||
-rw-r--r-- | parts/snippet/snippet_part.h | 3 | ||||
-rw-r--r-- | parts/snippet/snippet_widget.cpp | 154 | ||||
-rw-r--r-- | parts/snippet/snippet_widget.h | 3 | ||||
-rw-r--r-- | parts/snippet/snippetdlg.ui | 30 | ||||
-rw-r--r-- | parts/snippet/snippetdlg.ui.h | 2 | ||||
-rw-r--r-- | parts/snippet/snippetitem.cpp | 16 | ||||
-rw-r--r-- | parts/snippet/snippetitem.h | 6 | ||||
-rw-r--r-- | parts/snippet/snippetsettings.cpp | 8 | ||||
-rw-r--r-- | parts/snippet/snippetsettings.h | 5 | ||||
-rw-r--r-- | parts/snippet/snippetsettingsbase.ui | 34 |
11 files changed, 137 insertions, 134 deletions
diff --git a/parts/snippet/snippet_part.cpp b/parts/snippet/snippet_part.cpp index eb1c47ac..e130d1e6 100644 --- a/parts/snippet/snippet_part.cpp +++ b/parts/snippet/snippet_part.cpp @@ -37,8 +37,8 @@ static const KDevPluginInfo data("kdevsnippet"); typedef KDevGenericFactory<SnippetPart> snippetFactory; K_EXPORT_COMPONENT_FACTORY( libkdevsnippet, snippetFactory( data ) ) -SnippetPart::SnippetPart(TQObject *parent, const char *name, const TQStringList& ) - : KDevPlugin(&data, parent, name ? name : "SnippetPart" ) +SnippetPart::SnippetPart(TQObject *tqparent, const char *name, const TQStringList& ) + : KDevPlugin(&data, tqparent, name ? name : "SnippetPart" ) { setInstance(snippetFactory::instance()); setXMLFile("kdevpart_snippet.rc"); @@ -112,9 +112,9 @@ void SnippetPart::slotConfigWidget( KDialogBase *dlg ) TQStringList SnippetPart::getAllLanguages() { KTrader::OfferList languageSupportOffers = - KTrader::self()->query(TQString::fromLatin1("KDevelop/LanguageSupport"), - TQString::fromLatin1("[X-KDevelop-Version] == %1" - ).arg( KDEVELOP_PLUGIN_VERSION )); + KTrader::self()->query(TQString::tqfromLatin1("KDevelop/LanguageSupport"), + TQString::tqfromLatin1("[X-KDevelop-Version] == %1" + ).tqarg( KDEVELOP_PLUGIN_VERSION )); TQStringList languages; diff --git a/parts/snippet/snippet_part.h b/parts/snippet/snippet_part.h index c62950fc..f9f7bc93 100644 --- a/parts/snippet/snippet_part.h +++ b/parts/snippet/snippet_part.h @@ -27,10 +27,11 @@ For more info read the README.dox file class SnippetPart : public KDevPlugin { Q_OBJECT + TQ_OBJECT public: - SnippetPart(TQObject *parent, const char *name, const TQStringList &); + SnippetPart(TQObject *tqparent, const char *name, const TQStringList &); ~SnippetPart(); KAboutData * aboutData(); TQStringList getAllLanguages(); diff --git a/parts/snippet/snippet_widget.cpp b/parts/snippet/snippet_widget.cpp index 2c35d5c5..e555115a 100644 --- a/parts/snippet/snippet_widget.cpp +++ b/parts/snippet/snippet_widget.cpp @@ -50,7 +50,7 @@ SnippetWidget::SnippetWidget(SnippetPart *part) : KListView(0, "snippet widget"), TQToolTip( viewport() ), m_part( part ) { - // init the QPtrList + // init the TQPtrList _list.setAutoDelete(TRUE); // init the KListView @@ -85,7 +85,7 @@ SnippetWidget::~SnippetWidget() writeConfig(); delete _cfg; - /* We need to delete the child items before the parent items + /* We need to delete the child items before the tqparent items otherwise KDevelop would crash on exiting */ SnippetItem * item; while (_list.count() > 0) { @@ -111,7 +111,7 @@ void SnippetWidget::slotAdd() which the selected item is a child of*/ SnippetGroup * group = dynamic_cast<SnippetGroup*>(selectedItem()); if (!group) - group = dynamic_cast<SnippetGroup*>(selectedItem()->parent()); + group = dynamic_cast<SnippetGroup*>(selectedItem()->tqparent()); /*fill the combobox with the names of all SnippetGroup entries*/ for (SnippetItem *it=_list.first(); it; it=_list.next()) { @@ -165,7 +165,7 @@ void SnippetWidget::slotRemove() if (group) { if (group->childCount() > 0 && - KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove this group and all its snippets?"),TQString::null,KStdGuiItem::del()) + KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove this group and all its snippets?"),TQString(),KStdGuiItem::del()) == KMessageBox::Cancel) return; @@ -218,10 +218,10 @@ void SnippetWidget::slotEdit() pSnippet->setName( dlg.snippetName->text() ); pSnippet->setText( dlg.snippetText->text() ); - /* if the user changed the parent we need to move the snippet */ + /* if the user changed the tqparent we need to move the snippet */ if ( SnippetItem::findGroupById(pSnippet->getParent(), _list)->getName() != dlg.cbGroup->currentText() ) { SnippetGroup * newGroup = dynamic_cast<SnippetGroup*>(SnippetItem::findItemByName(dlg.cbGroup->currentText(), _list)); - pSnippet->parent()->takeItem(pSnippet); + pSnippet->tqparent()->takeItem(pSnippet); newGroup->insertItem(pSnippet); pSnippet->resetParent(); } @@ -327,9 +327,9 @@ void SnippetWidget::writeConfig() SnippetGroup * group = dynamic_cast<SnippetGroup*>(item); if (group) { kdDebug(9035) << "-->GROUP " << item->getName() << group->getId() << " " << iGroupCount<< endl; - strKeyName=TQString("snippetGroupName_%1").arg(iGroupCount); - strKeyId=TQString("snippetGroupId_%1").arg(iGroupCount); - strKeyText=TQString("snippetGroupLang_%1").arg(iGroupCount); + strKeyName=TQString("snippetGroupName_%1").tqarg(iGroupCount); + strKeyId=TQString("snippetGroupId_%1").tqarg(iGroupCount); + strKeyText=TQString("snippetGroupLang_%1").tqarg(iGroupCount); _cfg->writeEntry(strKeyName, group->getName()); _cfg->writeEntry(strKeyId, group->getId()); @@ -337,9 +337,9 @@ void SnippetWidget::writeConfig() iGroupCount++; } else if (dynamic_cast<SnippetItem*>(item)) { kdDebug(9035) << "-->ITEM " << item->getName() << item->getParent() << " " << iSnipCount << endl; - strKeyName=TQString("snippetName_%1").arg(iSnipCount); - strKeyText=TQString("snippetText_%1").arg(iSnipCount); - strKeyId=TQString("snippetParent_%1").arg(iSnipCount); + strKeyName=TQString("snippetName_%1").tqarg(iSnipCount); + strKeyText=TQString("snippetText_%1").tqarg(iSnipCount); + strKeyId=TQString("snippetParent_%1").tqarg(iSnipCount); _cfg->writeEntry(strKeyName, item->getName()); _cfg->writeEntry(strKeyText, item->getText()); @@ -357,8 +357,8 @@ void SnippetWidget::writeConfig() for ( it = _mapSaved.begin(); it != _mapSaved.end(); ++it ) { //write the saved variable values if (it.data().length()<=0) continue; //is the saved value has no length -> no need to save it - strKeyName=TQString("snippetSavedName_%1").arg(iCount); - strKeyText=TQString("snippetSavedVal_%1").arg(iCount); + strKeyName=TQString("snippetSavedName_%1").tqarg(iCount); + strKeyText=TQString("snippetSavedVal_%1").tqarg(iCount); _cfg->writeEntry(strKeyName, it.key()); _cfg->writeEntry(strKeyText, it.data()); @@ -394,8 +394,8 @@ void SnippetWidget::initConfigOldVersion(KConfig *cfg) TQString strKeyName=""; TQString strKeyText=""; for ( int i=0; i<iCount; i++) { //read the snippet-list - strKeyName=TQString("snippetName_%1").arg(i); - strKeyText=TQString("snippetText_%1").arg(i); + strKeyName=TQString("snippetName_%1").tqarg(i); + strKeyText=TQString("snippetText_%1").tqarg(i); TQString strNameVal=""; TQString strTextVal=""; @@ -434,9 +434,9 @@ void SnippetWidget::initConfig() int iCount = _cfg->readNumEntry("snippetGroupCount", -1); for ( int i=0; i<iCount; i++) { //read the group-list - strKeyName=TQString("snippetGroupName_%1").arg(i); - strKeyId=TQString("snippetGroupId_%1").arg(i); - strKeyText=TQString("snippetGroupLang_%1").arg(i); + strKeyName=TQString("snippetGroupName_%1").tqarg(i); + strKeyId=TQString("snippetGroupId_%1").tqarg(i); + strKeyText=TQString("snippetGroupLang_%1").tqarg(i); TQString strNameVal=""; int iIdVal=-1; @@ -465,9 +465,9 @@ void SnippetWidget::initConfig() if (iCount != -1) { iCount = _cfg->readNumEntry("snippetCount", 0); for ( int i=0; i<iCount; i++) { //read the snippet-list - strKeyName=TQString("snippetName_%1").arg(i); - strKeyText=TQString("snippetText_%1").arg(i); - strKeyId=TQString("snippetParent_%1").arg(i); + strKeyName=TQString("snippetName_%1").tqarg(i); + strKeyText=TQString("snippetText_%1").tqarg(i); + strKeyId=TQString("snippetParent_%1").tqarg(i); TQString strNameVal=""; TQString strTextVal=""; @@ -491,9 +491,9 @@ void SnippetWidget::initConfig() iCount = _cfg->readNumEntry("snippetSavedCount", 0); - for ( int i=1; i<=iCount; i++) { //read the saved-values and store in QMap - strKeyName=TQString("snippetSavedName_%1").arg(i); - strKeyText=TQString("snippetSavedVal_%1").arg(i); + for ( int i=1; i<=iCount; i++) { //read the saved-values and store in TQMap + strKeyName=TQString("snippetSavedName_%1").tqarg(i); + strKeyText=TQString("snippetSavedVal_%1").tqarg(i); TQString strNameVal=""; TQString strTextVal=""; @@ -526,7 +526,7 @@ void SnippetWidget::maybeTip( const TQPoint & p ) if (!item) return; - TQRect r = itemRect( item ); + TQRect r = tqitemRect( item ); if (r.isValid() && _SnippetConfig.useToolTips() ) @@ -589,15 +589,15 @@ TQString SnippetWidget::parseText(TQString text, TQString del) TQRect rMulti = _SnippetConfig.getMultiRect(); do { - iFound = text.find(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this QRegExp + iFound = text.tqfind(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this TQRegExp if (iFound >= 0) { - iEnd = text.find(del, iFound+1)+1; + iEnd = text.tqfind(del, iFound+1)+1; strName = text.mid(iFound, iEnd-iFound); if ( strName != del+del ) { //if not doubel-delimiter if (iInMeth == 0) { //if input-method "single" is selected if ( mapVar[strName].length() <= 0 ) { // and not already in map - strMsg=i18n("Please enter the value for <b>%1</b>:").arg(strName); + strMsg=i18n("Please enter the value for <b>%1</b>:").tqarg(strName); strNew = showSingleVarDialog( strName, &_mapSaved, rSingle ); if (strNew=="") return ""; //user clicked Cancle @@ -612,7 +612,7 @@ TQString SnippetWidget::parseText(TQString text, TQString del) } if (iInMeth == 0) { //if input-method "single" is selected - str.replace(strName, strNew); + str.tqreplace(strName, strNew); } mapVar[strName] = strNew; @@ -627,13 +627,13 @@ TQString SnippetWidget::parseText(TQString text, TQString del) if (showMultiVarDialog( &mapVar, &_mapSaved, w, bh, oh )) { //generate and show the dialog TQMap<TQString, TQString>::Iterator it; for ( it = mapVar.begin(); it != mapVar.end(); ++it ) { //walk through the map and do the replacement - str.replace(it.key(), it.data()); + str.tqreplace(it.key(), it.data()); } } else { return ""; } - rMulti.setWidth(w); //this is a hack to save the dialog's dimensions in only one QRect + rMulti.setWidth(w); //this is a hack to save the dialog's dimensions in only one TQRect rMulti.setHeight(bh); rMulti.setTop(oh); rMulti.setLeft(0); @@ -671,35 +671,35 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ TQDialog dlg(this); dlg.setCaption(i18n("Enter Values for Variables")); - TQGridLayout * layout = new TQGridLayout( &dlg, 1, 1, 11, 6, "layout"); - TQGridLayout * layoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "layoutTop"); - TQGridLayout * layoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "layoutVar"); - TQGridLayout * layoutBtn = new TQGridLayout( 0, 1, 1, 0, 6, "layoutBtn"); + TQGridLayout * tqlayout = new TQGridLayout( &dlg, 1, 1, 11, 6, "tqlayout"); + TQGridLayout * tqlayoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayoutTop"); + TQGridLayout * tqlayoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayoutVar"); + TQGridLayout * tqlayoutBtn = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayoutBtn"); KTextEdit *te = NULL; TQLabel * labTop = NULL; TQCheckBox * cb = NULL; labTop = new TQLabel( &dlg, "label" ); - labTop->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, + labTop->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, labTop->sizePolicy().hasHeightForWidth() ) ); labTop->setText(i18n("Enter the replacement values for these variables:")); - layoutTop->addWidget(labTop, 0, 0); - layout->addMultiCellLayout( layoutTop, 0, 0, 0, 1 ); + tqlayoutTop->addWidget(labTop, 0, 0); + tqlayout->addMultiCellLayout( tqlayoutTop, 0, 0, 0, 1 ); int i = 0; //walk through the variable map and add - for ( it = map->begin(); it != map->end(); ++it ) { //a checkbox, a lable and a lineedit to the main layout + for ( it = map->begin(); it != map->end(); ++it ) { //a checkbox, a lable and a lineedit to the main tqlayout if (it.key() == _SnippetConfig.getDelimiter() + _SnippetConfig.getDelimiter()) continue; cb = new TQCheckBox( &dlg, "cbVar" ); cb->setChecked( FALSE ); cb->setText(it.key()); - layoutVar->addWidget( cb, i ,0, Qt::AlignTop ); + tqlayoutVar->addWidget( cb, i ,0, TQt::AlignTop ); te = new KTextEdit( &dlg, "teVar" ); - layoutVar->addWidget( te, i, 1, Qt::AlignTop ); + tqlayoutVar->addWidget( te, i, 1, TQt::AlignTop ); if ((*mapSave)[it.key()].length() > 0) { cb->setChecked( TRUE ); @@ -716,22 +716,22 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ i++; } - layout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 ); + tqlayout->addMultiCellLayout( tqlayoutVar, 1, 1, 0, 1 ); KPushButton * btn1 = new KPushButton( &dlg, "pushButton1" ); btn1->setText(i18n("&Cancel")); - btn1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, + btn1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btn1->sizePolicy().hasHeightForWidth() ) ); - layoutBtn->addWidget( btn1, 0, 0 ); + tqlayoutBtn->addWidget( btn1, 0, 0 ); KPushButton * btn2 = new KPushButton( &dlg, "pushButton2" ); btn2->setText(i18n("&Apply")); btn2->setDefault( TRUE ); - btn2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, + btn2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btn2->sizePolicy().hasHeightForWidth() ) ); - layoutBtn->addWidget( btn2, 0, 1 ); + tqlayoutBtn->addWidget( btn2, 0, 1 ); - layout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 ); + tqlayout->addMultiCellLayout( tqlayoutBtn, 2, 2, 0, 1 ); // --END-- building a dynamic dialog //connect the buttons to the TQDialog default slots @@ -742,7 +742,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ bool bReturn = false; //resize the textedits if (iWidth > 1) { - TQRect r = dlg.geometry(); + TQRect r = dlg.tqgeometry(); r.setHeight(iBasicHeight + iOneHeight*mapVar2Te.count()); r.setWidth(iWidth); dlg.setGeometry(r); @@ -763,9 +763,9 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ } bReturn = true; - iBasicHeight = dlg.geometry().height() - layoutVar->geometry().height(); - iOneHeight = layoutVar->geometry().height() / mapVar2Te.count(); - iWidth = dlg.geometry().width(); + iBasicHeight = dlg.tqgeometry().height() - tqlayoutVar->tqgeometry().height(); + iOneHeight = tqlayoutVar->tqgeometry().height() / mapVar2Te.count(); + iWidth = dlg.tqgeometry().width(); } //do some cleanup @@ -777,10 +777,10 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ for (it2 = mapVar2Cb.begin(); it2 != mapVar2Cb.end(); ++it2) delete it2.data(); mapVar2Cb.clear(); - delete layoutTop; - delete layoutVar; - delete layoutBtn; - delete layout; + delete tqlayoutTop; + delete tqlayoutVar; + delete tqlayoutBtn; + delete tqlayout; if (i==0) //if nothing happened this means, that there are no variables to translate return true; //.. so just return OK @@ -800,19 +800,19 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri TQDialog dlg(this); dlg.setCaption(i18n("Enter Values for Variables")); - TQGridLayout * layout = new TQGridLayout( &dlg, 1, 1, 11, 6, "layout"); - TQGridLayout * layoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "layoutTop"); - TQGridLayout * layoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "layoutVar"); - TQGridLayout * layoutBtn = new TQGridLayout( 0, 2, 1, 0, 6, "layoutBtn"); + TQGridLayout * tqlayout = new TQGridLayout( &dlg, 1, 1, 11, 6, "tqlayout"); + TQGridLayout * tqlayoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayoutTop"); + TQGridLayout * tqlayoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayoutVar"); + TQGridLayout * tqlayoutBtn = new TQGridLayout( 0, 2, 1, 0, 6, "tqlayoutBtn"); KTextEdit *te = NULL; TQLabel * labTop = NULL; TQCheckBox * cb = NULL; labTop = new TQLabel( &dlg, "label" ); - layoutTop->addWidget(labTop, 0, 0); - labTop->setText(i18n("Enter the replacement values for %1:").arg( var )); - layout->addMultiCellLayout( layoutTop, 0, 0, 0, 1 ); + tqlayoutTop->addWidget(labTop, 0, 0); + labTop->setText(i18n("Enter the replacement values for %1:").tqarg( var )); + tqlayout->addMultiCellLayout( tqlayoutTop, 0, 0, 0, 1 ); cb = new TQCheckBox( &dlg, "cbVar" ); @@ -820,8 +820,8 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri cb->setText(i18n( "Make value &default" )); te = new KTextEdit( &dlg, "teVar" ); - layoutVar->addWidget( te, 0, 1, Qt::AlignTop); - layoutVar->addWidget( cb, 1, 1, Qt::AlignTop); + tqlayoutVar->addWidget( te, 0, 1, TQt::AlignTop); + tqlayoutVar->addWidget( cb, 1, 1, TQt::AlignTop); if ((*mapSave)[var].length() > 0) { cb->setChecked( TRUE ); te->setText((*mapSave)[var]); @@ -832,18 +832,18 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri "If you use the same variable later, even in another snippet, the value entered to the right " "will be the default value for that variable.") ); - layout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 ); + tqlayout->addMultiCellLayout( tqlayoutVar, 1, 1, 0, 1 ); KPushButton * btn1 = new KPushButton( &dlg, "pushButton1" ); btn1->setText(i18n("&Cancel")); - layoutBtn->addWidget( btn1, 0, 0 ); + tqlayoutBtn->addWidget( btn1, 0, 0 ); KPushButton * btn2 = new KPushButton( &dlg, "pushButton2" ); btn2->setText(i18n("&Apply")); btn2->setDefault( TRUE ); - layoutBtn->addWidget( btn2, 0, 1 ); + tqlayoutBtn->addWidget( btn2, 0, 1 ); - layout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 ); + tqlayout->addMultiCellLayout( tqlayoutBtn, 2, 2, 0, 1 ); te->setFocus(); // --END-- building a dynamic dialog @@ -863,7 +863,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri strReturn = te->text(); //copy the entered values back the the given map - dlgSize = dlg.geometry(); + dlgSize = dlg.tqgeometry(); } //do some cleanup @@ -872,10 +872,10 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri delete labTop; delete btn1; delete btn2; - delete layoutTop; - delete layoutVar; - delete layoutBtn; - delete layout; + delete tqlayoutTop; + delete tqlayoutVar; + delete tqlayoutBtn; + delete tqlayout; return strReturn; } @@ -917,10 +917,10 @@ void SnippetWidget::slotDropped(TQDropEvent *e, TQListViewItem *) SnippetGroup *group = dynamic_cast<SnippetGroup *>(item2); if (!group) - group = dynamic_cast<SnippetGroup *>(item2->parent()); + group = dynamic_cast<SnippetGroup *>(item2->tqparent()); TQCString dropped; - TQByteArray data = e->encodedData("text/plain"); + TQByteArray data = e->tqencodedData("text/plain"); if ( e->provides("text/plain") && data.size()>0 ) { //get the data from the event... TQString encData(data.data()); @@ -958,7 +958,7 @@ void SnippetWidget::languageChanged() for (SnippetItem *it=_list.first(); it; it=_list.next()) { SnippetGroup * group = dynamic_cast<SnippetGroup*>(it); if (group) { - if (group->getLanguage() == i18n("All") || langs.contains(group->getLanguage())) { + if (group->getLanguage() == i18n("All") || langs.tqcontains(group->getLanguage())) { group->setOpen(TRUE); } else { group->setOpen(FALSE); diff --git a/parts/snippet/snippet_widget.h b/parts/snippet/snippet_widget.h index 7aa1f24e..40d77406 100644 --- a/parts/snippet/snippet_widget.h +++ b/parts/snippet/snippet_widget.h @@ -37,9 +37,10 @@ It inherits KListView and TQToolTip which is needed for showing the tooltips which contains the text of the snippet @author Robert Gruber */ -class SnippetWidget : public KListView, public QToolTip +class SnippetWidget : public KListView, public TQToolTip { Q_OBJECT + TQ_OBJECT friend class SnippetSettings; //to allow SnippetSettings to call languageChanged() diff --git a/parts/snippet/snippetdlg.ui b/parts/snippet/snippetdlg.ui index a7d4530b..acf7841b 100644 --- a/parts/snippet/snippetdlg.ui +++ b/parts/snippet/snippetdlg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SnippetDlg</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SnippetDlg</cstring> </property> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -37,7 +37,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -62,9 +62,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> @@ -91,14 +91,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>80</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -109,21 +109,21 @@ <cstring>snippetName</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>&Snippet:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <property name="buddy" stdset="0"> <cstring>snippetText</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabelGroup</cstring> </property> @@ -131,7 +131,7 @@ <string>Group:</string> </property> </widget> - <widget class="QToolButton" row="3" column="0"> + <widget class="TQToolButton" row="3" column="0"> <property name="name"> <cstring>toolBtnHelp</cstring> </property> @@ -200,10 +200,10 @@ <includes> <include location="local" impldecl="in implementation">snippetdlg.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>slotHelp()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/parts/snippet/snippetdlg.ui.h b/parts/snippet/snippetdlg.ui.h index 41ad9d8c..103a49b0 100644 --- a/parts/snippet/snippetdlg.ui.h +++ b/parts/snippet/snippetdlg.ui.h @@ -9,7 +9,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/parts/snippet/snippetitem.cpp b/parts/snippet/snippetitem.cpp index e2f08a2b..69010a5d 100644 --- a/parts/snippet/snippetitem.cpp +++ b/parts/snippet/snippetitem.cpp @@ -11,20 +11,20 @@ #include "snippetitem.h" -SnippetItem::SnippetItem(TQListView * parent, TQString name, TQString text ) - : TQListViewItem( parent, name ) +SnippetItem::SnippetItem(TQListView * tqparent, TQString name, TQString text ) + : TQListViewItem( tqparent, name ) { strName = name; strText = text; iParent = -1; } -SnippetItem::SnippetItem(TQListViewItem * parent, TQString name, TQString text) - : TQListViewItem( parent, name ) +SnippetItem::SnippetItem(TQListViewItem * tqparent, TQString name, TQString text) + : TQListViewItem( tqparent, name ) { strName = name; strText = text; - iParent = ((SnippetGroup *)parent)->getId(); + iParent = ((SnippetGroup *)tqparent)->getId(); } SnippetItem::~SnippetItem() @@ -69,7 +69,7 @@ void SnippetItem::setName(TQString name) void SnippetItem::resetParent() { - SnippetGroup * group = dynamic_cast<SnippetGroup*>(parent()); + SnippetGroup * group = dynamic_cast<SnippetGroup*>(tqparent()); if (group) iParent = group->getId(); } @@ -100,8 +100,8 @@ Deklaration for class SnippetGroup int SnippetGroup::iMaxId = 1; -SnippetGroup::SnippetGroup(TQListView * parent, TQString name, int id, TQString lang) - : SnippetItem(parent, name, "GROUP") +SnippetGroup::SnippetGroup(TQListView * tqparent, TQString name, int id, TQString lang) + : SnippetItem(tqparent, name, "GROUP") { if (id > 0) { iId = id; diff --git a/parts/snippet/snippetitem.h b/parts/snippet/snippetitem.h index ee181725..d96ecd5b 100644 --- a/parts/snippet/snippetitem.h +++ b/parts/snippet/snippetitem.h @@ -24,7 +24,7 @@ It also holds the needed data for one snippet. class SnippetItem : public TQListViewItem { friend class SnippetGroup; public: - SnippetItem(TQListViewItem * parent, TQString name, TQString text); + SnippetItem(TQListViewItem * tqparent, TQString name, TQString text); ~SnippetItem(); TQString getName(); @@ -37,7 +37,7 @@ public: static SnippetGroup * findGroupById(int id, TQPtrList<SnippetItem> &list); private: - SnippetItem(TQListView * parent, TQString name, TQString text); + SnippetItem(TQListView * tqparent, TQString name, TQString text); TQString strName; TQString strText; int iParent; @@ -51,7 +51,7 @@ it in the main TQPtrList<SnippetItem>. */ class SnippetGroup : public SnippetItem { public: - SnippetGroup(TQListView * parent, TQString name, int id, TQString lang=i18n("All")); + SnippetGroup(TQListView * tqparent, TQString name, int id, TQString lang=i18n("All")); ~SnippetGroup(); int getId() { return iId; } diff --git a/parts/snippet/snippetsettings.cpp b/parts/snippet/snippetsettings.cpp index 8e559ba5..d66094e7 100644 --- a/parts/snippet/snippetsettings.cpp +++ b/parts/snippet/snippetsettings.cpp @@ -15,14 +15,14 @@ #include "snippet_widget.h" -SnippetSettings::SnippetSettings(TQWidget *parent, const char *name) - : SnippetSettingsBase(parent, name) +SnippetSettings::SnippetSettings(TQWidget *tqparent, const char *name) + : SnippetSettingsBase(tqparent, name) { _widget = NULL; } -SnippetSettings::SnippetSettings(SnippetWidget * w, TQWidget *parent, const char *name) - : SnippetSettingsBase(parent, name) +SnippetSettings::SnippetSettings(SnippetWidget * w, TQWidget *tqparent, const char *name) + : SnippetSettingsBase(tqparent, name) { _cfg = w->getSnippetConfig(); _widget = w; diff --git a/parts/snippet/snippetsettings.h b/parts/snippet/snippetsettings.h index 2f51a823..44c84e33 100644 --- a/parts/snippet/snippetsettings.h +++ b/parts/snippet/snippetsettings.h @@ -24,9 +24,10 @@ same named .ui file class SnippetSettings : public SnippetSettingsBase { Q_OBJECT + TQ_OBJECT public: - SnippetSettings(TQWidget *parent = 0, const char *name = 0); - SnippetSettings(SnippetWidget * w, TQWidget *parent = 0, const char *name = 0); + SnippetSettings(TQWidget *tqparent = 0, const char *name = 0); + SnippetSettings(SnippetWidget * w, TQWidget *tqparent = 0, const char *name = 0); ~SnippetSettings(); diff --git a/parts/snippet/snippetsettingsbase.ui b/parts/snippet/snippetsettingsbase.ui index 54b8c325..3d2b6a39 100644 --- a/parts/snippet/snippetsettingsbase.ui +++ b/parts/snippet/snippetsettingsbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SnippetSettingsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SnippetSettingsBase</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>cbToolTip</cstring> </property> @@ -56,14 +56,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>70</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="1" column="0"> + <widget class="TQButtonGroup" row="1" column="0"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -74,7 +74,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="1" column="0"> + <widget class="TQButtonGroup" row="1" column="0"> <property name="name"> <cstring>btnGroup</cstring> </property> @@ -85,7 +85,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>rbSingle</cstring> </property> @@ -102,7 +102,7 @@ <string>An input dialog will be displayed for every variable within a snippet</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>rbAll</cstring> </property> @@ -121,15 +121,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -144,7 +144,7 @@ <property name="name"> <cstring>leDelimiter</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>40</width> <height>32767</height> @@ -164,7 +164,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -175,7 +175,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup" row="2" column="0"> + <widget class="TQButtonGroup" row="2" column="0"> <property name="name"> <cstring>btnGroupAutoOpen</cstring> </property> @@ -186,7 +186,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>rbOpenOnActiv</cstring> </property> @@ -200,7 +200,7 @@ <string><qt>If the group's language is the same as the project's primary language, the group will be automatically opened.</qt></string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>rbOpenOnSupported</cstring> </property> @@ -221,7 +221,7 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> </includehints> |