Commit 2ed5ec2b authored by David Jarvie's avatar David Jarvie

Qt 4 conversion

svn path=/trunk/KDE/kdepim/; revision=472778
parent 14ad337c
......@@ -25,6 +25,7 @@
#include <kurl.h>
#include <libkcal/calendarlocal.h>
#include "alarmevent.h"
class KConfig;
/** Provides read and write access to calendar files.
......
......@@ -26,8 +26,6 @@
#include <qcolor.h>
#include <qregexp.h>
#include <QByteArray>
//Added by qt3to4:
#include <Q3ValueList>
#include <klocale.h>
#include <kdebug.h>
......@@ -2175,12 +2173,12 @@ bool KAEvent::setRecurWeekly(int freq, const QBitArray& days, int count, const Q
* = 0 to use 'end' instead.
* end = end date (invalid to use 'count' instead).
*/
bool KAEvent::setRecurMonthlyByDate(int freq, const Q3ValueList<int>& days, int count, const QDate& end)
bool KAEvent::setRecurMonthlyByDate(int freq, const QList<int>& days, int count, const QDate& end)
{
if (!setRecur(RecurrenceRule::rMonthly, freq, count, QDateTime(end)))
return false;
for (Q3ValueListConstIterator<int> it = days.begin(); it != days.end(); ++it)
mRecurrence->addMonthlyDate(*it);
for (int i = 0, end = days.count(); i < end; ++i)
mRecurrence->addMonthlyDate(days[i]);
return true;
}
......@@ -2195,12 +2193,12 @@ bool KAEvent::setRecurMonthlyByDate(int freq, const Q3ValueList<int>& days, int
* = 0 to use 'end' instead.
* end = end date (invalid to use 'count' instead).
*/
bool KAEvent::setRecurMonthlyByPos(int freq, const Q3ValueList<MonthPos>& posns, int count, const QDate& end)
bool KAEvent::setRecurMonthlyByPos(int freq, const QList<MonthPos>& posns, int count, const QDate& end)
{
if (!setRecur(RecurrenceRule::rMonthly, freq, count, QDateTime(end)))
return false;
for (Q3ValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
mRecurrence->addMonthlyPos((*it).weeknum, (*it).days);
for (int i = 0, end = posns.count(); i < end; ++i)
mRecurrence->addMonthlyPos(posns[i].weeknum, posns[i].days);
return true;
}
......@@ -2217,12 +2215,12 @@ bool KAEvent::setRecurMonthlyByPos(int freq, const Q3ValueList<MonthPos>& posns,
* = 0 to use 'end' instead.
* end = end date (invalid to use 'count' instead).
*/
bool KAEvent::setRecurAnnualByDate(int freq, const Q3ValueList<int>& months, int day, KARecurrence::Feb29Type feb29, int count, const QDate& end)
bool KAEvent::setRecurAnnualByDate(int freq, const QList<int>& months, int day, KARecurrence::Feb29Type feb29, int count, const QDate& end)
{
if (!setRecur(RecurrenceRule::rYearly, freq, count, QDateTime(end), feb29))
return false;
for (Q3ValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
mRecurrence->addYearlyMonth(*it);
for (int i = 0, end = months.count(); i < end; ++i)
mRecurrence->addYearlyMonth(months[i]);
if (day)
mRecurrence->addMonthlyDate(day);
return true;
......@@ -2240,14 +2238,16 @@ bool KAEvent::setRecurAnnualByDate(int freq, const Q3ValueList<int>& months, int
* = 0 to use 'end' instead.
* end = end date (invalid to use 'count' instead).
*/
bool KAEvent::setRecurAnnualByPos(int freq, const Q3ValueList<MonthPos>& posns, const Q3ValueList<int>& months, int count, const QDate& end)
bool KAEvent::setRecurAnnualByPos(int freq, const QList<MonthPos>& posns, const QList<int>& months, int count, const QDate& end)
{
if (!setRecur(RecurrenceRule::rYearly, freq, count, QDateTime(end)))
return false;
for (Q3ValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
mRecurrence->addYearlyMonth(*it);
for (Q3ValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
mRecurrence->addYearlyPos((*it).weeknum, (*it).days);
int i = 0;
int iend;
for (iend = months.count(); i < iend; ++i)
mRecurrence->addYearlyMonth(months[i]);
for (i = 0, iend = posns.count(); i < iend; ++i)
mRecurrence->addYearlyPos(posns[i].weeknum, posns[i].days);
return true;
}
......@@ -2349,19 +2349,19 @@ int KAEvent::recurInterval() const
/******************************************************************************
* Convert a QValueList<WDayPos> to QValueList<MonthPos>.
*/
Q3ValueList<KAEvent::MonthPos> KAEvent::convRecurPos(const Q3ValueList<KCal::RecurrenceRule::WDayPos>& wdaypos)
QList<KAEvent::MonthPos> KAEvent::convRecurPos(const QList<KCal::RecurrenceRule::WDayPos>& wdaypos)
{
Q3ValueList<MonthPos> mposns;
for (Q3ValueList<KCal::RecurrenceRule::WDayPos>::ConstIterator it = wdaypos.begin(); it != wdaypos.end(); ++it)
QList<MonthPos> mposns;
for (int i = 0, end = wdaypos.count(); i < end; ++i)
{
int daybit = (*it).day() - 1;
int weeknum = (*it).pos();
int daybit = wdaypos[i].day() - 1;
int weeknum = wdaypos[i].pos();
bool found = false;
for (Q3ValueList<MonthPos>::Iterator mit = mposns.begin(); mit != mposns.end(); ++mit)
for (int m = 0, mend = mposns.count(); m < mend; ++m)
{
if ((*mit).weeknum == weeknum)
if (mposns[m].weeknum == weeknum)
{
(*mit).days.setBit(daybit);
mposns[m].days.setBit(daybit);
found = true;
break;
}
......@@ -3053,13 +3053,13 @@ void KAAlarmEventBase::dumpDebug() const
* Sets the list of email addresses, removing any empty addresses.
* Reply = false if empty addresses were found.
*/
EmailAddressList& EmailAddressList::operator=(const Q3ValueList<Person>& addresses)
EmailAddressList& EmailAddressList::operator=(const QList<Person>& addresses)
{
clear();
for (Q3ValueList<Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
for (int p = 0, end = addresses.count(); p < end; ++p)
{
if (!(*it).email().isEmpty())
append(*it);
if (!addresses[p].email().isEmpty())
append(addresses[p]);
}
return *this;
}
......@@ -3072,7 +3072,7 @@ QString EmailAddressList::join(const QString& separator) const
{
QString result;
bool first = true;
for (Q3ValueList<Person>::ConstIterator it = begin(); it != end(); ++it)
for (int p = 0, end = count(); p < end; ++p)
{
if (first)
first = false;
......@@ -3080,7 +3080,7 @@ QString EmailAddressList::join(const QString& separator) const
result += separator;
bool quote = false;
QString name = (*it).name();
QString name = (*this)[p].name();
if (!name.isEmpty())
{
// Need to enclose the name in quotes if it has any special characters
......@@ -3095,12 +3095,12 @@ QString EmailAddressList::join(const QString& separator) const
break;
}
}
result += (*it).name();
result += (*this)[p].name();
result += (quote ? "\" <" : " <");
quote = true; // need angle brackets round email address
}
result += (*it).email();
result += (*this)[p].email();
if (quote)
result += ">";
}
......
......@@ -25,8 +25,7 @@
#include <qcolor.h>
#include <qfont.h>
//Added by qt3to4:
#include <Q3ValueList>
#include <QList>
#include <libkcal/person.h>
#include <libkcal/event.h>
......@@ -44,12 +43,12 @@ struct AlarmData;
typedef KCal::Person EmailAddress;
class EmailAddressList : public Q3ValueList<KCal::Person>
class EmailAddressList : public QList<KCal::Person>
{
public:
EmailAddressList() : Q3ValueList<KCal::Person>() { }
EmailAddressList(const Q3ValueList<KCal::Person>& list) { operator=(list); }
EmailAddressList& operator=(const Q3ValueList<KCal::Person>&);
EmailAddressList() : QList<KCal::Person>() { }
EmailAddressList(const QList<KCal::Person>& list) { operator=(list); }
EmailAddressList& operator=(const QList<KCal::Person>&);
QString join(const QString& separator) const;
};
......@@ -431,10 +430,10 @@ class KAEvent : public KAAlarmEventBase
bool setRecurMinutely(int freq, int count, const QDateTime& end);
bool setRecurDaily(int freq, const QBitArray& days, int count, const QDate& end);
bool setRecurWeekly(int freq, const QBitArray& days, int count, const QDate& end);
bool setRecurMonthlyByDate(int freq, const Q3ValueList<int>& days, int count, const QDate& end);
bool setRecurMonthlyByPos(int freq, const Q3ValueList<MonthPos>& pos, int count, const QDate& end);
bool setRecurAnnualByDate(int freq, const Q3ValueList<int>& months, int day, KARecurrence::Feb29Type, int count, const QDate& end);
bool setRecurAnnualByPos(int freq, const Q3ValueList<MonthPos>& pos, const Q3ValueList<int>& months, int count, const QDate& end);
bool setRecurMonthlyByDate(int freq, const QList<int>& days, int count, const QDate& end);
bool setRecurMonthlyByPos(int freq, const QList<MonthPos>& pos, int count, const QDate& end);
bool setRecurAnnualByDate(int freq, const QList<int>& months, int day, KARecurrence::Feb29Type, int count, const QDate& end);
bool setRecurAnnualByPos(int freq, const QList<MonthPos>& pos, const QList<int>& months, int count, const QDate& end);
// static QValueList<MonthPos> convRecurPos(const QValueList<KCal::RecurrenceRule::WDayPos>&);
#ifdef NDEBUG
void dumpDebug() const { }
......
......@@ -23,11 +23,11 @@
#include <qtooltip.h>
#include <qpainter.h>
#include <qstyle.h>
#include <q3header.h>
#include <qregexp.h>
//Added by qt3to4:
#include <q3header.h>
#include <QPixmap>
#include <Q3ValueList>
#include <QList>
#include <QMouseEvent>
#include <kglobal.h>
......@@ -49,12 +49,12 @@
= Class: AlarmListView
= Displays the list of outstanding alarms.
=============================================================================*/
Q3ValueList<EventListViewBase*> AlarmListView::mInstanceList;
bool AlarmListView::mDragging = false;
QList<EventListViewBase*> AlarmListView::mInstanceList;
bool AlarmListView::mDragging = false;
AlarmListView::AlarmListView(QWidget* parent, const char* name)
: EventListViewBase(parent, name),
AlarmListView::AlarmListView(QWidget* parent)
: EventListViewBase(parent),
mTimeColumn(0),
mTimeToColumn(1),
mRepeatColumn(2),
......@@ -110,9 +110,9 @@ void AlarmListView::populate()
if (cal)
{
events = cal->events();
for (it = events.begin(); it != events.end(); ++it)
for (it = events.begin(); it != events.end(); ++it)
{
KCal::Event* kcalEvent = *it;
KCal::Event* kcalEvent = *it;
if (kcalEvent->alarms().count() > 0)
{
event.set(*kcalEvent);
......@@ -122,9 +122,9 @@ void AlarmListView::populate()
}
}
events = AlarmCalendar::activeCalendar()->events();
for (it = events.begin(); it != events.end(); ++it)
for (it = events.begin(); it != events.end(); ++it)
{
KCal::Event* kcalEvent = *it;
KCal::Event* kcalEvent = *it;
event.set(*kcalEvent);
if (mShowExpired || !event.expired())
addEntry(event, now);
......@@ -203,8 +203,8 @@ void AlarmListView::updateTimeToAlarms(bool forceDisplay)
void AlarmListView::addEvent(const KAEvent& event, EventListViewBase* view)
{
QDateTime now = QDateTime::currentDateTime();
for (InstanceListConstIterator it = mInstanceList.begin(); it != mInstanceList.end(); ++it)
static_cast<AlarmListView*>(*it)->addEntry(event, now, true, (*it == view));
for (int i = 0, end = mInstanceList.count(); i < end; ++i)
static_cast<AlarmListView*>(mInstanceList[i])->addEntry(event, now, true, (mInstanceList[i] == view));
}
/******************************************************************************
......@@ -289,12 +289,12 @@ void AlarmListView::contentsMouseMoveEvent(QMouseEvent* e)
mMousePressed = false;
KCal::CalendarLocal cal(QString::fromLatin1("UTC"));
cal.setLocalTime(); // write out using local time (i.e. no time zone)
Q3ValueList<EventListViewItemBase*> items = selectedItems();
if (!items.count())
QList<EventListViewItemBase*> items = selectedItems();
if (items.isEmpty())
return;
for (Q3ValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
for (int i = 0, end = items.count(); i < end; ++i)
{
const KAEvent& event = (*it)->event();
const KAEvent& event = items[i]->event();
KCal::Event* kcalEvent = new KCal::Event;
event.updateKCalEvent(*kcalEvent, false, true);
kcalEvent->setUid(event.id());
......@@ -342,17 +342,18 @@ bool AlarmListView::event(QEvent *e)
if (!item->messageTruncated() && colWidth >= widthNeeded)
{
if (columnX + widthNeeded <= viewport()->width())
return false;
return EventListViewBase::event(e);
}
// QRect rect = itemRect(item);
// rect.setLeft(columnX);
// rect.setWidth(colWidth);
kdDebug(5950) << "AlarmListView::event(): display\n";
QToolTip::showText(pt, AlarmText::summary(item->event(), 10)); // display up to 10 lines of text
return true;
}
}
}
return false;
return EventListViewBase::event(e);
}
......
......@@ -66,7 +66,7 @@ class AlarmListView : public EventListViewBase
{
Q_OBJECT // needed by QObject::isA() calls
public:
AlarmListView(QWidget* parent = 0, const char* name = 0);
explicit AlarmListView(QWidget* parent = 0);
~AlarmListView();
void showExpired(bool show) { mShowExpired = show; }
bool showingExpired() const { return mShowExpired; }
......
......@@ -20,21 +20,15 @@
#include "kalarm.h"
#include <qlayout.h>
#include <q3groupbox.h>
#include <q3hbox.h>
#include <qpushbutton.h>
#include <q3whatsthis.h>
//Added by qt3to4:
#include <QGroupBox>
#include <QVBoxLayout>
#include <Q3Frame>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QBoxLayout>
#include <kdialog.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <khbox.h>
#include "buttongroup.h"
#include "checkbox.h"
......@@ -63,69 +57,67 @@ QString AlarmTimeWidget::i18n_TimeAfterPeriod()
* Construct a widget with a group box and title.
*/
AlarmTimeWidget::AlarmTimeWidget(const QString& groupBoxTitle, int mode, QWidget* parent)
: QGroupBox(groupBoxTitle, parent),
: QFrame(parent),
mMinDateTimeIsNow(false),
mPastMax(false),
mMinMaxTimeSet(false)
{
init(mode);
QGroupBox* box = new QGroupBox(groupBoxTitle, this);
init(box, mode, true);
}
/******************************************************************************
* Construct a widget without a group box or title.
*/
AlarmTimeWidget::AlarmTimeWidget(int mode, QWidget* parent)
: QGroupBox(parent),
: QFrame(parent),
mMinDateTimeIsNow(false),
mPastMax(false),
mMinMaxTimeSet(false)
{
#warning setFrameStyle() ??
// setFrameStyle(Q3Frame::NoFrame);
init(mode);
init(this, mode, false);
}
void AlarmTimeWidget::init(int mode)
void AlarmTimeWidget::init(QWidget* topWidget, int mode, bool hasTitle)
{
static const QString recurText = i18n("For a simple repetition, enter the date/time of the first occurrence.\n"
"If a recurrence is configured, the start date/time will be adjusted "
"to the first recurrence on or after the entered date/time.");
mButtonGroup = new ButtonGroup(this);
connect(this, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotButtonSet(QAbstractButton*)));
QBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
if (!title().isEmpty())
mButtonGroup = new ButtonGroup(topWidget);
connect(mButtonGroup, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotButtonSet(QAbstractButton*)));
QVBoxLayout* topLayout = new QVBoxLayout(topWidget, 0, KDialog::spacingHint());
if (hasTitle)
{
topLayout->setMargin(KDialog::marginHint());
topLayout->addSpacing(fontMetrics().lineSpacing()/2);
}
// At time radio button/label
mAtTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("&Defer to date/time:") : i18n("At &date/time:")), this);
mAtTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("&Defer to date/time:") : i18n("At &date/time:")), topWidget);
mAtTimeRadio->setFixedSize(mAtTimeRadio->sizeHint());
Q3WhatsThis::add(mAtTimeRadio,
((mode & DEFER_TIME) ? i18n("Reschedule the alarm to the specified date and time.")
: i18n("Schedule the alarm at the specified date and time.")));
mAtTimeRadio->setWhatsThis((mode & DEFER_TIME) ? i18n("Reschedule the alarm to the specified date and time.")
: i18n("Schedule the alarm at the specified date and time."));
#warning Add widgets to topLayout?
// Date edit box
mDateEdit = new DateEdit(this);
mDateEdit = new DateEdit(topWidget);
mDateEdit->setFixedSize(mDateEdit->sizeHint());
connect(mDateEdit, SIGNAL(dateChanged(const QDate&)), SLOT(dateTimeChanged()));
static const QString enterDateText = i18n("Enter the date to schedule the alarm.");
Q3WhatsThis::add(mDateEdit, ((mode & DEFER_TIME) ? enterDateText
: QString("%1\n%2").arg(enterDateText).arg(recurText)));
mDateEdit->setWhatsThis((mode & DEFER_TIME) ? enterDateText
: QString("%1\n%2").arg(enterDateText).arg(recurText));
mAtTimeRadio->setFocusWidget(mDateEdit);
// Time edit box and Any time checkbox
Q3HBox* timeBox = new Q3HBox(this);
KHBox* timeBox = new KHBox(topWidget);
timeBox->setSpacing(2*KDialog::spacingHint());
mTimeEdit = new TimeEdit(timeBox);
mTimeEdit->setFixedSize(mTimeEdit->sizeHint());
connect(mTimeEdit, SIGNAL(valueChanged(int)), SLOT(dateTimeChanged()));
static const QString enterTimeText = i18n("Enter the time to schedule the alarm.");
Q3WhatsThis::add(mTimeEdit,
((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis())
: QString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
mTimeEdit->setWhatsThis((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis())
: QString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis()));
mAnyTime = -1; // current status is uninitialised
if (mode & DEFER_TIME)
......@@ -139,24 +131,22 @@ void AlarmTimeWidget::init(int mode)
mAnyTimeCheckBox = new CheckBox(i18n("An&y time"), timeBox);
mAnyTimeCheckBox->setFixedSize(mAnyTimeCheckBox->sizeHint());
connect(mAnyTimeCheckBox, SIGNAL(toggled(bool)), SLOT(slotAnyTimeToggled(bool)));
Q3WhatsThis::add(mAnyTimeCheckBox, i18n("Schedule the alarm for any time during the day"));
mAnyTimeCheckBox->setWhatsThis(i18n("Schedule the alarm for any time during the day"));
}
// 'Time from now' radio button/label
mAfterTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("Defer for time &interval:") : i18n_w_TimeFromNow()), this);
mAfterTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("Defer for time &interval:") : i18n_w_TimeFromNow()), topWidget);
mAfterTimeRadio->setFixedSize(mAfterTimeRadio->sizeHint());
Q3WhatsThis::add(mAfterTimeRadio,
((mode & DEFER_TIME) ? i18n("Reschedule the alarm for the specified time interval after now.")
: i18n("Schedule the alarm after the specified time interval from now.")));
mAfterTimeRadio->setWhatsThis((mode & DEFER_TIME) ? i18n("Reschedule the alarm for the specified time interval after now.")
: i18n("Schedule the alarm after the specified time interval from now."));
// Delay time spin box
mDelayTimeEdit = new TimeSpinBox(1, maxDelayTime, this);
mDelayTimeEdit = new TimeSpinBox(1, maxDelayTime, topWidget);
mDelayTimeEdit->setValue(1439);
mDelayTimeEdit->setFixedSize(mDelayTimeEdit->sizeHint());
connect(mDelayTimeEdit, SIGNAL(valueChanged(int)), SLOT(delayTimeChanged(int)));
Q3WhatsThis::add(mDelayTimeEdit,
((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis())
: QString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
mDelayTimeEdit->setWhatsThis((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis())
: QString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis()));
mAfterTimeRadio->setFocusWidget(mDelayTimeEdit);
// Set up the layout, either narrow or wide
......@@ -168,7 +158,7 @@ void AlarmTimeWidget::init(int mode)
grid->addWidget(timeBox, 1, 1, Qt::AlignLeft);
grid->setColStretch(2, 1);
topLayout->addStretch();
QBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
QHBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
layout->addWidget(mAfterTimeRadio);
layout->addWidget(mDelayTimeEdit);
layout->addStretch();
......
......@@ -21,7 +21,7 @@
#ifndef ALARMTIMEWIDGET_H
#define ALARMTIMEWIDGET_H
#include <QGroupBox>
#include <QFrame>
#include "datetime.h"
class QAbstractButton;
......@@ -33,7 +33,7 @@ class TimeEdit;
class TimeSpinBox;
class AlarmTimeWidget : public QGroupBox
class AlarmTimeWidget : public QFrame
{
Q_OBJECT
public:
......@@ -72,7 +72,7 @@ class AlarmTimeWidget : public QGroupBox
void slotAnyTimeToggled(bool);
private:
void init(int mode);
void init(QWidget* topWidget, int mode, bool hasTitle);
void setAnyTime();
void setMaxDelayTime(const QDateTime& now);
void setMaxMinTimeIf(const QDateTime& now);
......
/*
* birthdaydlg.cpp - dialog to pick birthdays from address book
* Program: kalarm
* Copyright (c) 2002 - 2004 by David Jarvie <software@astrojar.org.uk>
* Copyright (c) 2002 - 2005 by David Jarvie <software@astrojar.org.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -20,23 +20,20 @@
#include "kalarm.h"
#include <qlayout.h>
#include <q3groupbox.h>
#include <q3hbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <q3whatsthis.h>
//Added by qt3to4:
#include <QGroupBox>
#include <QLabel>
#include <QHBoxLayout>
#include <QBoxLayout>
#include <Q3ValueList>
#include <QVBoxLayout>
//Added by qt3to4:
#warning Remove #include q3valuelist.h
#include <q3valuelist.h>
#include <klistview.h>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kmessagebox.h>
#include <khbox.h>
#include <kabc/addressbook.h>
#include <kabc/stdaddressbook.h>
#include <kdebug.h>
......@@ -80,7 +77,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
mSpecialActionsButton(0)
{
QWidget* topWidget = plainPage();
QBoxLayout* topLayout = new QVBoxLayout(topWidget);
QVBoxLayout* topLayout = new QVBoxLayout(topWidget);
topLayout->setSpacing(spacingHint());
// Prefix and suffix to the name in the alarm text
......@@ -90,30 +87,34 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
mPrefixText = config->readEntry(QString::fromLatin1("BirthdayPrefix"), i18n("Birthday: "));
mSuffixText = config->readEntry(QString::fromLatin1("BirthdaySuffix"));
Q3GroupBox* textGroup = new Q3GroupBox(2, Qt::Horizontal, i18n("Alarm Text"), topWidget);
QGroupBox* textGroup = new QGroupBox(i18n("Alarm Text"), topWidget);
topLayout->addWidget(textGroup);
QGridLayout* grid = new QGridLayout(textGroup, 2, 2, marginHint(), spacingHint());
QLabel* label = new QLabel(i18n("Pre&fix:"), textGroup);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0);
mPrefix = new BLineEdit(mPrefixText, textGroup);
mPrefix->setMinimumSize(mPrefix->sizeHint());
label->setBuddy(mPrefix);
connect(mPrefix, SIGNAL(focusLost()), SLOT(slotTextLostFocus()));
Q3WhatsThis::add(mPrefix,
i18n("Enter text to appear before the person's name in the alarm message, "
"including any necessary trailing spaces."));
mPrefix->setWhatsThis(i18n("Enter text to appear before the person's name in the alarm message, "
"including any necessary trailing spaces."));
grid->addWidget(mPrefix, 0, 1);
label = new QLabel(i18n("S&uffix:"), textGroup);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 0);
mSuffix = new BLineEdit(mSuffixText, textGroup);
mSuffix->setMinimumSize(mSuffix->sizeHint());
label->setBuddy(mSuffix);
connect(mSuffix, SIGNAL(focusLost()), SLOT(slotTextLostFocus()));
Q3WhatsThis::add(mSuffix,
i18n("Enter text to appear after the person's name in the alarm message, "
"including any necessary leading spaces."));
mSuffix->setWhatsThis(i18n("Enter text to appear after the person's name in the alarm message, "
"including any necessary leading spaces."));
grid->addWidget(mSuffix, 1, 1);
Q3GroupBox* group = new Q3GroupBox(1, Qt::Horizontal, i18n("Select Birthdays"), topWidget);
QGroupBox* group = new QGroupBox(i18n("Select Birthdays"), topWidget);
topLayout->addWidget(group);
//?? Does this need a layout?
mAddresseeList = new KListView(group);
mAddresseeList->setMultiSelection(true);
mAddresseeList->setSelectionMode(Q3ListView::Extended);
......@@ -122,20 +123,19 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
mAddresseeList->addColumn(i18n("Name"));
mAddresseeList->addColumn(i18n("Birthday"));
connect(mAddresseeList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
Q3WhatsThis::add(mAddresseeList,