summaryrefslogtreecommitdiffstats
path: root/kmail/snippetwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/snippetwidget.cpp')
-rw-r--r--kmail/snippetwidget.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp
index b7ba16f1..601174cf 100644
--- a/kmail/snippetwidget.cpp
+++ b/kmail/snippetwidget.cpp
@@ -44,14 +44,14 @@
#include <cassert>
-SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, TQWidget* parent)
- : KListView(parent, "snippet widget"), TQToolTip( viewport() ),
+SnippetWidget::SnippetWidget(KMEdit* editor, TDEActionCollection* actionCollection, TQWidget* parent)
+ : TDEListView(parent, "snippet widget"), TQToolTip( viewport() ),
mEditor( editor ), mActionCollection( actionCollection )
{
// init the TQPtrList
_list.setAutoDelete(TRUE);
- // init the KListView
+ // init the TDEListView
setSorting( -1 );
addColumn( "" );
setFullWidth(true);
@@ -142,13 +142,13 @@ void SnippetWidget::slotAdd()
\fn SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text )
Helper factory method.
*/
-SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const KShortcut& shortcut )
+SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const TDEShortcut& shortcut )
{
SnippetItem * item = new SnippetItem(parent, name, text);
const TQString actionName = i18n("Snippet %1").arg(name);
const TQString normalizedName = TQString(actionName).replace(" ", "_");
if ( !mActionCollection->action(normalizedName.utf8().data() ) ) {
- KAction * action = new KAction( actionName, shortcut, item,
+ TDEAction * action = new TDEAction( actionName, shortcut, item,
TQT_SLOT( slotExecute() ), mActionCollection,
normalizedName.utf8() );
item->setAction(action);
@@ -249,7 +249,7 @@ void SnippetWidget::slotEdit( TQListViewItem* item )
dlg.cbGroup->setCurrentText(SnippetItem::findGroupById(pSnippet->getParent(), _list)->getName());
if (dlg.exec() == TQDialog::Accepted) {
- //update the KListView and the SnippetItem
+ //update the TDEListView and the SnippetItem
item->setText( 0, dlg.snippetName->text() );
pSnippet->setName( dlg.snippetName->text() );
pSnippet->setText( dlg.snippetText->text() );
@@ -291,7 +291,7 @@ void SnippetWidget::slotEditGroup()
dlg.cbGroup->insertItem(i18n("All"));
if (dlg.exec() == TQDialog::Accepted) {
- //update the KListView and the SnippetGroup
+ //update the TDEListView and the SnippetGroup
item->setText( 0, dlg.snippetName->text() );
pGroup->setName( dlg.snippetName->text() );
@@ -369,9 +369,9 @@ void SnippetWidget::writeConfig()
_cfg->writeEntry(strKeyText, item->getText());
_cfg->writeEntry(strKeyId, item->getParent());
- KAction * action = item->getAction();
+ TDEAction * action = item->getAction();
assert( action );
- const KShortcut& sc = action->shortcut();
+ const TDEShortcut& sc = action->shortcut();
if (!sc.isNull() ) {
_cfg->writeEntry( TQString("snippetShortcut_%1").arg(iSnipCount), sc.toString() );
}
@@ -474,7 +474,7 @@ void SnippetWidget::initConfig()
//kdDebug(5006) << "Read item " << strNameVal << " " << iParentVal << endl;
if (strNameVal != "" && strTextVal != "" && iParentVal != -1) {
- KShortcut shortcut( _cfg->readEntry( TQString("snippetShortcut_%1").arg(i), TQString() ) );
+ TDEShortcut shortcut( _cfg->readEntry( TQString("snippetShortcut_%1").arg(i), TQString() ) );
item = makeItem( SnippetItem::findGroupById(iParentVal, _list), strNameVal, strTextVal, shortcut );
//kdDebug(5006) << "Created item " << item->getName() << " " << item->getParent() << endl;
_list.append(item);
@@ -536,7 +536,7 @@ void SnippetWidget::maybeTip( const TQPoint & p )
*/
void SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int )
{
- KPopupMenu popup;
+ TDEPopupMenu popup;
SnippetItem * selectedItem = static_cast<SnippetItem *>(item);
if ( item ) {
@@ -868,7 +868,7 @@ TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQStri
// fn SnippetWidget::acceptDrag (TQDropEvent *event) const
/*!
- Reimplementation from KListView.
+ Reimplementation from TDEListView.
Check here if the data the user is about to drop fits our restrictions.
We only accept dropps of plaintext, because from the dropped text
we will create a snippet.