author | zautrix <zautrix> | 2004-09-17 00:05:23 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-17 00:05:23 (UTC) |
commit | 8462751df135b9ad08b1269661d2c7eb18c67976 (patch) (side-by-side diff) | |
tree | 1c40fa2638f9f22df2d96b0879acfd20a9c2c502 /korganizer | |
parent | eebe4409884ccd4dedb7cb697a800f74b33eb292 (diff) | |
download | kdepimpi-8462751df135b9ad08b1269661d2c7eb18c67976.zip kdepimpi-8462751df135b9ad08b1269661d2c7eb18c67976.tar.gz kdepimpi-8462751df135b9ad08b1269661d2c7eb18c67976.tar.bz2 |
Rearranged linking
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | korganizer/incomingdialog.cpp | 3 | ||||
-rw-r--r-- | korganizer/korganizerE.pro | 4 | ||||
-rw-r--r-- | korganizer/publishdialog.cpp | 3 |
4 files changed, 10 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 369c7a0..56b3fb0 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1281,139 +1281,141 @@ void CalendarView::syncExternal( int mode ) } } #ifndef DESKTOP_VERSION if ( sharpFormat ) sharpFormat->save(calendar); #endif if ( phoneFormat ) phoneFormat->save(calendar); iL = calendar->rawIncidences(); inc = iL.first(); Incidence* loc; while ( inc ) { if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { loc = mCalendar->incidence(inc->uid() ); if ( loc ) { loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); } } inc = iL.next(); } Incidence* lse = getLastSyncEvent(); if ( lse ) { lse->setReadOnly( false ); lse->setDescription( "" ); lse->setReadOnly( true ); } } } setModified( true ); } else { QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), question, i18n("Ok")) ; } delete calendar; updateView(); return ;//syncOK; } void CalendarView::syncSharp() { syncExternal( 0 ); } -#include <kabc/stdaddressbook.h> +//#include <kabc/stdaddressbook.h> bool CalendarView::importBday() { +#if 0 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); KABC::AddressBook::Iterator it; int count = 0; for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { ++count; } QProgressBar bar(count,0 ); int w = 300; if ( QApplication::desktop()->width() < 320 ) w = 220; int h = bar.sizeHint().height() ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); bar.show(); bar.setCaption (i18n("Reading addressbook - close to abort!") ); qApp->processEvents(); count = 0; int addCount = 0; KCal::Attendee* a = 0; for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { if ( ! bar.isVisible() ) return false; bar.setProgress( count++ ); qApp->processEvents(); //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); if ( (*it).birthday().date().isValid() ){ a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) ++addCount; } QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); if ( anni.isValid() ){ a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) ++addCount; } } updateView(); topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); +#endif return true; } bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) { //qDebug("addAnni "); Event * ev = new Event(); if ( a ) { ev->addAttendee( a ); } QString kind; if ( birthday ) kind = i18n( "Birthday" ); else kind = i18n( "Anniversary" ); ev->setSummary( name + " - " + kind ); ev->setOrganizer( "nobody@nowhere" ); ev->setCategories( kind ); ev->setDtStart( QDateTime(date) ); ev->setDtEnd( QDateTime(date) ); ev->setFloats( true ); Recurrence * rec = ev->recurrence(); rec->setYearly(Recurrence::rYearlyMonth,1,-1); rec->addYearlyNum( date.month() ); if ( !mCalendar->addAnniversaryNoDup( ev ) ) { delete ev; return false; } return true; } bool CalendarView::importQtopia( const QString &categories, const QString &datebook, const QString &todolist ) { QtopiaFormat qtopiaFormat; qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); updateView(); return true; #if 0 mGlobalSyncMode = SYNC_MODE_QTOPIA; mCurrentSyncDevice = "qtopia-XML"; diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp index f3bd09f..50e3077 100644 --- a/korganizer/incomingdialog.cpp +++ b/korganizer/incomingdialog.cpp @@ -5,97 +5,98 @@ 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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 <qfile.h> #include <qdir.h> #include <qmap.h> #include <kglobal.h> #include <klocale.h> #include <kdebug.h> #include <kstandarddirs.h> #include <kmessagebox.h> #include <libkcal/incidence.h> #include <libkcal/event.h> #include <libkcal/calendar.h> #include <libkcal/freebusy.h> #include <libkcal/attendee.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <kresources/resourceselectdialog.h> #ifndef KORG_NOMAIL #include "mailscheduler.h" #else #include <libkcal/dummyscheduler.h> #endif #include "incomingdialog.h" #include "koeventviewerdialog.h" #include "kocounterdialog.h" #include "koprefs.h" #ifndef KORG_NOKABC -#include <kabc/stdaddressbook.h> +#define KORG_NOKABC +//#include <kabc/stdaddressbook.h> #define size count #endif ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev, Scheduler::Method method,ScheduleMessage::Status status) : QListViewItem(parent) { mIncidence = ev; mMethod = method; mStatus = status; setText(6,Scheduler::translatedMethodName(mMethod)+" "); setText(7,ScheduleMessage::statusName(status)); } /* Visitor */ ScheduleItemVisitor::ScheduleItemVisitor(ScheduleItemIn *item) { mItem = item; } ScheduleItemVisitor::~ScheduleItemVisitor() { } bool ScheduleItemVisitor::visit(Event *e) { mItem->setText(0,e->summary()); mItem->setText(1,e->dtStartDateStr()); if (e->doesFloat()) { mItem->setText(2,i18n("no time ")); mItem->setText(4,i18n("no time ")); } else { mItem->setText(2,e->dtStartTimeStr()); mItem->setText(4,e->dtEndTimeStr()); } if (e->hasEndDate()) { mItem->setText(3,e->dtEndDateStr()); } else { mItem->setText(3,""); } mItem->setText(5,e->organizer()+" "); return true; } diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro index 4247838..d841193 100644 --- a/korganizer/korganizerE.pro +++ b/korganizer/korganizerE.pro @@ -1,71 +1,73 @@ TEMPLATE = app CONFIG += qt warn_on TARGET = kopi OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR=$(QPEDIR)/bin INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kdeui $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/libkdepim interfaces $(KDEPIMDIR)/kabc $(QPEDIR)/include DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER DEFINES += KORG_NOLVALTERNATION #KORG_NOKABC LIBS += -lmicrokdepim LIBS += -lmicrokcal LIBS += -lmicrokde LIBS += -lmicroqtcompat -LIBS += -lmicrokabc +#LIBS += -lmicrokabc #LIBS += $(QPEDIR)/lib/gammu #LIBS += -lmicrogammu #LIBS += -lbluetooth #LIBS += -lsdp +LIBS += $(GCC3EXTRALIB1) +LIBS += $(GCC3EXTRALIB2) LIBS += -lqpe LIBS += -ljpeg LIBS += $(QTOPIALIB) LIBS += -L$(QPEDIR)/lib INTERFACES = kofilterview_base.ui #filteredit_base.ui HEADERS = \ wordsgerman.h \ filteredit_base.h \ alarmclient.h \ calendarview.h \ customlistviewitem.h \ datenavigator.h \ docprefs.h \ filtereditdialog.h \ incomingdialog.h \ incomingdialog_base.h \ interfaces/korganizer/baseview.h \ interfaces/korganizer/calendarviewbase.h \ journalentry.h \ kdateedit.h \ kdatenavigator.h \ koagenda.h \ koagendaitem.h \ koagendaview.h \ kocounterdialog.h \ kodaymatrix.h \ kodialogmanager.h \ koeditordetails.h \ koeditorgeneral.h \ koeditorgeneralevent.h \ koeditorgeneraltodo.h \ koeditorrecurrence.h \ koeventeditor.h \ koeventpopupmenu.h \ koeventview.h \ koeventviewer.h \ koeventviewerdialog.h \ kofilterview.h \ koglobals.h \ koincidenceeditor.h \ kojournalview.h \ kolistview.h \ kolocationbox.h \ diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp index 4323b91..2ae6720 100644 --- a/korganizer/publishdialog.cpp +++ b/korganizer/publishdialog.cpp @@ -1,78 +1,79 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlineedit.h> #include <kdebug.h> #include <kglobal.h> #include <klocale.h> #ifndef KORG_NOKABC -#include <kabc/addresseedialog.h> +#define KORG_NOKABC +//#include <kabc/addresseedialog.h> #endif #include "koprefs.h" #include "publishdialog.h" PublishDialog::PublishDialog(QWidget* parent, const char* name, bool modal, WFlags fl) : PublishDialog_base(parent,name,modal,fl) { setCaption(i18n("Select Addresses")); mNameLineEdit->setEnabled(false); mEmailLineEdit->setEnabled(false); connect(mAddressListView,SIGNAL(selectionChanged(QListViewItem *)), SLOT(updateInput())); } PublishDialog::~PublishDialog() { } void PublishDialog::addAttendee(Attendee *attendee) { mNameLineEdit->setEnabled(true); mEmailLineEdit->setEnabled(true); QListViewItem *item = new QListViewItem(mAddressListView); item->setText(0,attendee->name()); item->setText(1,attendee->email()); mAddressListView->insertItem(item); } QString PublishDialog::addresses() { QString to = ""; QListViewItem *item; int i, count; count = mAddressListView->childCount(); for (i=0;i<count;i++) { item = mAddressListView->firstChild(); mAddressListView->takeItem(item); to += item->text(1); if (i<count-1) { to += ", "; } } return to; } void PublishDialog::addItem() |