summaryrefslogtreecommitdiffabout
path: root/korganizer/navigatorbar.cpp
Unidiff
Diffstat (limited to 'korganizer/navigatorbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/navigatorbar.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index 1052a99..f339c67 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -151,49 +151,48 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
151 mPrevMonth->setFocusPolicy(NoFocus); 151 mPrevMonth->setFocusPolicy(NoFocus);
152 mNextMonth->setFocusPolicy(NoFocus); 152 mNextMonth->setFocusPolicy(NoFocus);
153 mNextYear->setFocusPolicy(NoFocus); 153 mNextYear->setFocusPolicy(NoFocus);
154 mSelectMonth->setFocusPolicy(NoFocus); 154 mSelectMonth->setFocusPolicy(NoFocus);
155} 155}
156 156
157NavigatorBar::~NavigatorBar() 157NavigatorBar::~NavigatorBar()
158{ 158{
159} 159}
160 160
161void NavigatorBar::selectMonth() 161void NavigatorBar::selectMonth()
162{ 162{
163 163
164 int month; 164 int month;
165 KPopupFrame* popup = new KPopupFrame(this); 165 KPopupFrame* popup = new KPopupFrame(this);
166 int size = 12; 166 int size = 12;
167 if ( QApplication::desktop()->width() >= 480 ) 167 if ( QApplication::desktop()->width() >= 480 )
168 size = 18; 168 size = 18;
169 KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(size, popup); 169 KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(size, popup);
170 // ----- 170 // -----
171 picker->resize(picker->sizeHint()); 171 picker->resize(picker->sizeHint());
172 popup->setMainWidget(picker); 172 popup->setMainWidget(picker);
173 picker->setFocus(); 173 picker->setFocus();
174 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 174 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
175 if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) 175 if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height()))))
176 { 176 {
177 month = picker->getResult(); 177 month = picker->getResult();
178 emit monthSelected ( month ); 178 emit monthSelected ( month );
179 } else { 179 } else {
180 KNotifyClient::beep(); 180 KNotifyClient::beep();
181 } 181 }
182 delete popup; 182 delete popup;
183} 183}
184void NavigatorBar::selectDates( const KCal::DateList &dateList ) 184void NavigatorBar::selectDates( const KCal::DateList &dateList )
185{ 185{
186 if (dateList.count() > 0) { 186 if (dateList.count() > 0) {
187 QDate date = dateList.first(); 187 QDate date = dateList.first();
188 188
189 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); 189 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
190 190
191 // compute the label at the top of the navigator 191 // compute the label at the top of the navigator
192 QString dtstr = i18n(calSys->monthName( date )) + " '" + 192 QString dtstr = i18n(calSys->monthName( date )) + " '" +
193 QString::number( calSys->year( date ) ).right(2); 193 QString::number( calSys->year( date ) ).right(2);
194 194
195 mSelectMonth->setText( dtstr ); 195 mSelectMonth->setText( dtstr );
196 } 196 }
197} 197}
198 198
199#include "navigatorbar.moc"