summaryrefslogtreecommitdiffstats
path: root/korganizer/kolistview.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 /korganizer/kolistview.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 'korganizer/kolistview.cpp')
-rw-r--r--korganizer/kolistview.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 722a26460..7ca342e87 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -24,10 +24,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kdebug.h>
@@ -46,24 +46,24 @@
#include "kolistview.moc"
-KOListViewToolTip::KOListViewToolTip( QWidget* parent,
+KOListViewToolTip::KOListViewToolTip( TQWidget* parent,
KListView* lv )
- :QToolTip(parent)
+ :TQToolTip(parent)
{
eventlist=lv;
}
-void KOListViewToolTip::maybeTip( const QPoint & pos)
+void KOListViewToolTip::maybeTip( const TQPoint & pos)
{
- QRect r;
- QListViewItem *it = eventlist->itemAt(pos);
+ TQRect r;
+ TQListViewItem *it = eventlist->itemAt(pos);
KOListViewItem *i = static_cast<KOListViewItem*>(it);
if( i && KOPrefs::instance()->mEnableToolTips ) {
/* Calculate the rectangle. */
r=eventlist->itemRect( it );
/* Show the tip */
- QString tipText( IncidenceFormatter::toolTipString( i->data() ) );
+ TQString tipText( IncidenceFormatter::toolTipString( i->data() ) );
if ( !tipText.isEmpty() ) {
tip(r, tipText);
}
@@ -93,7 +93,7 @@ bool KOListView::ListItemVisitor::visit( Event *e )
{
mItem->setText(0,e->summary());
if ( e->isAlarmEnabled() ) {
- static const QPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
+ static const TQPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
mItem->setPixmap(1,alarmPxmp);
mItem->setSortKey(1,"1");
}
@@ -101,14 +101,14 @@ bool KOListView::ListItemVisitor::visit( Event *e )
mItem->setSortKey(1,"0");
if ( e->doesRecur() ) {
- static const QPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
+ static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
mItem->setPixmap(2,recurPxmp);
mItem->setSortKey(2,"1");
}
else
mItem->setSortKey(2,"0");
- static const QPixmap eventPxmp = KOGlobals::self()->smallIcon( "appointment" );
+ static const TQPixmap eventPxmp = KOGlobals::self()->smallIcon( "appointment" );
mItem->setPixmap(0, eventPxmp);
mItem->setText( 3,e->dtStartDateStr());
@@ -130,12 +130,12 @@ bool KOListView::ListItemVisitor::visit( Event *e )
bool KOListView::ListItemVisitor::visit(Todo *t)
{
- static const QPixmap todoPxmp = KOGlobals::self()->smallIcon( "todo" );
- static const QPixmap todoDonePxmp = KOGlobals::self()->smallIcon( "checkedbox" );
+ static const TQPixmap todoPxmp = KOGlobals::self()->smallIcon( "todo" );
+ static const TQPixmap todoDonePxmp = KOGlobals::self()->smallIcon( "checkedbox" );
mItem->setPixmap(0, t->isCompleted() ? todoDonePxmp : todoPxmp );
mItem->setText(0,t->summary());
if ( t->isAlarmEnabled() ) {
- static const QPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
+ static const TQPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
mItem->setPixmap(1,alarmPxmp);
mItem->setSortKey(1, "1");
}
@@ -143,7 +143,7 @@ bool KOListView::ListItemVisitor::visit(Todo *t)
mItem->setSortKey(1, "0");
if ( t->doesRecur() ) {
- static const QPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
+ static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
mItem->setPixmap(2,recurPxmp);
mItem->setSortKey(2, "1");
}
@@ -185,7 +185,7 @@ bool KOListView::ListItemVisitor::visit(Todo *t)
bool KOListView::ListItemVisitor::visit(Journal *t)
{
- static const QPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" );
+ static const TQPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" );
mItem->setPixmap(0,jrnalPxmp);
// Just use the first line
mItem->setText( 0, t->description().section( "\n", 0, 0 ) );
@@ -195,7 +195,7 @@ bool KOListView::ListItemVisitor::visit(Journal *t)
return true;
}
-KOListView::KOListView( Calendar *calendar, QWidget *parent,
+KOListView::KOListView( Calendar *calendar, TQWidget *parent,
const char *name)
: KOEventView(calendar, parent, name)
{
@@ -215,35 +215,35 @@ KOListView::KOListView( Calendar *calendar, QWidget *parent,
mListView->setColumnAlignment(6,AlignHCenter);
mListView->addColumn(i18n("Categories"));
- QBoxLayout *layoutTop = new QVBoxLayout(this);
+ TQBoxLayout *layoutTop = new TQVBoxLayout(this);
layoutTop->addWidget(mListView);
mPopupMenu = eventPopup();
/*
mPopupMenu->insertSeparator();
mPopupMenu->insertItem(i18n("Show Dates"), this,
- SLOT(showDates()));
+ TQT_SLOT(showDates()));
mPopupMenu->insertItem(i18n("Hide Dates"), this,
- SLOT(hideDates()));
+ TQT_SLOT(hideDates()));
*/
- QObject::connect( mListView, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( defaultItemAction( QListViewItem * ) ) );
- QObject::connect( mListView, SIGNAL( returnPressed( QListViewItem * ) ),
- SLOT( defaultItemAction( QListViewItem * ) ) );
- QObject::connect( mListView, SIGNAL( rightButtonClicked ( QListViewItem *,
- const QPoint &,
+ TQObject::connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( defaultItemAction( TQListViewItem * ) ) );
+ TQObject::connect( mListView, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ TQT_SLOT( defaultItemAction( TQListViewItem * ) ) );
+ TQObject::connect( mListView, TQT_SIGNAL( rightButtonClicked ( TQListViewItem *,
+ const TQPoint &,
int ) ),
- SLOT( popupMenu( QListViewItem *, const QPoint &, int ) ) );
- QObject::connect( mListView, SIGNAL( selectionChanged() ),
- SLOT( processSelectionChange() ) );
+ TQT_SLOT( popupMenu( TQListViewItem *, const TQPoint &, int ) ) );
+ TQObject::connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( processSelectionChange() ) );
// setMinimumSize(100,100);
mListView->restoreLayout(KOGlobals::self()->config(),"KOListView Layout");
new KOListViewToolTip( mListView->viewport(), mListView );
- mSelectedDates.append( QDate::currentDate() );
+ mSelectedDates.append( TQDate::currentDate() );
}
KOListView::~KOListView()
@@ -265,7 +265,7 @@ Incidence::List KOListView::selectedIncidences()
{
Incidence::List eventList;
- QListViewItem *item = mListView->selectedItem();
+ TQListViewItem *item = mListView->selectedItem();
if (item) eventList.append(((KOListViewItem *)item)->data());
return eventList;
@@ -310,11 +310,11 @@ void KOListView::updateView()
kdDebug(5850) << "KOListView::updateView() does nothing" << endl;
}
-void KOListView::showDates(const QDate &start, const QDate &end)
+void KOListView::showDates(const TQDate &start, const TQDate &end)
{
clear();
- QDate date = start;
+ TQDate date = start;
while( date <= end ) {
addIncidences( calendar()->incidences(date) );
mSelectedDates.append( date );
@@ -357,10 +357,10 @@ void KOListView::showIncidences( const Incidence::List &incidenceList )
void KOListView::changeIncidenceDisplay(Incidence *incidence, int action)
{
KOListViewItem *item;
- QDate f = mSelectedDates.first();
- QDate l = mSelectedDates.last();
+ TQDate f = mSelectedDates.first();
+ TQDate l = mSelectedDates.last();
- QDate date;
+ TQDate date;
if ( incidence->type() == "Todo" )
date = static_cast<Todo *>(incidence)->dtDue().date();
else
@@ -404,20 +404,20 @@ KOListViewItem *KOListView::getItemForIncidence(Incidence *incidence)
return 0;
}
-void KOListView::defaultItemAction(QListViewItem *i)
+void KOListView::defaultItemAction(TQListViewItem *i)
{
KOListViewItem *item = static_cast<KOListViewItem *>( i );
if ( item ) defaultAction( item->data() );
}
-void KOListView::popupMenu(QListViewItem *item,const QPoint &,int)
+void KOListView::popupMenu(TQListViewItem *item,const TQPoint &,int)
{
mActiveItem = (KOListViewItem *)item;
if (mActiveItem) {
Incidence *incidence = mActiveItem->data();
// FIXME: For recurring incidences we don't know the date of this
// occurrence, there's no reference to it at all!
- mPopupMenu->showIncidencePopup( incidence, QDate() );
+ mPopupMenu->showIncidencePopup( incidence, TQDate() );
}
else {
showNewEventPopup();