summaryrefslogtreecommitdiffabout
path: root/korganizer/incomingdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/incomingdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/incomingdialog.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index fe78356..c2402d4 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -14,16 +14,18 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <qlistview.h>
+#include <q3listview.h>
#include <qfile.h>
#include <qdir.h>
#include <qmap.h>
+//Added by qt3to4:
+#include <Q3PtrList>
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
@@ -53,15 +55,15 @@
#define KORG_NOKABC
//#include <kabc/stdaddressbook.h>
#define size count
#endif
-ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev,
+ScheduleItemIn::ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,
Scheduler::Method method,ScheduleMessage::Status status)
- : QListViewItem(parent)
+ : Q3ListViewItem(parent)
{
mIncidence = ev;
mMethod = method;
mStatus = status;
setText(6,Scheduler::translatedMethodName(mMethod)+" ");
setText(7,ScheduleMessage::statusName(status));
@@ -132,28 +134,28 @@ bool ScheduleItemVisitor::visit(Journal *)
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
- QWidget* parent,const char* name,bool modal,WFlags fl) :
+ QWidget* parent,const char* name,bool modal,Qt::WFlags fl) :
IncomingDialog_base(parent,name,modal,fl)
{
mCalendar = calendar;
mOutgoing = outgoing;
#ifndef KORG_NOMAIL
mScheduler = new MailScheduler(mCalendar);
#else
mScheduler = new DummyScheduler(mCalendar);
#endif
- mMessageListView->setColumnAlignment(1,AlignHCenter);
- mMessageListView->setColumnAlignment(2,AlignHCenter);
- mMessageListView->setColumnAlignment(3,AlignHCenter);
- mMessageListView->setColumnAlignment(4,AlignHCenter);
- QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)),
- this,SLOT(showEvent(QListViewItem *)));
+ mMessageListView->setColumnAlignment(1,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(2,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(3,Qt::AlignHCenter);
+ mMessageListView->setColumnAlignment(4,Qt::AlignHCenter);
+ QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
+ this,SLOT(showEvent(Q3ListViewItem *)));
retrieve();
}
/*
* Destroys the object and frees any allocated resources
*/
@@ -166,13 +168,13 @@ void IncomingDialog::setOutgoingDialog(OutgoingDialog *outgoing)
{
mOutgoing = outgoing;
}
void IncomingDialog::retrieve()
{
- QPtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions();
+ Q3PtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions();
ScheduleMessage *message;
for(message = messages.first();message;message = messages.next()) {
IncidenceBase *inc = message->event();
Scheduler::Method method = (Scheduler::Method)message->method();
ScheduleMessage::Status status = message->status();
@@ -249,13 +251,13 @@ void IncomingDialog::rejectMessage()
mScheduler->deleteTransaction(item->event());
delete item;
emit numMessagesChanged(mMessageListView->childCount());
}
}
-void IncomingDialog::showEvent(QListViewItem *item)
+void IncomingDialog::showEvent(Q3ListViewItem *item)
{
IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
if( incidence && incidence->typeID() == eventID ) {
Event *event = static_cast<Event *>(incidence);
KOEventViewerDialog *eventViewer = new KOEventViewerDialog(this);
eventViewer->setEvent(event);
@@ -266,13 +268,13 @@ void IncomingDialog::showEvent(QListViewItem *item)
bool IncomingDialog::incomeRefresh(ScheduleItemIn *item)
{
Event *ev = mCalendar->event(item->event()->uid());
if (ev) {
//user interaction before??
Attendee *att;
- QPtrList<Attendee> attlist = ev->attendees();
+ Q3PtrList<Attendee> attlist = ev->attendees();
for (att=attlist.first(); att; att=attlist.next()) {
Event *event = new Event(*ev);
mOutgoing->addMessage(event,Scheduler::Request,att->email());
delete(event);
}
mScheduler->deleteTransaction(item->event());
@@ -511,13 +513,13 @@ bool IncomingDialog::checkOrganizerInAddressbook(QString organizer)
bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc)
{
bool inBook = false;
#ifndef KORG_NOKABC
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
KABC::Addressee::List addressList;
- QPtrList <Attendee> attendees;
+ Q3PtrList <Attendee> attendees;
Attendee *att;
attendees = inc->attendees();
for (att=attendees.first();att;att=attendees.next()) {
addressList = add_book->findByEmail(att->email());
if (addressList.size()>0 ) inBook = true;
}