diff options
Diffstat (limited to 'kmail/snippetwidget.cpp')
-rw-r--r-- | kmail/snippetwidget.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp index e16b4884..406632b6 100644 --- a/kmail/snippetwidget.cpp +++ b/kmail/snippetwidget.cpp @@ -49,7 +49,7 @@ SnippetWidget::SnippetWidget(KMEdit* editor, TDEActionCollection* actionCollecti mEditor( editor ), mActionCollection( actionCollection ) { // init the TQPtrList - _list.setAutoDelete(TRUE); + _list.setAutoDelete(true); // init the TDEListView setSorting( -1 ); @@ -62,22 +62,22 @@ SnippetWidget::SnippetWidget(KMEdit* editor, TDEActionCollection* actionCollecti 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( doubleClicked (TQListViewItem *) ), - this, TQT_SLOT( slotEdit( TQListViewItem *) ) ); - connect( this, TQT_SIGNAL( returnPressed (TQListViewItem *) ), - this, TQT_SLOT( slotExecuted( TQListViewItem *) ) ); + connect( this, TQ_SIGNAL( doubleClicked (TQListViewItem *) ), + this, TQ_SLOT( slotEdit( 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 *) ) ); - connect( editor, TQT_SIGNAL( insertSnippet() ), this, TQT_SLOT( slotExecute() )); + connect( editor, TQ_SIGNAL( insertSnippet() ), this, TQ_SLOT( slotExecute() )); _cfg = 0; - TQTimer::singleShot(0, this, TQT_SLOT(initConfig())); + TQTimer::singleShot(0, this, TQ_SLOT(initConfig())); } SnippetWidget::~SnippetWidget() @@ -149,11 +149,11 @@ SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString normalizedName = TQString(actionName).replace(" ", "_"); if ( !mActionCollection->action(normalizedName.utf8().data() ) ) { TDEAction * action = new TDEAction( actionName, shortcut, item, - TQT_SLOT( slotExecute() ), mActionCollection, + TQ_SLOT( slotExecute() ), mActionCollection, normalizedName.utf8() ); item->setAction(action); - connect( item, TQT_SIGNAL( execute( TQListViewItem* ) ), - this, TQT_SLOT( slotExecuted( TQListViewItem* ) ) ); + connect( item, TQ_SIGNAL( execute( TQListViewItem* ) ), + this, TQ_SLOT( slotExecuted( TQListViewItem* ) ) ); } return item; } @@ -263,7 +263,7 @@ void SnippetWidget::slotEdit( TQListViewItem* item ) pSnippet->resetParent(); } - setSelected(item, TRUE); + setSelected(item, true); } } @@ -286,7 +286,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")); @@ -295,7 +295,7 @@ void SnippetWidget::slotEditGroup() item->setText( 0, dlg.snippetName->text() ); pGroup->setName( dlg.snippetName->text() ); - setSelected(item, TRUE); + setSelected(item, true); } } @@ -542,18 +542,18 @@ void SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int if ( item ) { popup.insertTitle( selectedItem->getName() ); if (dynamic_cast<SnippetGroup*>(item)) { - popup.insertItem( i18n("Edit &group..."), this, TQT_SLOT( slotEditGroup() ) ); + popup.insertItem( i18n("Edit &group..."), this, TQ_SLOT( slotEditGroup() ) ); } else { - popup.insertItem( SmallIconSet("edit-paste"), i18n("&Paste"), this, TQT_SLOT( slotExecuted() ) ); - popup.insertItem( SmallIconSet("edit"), i18n("&Edit..."), this, TQT_SLOT( slotEdit() ) ); + popup.insertItem( SmallIconSet("edit-paste"), i18n("&Paste"), this, TQ_SLOT( slotExecuted() ) ); + popup.insertItem( SmallIconSet("edit"), i18n("&Edit..."), this, TQ_SLOT( slotEdit() ) ); } - popup.insertItem( SmallIconSet("edit-delete"), i18n("&Remove"), this, TQT_SLOT( slotRemove() ) ); + popup.insertItem( SmallIconSet("edit-delete"), i18n("&Remove"), this, TQ_SLOT( slotRemove() ) ); popup.insertSeparator(); } else { popup.insertTitle(i18n("Text Snippets")); } - popup.insertItem( i18n("&Add Snippet..."), this, TQT_SLOT( slotAdd() ) ); - popup.insertItem( i18n("Add G&roup..."), this, TQT_SLOT( slotAddGroup() ) ); + popup.insertItem( i18n("&Add Snippet..."), this, TQ_SLOT( slotAdd() ) ); + popup.insertItem( i18n("Add G&roup..."), this, TQ_SLOT( slotAddGroup() ) ); popup.exec(p); } @@ -683,7 +683,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 ); @@ -691,7 +691,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()]); } @@ -713,7 +713,7 @@ bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQ layoutBtn->addWidget( btn1, 0, 0 ); KPushButton * btn2 = new KPushButton( KStdGuiItem::apply(), &dlg, "pushButton2" ); - 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 ); @@ -722,8 +722,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; @@ -804,14 +804,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]); } @@ -826,7 +826,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri layoutBtn->addWidget( btn1, 0, 0 ); KPushButton * btn2 = new KPushButton( KStdGuiItem::apply(), &dlg, "pushButton2" ); - btn2->setDefault( TRUE ); + btn2->setDefault( true ); layoutBtn->addWidget( btn2, 0, 1 ); layout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 ); @@ -834,8 +834,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 = ""; @@ -882,18 +882,18 @@ bool SnippetWidget::acceptDrag (TQDropEvent *event) const if (item && TQString(event->format()).startsWith("text/plain") && static_cast<SnippetWidget *>(event->source()) != this) { - ///kdDebug(5006) << "returning TRUE " << endl; - return TRUE; + ///kdDebug(5006) << "returning true " << endl; + return true; } else if(item && TQString(event->format()).startsWith("x-kmailsnippet") && static_cast<SnippetWidget *>(event->source()) != this) { - //kdDebug(5006) << "returning TRUE " << endl; - return TRUE; + //kdDebug(5006) << "returning true " << endl; + return true; } else { - //kdDebug(5006) << "returning FALSE" << endl; - event->acceptAction(FALSE); - return FALSE; + //kdDebug(5006) << "returning false" << endl; + event->acceptAction(false); + return false; } } |