diff options
Diffstat (limited to 'parts/snippet')
-rw-r--r-- | parts/snippet/snippet_part.cpp | 16 | ||||
-rw-r--r-- | parts/snippet/snippet_part.h | 2 | ||||
-rw-r--r-- | parts/snippet/snippet_widget.cpp | 76 | ||||
-rw-r--r-- | parts/snippet/snippet_widget.h | 2 | ||||
-rw-r--r-- | parts/snippet/snippetdlg.ui | 4 | ||||
-rw-r--r-- | parts/snippet/snippetsettings.h | 2 | ||||
-rw-r--r-- | parts/snippet/snippetsettingsbase.ui | 9 |
7 files changed, 51 insertions, 60 deletions
diff --git a/parts/snippet/snippet_part.cpp b/parts/snippet/snippet_part.cpp index 82969151..75815de5 100644 --- a/parts/snippet/snippet_part.cpp +++ b/parts/snippet/snippet_part.cpp @@ -33,12 +33,12 @@ #include "snippetsettings.h" #include "snippetconfig.h" -static const KDevPluginInfo data("kdevsnippet"); +static const KDevPluginInfo pluginData("kdevsnippet"); typedef KDevGenericFactory<SnippetPart> snippetFactory; -K_EXPORT_COMPONENT_FACTORY( libkdevsnippet, snippetFactory( data ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevsnippet, snippetFactory( pluginData ) ) SnippetPart::SnippetPart(TQObject *parent, const char *name, const TQStringList& ) - : KDevPlugin(&data, parent, name ? name : "SnippetPart" ) + : KDevPlugin(&pluginData, parent, name ? name : "SnippetPart" ) { setInstance(snippetFactory::instance()); setXMLFile("kdevpart_snippet.rc"); @@ -51,12 +51,12 @@ SnippetPart::SnippetPart(TQObject *parent, const char *name, const TQStringList& mainWindow()->embedSelectViewRight( m_widget, i18n("Code Snippets"), i18n("Insert a code snippet") ); - connect( core(), TQT_SIGNAL( configWidget( KDialogBase * ) ), this, TQT_SLOT( slotConfigWidget( KDialogBase * ) ) ); + connect( core(), TQ_SIGNAL( configWidget( KDialogBase * ) ), this, TQ_SLOT( slotConfigWidget( KDialogBase * ) ) ); /*The next two connects are used to check if certain SnippetGroups need to be opened according to the languages supported by this project*/ - connect( core(), TQT_SIGNAL( projectOpened() ), m_widget, TQT_SLOT( languageChanged() ) ); - connect( core(), TQT_SIGNAL( languageChanged() ), m_widget, TQT_SLOT( languageChanged() ) ); + connect( core(), TQ_SIGNAL( projectOpened() ), m_widget, TQ_SLOT( languageChanged() ) ); + connect( core(), TQ_SIGNAL( languageChanged() ), m_widget, TQ_SLOT( languageChanged() ) ); setupActions(); } @@ -73,7 +73,7 @@ SnippetPart::~SnippetPart() void SnippetPart::setupActions() { - new TDEAction( i18n("Show Snippet Tree"), CTRL+ALT+SHIFT+Key_S, this, TQT_SLOT(slotShowView()), actionCollection(), "snippet_showview"); + new TDEAction( i18n("Show Snippet Tree"), CTRL+ALT+SHIFT+Key_S, this, TQ_SLOT(slotShowView()), actionCollection(), "snippet_showview"); } /*! @@ -105,7 +105,7 @@ void SnippetPart::slotConfigWidget( KDialogBase *dlg ) w->leDelimiter->setText(m_widget->getSnippetConfig()->getDelimiter()); w->cbToolTip->setChecked(m_widget->getSnippetConfig()->useToolTips()); w->btnGroupAutoOpen->setButton(m_widget->getSnippetConfig()->getAutoOpenGroups()); - connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(slotOKClicked()) ); + connect( dlg, TQ_SIGNAL(okClicked()), w, TQ_SLOT(slotOKClicked()) ); } diff --git a/parts/snippet/snippet_part.h b/parts/snippet/snippet_part.h index 8ffd8fce..90052c2e 100644 --- a/parts/snippet/snippet_part.h +++ b/parts/snippet/snippet_part.h @@ -26,7 +26,7 @@ For more info read the README.dox file */ class SnippetPart : public KDevPlugin { - Q_OBJECT + TQ_OBJECT public: diff --git a/parts/snippet/snippet_widget.cpp b/parts/snippet/snippet_widget.cpp index 9cd4ae4b..a8f47da7 100644 --- a/parts/snippet/snippet_widget.cpp +++ b/parts/snippet/snippet_widget.cpp @@ -51,7 +51,7 @@ SnippetWidget::SnippetWidget(SnippetPart *part) m_part( part ) { // init the TQPtrList - _list.setAutoDelete(TRUE); + _list.setAutoDelete(true); // init the TDEListView setSorting( -1 ); @@ -64,20 +64,20 @@ SnippetWidget::SnippetWidget(SnippetPart *part) setRootIsDecorated(true); //connect the signals - connect( this, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *, const TQPoint & , int ) ), - this, TQT_SLOT( showPopupMenu(TQListViewItem *, const TQPoint & , int ) ) ); + connect( this, TQ_SIGNAL( contextMenuRequested ( TQListViewItem *, const TQPoint & , int ) ), + this, TQ_SLOT( showPopupMenu(TQListViewItem *, const TQPoint & , int ) ) ); - connect( this, TQT_SIGNAL( executed (TQListViewItem *) ), - this, TQT_SLOT( slotExecuted( TQListViewItem *) ) ); - connect( this, TQT_SIGNAL( returnPressed (TQListViewItem *) ), - this, TQT_SLOT( slotExecuted( TQListViewItem *) ) ); + connect( this, TQ_SIGNAL( executed (TQListViewItem *) ), + this, TQ_SLOT( slotExecuted( TQListViewItem *) ) ); + connect( this, TQ_SIGNAL( returnPressed (TQListViewItem *) ), + this, TQ_SLOT( slotExecuted( TQListViewItem *) ) ); - connect( this, TQT_SIGNAL( dropped(TQDropEvent *, TQListViewItem *) ), - this, TQT_SLOT( slotDropped(TQDropEvent *, TQListViewItem *) ) ); + connect( this, TQ_SIGNAL( dropped(TQDropEvent *, TQListViewItem *) ), + this, TQ_SLOT( slotDropped(TQDropEvent *, TQListViewItem *) ) ); _cfg = 0; - TQTimer::singleShot(0, this, TQT_SLOT(initConfig())); + TQTimer::singleShot(0, this, TQ_SLOT(initConfig())); } SnippetWidget::~SnippetWidget() @@ -226,7 +226,7 @@ void SnippetWidget::slotEdit() pSnippet->resetParent(); } - setSelected(item, TRUE); + setSelected(item, true); } } @@ -248,7 +248,7 @@ void SnippetWidget::slotEditGroup() dlg.snippetName->setText(pGroup->getName()); dlg.snippetText->setText(pGroup->getText()); dlg.btnAdd->setText(i18n("&Apply")); - dlg.snippetText->setEnabled(FALSE); + dlg.snippetText->setEnabled(false); dlg.setCaption(i18n("Edit Group")); dlg.cbGroup->insertItem(i18n("All")); dlg.cbGroup->insertStringList(m_part->getAllLanguages()); @@ -261,7 +261,7 @@ void SnippetWidget::slotEditGroup() pGroup->setName( dlg.snippetName->text() ); pGroup->setLanguage(dlg.cbGroup->currentText()); - setSelected(item, TRUE); + setSelected(item, true); } } @@ -452,9 +452,9 @@ void SnippetWidget::initConfig() kdDebug(9035) << "Created group " << group->getName() << " " << group->getId() << endl; _list.append(group); if (group->getLanguage() == i18n("All")) - group->setOpen(TRUE); + group->setOpen(true); else - group->setOpen(FALSE); //groups assigned to certain languages get handled later + group->setOpen(false); //groups assigned to certain languages get handled later } } @@ -551,19 +551,19 @@ void SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int if ( item ) { popup.insertTitle( selectedItem->getName() ); - popup.insertItem( i18n("Add Item..."), this, TQT_SLOT( slotAdd() ) ); - popup.insertItem( i18n("Add Group..."), this, TQT_SLOT( slotAddGroup() ) ); + popup.insertItem( i18n("Add Item..."), this, TQ_SLOT( slotAdd() ) ); + popup.insertItem( i18n("Add Group..."), this, TQ_SLOT( slotAddGroup() ) ); if (dynamic_cast<SnippetGroup*>(item)) { - popup.insertItem( i18n("Edit..."), this, TQT_SLOT( slotEditGroup() ) ); + popup.insertItem( i18n("Edit..."), this, TQ_SLOT( slotEditGroup() ) ); } else { - popup.insertItem( i18n("Edit..."), this, TQT_SLOT( slotEdit() ) ); + popup.insertItem( i18n("Edit..."), this, TQ_SLOT( slotEdit() ) ); } - popup.insertItem( i18n("Remove"), this, TQT_SLOT( slotRemove() ) ); + popup.insertItem( i18n("Remove"), this, TQ_SLOT( slotRemove() ) ); } else { popup.insertTitle(i18n("Code Snippets")); - popup.insertItem( i18n("Add Group..."), this, TQT_SLOT( slotAddGroup() ) ); + popup.insertItem( i18n("Add Group..."), this, TQ_SLOT( slotAddGroup() ) ); } popup.exec(p); @@ -694,7 +694,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ continue; cb = new TQCheckBox( &dlg, "cbVar" ); - cb->setChecked( FALSE ); + cb->setChecked( false ); cb->setText(it.key()); layoutVar->addWidget( cb, i ,0, TQt::AlignTop ); @@ -702,7 +702,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ layoutVar->addWidget( te, i, 1, TQt::AlignTop ); if ((*mapSave)[it.key()].length() > 0) { - cb->setChecked( TRUE ); + cb->setChecked( true ); te->setText((*mapSave)[it.key()]); } @@ -726,7 +726,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ KPushButton * btn2 = new KPushButton( &dlg, "pushButton2" ); btn2->setText(i18n("&Apply")); - btn2->setDefault( TRUE ); + btn2->setDefault( true ); btn2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btn2->sizePolicy().hasHeightForWidth() ) ); layoutBtn->addWidget( btn2, 0, 1 ); @@ -735,8 +735,8 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ // --END-- building a dynamic dialog //connect the buttons to the TQDialog default slots - connect(btn1, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(reject()) ); - connect(btn2, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(accept()) ); + connect(btn1, TQ_SIGNAL(clicked()), &dlg, TQ_SLOT(reject()) ); + connect(btn2, TQ_SIGNAL(clicked()), &dlg, TQ_SLOT(accept()) ); //prepare to execute the dialog bool bReturn = false; @@ -816,14 +816,14 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri cb = new TQCheckBox( &dlg, "cbVar" ); - cb->setChecked( FALSE ); + cb->setChecked( false ); cb->setText(i18n( "Make value &default" )); te = new KTextEdit( &dlg, "teVar" ); layoutVar->addWidget( te, 0, 1, TQt::AlignTop); layoutVar->addWidget( cb, 1, 1, TQt::AlignTop); if ((*mapSave)[var].length() > 0) { - cb->setChecked( TRUE ); + cb->setChecked( true ); te->setText((*mapSave)[var]); } @@ -840,7 +840,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri KPushButton * btn2 = new KPushButton( &dlg, "pushButton2" ); btn2->setText(i18n("&Apply")); - btn2->setDefault( TRUE ); + btn2->setDefault( true ); layoutBtn->addWidget( btn2, 0, 1 ); layout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 ); @@ -848,8 +848,8 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri // --END-- building a dynamic dialog //connect the buttons to the TQDialog default slots - connect(btn1, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(reject()) ); - connect(btn2, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(accept()) ); + connect(btn1, TQ_SIGNAL(clicked()), &dlg, TQ_SLOT(reject()) ); + connect(btn2, TQ_SIGNAL(clicked()), &dlg, TQ_SLOT(accept()) ); //execute the dialog TQString strReturn = ""; @@ -896,12 +896,12 @@ bool SnippetWidget::acceptDrag (TQDropEvent *event) const if (item && TQString(event->format()).startsWith("text/plain") && static_cast<SnippetWidget *>(event->source()) != this) { - kdDebug(9035) << "returning TRUE " << endl; - return TRUE; + kdDebug(9035) << "returning true " << endl; + return true; } else { - kdDebug(9035) << "returning FALSE" << endl; - event->acceptAction(FALSE); - return FALSE; + kdDebug(9035) << "returning false" << endl; + event->acceptAction(false); + return false; } } @@ -959,9 +959,9 @@ void SnippetWidget::languageChanged() SnippetGroup * group = dynamic_cast<SnippetGroup*>(it); if (group) { if (group->getLanguage() == i18n("All") || langs.contains(group->getLanguage())) { - group->setOpen(TRUE); + group->setOpen(true); } else { - group->setOpen(FALSE); + group->setOpen(false); } } } diff --git a/parts/snippet/snippet_widget.h b/parts/snippet/snippet_widget.h index 8b6c17a1..5ed9ec82 100644 --- a/parts/snippet/snippet_widget.h +++ b/parts/snippet/snippet_widget.h @@ -39,7 +39,7 @@ tooltips which contains the text of the snippet */ class SnippetWidget : public TDEListView, 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 f7bafb74..7b924164 100644 --- a/parts/snippet/snippetdlg.ui +++ b/parts/snippet/snippetdlg.ui @@ -197,9 +197,9 @@ <tabstop>btnAdd</tabstop> <tabstop>btnCancel</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot>slotHelp()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">kcombobox.h</include> diff --git a/parts/snippet/snippetsettings.h b/parts/snippet/snippetsettings.h index 4c0d922a..92d34309 100644 --- a/parts/snippet/snippetsettings.h +++ b/parts/snippet/snippetsettings.h @@ -23,7 +23,7 @@ same named .ui file */ class SnippetSettings : public SnippetSettingsBase { -Q_OBJECT +TQ_OBJECT public: SnippetSettings(TQWidget *parent = 0, const char *name = 0); diff --git a/parts/snippet/snippetsettingsbase.ui b/parts/snippet/snippetsettingsbase.ui index 9d1d0c9d..9d816561 100644 --- a/parts/snippet/snippetsettingsbase.ui +++ b/parts/snippet/snippetsettingsbase.ui @@ -92,9 +92,6 @@ <property name="text"> <string>Single dialog for each variable within a snippet</string> </property> - <property name="accel"> - <string></string> - </property> <property name="checked"> <bool>true</bool> </property> @@ -109,9 +106,6 @@ <property name="text"> <string>One dialog for all variables within a snippet</string> </property> - <property name="accel"> - <string></string> - </property> <property name="checked"> <bool>false</bool> </property> @@ -207,9 +201,6 @@ <property name="text"> <string>The group's language is supported by the project</string> </property> - <property name="accel"> - <string></string> - </property> <property name="checked"> <bool>false</bool> </property> |