summaryrefslogtreecommitdiffstats
path: root/kontact/src/profiledialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kontact/src/profiledialog.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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 'kontact/src/profiledialog.cpp')
-rw-r--r--kontact/src/profiledialog.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/kontact/src/profiledialog.cpp b/kontact/src/profiledialog.cpp
index 9525c968a..5d440e5f7 100644
--- a/kontact/src/profiledialog.cpp
+++ b/kontact/src/profiledialog.cpp
@@ -30,86 +30,86 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
-Kontact::ProfileDialog::ProfileDialog( QWidget* parent, WFlags flags ) : KDialogBase( parent, /*name=*/0, /*modal=*/true, /*caption=*/QString(), /*buttonMask=*/KDialogBase::Ok|KDialogBase::Close )
+Kontact::ProfileDialog::ProfileDialog( TQWidget* parent, WFlags flags ) : KDialogBase( parent, /*name=*/0, /*modal=*/true, /*caption=*/TQString(), /*buttonMask=*/KDialogBase::Ok|KDialogBase::Close )
{
setWFlags( flags );
setCaption( i18n("Configure Profiles") );
setButtonOK( i18n("Load Profile") );
- QWidget* mainWidget = new QWidget( this );
+ TQWidget* mainWidget = new TQWidget( this );
- QHBoxLayout* horizontalLayout = new QHBoxLayout( mainWidget );
+ TQHBoxLayout* horizontalLayout = new TQHBoxLayout( mainWidget );
horizontalLayout->setSpacing( 5 );
m_list = new KListView( mainWidget );
m_list->addColumn( i18n("Name") );
m_list->addColumn( i18n("Description") );
- m_list->setSelectionMode( QListView::Single );
+ m_list->setSelectionMode( TQListView::Single );
m_list->setItemsRenameable( true );
m_list->setRenameable( NameColumn, true );
m_list->setRenameable( DescriptionColumn, true );
- connect( m_list, SIGNAL( selectionChanged() ),
- this, SLOT( listSelectionChanged() ) );
- connect( m_list, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ),
- this, SLOT( listItemRenamed( QListViewItem*, const QString&, int ) ) );
+ connect( m_list, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( listSelectionChanged() ) );
+ connect( m_list, TQT_SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ),
+ this, TQT_SLOT( listItemRenamed( TQListViewItem*, const TQString&, int ) ) );
horizontalLayout->addWidget( m_list );
- QVBoxLayout* buttonLayout = new QVBoxLayout( horizontalLayout );
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout( horizontalLayout );
buttonLayout->setSpacing( 5 );
- m_newProfileButton = new QPushButton( mainWidget );
+ m_newProfileButton = new TQPushButton( mainWidget );
m_newProfileButton->setText( i18n("New Profile") );
- connect( m_newProfileButton, SIGNAL( clicked() ),
- this, SLOT( addNewProfile() ) );
+ connect( m_newProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addNewProfile() ) );
buttonLayout->addWidget( m_newProfileButton );
- m_deleteProfileButton = new QPushButton( mainWidget );
+ m_deleteProfileButton = new TQPushButton( mainWidget );
m_deleteProfileButton->setText( i18n("Delete Profile") );
m_deleteProfileButton->setEnabled( false );
- connect( m_deleteProfileButton, SIGNAL( clicked() ),
- this, SLOT( deleteSelectedProfile() ) );
+ connect( m_deleteProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteSelectedProfile() ) );
buttonLayout->addWidget( m_deleteProfileButton );
- m_saveProfileButton = new QPushButton( mainWidget );
+ m_saveProfileButton = new TQPushButton( mainWidget );
m_saveProfileButton->setText( i18n("Save Profile") );
m_saveProfileButton->setEnabled( false );
- connect( m_saveProfileButton, SIGNAL( clicked() ),
- this, SLOT( saveToSelectedProfile() ) );
+ connect( m_saveProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( saveToSelectedProfile() ) );
buttonLayout->addWidget( m_saveProfileButton );
buttonLayout->addStretch();
- m_importProfileButton = new QPushButton( mainWidget );
+ m_importProfileButton = new TQPushButton( mainWidget );
m_importProfileButton->setText( i18n("Import Profile") );
- connect( m_importProfileButton, SIGNAL( clicked() ),
- this, SLOT( importProfile() ) );
+ connect( m_importProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( importProfile() ) );
buttonLayout->addWidget( m_importProfileButton );
- m_exportProfileButton = new QPushButton( mainWidget );
+ m_exportProfileButton = new TQPushButton( mainWidget );
m_exportProfileButton->setText( i18n("Export Profile") );
m_exportProfileButton->setEnabled( false );
- connect( m_exportProfileButton, SIGNAL( clicked() ),
- this, SLOT( exportSelectedProfile() ) );
+ connect( m_exportProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( exportSelectedProfile() ) );
buttonLayout->addWidget( m_exportProfileButton );
setMainWidget( mainWidget );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileAdded( const QString& ) ),
- this, SLOT( profileAdded( const QString& ) ) );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileRemoved( const QString& ) ),
- this, SLOT( profileRemoved( const QString& ) ) );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileLoaded( const QString& ) ),
- this, SLOT( profileLoaded( const QString& ) ) );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileUpdated( const QString& ) ),
- this, SLOT( profileUpdated( const QString& ) ) );
-
- const QValueList<Kontact::Profile> profiles = Kontact::ProfileManager::self()->profiles();
- for ( QValueList<Kontact::Profile>::ConstIterator it = profiles.begin(), end = profiles.end(); it != end; ++it )
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileAdded( const TQString& ) ),
+ this, TQT_SLOT( profileAdded( const TQString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileRemoved( const TQString& ) ),
+ this, TQT_SLOT( profileRemoved( const TQString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileLoaded( const TQString& ) ),
+ this, TQT_SLOT( profileLoaded( const TQString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileUpdated( const TQString& ) ),
+ this, TQT_SLOT( profileUpdated( const TQString& ) ) );
+
+ const TQValueList<Kontact::Profile> profiles = Kontact::ProfileManager::self()->profiles();
+ for ( TQValueList<Kontact::Profile>::ConstIterator it = profiles.begin(), end = profiles.end(); it != end; ++it )
{
profileAdded( (*it).id() );
}
@@ -122,7 +122,7 @@ void Kontact::ProfileDialog::slotOk()
KDialogBase::slotOk();
}
-QString Kontact::ProfileDialog::selectedProfile() const
+TQString Kontact::ProfileDialog::selectedProfile() const
{
return m_itemToProfile[m_list->selectedItem()];
}
@@ -135,7 +135,7 @@ void Kontact::ProfileDialog::loadSelectedProfile()
Kontact::ProfileManager::self()->loadProfile( profile.id() );
}
-void Kontact::ProfileDialog::profileLoaded( const QString& id )
+void Kontact::ProfileDialog::profileLoaded( const TQString& id )
{
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
if ( profile.isNull() )
@@ -165,11 +165,11 @@ void Kontact::ProfileDialog::deleteSelectedProfile()
void Kontact::ProfileDialog::exportSelectedProfile()
{
- const QString id = selectedProfile();
+ const TQString id = selectedProfile();
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
if ( profile.isNull() )
return;
- const QString path = KFileDialog::getExistingDirectory( QString(), this, i18n("Select Profile Folder") );
+ const TQString path = KFileDialog::getExistingDirectory( TQString(), this, i18n("Select Profile Folder") );
if ( path.isNull() )
return;
const Kontact::ProfileManager::ExportError error = Kontact::ProfileManager::self()->exportProfileToDirectory( id, path );
@@ -185,7 +185,7 @@ void Kontact::ProfileDialog::exportSelectedProfile()
void Kontact::ProfileDialog::importProfile()
{
- const QString path = KFileDialog::getExistingDirectory( QString(), this, i18n("Select Profile Folder") );
+ const TQString path = KFileDialog::getExistingDirectory( TQString(), this, i18n("Select Profile Folder") );
if ( path.isNull() )
return;
const Kontact::ProfileManager::ImportError error = Kontact::ProfileManager::self()->importProfileFromDirectory( path );
@@ -195,29 +195,29 @@ void Kontact::ProfileDialog::importProfile()
}
}
-void Kontact::ProfileDialog::profileAdded( const QString& id )
+void Kontact::ProfileDialog::profileAdded( const TQString& id )
{
Q_ASSERT( !m_profileToItem[id] );
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
Q_ASSERT( !profile.isNull() );
- QListViewItem* const item = new QListViewItem( m_list );
+ TQListViewItem* const item = new TQListViewItem( m_list );
m_profileToItem[id] = item;
m_itemToProfile[item] = id;
profileUpdated( id );
}
-void Kontact::ProfileDialog::profileRemoved( const QString& id )
+void Kontact::ProfileDialog::profileRemoved( const TQString& id )
{
- QListViewItem* item = m_profileToItem[id];
+ TQListViewItem* item = m_profileToItem[id];
Q_ASSERT( item );
m_profileToItem.remove( id );
m_itemToProfile.remove( item );
delete item;
}
-void Kontact::ProfileDialog::profileUpdated( const QString& id )
+void Kontact::ProfileDialog::profileUpdated( const TQString& id )
{
- QListViewItem* item = m_profileToItem[id];
+ TQListViewItem* item = m_profileToItem[id];
Q_ASSERT( item );
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
Q_ASSERT( !profile.isNull() );
@@ -233,7 +233,7 @@ void Kontact::ProfileDialog::addNewProfile()
Kontact::ProfileManager::self()->addProfile( profile );
}
-void Kontact::ProfileDialog::listItemRenamed( QListViewItem* item, const QString& text, int col )
+void Kontact::ProfileDialog::listItemRenamed( TQListViewItem* item, const TQString& text, int col )
{
Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( m_itemToProfile[item] );
Q_ASSERT( !profile.isNull() );