summaryrefslogtreecommitdiffstats
path: root/kaddressbook/features/distributionlistwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kaddressbook/features/distributionlistwidget.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/features/distributionlistwidget.cpp')
-rw-r--r--kaddressbook/features/distributionlistwidget.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp
index 878ede7aa..16277784e 100644
--- a/kaddressbook/features/distributionlistwidget.cpp
+++ b/kaddressbook/features/distributionlistwidget.cpp
@@ -16,8 +16,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#include "distributionlistwidget.h"
@@ -55,9 +55,9 @@ typedef KABC::DistributionList DistributionList;
class DistributionListFactory : public KAB::ExtensionFactory
{
public:
- KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name )
+ KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *tqparent, const char *name )
{
- return new DistributionListWidget( core, parent, name );
+ return new DistributionListWidget( core, tqparent, name );
}
TQString identifier() const
@@ -78,11 +78,11 @@ extern "C" {
the event is forwarded to the ViewManager and it tries to
remove a contact instead of the distribution list.
*/
-class DeletePressedCatcher : public QObject
+class DeletePressedCatcher : public TQObject
{
public:
- DeletePressedCatcher( DistributionListWidget *parent )
- : TQObject( parent, "DeletePressedCatcher" ), mWidget( parent )
+ DeletePressedCatcher( DistributionListWidget *tqparent )
+ : TQObject( tqparent, "DeletePressedCatcher" ), mWidget( tqparent )
{
}
@@ -91,7 +91,7 @@ class DeletePressedCatcher : public QObject
{
if ( event->type() == TQEvent::AccelOverride ) {
TQKeyEvent *keyEvent = (TQKeyEvent*)event;
- if ( keyEvent->key() == Qt::Key_Delete ) {
+ if ( keyEvent->key() == TQt::Key_Delete ) {
keyEvent->accept();
mWidget->removeContact();
return true;
@@ -106,12 +106,12 @@ class DeletePressedCatcher : public QObject
DistributionListWidget *mWidget;
};
-class ContactItem : public QListViewItem
+class ContactItem : public TQListViewItem
{
public:
- ContactItem( DistributionListView *parent, const KABC::Addressee &addressee,
- const TQString &email = TQString::null ) :
- TQListViewItem( parent ),
+ ContactItem( DistributionListView *tqparent, const KABC::Addressee &addressee,
+ const TQString &email = TQString() ) :
+ TQListViewItem( tqparent ),
mAddressee( addressee ),
mEmail( email )
{
@@ -146,9 +146,9 @@ class ContactItem : public QListViewItem
TQString mEmail;
};
-DistributionListWidget::DistributionListWidget( KAB::Core *core, TQWidget *parent,
+DistributionListWidget::DistributionListWidget( KAB::Core *core, TQWidget *tqparent,
const char *name )
- : KAB::ExtensionWidget( core, parent, name )
+ : KAB::ExtensionWidget( core, tqparent, name )
#ifndef KDEPIM_NEW_DISTRLISTS
, mManager( 0 )
#endif
@@ -265,7 +265,7 @@ void DistributionListWidget::createList()
{
TQString newName = KInputDialog::getText( i18n( "New Distribution List" ),
i18n( "Please enter name:" ),
- TQString::null, 0, this );
+ TQString(), 0, this );
if ( newName.isEmpty() ) return;
@@ -344,7 +344,7 @@ void DistributionListWidget::removeList()
{
int result = KMessageBox::warningContinueCancel( this,
i18n( "<qt>Delete distribution list <b>%1</b>?</qt>" ) .arg( mNameCombo->currentText() ),
- TQString::null, KGuiItem( i18n("Delete"), "editdelete") );
+ TQString(), KGuiItem( i18n("Delete"), "editdelete") );
if ( result != KMessageBox::Continue )
return;
@@ -519,7 +519,7 @@ void DistributionListWidget::updateNameCombo()
const TQStringList names = mManager->listNames();
#endif
mNameCombo->insertStringList( names );
- mNameCombo->setCurrentItem( QMIN( pos, (int)names.count() - 1 ) );
+ mNameCombo->setCurrentItem( TQMIN( pos, (int)names.count() - 1 ) );
updateContactView();
}
@@ -590,8 +590,8 @@ void DistributionListWidget::changed()
}
#endif
-DistributionListView::DistributionListView( TQWidget *parent, const char* name )
- : KListView( parent, name )
+DistributionListView::DistributionListView( TQWidget *tqparent, const char* name )
+ : KListView( tqparent, name )
{
setDragEnabled( true );
setAcceptDrops( true );
@@ -622,9 +622,9 @@ void DistributionListView::dropEvent( TQDropEvent *e )
EmailSelector::EmailSelector( const TQStringList &emails,
- const TQString &current, TQWidget *parent )
+ const TQString &current, TQWidget *tqparent )
: KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok|Cancel, Ok,
- parent )
+ tqparent )
{
TQFrame *topFrame = plainPage();
TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
@@ -653,13 +653,13 @@ TQString EmailSelector::selected() const
if ( button )
return mEmailMap[ mButtonGroup->id( button ) ];
- return TQString::null;
+ return TQString();
}
TQString EmailSelector::getEmail( const TQStringList &emails,
- const TQString &current, TQWidget *parent, bool &canceled )
+ const TQString &current, TQWidget *tqparent, bool &canceled )
{
- EmailSelector dlg( emails, current, parent );
+ EmailSelector dlg( emails, current, tqparent );
if(dlg.exec())
{
canceled = false;