summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/korganizer/summarywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/korganizer/summarywidget.cpp')
-rw-r--r--kontact/plugins/korganizer/summarywidget.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kontact/plugins/korganizer/summarywidget.cpp b/kontact/plugins/korganizer/summarywidget.cpp
index 68742248..ff3d5da9 100644
--- a/kontact/plugins/korganizer/summarywidget.cpp
+++ b/kontact/plugins/korganizer/summarywidget.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <kdialog.h>
#include <kglobal.h>
@@ -50,26 +50,26 @@
#include "summarywidget.h"
-SummaryWidget::SummaryWidget( KOrganizerPlugin *plugin, QWidget *parent,
+SummaryWidget::SummaryWidget( KOrganizerPlugin *plugin, TQWidget *parent,
const char *name )
: Kontact::Summary( parent, name ), mPlugin( plugin ), mCalendar( 0 )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_date",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_date",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "Calendar" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "Calendar" ) );
mainLayout->addWidget( header );
- mLayout = new QGridLayout( mainLayout, 7, 5, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 5, 3 );
mLayout->setRowStretch( 6, 1 );
mCalendar = KOrg::StdCalendar::self();
mCalendar->load();
- connect( mCalendar, SIGNAL( calendarChanged() ), SLOT( updateView() ) );
- connect( mPlugin->core(), SIGNAL( dayChanged( const QDate& ) ),
- SLOT( updateView() ) );
+ connect( mCalendar, TQT_SIGNAL( calendarChanged() ), TQT_SLOT( updateView() ) );
+ connect( mPlugin->core(), TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ TQT_SLOT( updateView() ) );
updateView();
}
@@ -91,12 +91,12 @@ void SummaryWidget::updateView()
config.setGroup( "Calendar" );
int days = config.readNumEntry( "DaysToShow", 1 );
- QLabel *label = 0;
+ TQLabel *label = 0;
int counter = 0;
- QPixmap pm = loader.loadIcon( "appointment", KIcon::Small );
+ TQPixmap pm = loader.loadIcon( "appointment", KIcon::Small );
- QDate dt;
- QDate currentDate = QDate::currentDate();
+ TQDate dt;
+ TQDate currentDate = TQDate::currentDate();
for ( dt=currentDate;
dt<=currentDate.addDays( days - 1 );
dt=dt.addDays(1) ) {
@@ -108,10 +108,10 @@ void SummaryWidget::updateView()
KCal::Event::List events;
events.setAutoDelete( true );
- QDateTime qdt;
+ TQDateTime qdt;
// prevent implicitely sharing while finding recurring events
- // replacing the QDate with the currentDate
+ // replacing the TQDate with the currentDate
for ( ; it != events_orig.end(); ++it ) {
ev = (*it)->clone();
if ( ev->recursOn( dt ) ) {
@@ -137,7 +137,7 @@ void SummaryWidget::updateView()
// Count number of days remaining in multiday event
int span=1; int dayof=1;
if ( ev->isMultiDay() ) {
- QDate d = ev->dtStart().date();
+ TQDate d = ev->dtStart().date();
if ( d < currentDate ) {
d = currentDate;
}
@@ -155,7 +155,7 @@ void SummaryWidget::updateView()
if ( ev->isMultiDay() && ev->doesFloat() && dayof != 1 ) continue;
// Fill Appointment Pixmap Field
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( pm );
label->setMaximumWidth( label->minimumSizeHint().width() );
label->setAlignment( AlignVCenter );
@@ -164,10 +164,10 @@ void SummaryWidget::updateView()
// Fill Event Date Field
bool makeBold = false;
- QString datestr;
+ TQString datestr;
// Modify event date for printing
- QDate sD = QDate::QDate( dt.year(), dt.month(), dt.day() );
+ TQDate sD = TQDate::TQDate( dt.year(), dt.month(), dt.day() );
if ( ( sD.month() == currentDate.month() ) &&
( sD.day() == currentDate.day() ) ) {
datestr = i18n( "Today" );
@@ -187,10 +187,10 @@ void SummaryWidget::updateView()
KGlobal::locale()->formatDate( sD.addDays( span-1 ) );
}
- label = new QLabel( datestr, this );
+ label = new TQLabel( datestr, this );
label->setAlignment( AlignLeft | AlignVCenter );
if ( makeBold ) {
- QFont font = label->font();
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
}
@@ -198,9 +198,9 @@ void SummaryWidget::updateView()
mLabels.append( label );
// Fill Event Summary Field
- QString newtext = ev->summary();
+ TQString newtext = ev->summary();
if ( ev->isMultiDay() && !ev->doesFloat() ) {
- newtext.append( QString(" (%1/%2)").arg( dayof ).arg( span ) );
+ newtext.append( TQString(" (%1/%2)").arg( dayof ).arg( span ) );
}
KURLLabel *urlLabel = new KURLLabel( this );
@@ -211,32 +211,32 @@ void SummaryWidget::updateView()
mLayout->addWidget( urlLabel, counter, 2 );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( viewEvent( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( popupMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( viewEvent( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( popupMenu( const TQString& ) ) );
- QString tipText( KCal::IncidenceFormatter::toolTipString( ev, true ) );
+ TQString tipText( KCal::IncidenceFormatter::toolTipString( ev, true ) );
if ( !tipText.isEmpty() ) {
- QToolTip::add( urlLabel, tipText );
+ TQToolTip::add( urlLabel, tipText );
}
// Fill Event Time Range Field (only for non-floating Events)
if ( !ev->doesFloat() ) {
- QTime sST = ev->dtStart().time();
- QTime sET = ev->dtEnd().time();
+ TQTime sST = ev->dtStart().time();
+ TQTime sET = ev->dtEnd().time();
if ( ev->isMultiDay() ) {
if ( ev->dtStart().date() < dt ) {
- sST = QTime::QTime( 0, 0 );
+ sST = TQTime::TQTime( 0, 0 );
}
if ( ev->dtEnd().date() > dt ) {
- sET = QTime::QTime( 23, 59 );
+ sET = TQTime::TQTime( 23, 59 );
}
}
datestr = i18n( "Time from - to", "%1 - %2" )
.arg( KGlobal::locale()->formatTime( sST ) )
.arg( KGlobal::locale()->formatTime( sET ) );
- label = new QLabel( datestr, this );
+ label = new TQLabel( datestr, this );
label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 3 );
mLabels.append( label );
@@ -247,7 +247,7 @@ void SummaryWidget::updateView()
}
if ( !counter ) {
- QLabel *noEvents = new QLabel(
+ TQLabel *noEvents = new TQLabel(
i18n( "No appointments pending within the next day",
"No appointments pending within the next %n days",
days ), this, "nothing to see" );
@@ -260,29 +260,29 @@ void SummaryWidget::updateView()
label->show();
}
-void SummaryWidget::viewEvent( const QString &uid )
+void SummaryWidget::viewEvent( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_korganizerplugin" ); //ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.editIncidence( uid );
}
-void SummaryWidget::removeEvent( const QString &uid )
+void SummaryWidget::removeEvent( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_korganizerplugin" ); //ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.deleteIncidence( uid, false );
}
-void SummaryWidget::popupMenu( const QString &uid )
+void SummaryWidget::popupMenu( const TQString &uid )
{
KPopupMenu popup( this );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
popup.insertItem( i18n( "&Edit Appointment..." ), 0 );
popup.insertItem( KGlobal::iconLoader()->loadIcon( "editdelete", KIcon::Small),
i18n( "&Delete Appointment" ), 1 );
- switch ( popup.exec( QCursor::pos() ) ) {
+ switch ( popup.exec( TQCursor::pos() ) ) {
case 0:
viewEvent( uid );
break;
@@ -292,22 +292,22 @@ void SummaryWidget::popupMenu( const QString &uid )
}
}
-bool SummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SummaryWidget::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( "Edit Appointment: \"%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 );
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
- return QStringList( "kcmkorgsummary.desktop" );
+ return TQStringList( "kcmkorgsummary.desktop" );
}
#include "summarywidget.moc"