summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/knotes/summarywidget.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/plugins/knotes/summarywidget.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/plugins/knotes/summarywidget.cpp')
-rw-r--r--kontact/plugins/knotes/summarywidget.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kontact/plugins/knotes/summarywidget.cpp b/kontact/plugins/knotes/summarywidget.cpp
index 3045ede53..012e6ae82 100644
--- a/kontact/plugins/knotes/summarywidget.cpp
+++ b/kontact/plugins/knotes/summarywidget.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qobject.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqobject.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -45,26 +45,26 @@
#include "summarywidget.h"
KNotesSummaryWidget::KNotesSummaryWidget( Kontact::Plugin *plugin,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ), mLayout( 0 ), mPlugin( plugin )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_notes",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_notes",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget* header = createHeader( this, icon, i18n( "Notes" ) );
+ TQWidget* header = createHeader( this, icon, i18n( "Notes" ) );
mainLayout->addWidget( header );
- mLayout = new QGridLayout( mainLayout, 7, 3, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 3, 3 );
mLayout->setRowStretch( 6, 1 );
- mCalendar = new KCal::CalendarLocal( QString::fromLatin1("UTC") );
+ mCalendar = new KCal::CalendarLocal( TQString::fromLatin1("UTC") );
KNotesResourceManager *manager = new KNotesResourceManager();
- QObject::connect( manager, SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
- this, SLOT( addNote( KCal::Journal* ) ) );
- QObject::connect( manager, SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
- this, SLOT( removeNote( KCal::Journal* ) ) );
+ TQObject::connect( manager, TQT_SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( addNote( KCal::Journal* ) ) );
+ TQObject::connect( manager, TQT_SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( removeNote( KCal::Journal* ) ) );
manager->load();
@@ -74,7 +74,7 @@ KNotesSummaryWidget::KNotesSummaryWidget( Kontact::Plugin *plugin,
void KNotesSummaryWidget::updateView()
{
mNotes = mCalendar->journals();
- QLabel *label;
+ TQLabel *label;
for ( label = mLabels.first(); label; label = mLabels.next() )
label->deleteLater();
@@ -83,14 +83,14 @@ void KNotesSummaryWidget::updateView()
KIconLoader loader( "knotes" );
int counter = 0;
- QPixmap pm = loader.loadIcon( "knotes", KIcon::Small );
+ TQPixmap pm = loader.loadIcon( "knotes", KIcon::Small );
KCal::Journal::List::Iterator it;
if ( mNotes.count() ) {
for (it = mNotes.begin(); it != mNotes.end(); ++it) {
// Fill Note Pixmap Field
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( pm );
label->setMaximumWidth( label->minimumSizeHint().width() );
label->setAlignment( AlignVCenter );
@@ -98,7 +98,7 @@ void KNotesSummaryWidget::updateView()
mLabels.append( label );
// File Note Summary Field
- QString newtext = (*it)->summary();
+ TQString newtext = (*it)->summary();
KURLLabel *urlLabel = new KURLLabel( (*it)->uid(), newtext, this );
urlLabel->installEventFilter( this );
@@ -108,16 +108,16 @@ void KNotesSummaryWidget::updateView()
mLabels.append( urlLabel );
if ( !(*it)->description().isEmpty() ) {
- QToolTip::add( urlLabel, (*it)->description().left( 80 ) );
+ TQToolTip::add( urlLabel, (*it)->description().left( 80 ) );
}
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( urlClicked( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( urlClicked( const TQString& ) ) );
counter++;
}
} else {
- QLabel *noNotes = new QLabel( i18n( "No Notes Available" ), this );
+ TQLabel *noNotes = new TQLabel( i18n( "No Notes Available" ), this );
noNotes->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addWidget( noNotes, 0, 1 );
mLabels.append( noNotes );
@@ -127,7 +127,7 @@ void KNotesSummaryWidget::updateView()
label->show();
}
-void KNotesSummaryWidget::urlClicked( const QString &/*uid*/ )
+void KNotesSummaryWidget::urlClicked( const TQString &/*uid*/ )
{
if ( !mPlugin->isRunningStandalone() )
mPlugin->core()->selectPlugin( mPlugin );
@@ -135,14 +135,14 @@ void KNotesSummaryWidget::urlClicked( const QString &/*uid*/ )
mPlugin->bringToForeground();
}
-bool KNotesSummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool KNotesSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Read Note: \"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );