summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
Unidiff
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp59
1 files changed, 32 insertions, 27 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 73ee5cb..0eeacb3 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -170,13 +170,3 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
170{ 170{
171 mNewItemPopup = new QPopupMenu( this ); 171
172 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
173 QString pathString = "";
174 if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
175 if ( QApplication::desktop()->width() < 480 )
176 pathString += "icons16/";
177 } else
178 pathString += "iconsmini/";
179
180 mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
181 mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
182 172
@@ -200,12 +190,2 @@ KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) :
200{ 190{
201 mNewItemPopup = new QPopupMenu( this );
202 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
203 QString pathString = "";
204 if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
205 if ( QApplication::desktop()->width() < 480 )
206 pathString += "icons16/";
207 } else
208 pathString += "iconsmini/";
209 mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."),1 );
210 mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
211 blockResize = false; 191 blockResize = false;
@@ -243,3 +223,21 @@ QDate KOAgenda::selectedIncidenceDate() const
243void KOAgenda::init() 223void KOAgenda::init()
244{ 224{
225 mNewItemPopup = new QPopupMenu( this );
226 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
227 QString pathString = "";
228 if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
229 if ( QApplication::desktop()->width() < 480 )
230 pathString += "icons16/";
231 } else
232 pathString += "iconsmini/";
233
234 mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
235 mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
236 mNewItemPopup->insertSeparator ( );
237 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 );
238 mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 );
239 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 );
240 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 );
241 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next month"),6 );
242 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
245#ifndef _WIN32_ 243#ifndef _WIN32_
@@ -564,9 +562,16 @@ void KOAgenda::newItem( int item )
564{ 562{
565 qDebug("new %d ", item);
566 if ( item == 1 ) { //new event 563 if ( item == 1 ) { //new event
567 newEventSignal(mStartCellX ,mStartCellY ); 564 newEventSignal(mStartCellX ,mStartCellY );
568 } 565 } else
569 if ( item == 2 ) { //new event 566 if ( item == 2 ) { //new event
570 newTodoSignal(mStartCellX ,mStartCellY ); 567 newTodoSignal(mStartCellX ,mStartCellY );
571 } 568 } else
569 {
570 QDate day = mSelectedDates[mStartCellX];
571 emit showDateView( item, day );
572 // 3Day view
573 // 4Week view
574 // 5Month view
575 // 6Journal view
576 }
572} 577}