diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/distributionlistpicker.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/distributionlistpicker.cpp')
-rw-r--r-- | kaddressbook/distributionlistpicker.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kaddressbook/distributionlistpicker.cpp b/kaddressbook/distributionlistpicker.cpp index c2eb3ee00..a43c76d0a 100644 --- a/kaddressbook/distributionlistpicker.cpp +++ b/kaddressbook/distributionlistpicker.cpp @@ -35,32 +35,32 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qvalidator.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqvalidator.h> -KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressBook* book, QWidget* parent ) : KDialogBase( parent, 0, true, QString(), Ok | Cancel | User1 ), m_book( book ) +KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressBook* book, TQWidget* parent ) : KDialogBase( parent, 0, true, TQString(), Ok | Cancel | User1 ), m_book( book ) { Q_ASSERT( m_book ); setModal( true ); enableButton( Ok, false ); setButtonText( User1, i18n( "Add New Distribution List" ) ); - QWidget* main = new QWidget( this ); - QGridLayout* layout = new QGridLayout( main ); + TQWidget* main = new TQWidget( this ); + TQGridLayout* layout = new TQGridLayout( main ); layout->setSpacing( KDialog::spacingHint() ); - m_label = new QLabel( main ); + m_label = new TQLabel( main ); layout->addWidget( m_label, 0, 0 ); m_listBox = new KListBox( main ); layout->addWidget( m_listBox, 1, 0 ); - connect( m_listBox, SIGNAL( highlighted( const QString& ) ), - this, SLOT( entrySelected( const QString& ) ) ); - connect( m_listBox, SIGNAL( selected( const QString& ) ), - this, SLOT( entrySelected( const QString& ) ) ); + connect( m_listBox, TQT_SIGNAL( highlighted( const TQString& ) ), + this, TQT_SLOT( entrySelected( const TQString& ) ) ); + connect( m_listBox, TQT_SIGNAL( selected( const TQString& ) ), + this, TQT_SLOT( entrySelected( const TQString& ) ) ); setMainWidget( main ); #ifdef KDEPIM_NEW_DISTRLISTS - typedef QValueList<KPIM::DistributionList> DistListList; + typedef TQValueList<KPIM::DistributionList> DistListList; const DistListList lists = KPIM::DistributionList::allDistributionLists( m_book ); for ( DistListList::ConstIterator it = lists.begin(); it != lists.end(); ++it ) { @@ -69,12 +69,12 @@ KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressB #endif } -void KPIM::DistributionListPickerDialog::entrySelected( const QString& name ) +void KPIM::DistributionListPickerDialog::entrySelected( const TQString& name ) { actionButton( Ok )->setEnabled( !name.isNull() ); } -void KPIM::DistributionListPickerDialog::setLabelText( const QString& text ) +void KPIM::DistributionListPickerDialog::setLabelText( const TQString& text ) { m_label->setText( text ); } @@ -82,9 +82,9 @@ void KPIM::DistributionListPickerDialog::setLabelText( const QString& text ) void KPIM::DistributionListPickerDialog::slotUser1() { #ifdef KDEPIM_NEW_DISTRLISTS - const QValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( m_book ); - QStringList listNames; - for ( QValueList<KPIM::DistributionList>::ConstIterator it = lists.begin(); it != lists.end(); ++it ) + const TQValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( m_book ); + TQStringList listNames; + for ( TQValueList<KPIM::DistributionList>::ConstIterator it = lists.begin(); it != lists.end(); ++it ) { listNames += (*it).name(); } @@ -92,8 +92,8 @@ void KPIM::DistributionListPickerDialog::slotUser1() bool validName = false; do { - QRegExpValidator validator( QRegExp( "\\S+.*" ), 0 ); - const QString name = KInputDialog::getText( i18n( "Enter Name" ), i18n( "Enter a name for the new distribution list:" ), QString(), 0, this, 0, &validator ).stripWhiteSpace(); + TQRegExpValidator validator( TQRegExp( "\\S+.*" ), 0 ); + const TQString name = KInputDialog::getText( i18n( "Enter Name" ), i18n( "Enter a name for the new distribution list:" ), TQString(), 0, this, 0, &validator ).stripWhiteSpace(); if ( name.isEmpty() ) return; @@ -107,7 +107,7 @@ void KPIM::DistributionListPickerDialog::slotUser1() m_book->insertAddressee( list ); m_listBox->insertItem( name ); - QListBoxItem* item = m_listBox->findItem( name ); + TQListBoxItem* item = m_listBox->findItem( name ); m_listBox->setSelected( item, true ); } else @@ -122,18 +122,18 @@ void KPIM::DistributionListPickerDialog::slotUser1() void KPIM::DistributionListPickerDialog::slotOk() { - QListBoxItem* item = m_listBox->selectedItem(); - m_selectedDistributionList = item ? item->text() : QString(); + TQListBoxItem* item = m_listBox->selectedItem(); + m_selectedDistributionList = item ? item->text() : TQString(); KDialogBase::slotOk(); } void KPIM::DistributionListPickerDialog::slotCancel() { - m_selectedDistributionList = QString(); + m_selectedDistributionList = TQString(); KDialogBase::slotCancel(); } -QString KPIM::DistributionListPickerDialog::selectedDistributionList() const +TQString KPIM::DistributionListPickerDialog::selectedDistributionList() const { return m_selectedDistributionList; } |