pull/1/head
Timothy Pearson 12 years ago
parent cd9522f997
commit ad92760518

@ -30,10 +30,10 @@
#include <tdeabc/distributionlist.h>
#include <tdeabc/stdaddressbook.h>
#include "KWMailMergeKABC.h"
#include "KWMailMergeKABCConfig.h"
#include "KWMailMergeTDEABC.h"
#include "KWMailMergeTDEABCConfig.h"
KWMailMergeTDEABC::KWMailMergeKABC( TDEInstance *inst, TQObject *parent )
KWMailMergeTDEABC::KWMailMergeTDEABC( TDEInstance *inst, TQObject *parent )
: KWMailMergeDataSource( inst, parent )
{
_addressBook = TDEABC::StdAddressBook::self();
@ -94,7 +94,7 @@ KWMailMergeTDEABC::KWMailMergeKABC( TDEInstance *inst, TQObject *parent )
}
KWMailMergeTDEABC::~KWMailMergeKABC()
KWMailMergeTDEABC::~KWMailMergeTDEABC()
{
;
}
@ -516,10 +516,10 @@ bool KWMailMergeTDEABC::showConfigDialog( TQWidget* par, int action )
//if (action==KWSLOpen)
{
KWMailMergeKABCConfig *dia=new KWMailMergeKABCConfig( par, this );
KWMailMergeTDEABCConfig *dia=new KWMailMergeTDEABCConfig( par, this );
ret=( dia->exec() == TQDialog::Accepted );
kdDebug() << "KWMailMergeKABCConfig::Accepted " << ret << endl;
kdDebug() << "KWMailMergeTDEABCConfig::Accepted " << ret << endl;
delete dia;
}
refresh(false);
@ -539,13 +539,13 @@ extern "C"
{
KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kabc( TDEInstance *inst, TQObject *parent )
{
return new KWMailMergeKABC( inst, parent );
return new KWMailMergeTDEABC( inst, parent );
}
}
#include "KWMailMergeKABC.moc"
#include "KWMailMergeTDEABC.moc"

@ -30,14 +30,14 @@
#include "KWMailMergeDataSource.h"
class KWMailMergeKABC: public KWMailMergeDataSource
class KWMailMergeTDEABC: public KWMailMergeDataSource
{
Q_OBJECT
public:
KWMailMergeKABC( TDEInstance *inst, TQObject *parent );
~KWMailMergeKABC();
KWMailMergeTDEABC( TDEInstance *inst, TQObject *parent );
~KWMailMergeTDEABC();
/**
Saves the mail merge list to the kword document.
@ -71,19 +71,19 @@ public:
virtual void refresh( bool force );
/**
Shows a KWMailMergeKABCConfig dialog for selecting entries from KAddressbook.
Shows a KWMailMergeTDEABCConfig dialog for selecting entries from KAddressbook.
*/
virtual bool showConfigDialog( TQWidget*, int action);
protected:
friend class KWMailMergeKABCConfig;
friend class KWMailMergeTDEABCConfig;
/**
Adds an entry from TDEABC::StdAddressBook::self()
to the mail merge list.
To be called by KWMailMergeTDEABC::load() and
KWMailMergeKABCConfig::acceptSelection() only.
KWMailMergeTDEABCConfig::acceptSelection() only.
@param uid The entry's TDEABC::Addressee::uid().
*/
@ -93,7 +93,7 @@ protected:
Adds a distribution list to the mail merge list.
To be called by KWMailMergeTDEABC::load() and
KWMailMergeKABCConfig::acceptSelection() only.
KWMailMergeTDEABCConfig::acceptSelection() only.
@param id The DistributionList::name().
*/
@ -107,7 +107,7 @@ protected:
/**
@return All selected DistributionList::name().
To be called by KWMailMergeKABCConfig::initSelectedLists()
To be called by KWMailMergeTDEABCConfig::initSelectedLists()
*/
virtual TQStringList lists() const;
@ -115,7 +115,7 @@ protected:
@return The TDEABC::Addressee::uid() of all individually selected
entries in mail merge list.
To be called by KWMailMergeKABCConfig::initSelectedAddressees()
To be called by KWMailMergeTDEABCConfig::initSelectedAddressees()
*/
virtual TQStringList singleRecords() const;
@ -147,19 +147,19 @@ private:
/**
This list contains all the TDEABC::Addressee::uid() selected
individually with the KWMailMergeKABCConfig dialog.
individually with the KWMailMergeTDEABCConfig dialog.
*/
TQStringList _individualUIDs;
/**
This list contains all the TDEABC::Addressee::uid() from the distribution
lists selected with the KWMailMergeKABCConfig dialog.
lists selected with the KWMailMergeTDEABCConfig dialog.
*/
TQStringList _listUIDs;
/**
This list contains all the DistributionList::name() selected with the
KWMailMergeKABCConfig dialog.
KWMailMergeTDEABCConfig dialog.
*/
TQStringList _lists;
@ -168,7 +168,7 @@ private:
Appends all TDEABC::Addressee::uid() of a distribution list to _listUIDs
and updates the mail merge list.
To be used by KWMailMergeKABCConfig::addList( const TQString &id )
To be used by KWMailMergeTDEABCConfig::addList( const TQString &id )
only.
@param listName The DistributionList::name() of the distribution list.

@ -35,11 +35,11 @@
#include <tdeabc/distributionlist.h>
#include "addresspicker.h"
#include "KWMailMergeKABC.h"
#include "KWMailMergeKABCConfig.h"
#include "KWMailMergeTDEABC.h"
#include "KWMailMergeTDEABCConfig.h"
KWMailMergeKABCConfig::KWMailMergeKABCConfig( TQWidget *parent, KWMailMergeKABC *db_)
KWMailMergeTDEABCConfig::KWMailMergeTDEABCConfig( TQWidget *parent, KWMailMergeTDEABC *db_)
:KDialogBase( Plain, i18n( "Mail Merge - Editor" ),
Ok | Cancel, Ok, parent, "", true)
{
@ -55,13 +55,13 @@ KWMailMergeKABCConfig::KWMailMergeKABCConfig( TQWidget *parent, KWMailMergeKABC
}
KWMailMergeKABCConfig::~KWMailMergeKABCConfig()
KWMailMergeTDEABCConfig::~KWMailMergeTDEABCConfig()
{
;
}
void KWMailMergeKABCConfig::acceptSelection()
void KWMailMergeTDEABCConfig::acceptSelection()
{
_db->clear();
@ -95,7 +95,7 @@ void KWMailMergeKABCConfig::acceptSelection()
}
void KWMailMergeKABCConfig::addSelectedContacts()
void KWMailMergeTDEABCConfig::addSelectedContacts()
{
TQListViewItemIterator it( _ui->mAvailableView, TQListViewItemIterator::Selected );
TQListViewItem* selected = _ui->mSelectedView->findItem(
@ -110,8 +110,8 @@ void KWMailMergeKABCConfig::addSelectedContacts()
kdDebug() << "addSelectedContacts(): uid :" << uid << endl;
if( !uid.isEmpty() )
{
KWMailMergeKABCConfigListItem *item =
static_cast<KWMailMergeKABCConfigListItem*> ( it.current() );
KWMailMergeTDEABCConfigListItem *item =
static_cast<KWMailMergeTDEABCConfigListItem*> ( it.current() );
if( selected )
{
selected->insertItem( item );
@ -134,7 +134,7 @@ void KWMailMergeKABCConfig::addSelectedContacts()
}
void KWMailMergeKABCConfig::destroyAvailableClones( const TQString& uid )
void KWMailMergeTDEABCConfig::destroyAvailableClones( const TQString& uid )
{
if( uid.isEmpty() )
return;
@ -155,9 +155,9 @@ void KWMailMergeKABCConfig::destroyAvailableClones( const TQString& uid )
}
void KWMailMergeKABCConfig::filterChanged( const TQString& txt )
void KWMailMergeTDEABCConfig::filterChanged( const TQString& txt )
{
kdDebug() << "KWMailMergeKABCConfig::filterChanged( " << txt << " )" << endl;
kdDebug() << "KWMailMergeTDEABCConfig::filterChanged( " << txt << " )" << endl;
bool showAll = txt.isEmpty();
@ -190,7 +190,7 @@ void KWMailMergeKABCConfig::filterChanged( const TQString& txt )
}
void KWMailMergeKABCConfig::initSelectedAddressees()
void KWMailMergeTDEABCConfig::initSelectedAddressees()
{
TQStringList records = _db->singleRecords();
@ -201,14 +201,14 @@ void KWMailMergeKABCConfig::initSelectedAddressees()
{
if( category->text(0) != i18n("Distribution Lists") )
{
KWMailMergeKABCConfigListItem* item =
static_cast<KWMailMergeKABCConfigListItem*> ( category->firstChild() );
KWMailMergeTDEABCConfigListItem* item =
static_cast<KWMailMergeTDEABCConfigListItem*> ( category->firstChild() );
while( item && (records.count()>0) )
{
// Need some temporary item, because after selected->insertItem( item )
// the item->nextSibling() is not the one we want.
KWMailMergeKABCConfigListItem* nextItem =
static_cast<KWMailMergeKABCConfigListItem*> ( item->nextSibling() );
KWMailMergeTDEABCConfigListItem* nextItem =
static_cast<KWMailMergeTDEABCConfigListItem*> ( item->nextSibling() );
for( TQStringList::Iterator itRecords = records.begin();
itRecords != records.end(); ++itRecords )
@ -233,7 +233,7 @@ void KWMailMergeKABCConfig::initSelectedAddressees()
}
void KWMailMergeKABCConfig::initSelectedLists()
void KWMailMergeTDEABCConfig::initSelectedLists()
{
TQStringList lists = _db->lists();
@ -265,7 +265,7 @@ void KWMailMergeKABCConfig::initSelectedLists()
}
void KWMailMergeKABCConfig::initSlotSignalConnections()
void KWMailMergeTDEABCConfig::initSlotSignalConnections()
{
connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( acceptSelection() ) );
connect( _ui->mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addSelectedContacts() ) );
@ -283,14 +283,14 @@ void KWMailMergeKABCConfig::initSlotSignalConnections()
}
void KWMailMergeKABCConfig::launchAddressbook() const
void KWMailMergeTDEABCConfig::launchAddressbook() const
{
kapp->startServiceByDesktopName( "kaddressbook", TQString() );
}
void KWMailMergeKABCConfig::removeContact( TQListViewItem* item )
void KWMailMergeTDEABCConfig::removeContact( TQListViewItem* item )
{
TQStringList& categories = _usedCategories;
TQListViewItem* availableLists = _ui->mAvailableView->findItem(
@ -299,8 +299,8 @@ void KWMailMergeKABCConfig::removeContact( TQListViewItem* item )
{
if( !item->text( -1 ).isEmpty() ) // remove selected single entry here
{
KWMailMergeKABCConfigListItem* rightItem =
static_cast<KWMailMergeKABCConfigListItem*> ( item );
KWMailMergeTDEABCConfigListItem* rightItem =
static_cast<KWMailMergeTDEABCConfigListItem*> ( item );
TQStringList entryCategories = rightItem->addressee().categories();
for ( TQStringList::Iterator itEntryCat = entryCategories.begin();
@ -313,13 +313,13 @@ void KWMailMergeKABCConfig::removeContact( TQListViewItem* item )
*itEntryCat );
categories.append( *itEntryCat );
KWMailMergeKABCConfigListItem* leftItem = new KWMailMergeKABCConfigListItem(
KWMailMergeTDEABCConfigListItem* leftItem = new KWMailMergeTDEABCConfigListItem(
category, rightItem->addressee() );
}
else
{
KWMailMergeKABCConfigListItem* leftItem = new
KWMailMergeKABCConfigListItem(
KWMailMergeTDEABCConfigListItem* leftItem = new
KWMailMergeTDEABCConfigListItem(
_ui->mAvailableView->findItem(
*itEntryCat, 0,
TQt::ExactMatch),
@ -329,7 +329,7 @@ void KWMailMergeKABCConfig::removeContact( TQListViewItem* item )
if( entryCategories.isEmpty() )
{
TQString noCat = i18n("no category");
KWMailMergeKABCConfigListItem* leftItem = new KWMailMergeKABCConfigListItem(
KWMailMergeTDEABCConfigListItem* leftItem = new KWMailMergeTDEABCConfigListItem(
_ui->mAvailableView->findItem(
noCat, 0, TQt::ExactMatch),
rightItem->addressee() );
@ -344,7 +344,7 @@ void KWMailMergeKABCConfig::removeContact( TQListViewItem* item )
}
}
void KWMailMergeKABCConfig::removeSelectedContacts()
void KWMailMergeTDEABCConfig::removeSelectedContacts()
{
TQListViewItemIterator it( _ui->mSelectedView, TQListViewItemIterator::Selected );
@ -358,7 +358,7 @@ void KWMailMergeKABCConfig::removeSelectedContacts()
}
void KWMailMergeKABCConfig::saveDistributionList()
void KWMailMergeTDEABCConfig::saveDistributionList()
{
TDEABC::DistributionListManager dlm( TDEABC::StdAddressBook::self() );
dlm.load();
@ -389,8 +389,8 @@ void KWMailMergeKABCConfig::saveDistributionList()
{
if( category->text(0)==i18n("Single Entries") )
{
KWMailMergeKABCConfigListItem* item =
static_cast<KWMailMergeKABCConfigListItem*> ( category->firstChild() );
KWMailMergeTDEABCConfigListItem* item =
static_cast<KWMailMergeTDEABCConfigListItem*> ( category->firstChild() );
while(item)
{
@ -402,7 +402,7 @@ void KWMailMergeKABCConfig::saveDistributionList()
newListItem, item->addressee().formattedName() );
newItem->setEnabled( false );
item = static_cast<KWMailMergeKABCConfigListItem*>( item->nextSibling() );
item = static_cast<KWMailMergeTDEABCConfigListItem*>( item->nextSibling() );
}
TQListViewItemIterator it ( category->firstChild() );
@ -420,7 +420,7 @@ void KWMailMergeKABCConfig::saveDistributionList()
}
void KWMailMergeKABCConfig::updateAvailable()
void KWMailMergeTDEABCConfig::updateAvailable()
{
_ui->mAvailableView->clear();
_ui->mAvailableView->setRootIsDecorated( true );
@ -451,13 +451,13 @@ void KWMailMergeKABCConfig::updateAvailable()
TQListViewItem* category = new TQListViewItem( _ui->mAvailableView, *itCat );
categories.append( *itCat );
KWMailMergeKABCConfigListItem* item = new KWMailMergeKABCConfigListItem(
KWMailMergeTDEABCConfigListItem* item = new KWMailMergeTDEABCConfigListItem(
category, *itAddr );
}
// Append item to existing category in listview.
else
{
KWMailMergeKABCConfigListItem* item = new KWMailMergeKABCConfigListItem(
KWMailMergeTDEABCConfigListItem* item = new KWMailMergeTDEABCConfigListItem(
_ui->mAvailableView->findItem(
*itCat, 0, TQt::ExactMatch),
*itAddr );
@ -467,7 +467,7 @@ void KWMailMergeKABCConfig::updateAvailable()
// If Addressee does not belong to any category, append it to "no category".
if( entryCategories.isEmpty() )
{
KWMailMergeKABCConfigListItem* item = new KWMailMergeKABCConfigListItem(
KWMailMergeTDEABCConfigListItem* item = new KWMailMergeTDEABCConfigListItem(
noCategory, *itAddr );
}
}
@ -509,29 +509,29 @@ void KWMailMergeKABCConfig::updateAvailable()
KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListView *parent,
KWMailMergeTDEABCConfigListItem::KWMailMergeTDEABCConfigListItem( TQListView *parent,
const TDEABC::Addressee& addressEntry ) : TQListViewItem( parent )
{
setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry;
}
KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListViewItem *parent,
KWMailMergeTDEABCConfigListItem::KWMailMergeTDEABCConfigListItem( TQListViewItem *parent,
const TDEABC::Addressee& addressEntry ) : TQListViewItem( parent )
{
setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry;
}
KWMailMergeKABCConfigListItem::~KWMailMergeKABCConfigListItem()
KWMailMergeTDEABCConfigListItem::~KWMailMergeTDEABCConfigListItem()
{}
TDEABC::Addressee KWMailMergeKABCConfigListItem::addressee() const
TDEABC::Addressee KWMailMergeTDEABCConfigListItem::addressee() const
{
return _addressEntry;
}
TQString KWMailMergeKABCConfigListItem::text( int column ) const
TQString KWMailMergeTDEABCConfigListItem::text( int column ) const
{
if( column == -1 )
{
@ -543,4 +543,4 @@ TQString KWMailMergeKABCConfigListItem::text( int column ) const
}
}
#include "KWMailMergeKABCConfig.moc"
#include "KWMailMergeTDEABCConfig.moc"

@ -25,19 +25,19 @@
#include <tdelistview.h>
#include <tdeabc/stdaddressbook.h>
#include "KWMailMergeKABC.h"
#include "KWMailMergeTDEABC.h"
class AddressPickerUI;
class KWMailMergeKABC;
class KWMailMergeTDEABC;
class KWMailMergeKABCConfig: public KDialogBase
class KWMailMergeTDEABCConfig: public KDialogBase
{
Q_OBJECT
public:
KWMailMergeKABCConfig( TQWidget *parent, KWMailMergeKABC *db_ );
virtual ~KWMailMergeKABCConfig();
KWMailMergeTDEABCConfig( TQWidget *parent, KWMailMergeTDEABC *db_ );
virtual ~KWMailMergeTDEABCConfig();
private slots:
@ -85,7 +85,7 @@ private:
/**
The mail merge list.
*/
KWMailMergeKABC *_db;
KWMailMergeTDEABC *_db;
/**
Removes duplicates in the left TQListView, when moving an item to the right.
@ -110,7 +110,7 @@ private:
/**
Moves @p item from the right Listview to the left one.
Called by KWMailMergeKABCConfig::removeSelectedContacts().
Called by KWMailMergeTDEABCConfig::removeSelectedContacts().
*/
void removeContact( TQListViewItem* item );
@ -122,16 +122,16 @@ private:
};
class KWMailMergeKABCConfigListItem : public TQListViewItem
class KWMailMergeTDEABCConfigListItem : public TQListViewItem
{
public:
KWMailMergeKABCConfigListItem( TQListView *parent, const TDEABC::Addressee& addressEntry );
KWMailMergeKABCConfigListItem( TQListViewItem *parent, const TDEABC::Addressee& addressEntry );
virtual ~KWMailMergeKABCConfigListItem();
KWMailMergeTDEABCConfigListItem( TQListView *parent, const TDEABC::Addressee& addressEntry );
KWMailMergeTDEABCConfigListItem( TQListViewItem *parent, const TDEABC::Addressee& addressEntry );
virtual ~KWMailMergeTDEABCConfigListItem();
/**
Returns the TDEABC::Addressee of a KWMailMergeKABCConfigListItem.
Returns the TDEABC::Addressee of a KWMailMergeTDEABCConfigListItem.
*/
TDEABC::Addressee addressee() const;

@ -6,7 +6,7 @@ INCLUDES = $(KOFFICE_INCLUDES) -I$(top_srcdir)/lib/kformula \
kde_module_LTLIBRARIES = kwmailmerge_kabc.la
## Plugin encapsulating the QT SQL database interface
kwmailmerge_kabc_la_SOURCES = KWMailMergeKABC.cpp KWMailMergeKABCConfig.cpp addresspicker.ui
kwmailmerge_kabc_la_SOURCES = KWMailMergeTDEABC.cpp KWMailMergeTDEABCConfig.cpp addresspicker.ui
kwmailmerge_kabc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -lDCOP -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -ltdeio -ltdeparts
kwmailmerge_kabc_la_LIBADD = $(KOFFICE_LIBS) ../../libkwmailmerge_interface.la $(LIB_TDEUI) $(LIB_TDEABC)

@ -166,7 +166,7 @@ KoAutoFormat::KoAutoFormat( KoDocument *_doc, KoVariableCollection *_varCollecti
loadListOfWordCompletion();
m_listCompletion->setIgnoreCase( true );
updateMaxWords();
TDELocale klocale(m_doc->instance()->instanceName());
TDELocale tdelocale(m_doc->instance()->instanceName());
for (int i = 1; i <=7; i++)
{
m_cacheNameOfDays.append(tdelocale.calendar()->weekDayName( i ).lower());
@ -391,7 +391,7 @@ void KoAutoFormat::readConfig(bool force)
void KoAutoFormat::readAutoCorrectConfig()
{
Q_ASSERT( m_entries.isEmpty() ); // readConfig is only called once...
TDELocale klocale(m_doc->instance()->instanceName());
TDELocale tdelocale(m_doc->instance()->instanceName());
TQString kdelang = tdelocale.languageList().front();
kdelang.remove( TQRegExp( "@.*" ) );
kdDebug(32500) << "KoAutoFormat: m_autoFormatLanguage=" << m_autoFormatLanguage << " kdelang=" << kdelang << endl;
@ -616,7 +616,7 @@ void KoAutoFormat::loadEntry( const TQDomElement &nl, bool _allLanguages)
void KoAutoFormat::saveConfig()
{
TDEConfig* config = KoGlobal::kofficeConfig();
TDELocale klocale(m_doc->instance()->instanceName());
TDELocale tdelocale(m_doc->instance()->instanceName());
TDEConfigGroupSaver cgs( config, "AutoFormat" );
config->writeEntry( "ConvertUpperCase", m_convertUpperCase );

Loading…
Cancel
Save