diff options
Diffstat (limited to 'kontact/plugins/summary/summaryview_part.cpp')
-rw-r--r-- | kontact/plugins/summary/summaryview_part.cpp | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/kontact/plugins/summary/summaryview_part.cpp b/kontact/plugins/summary/summaryview_part.cpp index 9597de674..0b22f853b 100644 --- a/kontact/plugins/summary/summaryview_part.cpp +++ b/kontact/plugins/summary/summaryview_part.cpp @@ -21,10 +21,10 @@ Boston, MA 02110-1301, USA. */ -#include <qframe.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtimer.h> #include <dcopclient.h> #include <kaction.h> @@ -38,7 +38,7 @@ #include <kservice.h> #include <ktrader.h> #include <kstandarddirs.h> -#include <qscrollview.h> +#include <tqscrollview.h> #include <kglobal.h> #include <klocale.h> #include <kcmultidialog.h> @@ -67,7 +67,7 @@ namespace Kontact SummaryViewPart::SummaryViewPart( Kontact::Core *core, const char*, const KAboutData *aboutData, - QObject *parent, const char *name ) + TQObject *parent, const char *name ) : KParts::ReadOnlyPart( parent, name ), mCore( core ), mFrame( 0 ), mConfigAction( 0 ) { @@ -77,25 +77,25 @@ SummaryViewPart::SummaryViewPart( Kontact::Core *core, const char*, initGUI( core ); - connect( kapp, SIGNAL( kdisplayPaletteChanged() ), SLOT( slotAdjustPalette() ) ); + connect( kapp, TQT_SIGNAL( kdisplayPaletteChanged() ), TQT_SLOT( slotAdjustPalette() ) ); slotAdjustPalette(); - setDate( QDate::currentDate() ); - connect( mCore, SIGNAL( dayChanged( const QDate& ) ), - SLOT( setDate( const QDate& ) ) ); + setDate( TQDate::currentDate() ); + connect( mCore, TQT_SIGNAL( dayChanged( const TQDate& ) ), + TQT_SLOT( setDate( const TQDate& ) ) ); KParts::InfoExtension *info = new KParts::InfoExtension( this, "Summary" ); - connect( this, SIGNAL( textChanged( const QString& ) ), - info, SIGNAL( textChanged( const QString& ) ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString& ) ), + info, TQT_SIGNAL( textChanged( const TQString& ) ) ); mConfigAction = new KAction( i18n( "&Configure Summary View..." ), "configure", 0, this, - SLOT( slotConfigure() ), actionCollection(), + TQT_SLOT( slotConfigure() ), actionCollection(), "summaryview_configure" ); setXMLFile( "kontactsummary_part.rc" ); - QTimer::singleShot( 0, this, SLOT( slotTextChanged() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotTextChanged() ) ); } SummaryViewPart::~SummaryViewPart() @@ -122,7 +122,7 @@ void SummaryViewPart::partActivateEvent( KParts::PartActivateEvent *event ) void SummaryViewPart::updateSummaries() { - QMap<QString, Kontact::Summary*>::Iterator it; + TQMap<TQString, Kontact::Summary*>::Iterator it; for ( it = mSummaries.begin(); it != mSummaries.end(); ++it ) it.data()->updateSummary( false ); } @@ -136,18 +136,18 @@ void SummaryViewPart::updateWidgets() KPIM::IdentityManager idm( true, this ); const KPIM::Identity &id = idm.defaultIdentity(); - QString currentUser = i18n( "Summary for %1" ).arg( id.fullName() ); - mUsernameLabel->setText( QString::fromLatin1( "<b>%1</b>" ).arg( currentUser ) ); + TQString currentUser = i18n( "Summary for %1" ).arg( id.fullName() ); + mUsernameLabel->setText( TQString::fromLatin1( "<b>%1</b>" ).arg( currentUser ) ); mSummaries.clear(); mFrame = new DropWidget( mMainWidget ); - connect( mFrame, SIGNAL( summaryWidgetDropped( QWidget*, QWidget*, int ) ), - this, SLOT( summaryWidgetMoved( QWidget*, QWidget*, int ) ) ); + connect( mFrame, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ), + this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) ); mMainLayout->insertWidget( 2, mFrame ); - QStringList activeSummaries; + TQStringList activeSummaries; KConfig config( "kontact_summaryrc" ); if ( !config.hasKey( "ActiveSummaries" ) ) { @@ -161,11 +161,11 @@ void SummaryViewPart::updateWidgets() } // Collect all summary widgets with a summaryHeight > 0 - QStringList loadedSummaries; + TQStringList loadedSummaries; - QValueList<Kontact::Plugin*> plugins = mCore->pluginList(); - QValueList<Kontact::Plugin*>::ConstIterator end = plugins.end(); - QValueList<Kontact::Plugin*>::ConstIterator it = plugins.begin(); + TQValueList<Kontact::Plugin*> plugins = mCore->pluginList(); + TQValueList<Kontact::Plugin*>::ConstIterator end = plugins.end(); + TQValueList<Kontact::Plugin*>::ConstIterator it = plugins.begin(); for ( ; it != end; ++it ) { Kontact::Plugin *plugin = *it; if ( activeSummaries.find( plugin->identifier() ) == activeSummaries.end() ) @@ -176,10 +176,10 @@ void SummaryViewPart::updateWidgets() if ( summary->summaryHeight() > 0 ) { mSummaries.insert( plugin->identifier(), summary ); - connect( summary, SIGNAL( message( const QString& ) ), - BroadcastStatus::instance(), SLOT( setStatusMsg( const QString& ) ) ); - connect( summary, SIGNAL( summaryWidgetDropped( QWidget*, QWidget*, int ) ), - this, SLOT( summaryWidgetMoved( QWidget*, QWidget*, int ) ) ); + connect( summary, TQT_SIGNAL( message( const TQString& ) ), + BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) ); + connect( summary, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ), + this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) ); if ( !mLeftColumnSummaries.contains( plugin->identifier() ) && !mRightColumnSummaries.contains( plugin->identifier() ) ) { @@ -195,7 +195,7 @@ void SummaryViewPart::updateWidgets() // Remove all unavailable summary widgets { - QStringList::Iterator strIt; + TQStringList::Iterator strIt; for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) { if ( loadedSummaries.find( *strIt ) == loadedSummaries.end() ) { strIt = mLeftColumnSummaries.remove( strIt ); @@ -211,17 +211,17 @@ void SummaryViewPart::updateWidgets() } // Add vertical line between the two rows of summary widgets. - QFrame *vline = new QFrame( mFrame ); - vline->setFrameStyle( QFrame::VLine | QFrame::Plain ); + TQFrame *vline = new TQFrame( mFrame ); + vline->setFrameStyle( TQFrame::VLine | TQFrame::Plain ); - QHBoxLayout *layout = new QHBoxLayout( mFrame ); + TQHBoxLayout *layout = new TQHBoxLayout( mFrame ); - mLeftColumn = new QVBoxLayout( layout, KDialog::spacingHint() ); + mLeftColumn = new TQVBoxLayout( layout, KDialog::spacingHint() ); layout->addWidget( vline ); - mRightColumn = new QVBoxLayout( layout, KDialog::spacingHint() ); + mRightColumn = new TQVBoxLayout( layout, KDialog::spacingHint() ); - QStringList::Iterator strIt; + TQStringList::Iterator strIt; for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) { if ( mSummaries.find( *strIt ) != mSummaries.end() ) mLeftColumn->addWidget( mSummaries[ *strIt ] ); @@ -241,7 +241,7 @@ void SummaryViewPart::updateWidgets() mRightColumn->addStretch(); } -void SummaryViewPart::summaryWidgetMoved( QWidget *target, QWidget *widget, int alignment ) +void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, int alignment ) { if ( target == widget ) return; @@ -314,9 +314,9 @@ void SummaryViewPart::slotAdjustPalette() mMainWidget->setPaletteBackgroundColor( kapp->palette().active().base() ); } -void SummaryViewPart::setDate( const QDate& newDate ) +void SummaryViewPart::setDate( const TQDate& newDate ) { - QString date( "<b>%1</b>" ); + TQString date( "<b>%1</b>" ); date = date.arg( KGlobal::locale()->formatDate( newDate ) ); mDateLabel->setText( date ); } @@ -325,26 +325,26 @@ void SummaryViewPart::slotConfigure() { KCMultiDialog dlg( mMainWidget, "ConfigDialog", true ); - QStringList modules = configModules(); + TQStringList modules = configModules(); modules.prepend( "kcmkontactsummary.desktop" ); - connect( &dlg, SIGNAL( configCommitted() ), - this, SLOT( updateWidgets() ) ); + connect( &dlg, TQT_SIGNAL( configCommitted() ), + this, TQT_SLOT( updateWidgets() ) ); - QStringList::ConstIterator strIt; + TQStringList::ConstIterator strIt; for ( strIt = modules.begin(); strIt != modules.end(); ++strIt ) dlg.addModule( *strIt ); dlg.exec(); } -QStringList SummaryViewPart::configModules() const +TQStringList SummaryViewPart::configModules() const { - QStringList modules; + TQStringList modules; - QMap<QString, Kontact::Summary*>::ConstIterator it; + TQMap<TQString, Kontact::Summary*>::ConstIterator it; for ( it = mSummaries.begin(); it != mSummaries.end(); ++it ) { - QStringList cm = it.data()->configModules(); - QStringList::ConstIterator strIt; + TQStringList cm = it.data()->configModules(); + TQStringList::ConstIterator strIt; for ( strIt = cm.begin(); strIt != cm.end(); ++strIt ) if ( !(*strIt).isEmpty() && !modules.contains( *strIt ) ) modules.append( *strIt ); @@ -355,37 +355,37 @@ QStringList SummaryViewPart::configModules() const void SummaryViewPart::initGUI( Kontact::Core *core ) { - QScrollView *sv = new QScrollView( core ); + TQScrollView *sv = new TQScrollView( core ); - sv->setResizePolicy( QScrollView::AutoOneFit ); - sv->setFrameStyle( QFrame::NoFrame | QFrame::Plain ); - sv->setHScrollBarMode( QScrollView::AlwaysOff ); + sv->setResizePolicy( TQScrollView::AutoOneFit ); + sv->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain ); + sv->setHScrollBarMode( TQScrollView::AlwaysOff ); - mMainWidget = new QFrame( sv->viewport() ); + mMainWidget = new TQFrame( sv->viewport() ); sv->addChild( mMainWidget ); - mMainWidget->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - sv->setFocusPolicy( QWidget::StrongFocus ); + mMainWidget->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + sv->setFocusPolicy( TQWidget::StrongFocus ); setWidget( sv ); - mMainLayout = new QVBoxLayout( mMainWidget,KDialog::marginHint(), + mMainLayout = new TQVBoxLayout( mMainWidget,KDialog::marginHint(), KDialog::spacingHint() ); - QHBoxLayout *hbl = new QHBoxLayout( mMainLayout ); - mUsernameLabel = new QLabel( mMainWidget ); + TQHBoxLayout *hbl = new TQHBoxLayout( mMainLayout ); + mUsernameLabel = new TQLabel( mMainWidget ); hbl->addWidget( mUsernameLabel ); - mDateLabel = new QLabel( mMainWidget ); + mDateLabel = new TQLabel( mMainWidget ); mDateLabel->setAlignment( AlignRight ); hbl->addWidget( mDateLabel ); - QFrame *hline = new QFrame( mMainWidget ); - hline->setFrameStyle( QFrame::HLine | QFrame::Plain ); + TQFrame *hline = new TQFrame( mMainWidget ); + hline->setFrameStyle( TQFrame::HLine | TQFrame::Plain ); mMainLayout->insertWidget( 1, hline ); mFrame = new DropWidget( mMainWidget ); mMainLayout->insertWidget( 2, mFrame ); - connect( mFrame, SIGNAL( summaryWidgetDropped( QWidget*, QWidget*, int ) ), - this, SLOT( summaryWidgetMoved( QWidget*, QWidget*, int ) ) ); + connect( mFrame, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ), + this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) ); updateWidgets(); } @@ -420,15 +420,15 @@ void SummaryViewPart::saveLayout() config.sync(); } -QString SummaryViewPart::widgetName( QWidget *widget ) const +TQString SummaryViewPart::widgetName( TQWidget *widget ) const { - QMap<QString, Kontact::Summary*>::ConstIterator it; + TQMap<TQString, Kontact::Summary*>::ConstIterator it; for ( it = mSummaries.begin(); it != mSummaries.end(); ++it ) { if ( it.data() == widget ) return it.key(); } - return QString::null; + return TQString::null; } #include "summaryview_part.moc" |