summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/korganizer/todosummarywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/korganizer/todosummarywidget.cpp')
-rw-r--r--kontact/plugins/korganizer/todosummarywidget.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kontact/plugins/korganizer/todosummarywidget.cpp b/kontact/plugins/korganizer/todosummarywidget.cpp
index d52941ee4..e58ee6aa0 100644
--- a/kontact/plugins/korganizer/todosummarywidget.cpp
+++ b/kontact/plugins/korganizer/todosummarywidget.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>
@@ -53,25 +53,25 @@
#include "todosummarywidget.h"
TodoSummaryWidget::TodoSummaryWidget( TodoPlugin *plugin,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ), mPlugin( plugin )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_todo",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_todo",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "To-do" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "To-do" ) );
mainLayout->addWidget( header );
- mLayout = new QGridLayout( mainLayout, 7, 4, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 4, 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();
}
@@ -92,19 +92,19 @@ void TodoSummaryWidget::updateView()
KIconLoader loader( "kdepim" );
- QLabel *label = 0;
+ TQLabel *label = 0;
int counter = 0;
- QDate currentDate = QDate::currentDate();
+ TQDate currentDate = TQDate::currentDate();
KCal::Todo::List todos = mCalendar->todos();
if ( todos.count() > 0 ) {
- QPixmap pm = loader.loadIcon( "todo", KIcon::Small );
+ TQPixmap pm = loader.loadIcon( "todo", KIcon::Small );
KCal::Todo::List::ConstIterator it;
for ( it = todos.begin(); it != todos.end(); ++it ) {
KCal::Todo *todo = *it;
bool accepted = false;
- QString stateText;
+ TQString stateText;
// show all incomplete todos
if ( showAllTodos && !todo->isCompleted())
@@ -140,19 +140,19 @@ void TodoSummaryWidget::updateView()
if ( !accepted )
continue;
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( pm );
- label->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
mLayout->addWidget( label, counter, 0 );
mLabels.append( label );
- label = new QLabel( QString::number( todo->percentComplete() ) + "%", this );
+ label = new TQLabel( TQString::number( todo->percentComplete() ) + "%", this );
label->setAlignment( AlignHCenter | AlignVCenter );
- label->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
mLayout->addWidget( label, counter, 1 );
mLabels.append( label );
- QString sSummary = todo->summary();
+ TQString sSummary = todo->summary();
if ( todo->relatedTo() ) { // show parent only, not entire ancestry
sSummary = todo->relatedTo()->summary() + ":" + todo->summary();
}
@@ -164,19 +164,19 @@ void TodoSummaryWidget::updateView()
mLayout->addWidget( urlLabel, counter, 2 );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( viewTodo( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( popupMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( viewTodo( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( popupMenu( const TQString& ) ) );
- QString tipText( KCal::IncidenceFormatter::toolTipString( todo, true ) );
+ TQString tipText( KCal::IncidenceFormatter::toolTipString( todo, true ) );
if ( !tipText.isEmpty() ) {
- QToolTip::add( urlLabel, tipText );
+ TQToolTip::add( urlLabel, tipText );
}
- label = new QLabel( stateText, this );
+ label = new TQLabel( stateText, this );
label->setAlignment( AlignLeft | AlignVCenter );
- label->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
mLayout->addWidget( label, counter, 3 );
mLabels.append( label );
@@ -185,7 +185,7 @@ void TodoSummaryWidget::updateView()
}
if ( counter == 0 ) {
- QLabel *noTodos = new QLabel( i18n( "No to-dos pending" ), this );
+ TQLabel *noTodos = new TQLabel( i18n( "No to-dos pending" ), this );
noTodos->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addWidget( noTodos, 0, 1 );
mLabels.append( noTodos );
@@ -195,27 +195,27 @@ void TodoSummaryWidget::updateView()
label->show();
}
-void TodoSummaryWidget::viewTodo( const QString &uid )
+void TodoSummaryWidget::viewTodo( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_todoplugin" );//ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.editIncidence( uid );
}
-void TodoSummaryWidget::removeTodo( const QString &uid )
+void TodoSummaryWidget::removeTodo( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_todoplugin" );//ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.deleteIncidence( uid, false );
}
-void TodoSummaryWidget::completeTodo( const QString &uid )
+void TodoSummaryWidget::completeTodo( const TQString &uid )
{
KCal::Todo *todo = mCalendar->todo( uid );
IncidenceChanger *changer = new IncidenceChanger( mCalendar, this );
if ( !todo->isReadOnly() && changer->beginChange( todo ) ) {
KCal::Todo *oldTodo = todo->clone();
- todo->setCompleted( QDateTime::currentDateTime() );
+ todo->setCompleted( TQDateTime::currentDateTime() );
changer->changeIncidence( oldTodo, todo, KOGlobals::COMPLETION_MODIFIED );
changer->endChange( todo );
delete oldTodo;
@@ -223,10 +223,10 @@ void TodoSummaryWidget::completeTodo( const QString &uid )
}
}
-void TodoSummaryWidget::popupMenu( const QString &uid )
+void TodoSummaryWidget::popupMenu( const TQString &uid )
{
KPopupMenu popup( this );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
popup.insertItem( i18n( "&Edit To-do..." ), 0 );
popup.insertItem( KGlobal::iconLoader()->loadIcon( "editdelete", KIcon::Small),
i18n( "&Delete To-do" ), 1 );
@@ -236,7 +236,7 @@ void TodoSummaryWidget::popupMenu( const QString &uid )
i18n( "&Mark To-do Completed" ), 2 );
}
- switch ( popup.exec( QCursor::pos() ) ) {
+ switch ( popup.exec( TQCursor::pos() ) ) {
case 0:
viewTodo( uid );
break;
@@ -249,22 +249,22 @@ void TodoSummaryWidget::popupMenu( const QString &uid )
}
}
-bool TodoSummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool TodoSummaryWidget::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 To-do: \"%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 TodoSummaryWidget::configModules() const
+TQStringList TodoSummaryWidget::configModules() const
{
- return QStringList( "kcmtodosummary.desktop" );
+ return TQStringList( "kcmtodosummary.desktop" );
}
#include "todosummarywidget.moc"