diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:51:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:51:21 -0600 |
commit | b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04 (patch) | |
tree | 76f49820693d443128d3720322ff1605e9bcd558 /parts/snippet | |
parent | 247f828db1b8dcdc9346c1568d81cfa00db99c9e (diff) | |
download | tdevelop-b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04.tar.gz tdevelop-b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'parts/snippet')
-rw-r--r-- | parts/snippet/snippet_part.cpp | 6 | ||||
-rw-r--r-- | parts/snippet/snippet_widget.cpp | 84 | ||||
-rw-r--r-- | parts/snippet/snippetdlg.ui | 10 | ||||
-rw-r--r-- | parts/snippet/snippetsettingsbase.ui | 8 |
4 files changed, 54 insertions, 54 deletions
diff --git a/parts/snippet/snippet_part.cpp b/parts/snippet/snippet_part.cpp index 4d847f01..7501f77d 100644 --- a/parts/snippet/snippet_part.cpp +++ b/parts/snippet/snippet_part.cpp @@ -112,9 +112,9 @@ void SnippetPart::slotConfigWidget( KDialogBase *dlg ) TQStringList SnippetPart::getAllLanguages() { KTrader::OfferList languageSupportOffers = - KTrader::self()->query(TQString::tqfromLatin1("KDevelop/LanguageSupport"), - TQString::tqfromLatin1("[X-KDevelop-Version] == %1" - ).tqarg( KDEVELOP_PLUGIN_VERSION )); + KTrader::self()->query(TQString::fromLatin1("KDevelop/LanguageSupport"), + TQString::fromLatin1("[X-KDevelop-Version] == %1" + ).arg( KDEVELOP_PLUGIN_VERSION )); TQStringList languages; diff --git a/parts/snippet/snippet_widget.cpp b/parts/snippet/snippet_widget.cpp index 8b7796e8..db257d0a 100644 --- a/parts/snippet/snippet_widget.cpp +++ b/parts/snippet/snippet_widget.cpp @@ -11,7 +11,7 @@ #include <kurl.h> #include <kdebug.h> #include <klocale.h> -#include <tqlayout.h> +#include <layout.h> #include <kpushbutton.h> #include <klistview.h> #include <tqheader.h> @@ -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").tqarg(iGroupCount); - strKeyId=TQString("snippetGroupId_%1").tqarg(iGroupCount); - strKeyText=TQString("snippetGroupLang_%1").tqarg(iGroupCount); + strKeyName=TQString("snippetGroupName_%1").arg(iGroupCount); + strKeyId=TQString("snippetGroupId_%1").arg(iGroupCount); + strKeyText=TQString("snippetGroupLang_%1").arg(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").tqarg(iSnipCount); - strKeyText=TQString("snippetText_%1").tqarg(iSnipCount); - strKeyId=TQString("snippetParent_%1").tqarg(iSnipCount); + strKeyName=TQString("snippetName_%1").arg(iSnipCount); + strKeyText=TQString("snippetText_%1").arg(iSnipCount); + strKeyId=TQString("snippetParent_%1").arg(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").tqarg(iCount); - strKeyText=TQString("snippetSavedVal_%1").tqarg(iCount); + strKeyName=TQString("snippetSavedName_%1").arg(iCount); + strKeyText=TQString("snippetSavedVal_%1").arg(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").tqarg(i); - strKeyText=TQString("snippetText_%1").tqarg(i); + strKeyName=TQString("snippetName_%1").arg(i); + strKeyText=TQString("snippetText_%1").arg(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").tqarg(i); - strKeyId=TQString("snippetGroupId_%1").tqarg(i); - strKeyText=TQString("snippetGroupLang_%1").tqarg(i); + strKeyName=TQString("snippetGroupName_%1").arg(i); + strKeyId=TQString("snippetGroupId_%1").arg(i); + strKeyText=TQString("snippetGroupLang_%1").arg(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").tqarg(i); - strKeyText=TQString("snippetText_%1").tqarg(i); - strKeyId=TQString("snippetParent_%1").tqarg(i); + strKeyName=TQString("snippetName_%1").arg(i); + strKeyText=TQString("snippetText_%1").arg(i); + strKeyId=TQString("snippetParent_%1").arg(i); TQString strNameVal=""; TQString strTextVal=""; @@ -492,8 +492,8 @@ void SnippetWidget::initConfig() iCount = _cfg->readNumEntry("snippetSavedCount", 0); 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); + strKeyName=TQString("snippetSavedName_%1").arg(i); + strKeyText=TQString("snippetSavedVal_%1").arg(i); TQString strNameVal=""; TQString strTextVal=""; @@ -526,7 +526,7 @@ void SnippetWidget::maybeTip( const TQPoint & p ) if (!item) return; - TQRect r = tqitemRect( item ); + TQRect r = itemRect( item ); if (r.isValid() && _SnippetConfig.useToolTips() ) @@ -597,7 +597,7 @@ TQString SnippetWidget::parseText(TQString text, TQString del) 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>:").tqarg(strName); + strMsg=i18n("Please enter the value for <b>%1</b>:").arg(strName); strNew = showSingleVarDialog( strName, &_mapSaved, rSingle ); if (strNew=="") return ""; //user clicked Cancle @@ -671,7 +671,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ TQDialog dlg(this); dlg.setCaption(i18n("Enter Values for Variables")); - TQGridLayout * tqlayout = new TQGridLayout( &dlg, 1, 1, 11, 6, "tqlayout"); + 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"); @@ -681,15 +681,15 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ TQCheckBox * cb = NULL; labTop = new TQLabel( &dlg, "label" ); - labTop->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, + labTop->setSizePolicy( 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); - tqlayout->addMultiCellLayout( layoutTop, 0, 0, 0, 1 ); + layout->addMultiCellLayout( layoutTop, 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 tqlayout + for ( it = map->begin(); it != map->end(); ++it ) { //a checkbox, a lable and a lineedit to the main layout if (it.key() == _SnippetConfig.getDelimiter() + _SnippetConfig.getDelimiter()) continue; @@ -716,22 +716,22 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ i++; } - tqlayout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 ); + layout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 ); KPushButton * btn1 = new KPushButton( &dlg, "pushButton1" ); btn1->setText(i18n("&Cancel")); - btn1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, + btn1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btn1->sizePolicy().hasHeightForWidth() ) ); layoutBtn->addWidget( btn1, 0, 0 ); KPushButton * btn2 = new KPushButton( &dlg, "pushButton2" ); btn2->setText(i18n("&Apply")); btn2->setDefault( TRUE ); - btn2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, + btn2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btn2->sizePolicy().hasHeightForWidth() ) ); layoutBtn->addWidget( btn2, 0, 1 ); - tqlayout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 ); + layout->addMultiCellLayout( layoutBtn, 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.tqgeometry(); + TQRect r = dlg.geometry(); 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.tqgeometry().height() - layoutVar->tqgeometry().height(); - iOneHeight = layoutVar->tqgeometry().height() / mapVar2Te.count(); - iWidth = dlg.tqgeometry().width(); + iBasicHeight = dlg.geometry().height() - layoutVar->geometry().height(); + iOneHeight = layoutVar->geometry().height() / mapVar2Te.count(); + iWidth = dlg.geometry().width(); } //do some cleanup @@ -780,7 +780,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ delete layoutTop; delete layoutVar; delete layoutBtn; - delete tqlayout; + delete layout; if (i==0) //if nothing happened this means, that there are no variables to translate return true; //.. so just return OK @@ -800,7 +800,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri TQDialog dlg(this); dlg.setCaption(i18n("Enter Values for Variables")); - TQGridLayout * tqlayout = new TQGridLayout( &dlg, 1, 1, 11, 6, "tqlayout"); + 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"); @@ -811,8 +811,8 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri labTop = new TQLabel( &dlg, "label" ); layoutTop->addWidget(labTop, 0, 0); - labTop->setText(i18n("Enter the replacement values for %1:").tqarg( var )); - tqlayout->addMultiCellLayout( layoutTop, 0, 0, 0, 1 ); + labTop->setText(i18n("Enter the replacement values for %1:").arg( var )); + layout->addMultiCellLayout( layoutTop, 0, 0, 0, 1 ); cb = new TQCheckBox( &dlg, "cbVar" ); @@ -832,7 +832,7 @@ 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.") ); - tqlayout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 ); + layout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 ); KPushButton * btn1 = new KPushButton( &dlg, "pushButton1" ); btn1->setText(i18n("&Cancel")); @@ -843,7 +843,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri btn2->setDefault( TRUE ); layoutBtn->addWidget( btn2, 0, 1 ); - tqlayout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 ); + layout->addMultiCellLayout( layoutBtn, 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.tqgeometry(); + dlgSize = dlg.geometry(); } //do some cleanup @@ -875,7 +875,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri delete layoutTop; delete layoutVar; delete layoutBtn; - delete tqlayout; + delete layout; return strReturn; } @@ -920,7 +920,7 @@ void SnippetWidget::slotDropped(TQDropEvent *e, TQListViewItem *) group = dynamic_cast<SnippetGroup *>(item2->parent()); TQCString dropped; - TQByteArray data = e->tqencodedData("text/plain"); + TQByteArray data = e->encodedData("text/plain"); if ( e->provides("text/plain") && data.size()>0 ) { //get the data from the event... TQString encData(data.data()); diff --git a/parts/snippet/snippetdlg.ui b/parts/snippet/snippetdlg.ui index 55bd67ad..3606549b 100644 --- a/parts/snippet/snippetdlg.ui +++ b/parts/snippet/snippetdlg.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <hbox> <property name="name"> @@ -37,7 +37,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> @@ -64,7 +64,7 @@ </widget> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <grid> <property name="name"> @@ -91,7 +91,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>80</height> @@ -116,7 +116,7 @@ <property name="text"> <string>&Snippet:</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignTop</set> </property> <property name="buddy" stdset="0"> diff --git a/parts/snippet/snippetsettingsbase.ui b/parts/snippet/snippetsettingsbase.ui index f5c56b99..7ae3bfc8 100644 --- a/parts/snippet/snippetsettingsbase.ui +++ b/parts/snippet/snippetsettingsbase.ui @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>70</height> @@ -123,7 +123,7 @@ </widget> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout1</cstring> + <cstring>layout1</cstring> </property> <hbox> <property name="name"> @@ -144,7 +144,7 @@ <property name="name"> <cstring>leDelimiter</cstring> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>40</width> <height>32767</height> @@ -164,7 +164,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> |