summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp8
-rw-r--r--korganizer/koagendaview.cpp2
-rw-r--r--korganizer/koeditorgeneraltodo.cpp3
-rw-r--r--korganizer/navigatorbar.cpp6
4 files changed, 18 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index ed7a443..1a24887 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -448,24 +448,32 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
448 } else { 448 } else {
449 startItemAction(viewportPos); 449 startItemAction(viewportPos);
450 } 450 }
451 } 451 }
452 } 452 }
453 } else { // ---------- viewport() 453 } else { // ---------- viewport()
454 mPopupItem = 0; 454 mPopupItem = 0;
455 mPopupKind = 2; 455 mPopupKind = 2;
456 selectItem(0); 456 selectItem(0);
457 mActionItem = 0; 457 mActionItem = 0;
458 mPopupPos = viewport()->mapToGlobal( me->pos() ); 458 mPopupPos = viewport()->mapToGlobal( me->pos() );
459 if (me->button() == RightButton) { 459 if (me->button() == RightButton) {
460 int x,y;
461 viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
462 int gx,gy;
463 contentsToGrid(x,y,gx,gy);
464 mCurrentCellX = gx;
465 mCurrentCellY = gy;
466 mStartCellX = gx;
467 mStartCellY = gy;
460 popupMenu(); 468 popupMenu();
461 } else if (me->button() == LeftButton) { 469 } else if (me->button() == LeftButton) {
462 setCursor(arrowCursor); 470 setCursor(arrowCursor);
463 startSelectAction(viewportPos); 471 startSelectAction(viewportPos);
464 } 472 }
465 } 473 }
466 break; 474 break;
467 475
468 case QEvent::MouseButtonRelease: 476 case QEvent::MouseButtonRelease:
469 if (me->button() == LeftButton ) { 477 if (me->button() == LeftButton ) {
470 mPopupTimer->stop(); 478 mPopupTimer->stop();
471 } 479 }
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index f6f390b..f452db0 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -723,24 +723,25 @@ void KOAgendaView::createDayLabels()
723 if ( ! appendLabels ) { 723 if ( ! appendLabels ) {
724 dayLabel = mDayLabelsList.next(); 724 dayLabel = mDayLabelsList.next();
725 if ( !dayLabel ) 725 if ( !dayLabel )
726 appendLabels = true; 726 appendLabels = true;
727 } 727 }
728 if ( appendLabels ) { 728 if ( appendLabels ) {
729 dayLabel = getNewDaylabel(); 729 dayLabel = getNewDaylabel();
730 } 730 }
731 dayLabel->setMinimumWidth( 1 ); 731 dayLabel->setMinimumWidth( 1 );
732 dayLabel->setMaximumWidth( 10240 ); 732 dayLabel->setMaximumWidth( 10240 );
733 dayLabel->setFont( dlf ); 733 dayLabel->setFont( dlf );
734 dayLabel->show(); 734 dayLabel->show();
735 dayLabel->setAutoRepeat( false );
735 dayLabel->setNum( counter ); 736 dayLabel->setNum( counter );
736 QString str; 737 QString str;
737 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); 738 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date);
738 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); 739 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true );
739 switch ( maxLen ) { 740 switch ( maxLen ) {
740 case 2: 741 case 2:
741 str = QString::number( date.day() ); 742 str = QString::number( date.day() );
742 break; 743 break;
743 744
744 case 3: 745 case 3:
745 str = dayName.left( 1 ) +QString::number( date.day()); 746 str = dayName.left( 1 ) +QString::number( date.day());
746 747
@@ -814,24 +815,25 @@ void KOAgendaView::createDayLabels()
814 appendLabels = true; 815 appendLabels = true;
815 } 816 }
816 if ( appendLabels ) { 817 if ( appendLabels ) {
817 dayLabel = getNewDaylabel(); 818 dayLabel = getNewDaylabel();
818 } 819 }
819 //dayLabel->hide();//test only 820 //dayLabel->hide();//test only
820 821
821 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; 822 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ;
822 if ( offset < 0 ) offset = 0; 823 if ( offset < 0 ) offset = 0;
823 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); 824 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 );
824 dayLabel->setText(">");//QString::number ( mSelectedDates.first().month() ) ); 825 dayLabel->setText(">");//QString::number ( mSelectedDates.first().month() ) );
825 dayLabel->setFont( dlf ); 826 dayLabel->setFont( dlf );
827 dayLabel->setAutoRepeat( true );
826 dayLabel->show(); 828 dayLabel->show();
827 dayLabel->setNum( -2 ); 829 dayLabel->setNum( -2 );
828 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset ); 830 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset );
829 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2); 831 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2);
830 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); 832 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2);
831 if ( !appendLabels ) { 833 if ( !appendLabels ) {
832 dayLabel = mDayLabelsList.next(); 834 dayLabel = mDayLabelsList.next();
833 while ( dayLabel ) { 835 while ( dayLabel ) {
834 //qDebug("!dayLabel %d",dayLabel ); 836 //qDebug("!dayLabel %d",dayLabel );
835 dayLabel->hide(); 837 dayLabel->hide();
836 dayLabel = mDayLabelsList.next(); 838 dayLabel = mDayLabelsList.next();
837 } 839 }
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index a9d1ed3..a03ec52 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -206,31 +206,32 @@ void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
206 mTimeButton->setChecked( !allDay ); 206 mTimeButton->setChecked( !allDay );
207 if(mTimeButton->isChecked()) { 207 if(mTimeButton->isChecked()) {
208 mTimeButton->setEnabled(true); 208 mTimeButton->setEnabled(true);
209 } 209 }
210 else { 210 else {
211 mTimeButton->setEnabled(false); 211 mTimeButton->setEnabled(false);
212 } 212 }
213 213
214 enableTimeEdits( !allDay ); 214 enableTimeEdits( !allDay );
215 if ( due.isValid() ) { 215 if ( due.isValid() ) {
216 mDueCheck->setChecked(true); 216 mDueCheck->setChecked(true);
217 enableDueEdit(true); 217 enableDueEdit(true);
218 alarmDisable(false);
218 } else { 219 } else {
219 mDueCheck->setChecked(false); 220 mDueCheck->setChecked(false);
220 enableDueEdit(false); 221 enableDueEdit(false);
221 due = QDateTime::currentDateTime().addDays(7); 222 due = QDateTime::currentDateTime().addDays(7);
223 alarmDisable(true);
222 } 224 }
223 225
224 alarmDisable(true);
225 226
226 mStartCheck->setChecked(false); 227 mStartCheck->setChecked(false);
227 enableStartEdit(false); 228 enableStartEdit(false);
228 229
229 mDueDateEdit->setDate(due.date()); 230 mDueDateEdit->setDate(due.date());
230 mDueTimeEdit->setTime(due.time()); 231 mDueTimeEdit->setTime(due.time());
231 due = due.addDays(-7); 232 due = due.addDays(-7);
232 mStartDateEdit->setDate(due.date()); 233 mStartDateEdit->setDate(due.date());
233 mStartTimeEdit->setTime(due.time()); 234 mStartTimeEdit->setTime(due.time());
234 235
235 mPriorityCombo->setCurrentItem(2); 236 mPriorityCombo->setCurrentItem(2);
236 mCompletedLabel->setText(i18n(" completed"));; 237 mCompletedLabel->setText(i18n(" completed"));;
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index eca7c14..49149f2 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -142,24 +142,30 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
142 connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) ); 142 connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) );
143 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) ); 143 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) );
144 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); 144 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
145 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); 145 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) );
146 mPrevYear->setFocusPolicy(NoFocus); 146 mPrevYear->setFocusPolicy(NoFocus);
147 mPrevMonth->setFocusPolicy(NoFocus); 147 mPrevMonth->setFocusPolicy(NoFocus);
148 mNextMonth->setFocusPolicy(NoFocus); 148 mNextMonth->setFocusPolicy(NoFocus);
149 mPrevWeek->setFocusPolicy(NoFocus); 149 mPrevWeek->setFocusPolicy(NoFocus);
150 mNextWeek->setFocusPolicy(NoFocus); 150 mNextWeek->setFocusPolicy(NoFocus);
151 mNextYear->setFocusPolicy(NoFocus); 151 mNextYear->setFocusPolicy(NoFocus);
152 mSelectMonth->setFocusPolicy(NoFocus); 152 mSelectMonth->setFocusPolicy(NoFocus);
153 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); 153 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
154 mPrevYear->setAutoRepeat( true );
155 mPrevMonth->setAutoRepeat( true );
156 mNextMonth->setAutoRepeat( true );
157 mPrevWeek->setAutoRepeat( true );
158 mNextWeek->setAutoRepeat( true );
159 mNextYear->setAutoRepeat( true );
154 160
155} 161}
156 162
157NavigatorBar::~NavigatorBar() 163NavigatorBar::~NavigatorBar()
158{ 164{
159} 165}
160QSize NavigatorBar::sizeHint() const 166QSize NavigatorBar::sizeHint() const
161{ 167{
162 int wid = mCurrentMinWid ; 168 int wid = mCurrentMinWid ;
163 if ( mPrevYear->isVisible() ) 169 if ( mPrevYear->isVisible() )
164 wid += mCurrentButtonMinWid; 170 wid += mCurrentButtonMinWid;
165 if ( mPrevMonth->isVisible() ) 171 if ( mPrevMonth->isVisible() )