00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "multiagendaview.h"
00020
00021 #include "koagendaview.h"
00022 #include "koagenda.h"
00023 #include "koprefs.h"
00024 #include "timelabels.h"
00025
00026 #include <libkcal/calendarresources.h>
00027
00028 #include <kglobalsettings.h>
00029
00030 #include <qlayout.h>
00031 #include <qvbox.h>
00032 #include <qobjectlist.h>
00033 #include <qheader.h>
00034
00035 #define FOREACH_VIEW(av) \
00036 for(QValueList<KOAgendaView*>::ConstIterator it = mAgendaViews.constBegin(); \
00037 it != mAgendaViews.constEnd();) \
00038 for(KOAgendaView* av = (it != mAgendaViews.constEnd() ? (*it) : 0); \
00039 it != mAgendaViews.constEnd(); ++it, av = (*it) )
00040
00041 using namespace KOrg;
00042
00043 MultiAgendaView::MultiAgendaView( Calendar * cal, CalendarView *calendarView,
00044 QWidget * parent, const char *name ) :
00045 AgendaView( cal, parent, name ),
00046 mSelectedAgendaView( 0 ),
00047 mLastMovedSplitter( 0 ),
00048 mUpdateOnShow( false ),
00049 mPendingChanges( true ),
00050 mCalendarView( calendarView )
00051 {
00052 QBoxLayout *topLevelLayout = new QHBoxLayout( this );
00053
00054 QFontMetrics fm( font() );
00055 int topLabelHeight = 2 * fm.height() + fm.lineSpacing();
00056
00057 QVBox *topSideBox = new QVBox( this );
00058 mLeftTopSpacer = new QWidget( topSideBox );
00059 mLeftTopSpacer->setFixedHeight( topLabelHeight );
00060 mLeftSplitter = new QSplitter( Qt::Vertical, topSideBox );
00061 mLeftSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
00062 QLabel *label = new QLabel( i18n("All Day"), mLeftSplitter );
00063 label->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::WordBreak );
00064 QVBox *sideBox = new QVBox( mLeftSplitter );
00065 EventIndicator *eiSpacer = new EventIndicator( EventIndicator::Top, sideBox );
00066 eiSpacer->changeColumns( 0 );
00067 mTimeLabels = new TimeLabels( 24, sideBox );
00068 eiSpacer = new EventIndicator( EventIndicator::Bottom, sideBox );
00069 eiSpacer->changeColumns( 0 );
00070 mLeftBottomSpacer = new QWidget( topSideBox );
00071 topLevelLayout->addWidget( topSideBox );
00072
00073 mScrollView = new QScrollView( this );
00074 mScrollView->setResizePolicy( QScrollView::Manual );
00075 mScrollView->setVScrollBarMode( QScrollView::AlwaysOff );
00076 mScrollView->setFrameShape( QFrame::NoFrame );
00077 topLevelLayout->addWidget( mScrollView, 100 );
00078 mTopBox = new QHBox( mScrollView->viewport() );
00079 mScrollView->addChild( mTopBox );
00080
00081 topSideBox = new QVBox( this );
00082 mRightTopSpacer = new QWidget( topSideBox );
00083 mRightTopSpacer->setFixedHeight( topLabelHeight );
00084 mRightSplitter = new QSplitter( Qt::Vertical, topSideBox );
00085 mRightSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
00086 new QWidget( mRightSplitter );
00087 sideBox = new QVBox( mRightSplitter );
00088 eiSpacer = new EventIndicator( EventIndicator::Top, sideBox );
00089 eiSpacer->setFixedHeight( eiSpacer->minimumHeight() );
00090 eiSpacer->changeColumns( 0 );
00091 mScrollBar = new QScrollBar( Qt::Vertical, sideBox );
00092 eiSpacer = new EventIndicator( EventIndicator::Bottom, sideBox );
00093 eiSpacer->setFixedHeight( eiSpacer->minimumHeight() );
00094 eiSpacer->changeColumns( 0 );
00095 mRightBottomSpacer = new QWidget( topSideBox );
00096 topLevelLayout->addWidget( topSideBox );
00097
00098 recreateViews();
00099 }
00100
00101 void MultiAgendaView::recreateViews()
00102 {
00103 if ( !mPendingChanges ) {
00104 return;
00105 }
00106
00107 mPendingChanges = false;
00108
00109 deleteViews();
00110
00111 CalendarResources *calres = dynamic_cast<CalendarResources*>( calendar() );
00112 if ( !calres ) {
00113
00114 KOAgendaView* av = new KOAgendaView( calendar(), mCalendarView, mTopBox );
00115 mAgendaViews.append( av );
00116 mAgendaWidgets.append( av );
00117 mSelectedAgendaView = av;
00118 av->show();
00119 } else {
00120 CalendarResourceManager *manager = calres->resourceManager();
00121 for ( CalendarResourceManager::ActiveIterator it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
00122 if ( (*it)->canHaveSubresources() ) {
00123 QStringList subResources = (*it)->subresources();
00124 for ( QStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) {
00125 QString type = (*it)->subresourceType( *subit );
00126
00127 if ( !(*it)->subresourceActive( *subit ) || (!type.isEmpty() && type != "event") ) {
00128 continue;
00129 }
00130
00131 addView( (*it)->labelForSubresource( *subit ), *it, *subit );
00132 }
00133 } else {
00134 addView( (*it)->resourceName(), *it );
00135 }
00136 }
00137 }
00138
00139
00140 if ( mAgendaViews.isEmpty() ) {
00141 return;
00142 }
00143
00144 setupViews();
00145 QTimer::singleShot( 0, this, SLOT(slotResizeScrollView()) );
00146 mTimeLabels->updateConfig();
00147
00148 connect( mTimeLabels->verticalScrollBar(), SIGNAL(valueChanged(int)),
00149 mScrollBar, SLOT(setValue(int)) );
00150 connect( mScrollBar, SIGNAL(valueChanged(int)),
00151 mTimeLabels, SLOT(positionChanged(int)) );
00152
00153 installSplitterEventFilter( mLeftSplitter );
00154 installSplitterEventFilter( mRightSplitter );
00155
00156 QValueList<int> sizes = KOGlobals::self()->config()->readIntListEntry( "Separator AgendaView" );
00157 if ( sizes.count() != 2 ) {
00158 sizes = mLeftSplitter->sizes();
00159 }
00160 FOREACH_VIEW( agenda ) {
00161 agenda->splitter()->setSizes( sizes );
00162 }
00163 mLeftSplitter->setSizes( sizes );
00164 mRightSplitter->setSizes( sizes );
00165
00166 QTimer::singleShot( 0, this, SLOT(setupScrollBar()) );
00167
00168 mTimeLabels->positionChanged();
00169 }
00170
00171 void MultiAgendaView::deleteViews()
00172 {
00173 for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin();
00174 it != mAgendaWidgets.constEnd(); ++it ) {
00175 delete *it;
00176 }
00177 mAgendaViews.clear();
00178 mAgendaWidgets.clear();
00179 mLastMovedSplitter = 0;
00180 mSelectedAgendaView = 0;
00181 }
00182
00183 void MultiAgendaView::setupViews()
00184 {
00185 FOREACH_VIEW( agenda ) {
00186 if ( !agenda->readOnly() ) {
00187 connect( agenda,
00188 SIGNAL(newEventSignal(ResourceCalendar *,const QString &)),
00189 SIGNAL(newEventSignal(ResourceCalendar *,const QString &)) );
00190 connect( agenda,
00191 SIGNAL(newEventSignal(ResourceCalendar *,const QString &,const QDate &)),
00192 SIGNAL(newEventSignal(ResourceCalendar *,const QString &,const QDate &)) );
00193 connect( agenda,
00194 SIGNAL(newEventSignal(ResourceCalendar *,const QString &,const QDateTime &)),
00195 SIGNAL(newEventSignal(ResourceCalendar *,const QString &,const QDateTime &)) );
00196 connect( agenda,
00197 SIGNAL(newEventSignal(ResourceCalendar *,const QString &,const QDateTime &,const QDateTime &)),
00198 SIGNAL(newEventSignal(ResourceCalendar *,const QString &,const QDateTime &,const QDateTime&)) );
00199
00200 connect( agenda,
00201 SIGNAL(newTodoSignal(ResourceCalendar *,const QString &,const QDate &)),
00202 SIGNAL(newTodoSignal(ResourceCalendar *,const QString &,const QDate &)) );
00203
00204 connect( agenda,
00205 SIGNAL(editIncidenceSignal(Incidence *,const QDate &)),
00206 SIGNAL(editIncidenceSignal(Incidence *,const QDate &)) );
00207 connect( agenda,
00208 SIGNAL(deleteIncidenceSignal(Incidence *)),
00209 SIGNAL(deleteIncidenceSignal(Incidence *)) );
00210 connect( agenda,
00211 SIGNAL(startMultiModify(const QString &)),
00212 SIGNAL(startMultiModify(const QString &)) );
00213 connect( agenda,
00214 SIGNAL(endMultiModify()),
00215 SIGNAL(endMultiModify()) );
00216
00217 connect( agenda,
00218 SIGNAL(cutIncidenceSignal(Incidence*)),
00219 SIGNAL(cutIncidenceSignal(Incidence*)) );
00220 connect( agenda,
00221 SIGNAL(pasteIncidenceSignal()),
00222 SIGNAL(pasteIncidenceSignal()) );
00223 connect( agenda,
00224 SIGNAL(toggleAlarmSignal(Incidence*)),
00225 SIGNAL(toggleAlarmSignal(Incidence*)) );
00226 connect( agenda,
00227 SIGNAL(dissociateOccurrenceSignal(Incidence*, const QDate&)),
00228 SIGNAL(dissociateOccurrenceSignal(Incidence*, const QDate&)) );
00229 connect( agenda,
00230 SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const QDate&)),
00231 SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const QDate&)) );
00232 }
00233
00234 connect( agenda,
00235 SIGNAL(copyIncidenceSignal(Incidence*)),
00236 SIGNAL(copyIncidenceSignal(Incidence*)) );
00237 connect( agenda,
00238 SIGNAL(showIncidenceSignal(Incidence *,const QDate &)),
00239 SIGNAL(showIncidenceSignal(Incidence *,const QDate &)) );
00240 connect( agenda,
00241 SIGNAL(incidenceSelected(Incidence *,const QDate &)),
00242 SIGNAL(incidenceSelected(Incidence *,const QDate &)) );
00243 connect( agenda,
00244 SIGNAL(incidenceSelected(Incidence*,const QDate &)),
00245 SLOT(slotSelectionChanged()) );
00246
00247 connect( agenda,
00248 SIGNAL(timeSpanSelectionChanged()),
00249 SLOT(slotClearTimeSpanSelection()) );
00250
00251 disconnect( agenda->agenda(),
00252 SIGNAL(zoomView(const int,const QPoint&,const Qt::Orientation)),
00253 agenda, 0 );
00254 connect( agenda->agenda(),
00255 SIGNAL(zoomView(const int,const QPoint&,const Qt::Orientation)),
00256 SLOT(zoomView(const int,const QPoint&,const Qt::Orientation)) );
00257 }
00258
00259 KOAgenda *anAgenda = mAgendaViews.first()->agenda();
00260 connect( anAgenda, SIGNAL(lowerYChanged(int) ), SLOT(resizeSpacers(int)) );
00261
00262 FOREACH_VIEW( agenda ) {
00263 agenda->readSettings();
00264 }
00265
00266 int minWidth = 0;
00267 for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it )
00268 minWidth = QMAX( minWidth, (*it)->minimumSizeHint().width() );
00269 for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it )
00270 (*it)->setMinimumWidth( minWidth );
00271 }
00272
00273 MultiAgendaView::~ MultiAgendaView()
00274 {
00275 }
00276
00277 Incidence::List MultiAgendaView::selectedIncidences()
00278 {
00279 Incidence::List list;
00280 FOREACH_VIEW(agendaView) {
00281 list += agendaView->selectedIncidences();
00282 }
00283 return list;
00284 }
00285
00286 DateList MultiAgendaView::selectedIncidenceDates()
00287 {
00288 DateList list;
00289 FOREACH_VIEW(agendaView) {
00290 list += agendaView->selectedIncidenceDates();
00291 }
00292 return list;
00293 }
00294
00295 int MultiAgendaView::currentDateCount()
00296 {
00297 FOREACH_VIEW( agendaView )
00298 return agendaView->currentDateCount();
00299 return 0;
00300 }
00301
00302 void MultiAgendaView::showDates(const QDate & start, const QDate & end)
00303 {
00304 mStartDate = start;
00305 mEndDate = end;
00306 recreateViews();
00307 FOREACH_VIEW( agendaView )
00308 agendaView->showDates( start, end );
00309 }
00310
00311 void MultiAgendaView::showIncidences(const Incidence::List & incidenceList, const QDate &date)
00312 {
00313 FOREACH_VIEW( agendaView )
00314 agendaView->showIncidences( incidenceList, date );
00315 }
00316
00317 void MultiAgendaView::updateView()
00318 {
00319 recreateViews();
00320 FOREACH_VIEW( agendaView )
00321 agendaView->updateView();
00322 }
00323
00324 void MultiAgendaView::changeIncidenceDisplay(Incidence * incidence, int mode)
00325 {
00326 FOREACH_VIEW( agendaView )
00327 agendaView->changeIncidenceDisplay( incidence, mode );
00328 }
00329
00330 int MultiAgendaView::maxDatesHint()
00331 {
00332 FOREACH_VIEW( agendaView )
00333 return agendaView->maxDatesHint();
00334 return 0;
00335 }
00336
00337 void MultiAgendaView::slotSelectionChanged()
00338 {
00339 FOREACH_VIEW( agenda ) {
00340 if ( agenda != sender() )
00341 agenda->clearSelection();
00342 }
00343 }
00344
00345 bool MultiAgendaView::eventDurationHint(QDateTime & startDt, QDateTime & endDt, bool & allDay)
00346 {
00347 FOREACH_VIEW( agenda ) {
00348 bool valid = agenda->eventDurationHint( startDt, endDt, allDay );
00349 if ( valid )
00350 return true;
00351 }
00352 return false;
00353 }
00354
00355 void MultiAgendaView::slotClearTimeSpanSelection()
00356 {
00357 FOREACH_VIEW( agenda ) {
00358 if ( agenda != sender() )
00359 agenda->clearTimeSpanSelection();
00360 }
00361 }
00362
00363 void MultiAgendaView::setTypeAheadReceiver(QObject * o)
00364 {
00365 FOREACH_VIEW( agenda )
00366 agenda->setTypeAheadReceiver( o );
00367 }
00368
00369 void MultiAgendaView::finishTypeAhead()
00370 {
00371 FOREACH_VIEW( agenda )
00372 agenda->finishTypeAhead();
00373 }
00374
00375 void MultiAgendaView::addView( const QString &label, ResourceCalendar *res, const QString &subRes )
00376 {
00377 bool readOnlyView = false;
00378
00379 QVBox *box = new QVBox( mTopBox );
00380
00381
00382 QHeader *title = new QHeader( 1, box );
00383 title->setClickEnabled( false );
00384 title->setStretchEnabled( true );
00385 if ( res->readOnly() || !res->subresourceWritable( subRes ) ) {
00386 readOnlyView = true;
00387 title->setLabel( 0, QIconSet( KOGlobals::self()->smallIcon( "readonlyevent" ) ), label );
00388 } else {
00389 QColor resColor;
00390 if ( subRes.isEmpty() ) {
00391 resColor = *KOPrefs::instance()->resourceColor( res->identifier() );
00392 } else {
00393 resColor = *KOPrefs::instance()->resourceColor( subRes );
00394 }
00395 QFontMetrics fm = fontMetrics();
00396 QPixmap px( fm.height(), fm.height() );
00397 px.fill( resColor );
00398 title->setLabel( 0, QIconSet( px, QIconSet::Small ), label );
00399 }
00400
00401
00402 KOAgendaView* av = new KOAgendaView( calendar(), mCalendarView, box, 0, true );
00403 av->setReadOnly( readOnlyView );
00404 av->setResource( res, subRes );
00405 av->setIncidenceChanger( mChanger );
00406 av->agenda()->setVScrollBarMode( QScrollView::AlwaysOff );
00407 mAgendaViews.append( av );
00408 mAgendaWidgets.append( box );
00409 box->show();
00410 mTimeLabels->setAgenda( av->agenda() );
00411
00412 connect( av->agenda()->verticalScrollBar(), SIGNAL(valueChanged(int)),
00413 mTimeLabels, SLOT(positionChanged(int)) );
00414 connect( mTimeLabels->verticalScrollBar(), SIGNAL(valueChanged(int)),
00415 av, SLOT(setContentsPos(int)) );
00416
00417 av->installEventFilter( this );
00418 installSplitterEventFilter( av->splitter() );
00419 }
00420
00421 void MultiAgendaView::resizeEvent(QResizeEvent * ev)
00422 {
00423 resizeScrollView( ev->size() );
00424 AgendaView::resizeEvent( ev );
00425 }
00426
00427 void MultiAgendaView::resizeScrollView(const QSize & size)
00428 {
00429 const int widgetWidth = size.width() - mTimeLabels->width() - mScrollBar->width();
00430 int width = QMAX( mTopBox->sizeHint().width(), widgetWidth );
00431 int height = size.height();
00432 if ( width > widgetWidth ) {
00433 const int sbHeight = mScrollView->horizontalScrollBar()->height();
00434 height -= sbHeight;
00435 mLeftBottomSpacer->setFixedHeight( sbHeight );
00436 mRightBottomSpacer->setFixedHeight( sbHeight );
00437 } else {
00438 mLeftBottomSpacer->setFixedHeight( 0 );
00439 mRightBottomSpacer->setFixedHeight( 0 );
00440 }
00441 mScrollView->resizeContents( width, height );
00442 mTopBox->resize( width, height );
00443 }
00444
00445 void MultiAgendaView::setIncidenceChanger(IncidenceChangerBase * changer)
00446 {
00447 AgendaView::setIncidenceChanger( changer );
00448 FOREACH_VIEW( agenda )
00449 agenda->setIncidenceChanger( changer );
00450 }
00451
00452 void MultiAgendaView::updateConfig()
00453 {
00454 AgendaView::updateConfig();
00455 mTimeLabels->updateConfig();
00456 FOREACH_VIEW( agenda )
00457 agenda->updateConfig();
00458 }
00459
00460 bool MultiAgendaView::eventFilter(QObject * obj, QEvent * event)
00461 {
00462 if ( obj->className() == QCString("QSplitterHandle") ) {
00463
00464 if ( (event->type() == QEvent::MouseMove && KGlobalSettings::opaqueResize())
00465 || event->type() == QEvent::MouseButtonRelease ) {
00466 FOREACH_VIEW( agenda ) {
00467 if ( agenda->splitter() == obj->parent() )
00468 mLastMovedSplitter = agenda->splitter();
00469 }
00470 if ( mLeftSplitter == obj->parent() )
00471 mLastMovedSplitter = mLeftSplitter;
00472 else if ( mRightSplitter == obj->parent() )
00473 mLastMovedSplitter = mRightSplitter;
00474 QTimer::singleShot( 0, this, SLOT(resizeSplitters()) );
00475 }
00476 }
00477
00478 if ( obj->className() == QCString( "KOAgendaView" ) ) {
00479 if ( event->type() == QEvent::MouseButtonRelease ||
00480 event->type() == QEvent::MouseButtonPress ) {
00481 mSelectedAgendaView = (KOAgendaView *)obj;
00482 }
00483 }
00484
00485 return AgendaView::eventFilter( obj, event );
00486 }
00487
00488 KOAgendaView *MultiAgendaView::selectedAgendaView()
00489 {
00490 return mSelectedAgendaView;
00491 }
00492
00493 void MultiAgendaView::resizeSplitters()
00494 {
00495 if ( !mLastMovedSplitter )
00496 mLastMovedSplitter = mAgendaViews.first()->splitter();
00497 FOREACH_VIEW( agenda ) {
00498 if ( agenda->splitter() == mLastMovedSplitter )
00499 continue;
00500 agenda->splitter()->setSizes( mLastMovedSplitter->sizes() );
00501 }
00502 if ( mLastMovedSplitter != mLeftSplitter )
00503 mLeftSplitter->setSizes( mLastMovedSplitter->sizes() );
00504 if ( mLastMovedSplitter != mRightSplitter )
00505 mRightSplitter->setSizes( mLastMovedSplitter->sizes() );
00506 }
00507
00508 void MultiAgendaView::resizeSpacers( int newY )
00509 {
00510
00511
00512
00513
00514
00515 Q_UNUSED( newY );
00516 QFontMetrics fm( font() );
00517 int topLabelHeight = mAgendaViews.first()->dayLabels()->height() +
00518 fm.height() + mLeftSplitter->handleWidth();
00519 mLeftTopSpacer->setFixedHeight( topLabelHeight );
00520 mRightTopSpacer->setFixedHeight( topLabelHeight );
00521 }
00522
00523 void MultiAgendaView::zoomView( const int delta, const QPoint & pos, const Qt::Orientation ori )
00524 {
00525 if ( ori == Qt::Vertical ) {
00526 if ( delta > 0 ) {
00527 if ( KOPrefs::instance()->mHourSize > 4 )
00528 KOPrefs::instance()->mHourSize--;
00529 } else {
00530 KOPrefs::instance()->mHourSize++;
00531 }
00532 }
00533
00534 FOREACH_VIEW( agenda )
00535 agenda->zoomView( delta, pos, ori );
00536
00537 mTimeLabels->updateConfig();
00538 mTimeLabels->positionChanged();
00539 mTimeLabels->repaint();
00540 }
00541
00542
00543 void MultiAgendaView::installSplitterEventFilter(QSplitter * splitter)
00544 {
00545 QObjectList *objlist = splitter->queryList( "QSplitterHandle" );
00546
00547
00548 if ( objlist->count() == 0 && !isVisible() )
00549 mUpdateOnShow = true;
00550 QObjectListIt it( *objlist );
00551 QObject *obj;
00552 while ( (obj = it.current()) != 0 ) {
00553 obj->removeEventFilter( this );
00554 obj->installEventFilter( this );
00555 ++it;
00556 }
00557 delete objlist;
00558 }
00559
00560 void MultiAgendaView::slotResizeScrollView()
00561 {
00562 resizeScrollView( size() );
00563 }
00564
00565 void MultiAgendaView::show()
00566 {
00567 AgendaView::show();
00568 if ( mUpdateOnShow ) {
00569 mUpdateOnShow = false;
00570 mPendingChanges = true;
00571 showDates( mStartDate, mEndDate );
00572 }
00573 }
00574
00575 void MultiAgendaView::resourcesChanged()
00576 {
00577 mPendingChanges = true;
00578
00579 kdDebug() << "mAgendaViews.size is " << mAgendaViews.size()
00580 << "; mAgendaWidgets.size is " << mAgendaWidgets.size()
00581 << "; mSelectedAgendaView is " << mSelectedAgendaView
00582 << endl;
00583
00584 if ( mSelectedAgendaView ) {
00585 ResourceCalendar *res = mSelectedAgendaView->resourceCalendar();
00586 if ( res ) {
00587 if ( res->canHaveSubresources() ) {
00588 QString subRes = mSelectedAgendaView->subResourceCalendar();
00589 if ( !res->subresourceWritable( subRes ) ||
00590 !res->subresourceActive( subRes ) ) {
00591 mSelectedAgendaView = 0;
00592 }
00593 } else {
00594 if ( res->readOnly() || !res->isActive() ) {
00595 mSelectedAgendaView = 0;
00596 }
00597 }
00598 } else {
00599 mSelectedAgendaView = 0;
00600 }
00601 }
00602
00603 FOREACH_VIEW( agenda )
00604 agenda->resourcesChanged();
00605 }
00606
00607 void MultiAgendaView::setupScrollBar()
00608 {
00609 if ( !mAgendaViews.isEmpty() && mAgendaViews.first()->agenda() ) {
00610 QScrollBar *scrollBar = mAgendaViews.first()->agenda()->verticalScrollBar();
00611 mScrollBar->setMinValue( scrollBar->minValue() );
00612 mScrollBar->setMaxValue( scrollBar->maxValue() );
00613 mScrollBar->setLineStep( scrollBar->lineStep() );
00614 mScrollBar->setPageStep( scrollBar->pageStep() );
00615 mScrollBar->setValue( scrollBar->value() );
00616 }
00617 }
00618
00619 #include "multiagendaview.moc"