-rw-r--r-- | kaddressbook/kabcore.cpp | 34 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 11 |
2 files changed, 16 insertions, 29 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index fa9f130..9c40142 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -586,141 +586,121 @@ KConfig *KABCore::config() return KABPrefs::instance()->getConfig(); #endif //KAB_EMBEDDED } KActionCollection *KABCore::actionCollection() const { return mGUIClient->actionCollection(); } KABC::Field *KABCore::currentSearchField() const { if (mIncSearchWidget) return mIncSearchWidget->currentField(); else return 0; } QStringList KABCore::selectedUIDs() const { return mViewManager->selectedUids(); } KABC::Resource *KABCore::requestResource( QWidget *parent ) { QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); QPtrList<KRES::Resource> kresResources; QPtrListIterator<KABC::Resource> resIt( kabcResources ); KABC::Resource *resource; while ( ( resource = resIt.current() ) != 0 ) { ++resIt; if ( !resource->readOnly() ) { KRES::Resource *res = static_cast<KRES::Resource*>( resource ); if ( res ) kresResources.append( res ); } } KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); return static_cast<KABC::Resource*>( res ); } #ifndef KAB_EMBEDDED KAboutData *KABCore::createAboutData() #else //KAB_EMBEDDED void KABCore::createAboutData() #endif //KAB_EMBEDDED { -#ifndef KAB_EMBEDDED - KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ), - "3.1", I18N_NOOP( "The KDE Address Book" ), - KAboutData::License_GPL_V2, - I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) ); - about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" ); - about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) ); - about->addAuthor( "Cornelius Schumacher", - I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ), - "schumacher@kde.org" ); - about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ), - "mpilone@slac.com" ); - about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) ); - about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) ); - about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ), - "michel@klaralvdalens-datakonsult.se" ); - about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ), - "hansen@kde.org" ); - - return about; -#endif //KAB_EMBEDDED + QString version; #include <../version> QMessageBox::about( this, "About KAddressbook/Pi", "KAddressbook/Platform-independent\n" "(KA/Pi) " +version + " - " + #ifdef DESKTOP_VERSION "Desktop Edition\n" #else "PDA-Edition\n" "for: Zaurus 5500 / 7x0 / 8x0\n" #endif "(c) 2004 Ulf Schenk\n" - "(c) 2004 Lutz Rogowski\n" + "(c) 2004-2005 Lutz Rogowski\nrogowski@kde.org\n" "(c) 1997-2003, The KDE PIM Team\n" - "Tobias Koenig Current maintainer\ntokoe@kde.org\n" + "Tobias Koenig Maintainer\n" "Don Sanders Original author\n" - "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n" - "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n" + "Cornelius Schumacher Co-maintainer\n" + "Mike Pilone GUI and framework redesign\n" "Greg Stern DCOP interface\n" "Mark Westcot Contact pinning\n" - "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" - "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" + "Michel Boyer de la Giroday LDAP Lookup\n" + "Steffen Hansen LDAP Lookup" #ifdef _WIN32_ "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" #endif ); } void KABCore::setContactSelected( const QString &uid ) { KABC::Addressee addr = mAddressBook->findByUid( uid ); if ( !mDetails->isHidden() ) mDetails->setAddressee( addr ); if ( !addr.isEmpty() ) { emit contactSelected( addr.formattedName() ); KABC::Picture pic = addr.photo(); if ( pic.isIntern() ) { //US emit contactSelected( pic.data() ); //US instead use: QPixmap px; if (pic.data().isNull() != true) { px.convertFromImage(pic.data()); } emit contactSelected( px ); } } mExtensionManager->setSelectionChanged(); // update the actions bool selected = !uid.isEmpty(); if ( mReadWrite ) { mActionCut->setEnabled( selected ); mActionPaste->setEnabled( selected ); } mActionCopy->setEnabled( selected ); mActionDelete->setEnabled( selected ); mActionEditAddressee->setEnabled( selected ); mActionMail->setEnabled( selected ); mActionMailVCard->setEnabled( selected ); //if (mActionBeam) //mActionBeam->setEnabled( selected ); mActionWhoAmI->setEnabled( selected ); } diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 20a5b74..76d5c4b 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -907,98 +907,105 @@ void KOAgendaView::updateView() } /* Update configuration settings for the agenda view. This method is not complete. */ void KOAgendaView::updateConfig() { if ( mBlockUpdating ) return; if ( mAgenda->height() > 96 * KOPrefs::instance()->mHourSize ) { int old = KOPrefs::instance()->mHourSize; KOPrefs::instance()->mHourSize = mAgenda->height()/96 +1; qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize ); } // update config for children mTimeLabels->updateConfig(); mAgenda->storePosition(); mAgenda->updateConfig(); mAllDayAgenda->updateConfig(); // widget synchronization //TODO: find a better way, maybe signal/slot mTimeLabels->positionChanged(); // for some reason, this needs to be called explicitly mTimeLabels->repaint(); mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); // ToolTips displaying summary of events KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() ->mEnableToolTips); //setHolidayMasks(); //createDayLabels(); called by via updateView(); mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth()); updateView(); mAgenda->restorePosition(); } void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) { - // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl; - //qDebug("KOAgendaView::updateEventDates "); + + + int xxx = item->cellX(); + //qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() ); + if ( mMinY.at(xxx) > item->cellYTop() ) + mMinY.at(xxx) = item->cellYTop(); + if ( mMaxY.at(xxx) < item->cellYBottom() ) + mMaxY.at(xxx) = item->cellYBottom(); + QDateTime startDt,endDt; QDate startDate; int lenInSecs; // if ( type == KOAgenda::RESIZETOP ) // qDebug("RESIZETOP "); // if ( type == KOAgenda::RESIZEBOTTOM ) // qDebug("RESIZEBOTTOM "); // if ( type == KOAgenda::MOVE ) // qDebug("MOVE "); if ( item->incidence()->type() == "Event" ) { startDt =item->incidence()->dtStart(); endDt = item->incidence()->dtEnd(); lenInSecs = startDt.secsTo( endDt ); } // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { startDate = mSelectedDates[item->mLastMoveXPos]; } else { if (item->cellX() < 0) { startDate = (mSelectedDates.first()).addDays(item->cellX()); } else { startDate = mSelectedDates[item->cellX()]; } } startDt.setDate(startDate); if (item->incidence()->doesFloat()) { endDt.setDate(startDate.addDays(item->cellWidth() - 1)); } else { if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) startDt.setTime(mAgenda->gyToTime(item->cellYTop())); if ( item->incidence()->type() == "Event" ) { if ( type == KOAgenda::MOVE ) { endDt = startDt.addSecs(lenInSecs); } else if ( type == KOAgenda::RESIZEBOTTOM ) { if (item->lastMultiItem()) { endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); endDt.setDate(startDate. addDays(item->lastMultiItem()->cellX() - item->cellX())); } else { endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); endDt.setDate(startDate); } } } else { |