summaryrefslogtreecommitdiffstats
path: root/korganizer/kotodoview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/kotodoview.cpp')
-rw-r--r--korganizer/kotodoview.cpp308
1 files changed, 154 insertions, 154 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index f43ca2f69..3736bf29c 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -23,11 +23,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qheader.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,16 +63,16 @@ using namespace KOrg;
#include "calprinter.h"
#endif
-KOTodoListViewToolTip::KOTodoListViewToolTip (QWidget* parent,
+KOTodoListViewToolTip::KOTodoListViewToolTip (TQWidget* parent,
KOTodoListView* lv )
- :QToolTip(parent)
+ :TQToolTip(parent)
{
todolist=lv;
}
-void KOTodoListViewToolTip::maybeTip( const QPoint & pos)
+void KOTodoListViewToolTip::maybeTip( const TQPoint & pos)
{
- QRect r;
+ TQRect r;
int headerPos;
int col=todolist->header()->sectionAt(todolist->contentsX() + pos.x());
KOTodoViewItem *i=(KOTodoViewItem *)todolist->itemAt(pos);
@@ -88,7 +88,7 @@ void KOTodoListViewToolTip::maybeTip( const QPoint & pos)
r.setRight(headerPos + todolist->header()->sectionSize(col));
/* Show the tip */
- QString tipText( IncidenceFormatter::toolTipString( i->todo() ) );;
+ TQString tipText( IncidenceFormatter::toolTipString( i->todo() ) );;
if ( !tipText.isEmpty() ) {
tip(r, tipText);
}
@@ -98,7 +98,7 @@ void KOTodoListViewToolTip::maybeTip( const QPoint & pos)
-KOTodoListView::KOTodoListView( QWidget *parent, const char *name )
+KOTodoListView::KOTodoListView( TQWidget *parent, const char *name )
: KListView( parent, name ), mCalendar( 0 ), mChanger( 0 )
{
mOldCurrent = 0;
@@ -120,14 +120,14 @@ void KOTodoListView::setCalendar( Calendar *cal )
viewport()->setAcceptDrops( mCalendar );
}
-bool KOTodoListView::event(QEvent *e)
+bool KOTodoListView::event(TQEvent *e)
{
int tmp=0;
KOTodoViewItem *i;
/* Checks for an ApplicationPaletteChange event and updates
* the small Progress bars to make therm have the right colors. */
- if(e->type()==QEvent::ApplicationPaletteChange)
+ if(e->type()==TQEvent::ApplicationPaletteChange)
{
KListView::event(e);
@@ -142,15 +142,15 @@ bool KOTodoListView::event(QEvent *e)
}
- return (KListView::event(e) || e->type()==QEvent::ApplicationPaletteChange);
+ return (KListView::event(e) || e->type()==TQEvent::ApplicationPaletteChange);
}
-void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
+void KOTodoListView::contentsDragEnterEvent(TQDragEnterEvent *e)
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsDragEnterEvent" << endl;
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) {
+ !TQTextDrag::canDecode( e ) ) {
e->ignore();
return;
}
@@ -159,13 +159,13 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
#endif
}
-void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
+void KOTodoListView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsDragMoveEvent" << endl;
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) {
+ !TQTextDrag::canDecode( e ) ) {
e->ignore();
return;
}
@@ -174,7 +174,7 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
#endif
}
-void KOTodoListView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KOTodoListView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsDragLeaveEvent" << endl;
@@ -184,14 +184,14 @@ void KOTodoListView::contentsDragLeaveEvent( QDragLeaveEvent * )
#endif
}
-void KOTodoListView::contentsDropEvent( QDropEvent *e )
+void KOTodoListView::contentsDropEvent( TQDropEvent *e )
{
#ifndef KORG_NODND
kdDebug(5850) << "KOTodoListView::contentsDropEvent" << endl;
if ( !mCalendar || !mChanger ||
( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) ) {
+ !TQTextDrag::canDecode( e ) ) ) {
e->ignore();
return;
}
@@ -244,7 +244,7 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
}
}
else {
- QString text;
+ TQString text;
KOTodoViewItem *todoi = dynamic_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) ));
if ( ! todoi ) {
// Not dropped on a todo item:
@@ -252,8 +252,8 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
kdDebug( 5850 ) << "KOTodoListView::contentsDropEvent(): Not dropped on a todo item" << endl;
kdDebug( 5850 ) << "TODO: Create a new todo with the given data" << endl;
// FIXME: Create a new todo with the given text/contact/whatever
- } else if ( QTextDrag::decode(e, text) ) {
- //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
+ } else if ( TQTextDrag::decode(e, text) ) {
+ //TQListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
kdDebug(5850) << "Dropped : " << text << endl;
Todo*todo = todoi->todo();
if( mChanger->beginChange( todo ) ) {
@@ -262,12 +262,12 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
if( text.startsWith( "file:" ) ) {
todo->addAttachment( new Attachment( text ) );
} else {
- QStringList emails = KPIM::splitEmailAddrList( text );
- for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
+ TQStringList emails = KPIM::splitEmailAddrList( text );
+ for(TQStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
kdDebug(5850) << " Email: " << (*it) << endl;
int pos = (*it).find("<");
- QString name = (*it).left(pos);
- QString email = (*it).mid(pos);
+ TQString name = (*it).left(pos);
+ TQString email = (*it).mid(pos);
if (!email.isEmpty() && todoi) {
todo->addAttendee( new Attendee( name, email ) );
}
@@ -288,11 +288,11 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
#endif
}
-void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
+void KOTodoListView::contentsMousePressEvent(TQMouseEvent* e)
{
- QListView::contentsMousePressEvent(e);
- QPoint p(contentsToViewport(e->pos()));
- QListViewItem *i = itemAt(p);
+ TQListView::contentsMousePressEvent(e);
+ TQPoint p(contentsToViewport(e->pos()));
+ TQListViewItem *i = itemAt(p);
if (i) {
// if the user clicked into the root decoration of the item, don't
// try to start a drag!
@@ -308,15 +308,15 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
}
}
-void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
+void KOTodoListView::contentsMouseMoveEvent(TQMouseEvent* e)
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsMouseMoveEvent()" << endl;
- QListView::contentsMouseMoveEvent(e);
+ TQListView::contentsMouseMoveEvent(e);
if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
- QApplication::startDragDistance()) {
+ TQApplication::startDragDistance()) {
mMousePressed = false;
- QListViewItem *item = itemAt(contentsToViewport(mPressPos));
+ TQListViewItem *item = itemAt(contentsToViewport(mPressPos));
if ( item && mCalendar ) {
// kdDebug(5850) << "Start Drag for item " << item->text(0) << endl;
DndFactory factory( mCalendar );
@@ -326,33 +326,33 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
kdDebug(5850) << "KOTodoListView::contentsMouseMoveEvent(): Delete drag source" << endl;
}
/*
- QString source = fullPath(item);
- if ( QFile::exists(source) ) {
+ TQString source = fullPath(item);
+ if ( TQFile::exists(source) ) {
KURL url;
url.setPath(source);
KURLDrag* ud = KURLDrag::newDrag(KURL::List(url), viewport());
if ( ud->drag() )
- QMessageBox::information( this, "Drag source",
- QString("Delete ")+source, "Not implemented" );
+ TQMessageBox::information( this, "Drag source",
+ TQString("Delete ")+source, "Not implemented" );
*/
}
}
#endif
}
-void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
+void KOTodoListView::contentsMouseReleaseEvent(TQMouseEvent *e)
{
- QListView::contentsMouseReleaseEvent(e);
+ TQListView::contentsMouseReleaseEvent(e);
mMousePressed = false;
}
-void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
+void KOTodoListView::contentsMouseDoubleClickEvent(TQMouseEvent *e)
{
if (!e) return;
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt(vp);
+ TQListViewItem *item = itemAt(vp);
if (!item) return;
@@ -361,13 +361,13 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
/////////////////////////////////////////////////////////////////////////////
-KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
+KOTodoView::KOTodoView( Calendar *calendar, TQWidget *parent, const char* name)
: KOrg::BaseView( calendar, parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- QLabel *title = new QLabel( i18n("To-dos:"), this );
- title->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ TQLabel *title = new TQLabel( i18n("To-dos:"), this );
+ title->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
topLayout->addWidget( title );
mQuickAdd = new KPIM::ClickLineEdit( this, i18n( "Click to add a new to-do" ) );
@@ -402,17 +402,17 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
mTodoListView->setItemsRenameable( true );
mTodoListView->setRenameable( 0 );
- mTodoListView->setColumnWidthMode( eSummaryColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( eRecurColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( ePriorityColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( ePercentColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( eDueDateColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( eCategoriesColumn, QListView::Manual );
+ mTodoListView->setColumnWidthMode( eSummaryColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( eRecurColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( ePriorityColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( ePercentColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( eDueDateColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( eCategoriesColumn, TQListView::Manual );
#if 0
- mTodoListView->setColumnWidthMode( eDescriptionColumn, QListView::Manual );
+ mTodoListView->setColumnWidthMode( eDescriptionColumn, TQListView::Manual );
#endif
- mPriorityPopupMenu = new QPopupMenu( this );
+ mPriorityPopupMenu = new TQPopupMenu( this );
mPriority[ mPriorityPopupMenu->insertItem( i18n("Unspecified priority", "unspecified") ) ] = 0;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "1 (highest)") ) ] = 1;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "2" ) ) ] = 2;
@@ -423,16 +423,16 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
mPriority[ mPriorityPopupMenu->insertItem( i18n( "7" ) ) ] = 7;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "8" ) ) ] = 8;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "9 (lowest)" ) ) ] = 9;
- connect( mPriorityPopupMenu, SIGNAL( activated( int ) ),
- SLOT( setNewPriority( int ) ));
+ connect( mPriorityPopupMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( setNewPriority( int ) ));
- mPercentageCompletedPopupMenu = new QPopupMenu(this);
+ mPercentageCompletedPopupMenu = new TQPopupMenu(this);
for (int i = 0; i <= 100; i+=10) {
- QString label = QString ("%1 %").arg (i);
+ TQString label = TQString ("%1 %").arg (i);
mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
}
- connect( mPercentageCompletedPopupMenu, SIGNAL( activated( int ) ),
- SLOT( setNewPercentage( int ) ) );
+ connect( mPercentageCompletedPopupMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( setNewPercentage( int ) ) );
mMovePopupMenu = new KDatePickerPopup(
KDatePickerPopup::NoDate |
@@ -444,76 +444,76 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
KDatePickerPopup::Words );
- connect( mMovePopupMenu, SIGNAL( dateChanged( QDate )),
- SLOT( setNewDate( QDate ) ) );
- connect( mCopyPopupMenu, SIGNAL( dateChanged( QDate )),
- SLOT( copyTodoToDate( QDate ) ) );
+ connect( mMovePopupMenu, TQT_SIGNAL( dateChanged( TQDate )),
+ TQT_SLOT( setNewDate( TQDate ) ) );
+ connect( mCopyPopupMenu, TQT_SIGNAL( dateChanged( TQDate )),
+ TQT_SLOT( copyTodoToDate( TQDate ) ) );
- mItemPopupMenu = new QPopupMenu(this);
+ mItemPopupMenu = new TQPopupMenu(this);
mItemPopupMenu->insertItem(i18n("&Show"), this,
- SLOT (showTodo()));
+ TQT_SLOT (showTodo()));
mItemPopupMenu->insertItem(i18n("&Edit..."), this,
- SLOT (editTodo()), 0, ePopupEdit );
+ TQT_SLOT (editTodo()), 0, ePopupEdit );
#ifndef KORG_NOPRINTER
- mItemPopupMenu->insertItem(KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), this, SLOT( printTodo() ) );
+ mItemPopupMenu->insertItem(KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), this, TQT_SLOT( printTodo() ) );
#endif
mItemPopupMenu->insertItem(KOGlobals::self()->smallIconSet("editdelete"), i18n("&Delete"), this,
- SLOT (deleteTodo()), 0, ePopupDelete );
+ TQT_SLOT (deleteTodo()), 0, ePopupDelete );
mItemPopupMenu->insertSeparator();
mItemPopupMenu->insertItem(KOGlobals::self()->smallIconSet("todo"), i18n("New &To-do..."), this,
- SLOT (newTodo()));
+ TQT_SLOT (newTodo()));
mItemPopupMenu->insertItem(i18n("New Su&b-to-do..."), this,
- SLOT (newSubTodo()));
+ TQT_SLOT (newSubTodo()));
mItemPopupMenu->insertItem( i18n("&Make this To-do Independent"), this,
- SIGNAL( unSubTodoSignal() ), 0, ePopupUnSubTodo );
+ TQT_SIGNAL( unSubTodoSignal() ), 0, ePopupUnSubTodo );
mItemPopupMenu->insertItem( i18n("Make all Sub-to-dos &Independent"), this,
- SIGNAL( unAllSubTodoSignal() ), 0, ePopupUnAllSubTodo );
+ TQT_SIGNAL( unAllSubTodoSignal() ), 0, ePopupUnAllSubTodo );
mItemPopupMenu->insertSeparator();
mItemPopupMenu->insertItem( i18n("&Copy To"), mCopyPopupMenu, ePopupCopyTo );
mItemPopupMenu->insertItem(i18n("&Move To"), mMovePopupMenu, ePopupMoveTo );
mItemPopupMenu->insertSeparator();
mItemPopupMenu->insertItem(i18n("delete completed to-dos","Pur&ge Completed"),
- this, SLOT( purgeCompleted() ) );
+ this, TQT_SLOT( purgeCompleted() ) );
- connect( mMovePopupMenu, SIGNAL( dateChanged( QDate ) ),
- mItemPopupMenu, SLOT( hide() ) );
- connect( mCopyPopupMenu, SIGNAL( dateChanged( QDate ) ),
- mItemPopupMenu, SLOT( hide() ) );
+ connect( mMovePopupMenu, TQT_SIGNAL( dateChanged( TQDate ) ),
+ mItemPopupMenu, TQT_SLOT( hide() ) );
+ connect( mCopyPopupMenu, TQT_SIGNAL( dateChanged( TQDate ) ),
+ mItemPopupMenu, TQT_SLOT( hide() ) );
- mPopupMenu = new QPopupMenu(this);
+ mPopupMenu = new TQPopupMenu(this);
mPopupMenu->insertItem(KOGlobals::self()->smallIconSet("todo"), i18n("&New To-do..."), this,
- SLOT (newTodo()));
+ TQT_SLOT (newTodo()));
mPopupMenu->insertItem(i18n("delete completed to-dos","&Purge Completed"),
- this, SLOT(purgeCompleted()));
+ this, TQT_SLOT(purgeCompleted()));
mDocPrefs = new DocPrefs( name );
// Double clicking conflicts with opening/closing the subtree
- connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *,
- const QPoint &, int ) ),
- SLOT( editItem( QListViewItem *, const QPoint &, int ) ) );
- connect( mTodoListView, SIGNAL( returnPressed( QListViewItem * ) ),
- SLOT( editItem( QListViewItem * ) ) );
- connect( mTodoListView, SIGNAL( contextMenuRequested( QListViewItem *,
- const QPoint &, int ) ),
- SLOT( popupMenu( QListViewItem *, const QPoint &, int ) ) );
- connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ),
- SLOT( itemStateChanged( QListViewItem * ) ) );
- connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ),
- SLOT( itemStateChanged( QListViewItem * ) ) );
+ connect( mTodoListView, TQT_SIGNAL( doubleClicked( TQListViewItem *,
+ const TQPoint &, int ) ),
+ TQT_SLOT( editItem( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( mTodoListView, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ TQT_SLOT( editItem( TQListViewItem * ) ) );
+ connect( mTodoListView, TQT_SIGNAL( contextMenuRequested( TQListViewItem *,
+ const TQPoint &, int ) ),
+ TQT_SLOT( popupMenu( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( mTodoListView, TQT_SIGNAL( expanded( TQListViewItem * ) ),
+ TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
+ connect( mTodoListView, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
+ TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
#if 0
- connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
- connect(mTodoListView,SIGNAL(clicked(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
- connect(mTodoListView,SIGNAL(pressed(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
+ connect(mTodoListView,TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ TQT_SLOT(selectionChanged(TQListViewItem *)));
+ connect(mTodoListView,TQT_SIGNAL(clicked(TQListViewItem *)),
+ TQT_SLOT(selectionChanged(TQListViewItem *)));
+ connect(mTodoListView,TQT_SIGNAL(pressed(TQListViewItem *)),
+ TQT_SLOT(selectionChanged(TQListViewItem *)));
#endif
- connect( mTodoListView, SIGNAL(selectionChanged() ),
- SLOT( processSelectionChange() ) );
- connect( mQuickAdd, SIGNAL( returnPressed () ),
- SLOT( addQuickTodo() ) );
+ connect( mTodoListView, TQT_SIGNAL(selectionChanged() ),
+ TQT_SLOT( processSelectionChange() ) );
+ connect( mQuickAdd, TQT_SIGNAL( returnPressed () ),
+ TQT_SLOT( addQuickTodo() ) );
}
KOTodoView::~KOTodoView()
@@ -546,7 +546,7 @@ void KOTodoView::updateView()
kdDebug(5850) << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl;
}
- QPtrList<Event> l = t->getRelations();
+ TQPtrList<Event> l = t->getRelations();
Event *c;
for(c=l.first();c;c=l.next()) {
kdDebug(5850) << " - relation: " << c->getSummary() << endl;
@@ -575,7 +575,7 @@ void KOTodoView::updateView()
processSelectionChange();
}
-void KOTodoView::restoreItemState( QListViewItem *item )
+void KOTodoView::restoreItemState( TQListViewItem *item )
{
while( item ) {
KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
@@ -586,7 +586,7 @@ void KOTodoView::restoreItemState( QListViewItem *item )
}
-QMap<Todo *,KOTodoViewItem *>::ConstIterator
+TQMap<Todo *,KOTodoViewItem *>::ConstIterator
KOTodoView::insertTodoItem(Todo *todo)
{
// kdDebug(5850) << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
@@ -599,7 +599,7 @@ QMap<Todo *,KOTodoViewItem *>::ConstIterator
mTodoMap.insert(todo,0);
// kdDebug(5850) << " has Related" << endl;
- QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
+ TQMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
itemIterator = mTodoMap.find(relatedTodo);
if (itemIterator == mTodoMap.end()) {
// kdDebug(5850) << " related not yet in list" << endl;
@@ -645,7 +645,7 @@ bool KOTodoView::scheduleRemoveTodoItem( KOTodoViewItem *todoItem )
{
if ( todoItem ) {
mItemsToDelete.append( todoItem );
- QTimer::singleShot( 0, this, SLOT( removeTodoItems() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( removeTodoItems() ) );
return true;
} else
return false;
@@ -728,17 +728,17 @@ void KOTodoView::changeIncidenceDisplay(Incidence *incidence, int action)
}
break;
default:
- QTimer::singleShot( 0, this, SLOT( updateView() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateView() ) );
}
} else {
- // use a QTimer here, because when marking todos finished using
+ // use a TQTimer here, because when marking todos finished using
// the checkbox, this slot gets called, but we cannot update the views
// because we're still inside KOTodoViewItem::stateChange
- QTimer::singleShot(0,this,SLOT(updateView()));
+ TQTimer::singleShot(0,this,TQT_SLOT(updateView()));
}
}
-void KOTodoView::showDates(const QDate &, const QDate &)
+void KOTodoView::showDates(const TQDate &, const TQDate &)
{
}
@@ -756,29 +756,29 @@ CalPrinterBase::PrintType KOTodoView::printType()
}
}
-void KOTodoView::editItem( QListViewItem *item )
+void KOTodoView::editItem( TQListViewItem *item )
{
if (item)
emit editIncidenceSignal( static_cast<KOTodoViewItem *>( item )->todo() );
}
-void KOTodoView::editItem( QListViewItem *item, const QPoint &, int )
+void KOTodoView::editItem( TQListViewItem *item, const TQPoint &, int )
{
editItem( item );
}
-void KOTodoView::showItem( QListViewItem *item )
+void KOTodoView::showItem( TQListViewItem *item )
{
if (item)
emit showIncidenceSignal( static_cast<KOTodoViewItem *>( item )->todo() );
}
-void KOTodoView::showItem( QListViewItem *item, const QPoint &, int )
+void KOTodoView::showItem( TQListViewItem *item, const TQPoint &, int )
{
showItem( item );
}
-void KOTodoView::popupMenu( QListViewItem *item, const QPoint &, int column )
+void KOTodoView::popupMenu( TQListViewItem *item, const TQPoint &, int column )
{
mActiveItem = static_cast<KOTodoViewItem *>( item );
if ( mActiveItem && mActiveItem->todo() &&
@@ -792,45 +792,45 @@ void KOTodoView::popupMenu( QListViewItem *item, const QPoint &, int column )
mItemPopupMenu->setItemEnabled( ePopupUnAllSubTodo, editable );
if ( editable ) {
- QDate date = mActiveItem->todo()->dtDue().date();
+ TQDate date = mActiveItem->todo()->dtDue().date();
if ( mActiveItem->todo()->hasDueDate () ) {
mMovePopupMenu->datePicker()->setDate( date );
} else {
- mMovePopupMenu->datePicker()->setDate( QDate::currentDate() );
+ mMovePopupMenu->datePicker()->setDate( TQDate::currentDate() );
}
switch ( column ) {
case ePriorityColumn:
- mPriorityPopupMenu->popup( QCursor::pos() );
+ mPriorityPopupMenu->popup( TQCursor::pos() );
break;
case ePercentColumn: {
- mPercentageCompletedPopupMenu->popup( QCursor::pos() );
+ mPercentageCompletedPopupMenu->popup( TQCursor::pos() );
break;
}
case eDueDateColumn:
- mMovePopupMenu->popup( QCursor::pos() );
+ mMovePopupMenu->popup( TQCursor::pos() );
break;
case eCategoriesColumn:
- getCategoryPopupMenu( mActiveItem )->popup( QCursor::pos() );
+ getCategoryPopupMenu( mActiveItem )->popup( TQCursor::pos() );
break;
default:
mCopyPopupMenu->datePicker()->setDate( date );
- mCopyPopupMenu->datePicker()->setDate( QDate::currentDate() );
+ mCopyPopupMenu->datePicker()->setDate( TQDate::currentDate() );
mItemPopupMenu->setItemEnabled( ePopupUnSubTodo,
mActiveItem->todo()->relatedTo() );
mItemPopupMenu->setItemEnabled( ePopupUnAllSubTodo,
!mActiveItem->todo()->relations().isEmpty() );
- mItemPopupMenu->popup( QCursor::pos() );
+ mItemPopupMenu->popup( TQCursor::pos() );
}
} else {
- mItemPopupMenu->popup( QCursor::pos() );
+ mItemPopupMenu->popup( TQCursor::pos() );
}
- } else mPopupMenu->popup( QCursor::pos() );
+ } else mPopupMenu->popup( TQCursor::pos() );
}
void KOTodoView::newTodo()
{
kdDebug() << k_funcinfo << endl;
- emit newTodoSignal( QDate::currentDate().addDays(7) );
+ emit newTodoSignal( TQDate::currentDate().addDays(7) );
}
void KOTodoView::newSubTodo()
@@ -855,13 +855,13 @@ void KOTodoView::printTodo()
#ifndef KORG_NOPRINTER
KOCoreHelper helper;
CalPrinter printer( this, BaseView::calendar(), &helper );
- connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) );
+ connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) );
Incidence::List selectedIncidences;
selectedIncidences.append( mActiveItem->todo() );
printer.print( KOrg::CalPrinterBase::Incidence,
- QDate(), QDate(), selectedIncidences );
+ TQDate(), TQDate(), selectedIncidences );
#endif
}
@@ -899,7 +899,7 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage )
Todo *oldTodo = todo->clone();
/* Old code to make sub-items's percentage related to this one's:
- QListViewItem *myChild = firstChild();
+ TQListViewItem *myChild = firstChild();
KOTodoViewItem *item;
while( myChild ) {
item = static_cast<KOTodoViewItem*>(myChild);
@@ -907,10 +907,10 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage )
myChild = myChild->nextSibling();
}*/
if ( percentage == 100 ) {
- todo->setCompleted( QDateTime::currentDateTime() );
+ todo->setCompleted( TQDateTime::currentDateTime() );
// If the todo does recur, it doesn't get set as completed. However, the
// item is still checked. Uncheck it again.
- if ( !todo->isCompleted() ) item->setState( QCheckListItem::Off );
+ if ( !todo->isCompleted() ) item->setState( TQCheckListItem::Off );
else todo->setPercentComplete( percentage );
} else {
todo->setCompleted( false );
@@ -934,7 +934,7 @@ void KOTodoView::setNewPercentage( int index )
setNewPercentage( mActiveItem, mPercentage[index] );
}
-void KOTodoView::setNewDate( QDate date )
+void KOTodoView::setNewDate( TQDate date )
{
if ( !mActiveItem || !mChanger ) return;
Todo *todo = mActiveItem->todo();
@@ -943,7 +943,7 @@ void KOTodoView::setNewDate( QDate date )
if ( !todo->isReadOnly() && mChanger->beginChange( todo ) ) {
Todo *oldTodo = todo->clone();
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( date );
if ( !todo->doesFloat() )
@@ -964,9 +964,9 @@ void KOTodoView::setNewDate( QDate date )
}
}
-void KOTodoView::copyTodoToDate( QDate date )
+void KOTodoView::copyTodoToDate( TQDate date )
{
- QDateTime dt( date );
+ TQDateTime dt( date );
if ( mActiveItem && mChanger ) {
Todo *newTodo = mActiveItem->todo()->clone();
@@ -984,13 +984,13 @@ void KOTodoView::copyTodoToDate( QDate date )
}
}
-QPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem )
+TQPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem )
{
- QPopupMenu *tempMenu = new QPopupMenu( this );
- QStringList checkedCategories = todoItem->todo()->categories();
+ TQPopupMenu *tempMenu = new TQPopupMenu( this );
+ TQStringList checkedCategories = todoItem->todo()->categories();
tempMenu->setCheckable( true );
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = KOPrefs::instance()->mCustomCategories.begin();
it != KOPrefs::instance()->mCustomCategories.end();
++it ) {
@@ -1000,8 +1000,8 @@ QPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem )
tempMenu->setItemChecked( index, true );
}
- connect ( tempMenu, SIGNAL( activated( int ) ),
- SLOT( changedCategories( int ) ) );
+ connect ( tempMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( changedCategories( int ) ) );
return tempMenu;
}
@@ -1014,7 +1014,7 @@ void KOTodoView::changedCategories(int index)
if ( !todo->isReadOnly() && mChanger->beginChange( todo ) ) {
Todo *oldTodo = todo->clone();
- QStringList categories = todo->categories ();
+ TQStringList categories = todo->categories ();
if ( categories.find( mCategory[index] ) != categories.end() )
categories.remove( mCategory[index] );
else
@@ -1030,14 +1030,14 @@ void KOTodoView::changedCategories(int index)
}
}
-void KOTodoView::setDocumentId( const QString &id )
+void KOTodoView::setDocumentId( const TQString &id )
{
kdDebug(5850) << "KOTodoView::setDocumentId()" << endl;
mDocPrefs->setDoc( id );
}
-void KOTodoView::itemStateChanged( QListViewItem *item )
+void KOTodoView::itemStateChanged( TQListViewItem *item )
{
if (!item) return;
@@ -1052,24 +1052,24 @@ void KOTodoView::setNewPercentageDelayed( KOTodoViewItem *item, int percentage )
{
mPercentChangedMap.append( qMakePair( item, percentage ) );
- QTimer::singleShot( 0, this, SLOT( processDelayedNewPercentage() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( processDelayedNewPercentage() ) );
}
void KOTodoView::processDelayedNewPercentage()
{
- QValueList< QPair< KOTodoViewItem *, int> >::Iterator it;
+ TQValueList< QPair< KOTodoViewItem *, int> >::Iterator it;
for ( it = mPercentChangedMap.begin(); it != mPercentChangedMap.end(); ++it )
setNewPercentage( (*it).first, (*it).second );
mPercentChangedMap.clear();
}
-void KOTodoView::saveLayout(KConfig *config, const QString &group) const
+void KOTodoView::saveLayout(KConfig *config, const TQString &group) const
{
mTodoListView->saveLayout(config,group);
}
-void KOTodoView::restoreLayout(KConfig *config, const QString &group)
+void KOTodoView::restoreLayout(KConfig *config, const TQString &group)
{
mTodoListView->restoreLayout(config,group);
}
@@ -1110,7 +1110,7 @@ void KOTodoView::addQuickTodo()
delete todo;
return;
}
- mQuickAdd->setText( QString::null );
+ mQuickAdd->setText( TQString::null );
}
}