summaryrefslogtreecommitdiffstats
path: root/kalarm/alarmlistview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kalarm/alarmlistview.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/alarmlistview.cpp')
-rw-r--r--kalarm/alarmlistview.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp
index 2d4e39d62..4ef40f563 100644
--- a/kalarm/alarmlistview.cpp
+++ b/kalarm/alarmlistview.cpp
@@ -41,10 +41,10 @@
#include "alarmlistview.moc"
-class AlarmListTooltip : public QToolTip
+class AlarmListTooltip : public TQToolTip
{
public:
- AlarmListTooltip(TQWidget* parent) : TQToolTip(parent) { }
+ AlarmListTooltip(TQWidget* tqparent) : TQToolTip(tqparent) { }
virtual ~AlarmListTooltip() {}
protected:
virtual void maybeTip(const TQPoint&);
@@ -59,8 +59,8 @@ TQValueList<EventListViewBase*> AlarmListView::mInstanceList;
bool AlarmListView::mDragging = false;
-AlarmListView::AlarmListView(const TQValueList<int>& order, TQWidget* parent, const char* name)
- : EventListViewBase(parent, name),
+AlarmListView::AlarmListView(const TQValueList<int>& order, TQWidget* tqparent, const char* name)
+ : EventListViewBase(tqparent, name),
mMousePressed(false),
mDrawMessageInColour(false),
mShowExpired(false)
@@ -69,8 +69,8 @@ AlarmListView::AlarmListView(const TQValueList<int>& order, TQWidget* parent, co
i18n("Time"),
i18n("Time To"),
i18n("Repeat"),
- TQString::null,
- TQString::null,
+ TQString(),
+ TQString(),
i18n("Message, File or Command")
};
@@ -133,7 +133,7 @@ AlarmListView::AlarmListView(const TQValueList<int>& order, TQWidget* parent, co
setSorting(mColumn[TIME_COLUMN]); // sort initially by date/time
mTimeColumnHeaderWidth = columnWidth(mColumn[TIME_COLUMN]);
mTimeToColumnHeaderWidth = columnWidth(mColumn[TIME_TO_COLUMN]);
- setColumnAlignment(mColumn[REPEAT_COLUMN], Qt::AlignHCenter);
+ setColumnAlignment(mColumn[REPEAT_COLUMN], TQt::AlignHCenter);
setColumnWidthMode(mColumn[REPEAT_COLUMN], TQListView::Maximum);
// Set the width of the colour column in proportion to height
@@ -348,7 +348,7 @@ TQString AlarmListView::whatsThisText(int column) const
void AlarmListView::contentsMousePressEvent(TQMouseEvent* e)
{
TQListView::contentsMousePressEvent(e);
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
{
TQPoint p(contentsToViewport(e->pos()));
if (itemAt(p))
@@ -414,20 +414,20 @@ void AlarmListView::contentsMouseReleaseEvent(TQMouseEvent *e)
int AlarmListViewItem::mTimeHourPos = -2;
int AlarmListViewItem::mDigitWidth = -1;
-AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event, const TQDateTime& now)
- : EventListViewItemBase(parent, event),
+AlarmListViewItem::AlarmListViewItem(AlarmListView* tqparent, const KAEvent& event, const TQDateTime& now)
+ : EventListViewItemBase(tqparent, event),
mMessageTruncated(false),
mTimeToAlarmShown(false)
{
setLastColumnText(); // set the message column text
DateTime dateTime = event.expired() ? event.startDateTime() : event.displayDateTime();
- if (parent->column(AlarmListView::TIME_COLUMN) >= 0)
- setText(parent->column(AlarmListView::TIME_COLUMN), alarmTimeText(dateTime));
- if (parent->column(AlarmListView::TIME_TO_COLUMN) >= 0)
+ if (tqparent->column(AlarmListView::TIME_COLUMN) >= 0)
+ setText(tqparent->column(AlarmListView::TIME_COLUMN), alarmTimeText(dateTime));
+ if (tqparent->column(AlarmListView::TIME_TO_COLUMN) >= 0)
{
TQString tta = timeToAlarmText(now);
- setText(parent->column(AlarmListView::TIME_TO_COLUMN), tta);
+ setText(tqparent->column(AlarmListView::TIME_TO_COLUMN), tta);
mTimeToAlarmShown = !tta.isNull();
}
TQTime t = dateTime.time();
@@ -468,7 +468,7 @@ AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event
break;
}
}
- setText(parent->column(AlarmListView::REPEAT_COLUMN), repeatText);
+ setText(tqparent->column(AlarmListView::REPEAT_COLUMN), repeatText);
mRepeatOrder.sprintf("%c%08d", '0' + repeatOrder, repeatInterval);
bool showColour = (event.action() == KAEvent::MESSAGE || event.action() == KAEvent::FILE);
@@ -507,8 +507,8 @@ TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
if (!TQApplication::reverseLayout()) // don't try to align right-to-left languages
{
TQString fmt = locale->timeFormat();
- int i = fmt.find(TQRegExp("%[kl]")); // check if leading zeroes are omitted
- if (i >= 0 && i == fmt.find('%')) // and whether the hour is first
+ int i = fmt.tqfind(TQRegExp("%[kl]")); // check if leading zeroes are omitted
+ if (i >= 0 && i == fmt.tqfind('%')) // and whether the hour is first
mTimeHourPos = i; // yes, so need to align
}
}
@@ -526,7 +526,7 @@ TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const
{
if (event().expired())
- return TQString::null;
+ return TQString();
DateTime dateTime = event().displayDateTime();
if (dateTime.isDateOnly())
{
@@ -535,7 +535,7 @@ TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const
}
int mins = (now.secsTo(dateTime.dateTime()) + 59) / 60;
if (mins < 0)
- return TQString::null;
+ return TQString();
char minutes[3] = "00";
minutes[0] = (mins%60) / 10 + '0';
minutes[1] = (mins%60) % 10 + '0';
@@ -557,7 +557,7 @@ void AlarmListViewItem::updateTimeToAlarm(const TQDateTime& now, bool forceDispl
{
if (forceDisplay || mTimeToAlarmShown)
{
- setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), TQString::null);
+ setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), TQString());
mTimeToAlarmShown = false;
}
}
@@ -593,7 +593,7 @@ void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, in
if (mTimeHourPos >= 0)
{
// Need to pad out spacing to align times without leading zeroes
- i = str.find(" ~");
+ i = str.tqfind(" ~");
if (i >= 0)
{
if (mDigitWidth < 0)