summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-29 15:23:10 (UTC)
committer zautrix <zautrix>2005-01-29 15:23:10 (UTC)
commitc6548bb194a5e73b9b72505c2e952ef6346dec46 (patch) (side-by-side diff)
tree74039fb5cd5f1a64f6a7844c9ece030e6d76de87
parentf542fb5846520683e6241a522921e3d5eb24b833 (diff)
downloadkdepimpi-c6548bb194a5e73b9b72505c2e952ef6346dec46.zip
kdepimpi-c6548bb194a5e73b9b72505c2e952ef6346dec46.tar.gz
kdepimpi-c6548bb194a5e73b9b72505c2e952ef6346dec46.tar.bz2
todo
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp17
-rw-r--r--korganizer/calendarview.h4
-rw-r--r--korganizer/koagenda.cpp66
-rw-r--r--korganizer/koagenda.h6
-rw-r--r--korganizer/koagendaview.cpp19
-rw-r--r--korganizer/koagendaview.h3
-rw-r--r--korganizer/koeditorgeneraltodo.cpp17
-rw-r--r--korganizer/koviewmanager.cpp9
8 files changed, 119 insertions, 22 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 257a4dd..035d630 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2637,25 +2637,28 @@ void CalendarView::newEvent()
void CalendarView::newEvent(QDateTime fh)
{
newEvent(fh,
QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
}
void CalendarView::newEvent(QDate dt)
{
newEvent(QDateTime(dt, QTime(0,0,0)),
QDateTime(dt, QTime(0,0,0)), true);
}
-
+void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
+{
+ newEvent(fromHint, toHint, false);
+}
void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
{
showEventEditor();
mEventEditor->newEvent(fromHint,toHint,allDay);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mEventEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mEventEditor->setSecrecy( filter->getSecrecy() );
@@ -2675,40 +2678,44 @@ void CalendarView::todoChanged(Todo * t)
void CalendarView::todoToBeDeleted(Todo *)
{
//qDebug("todoToBeDeleted(Todo *) ");
updateTodoViews();
}
void CalendarView::todoDeleted()
{
//qDebug(" todoDeleted()");
updateTodoViews();
}
-
-void CalendarView::newTodo()
+void CalendarView::newTodoDateTime( QDateTime dt, bool allday )
{
-
+ qDebug("datetime ");
showTodoEditor();
- mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true);
+ mTodoEditor->newTodo(dt,0,allday);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mTodoEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mTodoEditor->setSecrecy( filter->getSecrecy() );
}
}
+void CalendarView::newTodo()
+{
+ newTodoDateTime( QDateTime(),true );
+}
+
void CalendarView::newSubTodo()
{
Todo *todo = selectedTodo();
if ( todo ) newSubTodo( todo );
}
void CalendarView::newSubTodo(Todo *parentEvent)
{
showTodoEditor();
mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
}
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index c8d6bdd..7c59a8d 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -216,25 +216,26 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void showIncidence();
void editIncidence();
void editIncidenceDescription();
void deleteIncidence();
void cloneIncidence();
void moveIncidence();
void beamIncidence();
void toggleCancelIncidence();
/** create an editeventwin with supplied date/time, and if bool is true,
* make the event take all day. */
- void newEvent(QDateTime, QDateTime, bool allDay = false);
+ void newEvent(QDateTime, QDateTime, bool allDay );
+ void newEvent(QDateTime, QDateTime);
void newEvent(QDateTime fh);
void newEvent(QDate dt);
/** create new event without having a date hint. Takes current date as
default hint. */
void newEvent();
void newFloatingEvent();
/** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/
void showIncidence(Incidence *);
/** Create an editor for the supplied incidence. It calls the correct editXXX method*/
void editIncidence(Incidence *);
/** Delete the supplied incidence. It calls the correct deleteXXX method*/
@@ -251,24 +252,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
/** Create a read-only viewer dialog for the supplied event. */
void showEvent(Event *);
void editJournal(Journal *);
void showJournal(Journal *);
void deleteJournal(Journal *);
/** Create an editor dialog for a todo */
void editTodo(Todo *);
/** Create a read-only viewer dialog for the supplied todo */
void showTodo(Todo *);
/** create new todo */
void newTodo();
+ void newTodoDateTime(QDateTime, bool allday);
/** create new todo with a parent todo */
void newSubTodo();
/** create new todo with a parent todo */
void newSubTodo(Todo *);
/** Delete todo */
void deleteTodo(Todo *);
/** Check if clipboard contains vCalendar event. The signal pasteEnabled() is
* emitted as result. */
void checkClipboard();
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 7e0b216..73ee5cb 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -159,44 +159,64 @@ void MarcusBains::updateLocation(bool recalculate)
////////////////////////////////////////////////////////////////////////////
/*
Create an agenda widget with rows rows and columns columns.
*/
KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
const char *name,WFlags f) :
QScrollView(parent,name,f)
{
-
+ mNewItemPopup = new QPopupMenu( this );
+ connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
+ QString pathString = "";
+ if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
+ if ( QApplication::desktop()->width() < 480 )
+ pathString += "icons16/";
+ } else
+ pathString += "iconsmini/";
+
+ mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
+ mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
+
mColumns = columns;
mRows = rows;
mGridSpacingY = rowSize;
mAllDayMode = false;
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
#endif
mHolidayMask = 0;
init();
}
/*
Create an agenda widget with columns columns and one row. This is used for
all-day events.
*/
KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) :
QScrollView(parent,name,f)
{
-
+ mNewItemPopup = new QPopupMenu( this );
+ connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
+ QString pathString = "";
+ if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
+ if ( QApplication::desktop()->width() < 480 )
+ pathString += "icons16/";
+ } else
+ pathString += "iconsmini/";
+ mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."),1 );
+ mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
blockResize = false;
mColumns = columns;
mRows = 1;
//qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize);
mGridSpacingY = KOPrefs::instance()->mAllDaySize;
mAllDayMode = true;
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
#endif
mHolidayMask = 0;
init();
}
@@ -409,26 +429,42 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
mActionItem = 0;
} else {
startItemAction(viewportPos);
startX = viewportPos.x();
startY = viewportPos.y();
block = true;
}
}
}
} else {
selectItem(0);
mActionItem = 0;
- setCursor(arrowCursor);
- startSelectAction(viewportPos);
+ if (me->button() == RightButton ) {
+ blockNewEvent = true;
+ qDebug("right ");
+ int x,y;
+ viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
+ int gx,gy;
+ contentsToGrid(x,y,gx,gy);
+ mStartCellX = gx;
+ mStartCellY = gy;
+ mCurrentCellX = gx;
+ mCurrentCellY = gy;
+ mNewItemPopup->popup( viewport()->mapToGlobal( me->pos() ) );
+
+ } else {
+ blockNewEvent = false;
+ setCursor(arrowCursor);
+ startSelectAction(viewportPos);
+ }
}
break;
case QEvent::MouseButtonRelease:
//qDebug("QEvent::MouseButtonRelease: ");
if (me->button() == RightButton && block ) {
if (object != viewport()) {
mClickedItem = (KOAgendaItem *)object;
if (mActionItem ) {
endItemAction();
}
if (mClickedItem) {
@@ -447,25 +483,29 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
mScrollDownTimer.stop();
mActionItem->resetMove();
placeSubCells( mActionItem );
// emit startDragSignal( mActionItem->incidence() );
setCursor( arrowCursor );
mActionItem = 0;
mActionType = NOP;
mItemMoved = 0;
return true;
}
endItemAction();
} else if ( mActionType == SELECT ) {
- endSelectAction();
+ if (me->button() == RightButton ) {
+
+ } else {
+ endSelectAction( !blockNewEvent );
+ }
}
break;
case QEvent::MouseMove:
if (object != viewport()) {
KOAgendaItem *moveItem = (KOAgendaItem *)object;
//qDebug("moveItem %d ",moveItem );
if (!moveItem->incidence()->isReadOnly() /*&&
!moveItem->incidence()->recurrence()->doesRecur()*/ )
if (!mActionItem)
setNoActionCursor(moveItem,viewportPos);
else {
@@ -511,24 +551,34 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
else
emit showIncidenceSignal(doubleClickedItem->incidence());
}
break;
default:
break;
}
return true;
}
+void KOAgenda::newItem( int item )
+{
+ qDebug("new %d ", item);
+ if ( item == 1 ) { //new event
+ newEventSignal(mStartCellX ,mStartCellY );
+ }
+ if ( item == 2 ) { //new event
+ newTodoSignal(mStartCellX ,mStartCellY );
+ }
+}
void KOAgenda::startSelectAction(QPoint viewportPos)
{
//emit newStartSelectSignal();
mActionType = SELECT;
int x,y;
viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
int gx,gy;
contentsToGrid(x,y,gx,gy);
mStartCellX = gx;
@@ -600,31 +650,33 @@ void KOAgenda::performSelectAction(QPoint viewportPos)
repaintContents( (KOGlobals::self()->reverseLayout() ?
mColumns - 1 - mSelectionCellX : mSelectionCellX) *
mGridSpacingX, mSelectionYTop,
mGridSpacingX, selectionHeight,false );
mCurrentCellY = gy;
} else {
}
}
}
-void KOAgenda::endSelectAction()
+void KOAgenda::endSelectAction( bool emitNewEvent )
{
mActionType = NOP;
mScrollUpTimer.stop();
mScrollDownTimer.stop();
emit newTimeSpanSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY);
+ if ( emitNewEvent && mStartCellY < mCurrentCellY )
+ emit newEventSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY);
}
void KOAgenda::startItemAction(QPoint viewportPos)
{
int x,y;
viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
int gx,gy;
contentsToGrid(x,y,gx,gy);
mStartCellX = gx;
mStartCellY = gy;
mCurrentCellX = gx;
@@ -1651,25 +1703,25 @@ void KOAgenda::scrollUp()
scrollBy(0,-mScrollOffset);
}
void KOAgenda::scrollDown()
{
scrollBy(0,mScrollOffset);
}
void KOAgenda::popupAlarm()
{
if (!mClickedItem) {
- kdDebug() << "KOAgenda::popupAlarm() called without having a clicked item" << endl;
+ qDebug("KOAgenda::popupAlarm() called without having a clicked item ");
return;
}
// TODO: deal correctly with multiple alarms
Alarm* alarm;
QPtrList<Alarm> list(mClickedItem->incidence()->alarms());
for(alarm=list.first();alarm;alarm=list.next()) {
alarm->toggleAlarm();
}
emit itemModified( mClickedItem , KOGlobals::EVENTEDITED );
mClickedItem->paintMe( true );
mClickedItem->repaint( false );
}
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index 111242f..12943d7 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -117,43 +117,45 @@ class KOAgenda : public QScrollView
void setHolidayMask(QMemArray<bool> *);
void setDateList(const DateList &selectedDates);
DateList dateList() const;
void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false);
void finishUpdate();
void printSelection();
void storePosition();
void restorePosition();
public slots:
+ void newItem( int );
void moveChild( QWidget *, int, int );
void scrollUp();
void scrollDown();
void updateTodo( Todo * t, int , bool );
void popupAlarm();
void checkScrollBoundaries(int);
/** Deselect selected items. This function does not emit any signals. */
void deselectItem();
/** Select item. If the argument is 0, the currently selected item gets
deselected. This function emits the itemSelected(bool) signal to inform
about selection/deseelction of events. */
void selectItem(KOAgendaItem *);
void finishResize();
signals:
void newEventSignal();
void newEventSignal(int gx,int gy);
+ void newTodoSignal(int gx,int gy);
void newEventSignal(int gxStart, int gyStart, int gxEnd, int gyEnd);
void newTimeSpanSignal(int gxStart, int gyStart, int gxEnd, int gyEnd);
void newStartSelectSignal();
void showIncidenceSignal(Incidence *);
void editIncidenceSignal(Incidence *);
void deleteIncidenceSignal(Incidence *);
void showIncidencePopupSignal(Incidence *);
void itemModified(KOAgendaItem *item, int );
void incidenceSelected(Incidence *);
void lowerYChanged(int);
@@ -171,25 +173,25 @@ class KOAgenda : public QScrollView
virtual void resizeEvent ( QResizeEvent * );
/** Handles mouse events. Called from eventFilter */
virtual bool eventFilter_mouse ( QObject *, QMouseEvent * );
/** Start selecting time span. */
void startSelectAction(QPoint viewportPos);
/** Select time span. */
void performSelectAction(QPoint viewportPos);
/** Emd selecting time span. */
- void endSelectAction();
+ void endSelectAction( bool emitNewEvent = false );
/** Start moving/resizing agenda item */
void startItemAction(QPoint viewportPos);
/** Move/resize agenda item */
void performItemAction(QPoint viewportPos);
/** End moving/resizing agenda item */
void endItemAction();
/** Set cursor, when no item action is in progress */
void setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos);
@@ -198,24 +200,25 @@ class KOAgenda : public QScrollView
void placeSubCells(KOAgendaItem *placeItem);
/** Process the keyevent, including the ignored keyevents of eventwidgets.
* Implements pgup/pgdn and cursor key navigation in the view.
*/
void keyPressEvent( QKeyEvent * );
void calculateWorkingHours();
virtual void contentsMousePressEvent ( QMouseEvent * );
private:
+ bool blockNewEvent;
void init();
void marcus_bains();
bool mAllDayMode;
bool blockResize;
QTimer mResizeTimer;
double mContentPosition;
// Width and height of agenda cells
int mGridSpacingX;
int mGridSpacingY;
// size of border, where mouse action will resize the KOAgendaItem
@@ -265,22 +268,23 @@ class KOAgenda : public QScrollView
MarcusBains *mMarcusBains;
void computeSizes();
MouseActionType mActionType;
bool mItemMoved;
// List of all Items contained in agenda
QPtrList<KOAgendaItem> mItems;
QPtrList<KOAgendaItem> mUnusedItems;
KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport);
QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems
+ QPopupMenu *mNewItemPopup;
int mOldLowerScrollValue;
int mOldUpperScrollValue;
KOAgendaItem * getItemForTodo ( Todo * todo );
QMemArray<bool> *mHolidayMask;
int mCurPixWid;
int mCurPixHei;
};
#endif // KOAGENDA_H
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index f54f7bc..60ae41f 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -479,28 +479,32 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width());
mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
// Scrolling
connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)),
mTimeLabels, SLOT(positionChanged()));
connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)),
SLOT(setContentsPos(int)));
// Create/Show/Edit/Delete Event
connect(mAgenda,SIGNAL(newEventSignal(int,int)),
SLOT(newEvent(int,int)));
+ connect(mAgenda,SIGNAL(newTodoSignal(int,int)),
+ SLOT(newTodo(int,int)));
connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)),
SLOT(newEvent(int,int,int,int)));
connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)),
SLOT(newEventAllDay(int,int)));
+ connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)),
+ SLOT(newTodoAllDay(int,int)));
connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)),
SLOT(newEventAllDay(int,int)));
connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
SLOT(newTimeSpanSelected(int,int,int,int)));
connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
SLOT(newTimeSpanSelectedAllDay(int,int,int,int)));
connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
connect(mAgenda,SIGNAL(editIncidenceSignal(Incidence *)),
SIGNAL(editIncidenceSignal(Incidence *)));
connect(mAllDayAgenda,SIGNAL(editIncidenceSignal(Incidence *)),
@@ -1274,24 +1278,39 @@ void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd)
emit newEventSignal(dtStart,dtEnd);
}
void KOAgendaView::newEventAllDay(int gx, int )
{
if (!mSelectedDates.count()) return;
QDate day = mSelectedDates[gx];
emit newEventSignal(day);
}
+void KOAgendaView::newTodoAllDay(int gx, int )
+{
+ if (!mSelectedDates.count()) return;
+
+ QDateTime day (mSelectedDates[gx] );
+ emit newTodoSignal(day, true);
+}
+void KOAgendaView::newTodo(int gx, int gy )
+{
+ if (!mSelectedDates.count()) return;
+ QDate dayStart = mSelectedDates[gx];
+ QTime timeStart = mAgenda->gyToTime(gy);
+ QDateTime dt (dayStart,timeStart);
+ emit newTodoSignal( dt, false );
+}
void KOAgendaView::updateEventIndicatorTop(int newY)
{
uint i;
for(i=0;i<mMinY.size();++i) {
if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true);
else mEventIndicatorTop->enableColumn(i,false);
}
mEventIndicatorTop->update();
}
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 3cf938f..01d74a1 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -153,42 +153,45 @@ class KOAgendaView : public KOEventView {
void repaintAgenda();
public slots:
virtual void updateView();
virtual void updateConfig();
virtual void showDates(const QDate &start, const QDate &end);
virtual void showEvents(QPtrList<Event> eventList);
void updateTodo( Todo *, int );
void changeEventDisplay(Event *, int);
void clearSelection();
+ void newTodo(int gx,int gy);
void newEvent(int gx,int gy);
void newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd);
void newEventAllDay(int gx, int gy);
+ void newTodoAllDay(int gx, int gy);
void startDrag(Event *);
void readSettings();
void readSettings(KConfig *);
void writeSettings(KConfig *);
void setContentsPos(int y);
void setExpandedButton( bool expanded );
void scrollOneHourUp();
void scrollOneHourDown();
void addToCalSlot(Incidence *, Incidence *);
signals:
+ void newTodoSignal( QDateTime ,bool );
void toggleExpand();
void todoMoved( Todo *, int );
void incidenceChanged(Incidence * , int );
// void cloneIncidenceSignal(Incidence *);
protected:
bool mBlockUpdating;
int mUpcomingWidth;
/** Fill agenda beginning with date startDate */
void fillAgenda(const QDate &startDate);
void resizeEvent( QResizeEvent* e );
/** Fill agenda using the current set value for the start date */
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 158a7d3..b9a028b 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -186,38 +186,43 @@ void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::setDefaults(allDay);
mTimeButton->setChecked( !allDay );
if(mTimeButton->isChecked()) {
mTimeButton->setEnabled(true);
}
else {
mTimeButton->setEnabled(false);
}
enableTimeEdits( !allDay );
-
- mDueCheck->setChecked(false);
- enableDueEdit(false);
+ if ( due.isValid() ) {
+ mDueCheck->setChecked(true);
+ enableDueEdit(true);
+ } else {
+ mDueCheck->setChecked(false);
+ enableDueEdit(false);
+ due = QDateTime::currentDateTime().addDays(7);
+ }
alarmDisable(true);
mStartCheck->setChecked(false);
enableStartEdit(false);
mDueDateEdit->setDate(due.date());
mDueTimeEdit->setTime(due.time());
-
- mStartDateEdit->setDate(QDate::currentDate());
- mStartTimeEdit->setTime(QTime::currentTime());
+ due = due.addDays(-7);
+ mStartDateEdit->setDate(due.date());
+ mStartTimeEdit->setTime(due.time());
mPriorityCombo->setCurrentItem(2);
mCompletedLabel->setText(i18n("completed"));;
mCompletedCombo->setCurrentItem(0);
}
void KOEditorGeneralTodo::readTodo(Todo *todo)
{
mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::readIncidence(todo);
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index e8d5ab1..a88276e 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -298,28 +298,33 @@ void KOViewManager::showAgendaView( bool fullScreen )
full = fullScreen;
if (!mAgendaView) {
full = false;
mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView");
addView(mAgendaView);
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold );
#endif
connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )),
mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) ));
// SIGNALS/SLOTS FOR DAY/WEEK VIEW
+
+
+
+ connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)),
+ mMainView, SLOT(newTodoDateTime(QDateTime,bool)));
connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)),
mMainView, SLOT(newEvent(QDateTime)));
- // connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)),
- // mMainView, SLOT(newEvent(QDateTime,QDateTime)));
+ connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)),
+ mMainView, SLOT(newEvent(QDateTime,QDateTime)));
connect(mAgendaView,SIGNAL(newEventSignal(QDate)),
mMainView, SLOT(newEvent(QDate)));
connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)),
mMainView, SLOT(editIncidence(Incidence *)));
connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)),
mMainView, SLOT(showIncidence(Incidence *)));
connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)),
mMainView, SLOT(deleteIncidence(Incidence *)));
connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ),
mMainView, SLOT( processMainViewSelection( Incidence * ) ) );