author | zautrix <zautrix> | 2005-07-10 12:06:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-10 12:06:17 (UTC) |
commit | a49b694c286167745886996d990f524f9141adbd (patch) (side-by-side diff) | |
tree | fe446c465bfbba1d068024449b18642de53dc0f1 /korganizer/calendarview.cpp | |
parent | 58b7818a74809dc9280a3249eeb7e0195a66f93d (diff) | |
download | kdepimpi-a49b694c286167745886996d990f524f9141adbd.zip kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.gz kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.bz2 |
fixx
-rw-r--r-- | korganizer/calendarview.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 17f1659..a9e402e 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -322,97 +322,97 @@ class KOCatPrefs : public QDialog format->setExclusive ( true ) ; addCatBut = new QRadioButton(i18n("Add to category list"), format ); new QRadioButton(i18n("Remove from Events/Todos"), format ); addCatBut->setChecked( true ); QPushButton * ok = new QPushButton( i18n("Change category list now!"), this ); lay->addWidget( ok ); QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); lay->addWidget( cancel ); connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); resize( 200, 200 ); } bool addCat() { return addCatBut->isChecked(); } private: QRadioButton* addCatBut; }; CalendarView::CalendarView( CalendarResources *calendar, QWidget *parent, const char *name ) : CalendarViewBase( parent, name ), mCalendar( calendar ), mResourceManager( calendar->resourceManager() ) { mEventEditor = 0; mTodoEditor = 0; init(); } CalendarView::CalendarView( Calendar *calendar, QWidget *parent, const char *name ) : CalendarViewBase( parent, name ), mCalendar( calendar ), mResourceManager( 0 ) { mEventEditor = 0; mTodoEditor = 0; init(); } void CalendarView::init() { mNextAlarmDateTime = QDateTime::currentDateTime(); - //setFocusPolicy ( NoFocus ); + setFocusPolicy (NoFocus ); mViewerCallerIsSearchDialog = false; mBlockShowDates = false; mDatePickerMode = 0; mCurrentSyncDevice = ""; mViewManager = new KOViewManager( this ); mDialogManager = new KODialogManager( this ); mEventViewerDialog = 0; mModified = false; mReadOnly = false; mSelectedIncidence = 0; mCalPrinter = 0; mFilters.setAutoDelete(true); mCalendar->registerObserver( this ); // TODO: Make sure that view is updated, when calendar is changed. mStorage = new FileStorage( mCalendar ); mNavigator = new DateNavigator( this, "datevav", mViewManager ); QBoxLayout *topLayout = (QBoxLayout*)layout(); #ifndef KORG_NOSPLITTER // create the main layout frames. mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); topLayout->addWidget(mPanner); mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, "CalendarView::LeftFrame"); mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); mDateNavigator = new DateNavigatorContainer( mLeftSplitter, "CalendarView::DateNavigator" ); mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); mTodoList->setNavigator( mNavigator ); mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); #ifdef KORG_NORESOURCEVIEW mResourceView = 0; #else if ( mResourceManager ) { mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); mResourceView->updateView(); connect( mResourceView, SIGNAL( resourcesChanged() ), SLOT( updateView() ) ); } else { mResourceView = 0; @@ -611,101 +611,96 @@ void CalendarView::init() mDateFrame = new QVBox(0,0,WType_Popup); //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); mDateFrame->setLineWidth(3); mDateFrame->hide(); mDateFrame->setCaption( i18n( "Pick a date to display")); mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); mEventEditor = mDialogManager->getEventEditor(); mTodoEditor = mDialogManager->getTodoEditor(); mFlagEditDescription = false; mSuspendTimer = new QTimer( this ); mAlarmTimer = new QTimer( this ); mRecheckAlarmTimer = new QTimer( this ); connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); mAlarmDialog = new AlarmDialog( this ); connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); mAlarmDialog->setServerNotification( false ); mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); #ifndef DESKTOP_VERSION //US listen for arriving address resultsets connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); #endif mDateNavigator->setCalendar( mCalendar ); } CalendarView::~CalendarView() { // kdDebug() << "~CalendarView()" << endl; //qDebug("CalendarView::~CalendarView() "); delete mDialogManager; delete mViewManager; delete mStorage; delete mDateFrame ; delete mEventViewerDialog; //kdDebug() << "~CalendarView() done" << endl; } -void CalendarView::slotResetFocus() -{ - qDebug(" CalendarView::slotResetFocus() %x", qApp->focusWidget()); - -} void CalendarView::nextConflict( bool all, bool allday ) { QPtrList<Event> testlist = mCalendar->events(); Event * test = testlist.first(); while ( test ) { test->setTagged( false ); test = testlist.next(); } QTime st ( 0,0,0); if ( mViewManager->currentView() == mViewManager->agendaView() ) st = mViewManager->agendaView()->agenda()->getEndTime(); //qDebug("time %s ", st.toString().latin1()); QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); QDateTime conflict; QDateTime retVal; bool found = false; Event * cE = 0; Event * cE2 = 0; QPtrList<Event> testlist2 = testlist; test = testlist.first(); bool skip = false; topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); while ( test ) { qApp->processEvents(); skip = false; if ( !all ) skip = ( allday != test->doesFloat() ); if ( !skip ) { Event * test2 = testlist2.first(); while ( test2 ) { skip = false; if ( !all ) skip = ( allday != test2->doesFloat() ); if ( !skip ) { if ( !test2->isTagged() ) { if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { //qDebug("overlap "); if ( ! found ) { if ( retVal >= startDT ) { conflict = retVal; cE = test; cE2 = test2; found = true; } } else { if ( retVal >= startDT && retVal < conflict ) { conflict = retVal; cE = test; |