summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-07 05:09:23 (UTC)
committer zautrix <zautrix>2005-06-07 05:09:23 (UTC)
commit0bbef196163a267722978e34db2ba3daaee76f88 (patch) (side-by-side diff)
treefac0b701aea6348490c5e9585820070b32b35e29 /korganizer
parent790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75 (diff)
downloadkdepimpi-0bbef196163a267722978e34db2ba3daaee76f88.zip
kdepimpi-0bbef196163a267722978e34db2ba3daaee76f88.tar.gz
kdepimpi-0bbef196163a267722978e34db2ba3daaee76f88.tar.bz2
clear view fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp19
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/koagendaview.cpp7
-rw-r--r--korganizer/koagendaview.h1
-rw-r--r--korganizer/kojournalview.cpp4
-rw-r--r--korganizer/kojournalview.h1
-rw-r--r--korganizer/kolistview.cpp4
-rw-r--r--korganizer/kolistview.h1
-rw-r--r--korganizer/komonthview.cpp10
-rw-r--r--korganizer/komonthview.h1
-rw-r--r--korganizer/koviewmanager.cpp13
-rw-r--r--korganizer/koviewmanager.h1
-rw-r--r--korganizer/kowhatsnextview.cpp5
-rw-r--r--korganizer/kowhatsnextview.h1
-rw-r--r--korganizer/mainwindow.cpp1
15 files changed, 67 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 608b73b..e13d0be 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1146,2 +1146,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
Event* eventLSync;
+ clearAllViews();
QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
@@ -1838,4 +1839,4 @@ bool CalendarView::openCalendar(QString filename, bool merge)
globalFlagBlockAgenda = 1;
+ clearAllViews();
if (!merge) {
- mTodoList->clearList();
mViewManager->setDocumentId( filename );
@@ -1950,3 +1951,4 @@ bool CalendarView::checkFileVersion(QString fn)
Event * e = getLastSyncEvent();
- mCalendar->deleteEvent ( e );
+ if ( e )
+ deleteEvent ( e );
updateView();
@@ -1983,2 +1985,3 @@ void CalendarView::closeCalendar()
// child windows no longer valid
+ clearAllViews();
emit closingDown();
@@ -2434,2 +2437,13 @@ void CalendarView::updateView(const QDate &start, const QDate &end)
+void CalendarView::clearAllViews()
+{
+ mTodoList->clearList();
+ mViewManager->clearAllViews();
+ SearchDialog * sd = mDialogManager->getSearchDialog();
+ if ( sd ) {
+ KOListView* kol = sd->listview();
+ if ( kol )
+ kol->clearList();
+ }
+}
void CalendarView::updateView()
@@ -3945,2 +3959,3 @@ void CalendarView::takeOverCalendar()
+ clearAllViews();
QPtrList<Event> events = mCalendar->events();
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 084b6db..4600090 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -333,2 +333,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void updateView();
+ void clearAllViews();
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index fd9bf29..1320a2e 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1333,2 +1333,9 @@ void KOAgendaView::clearView()
}
+void KOAgendaView::clearList()
+{
+ // kdDebug() << "ClearView" << endl;
+ clearView();
+ mAllDayAgenda->hideUnused();
+ mAgenda->hideUnused();
+}
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index c6e6602..cc953fc 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -168,2 +168,3 @@ class KOAgendaView : public KOEventView {
void clearView();
+ void clearList();
KOAgenda *agenda() { return mAgenda;}
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 6e6a939..bc16037 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -80,2 +80,6 @@ void KOJournalView::flushView()
+void KOJournalView::clearList()
+{
+ mEntry->clear();
+}
void KOJournalView::showDates(const QDate &start, const QDate &)
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 1c0be82..445f940 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -45,2 +45,3 @@ class KOJournalView : public KOrg::BaseView
virtual int currentDateCount();
+ void clearList();
virtual QPtrList<Incidence> selectedIncidences();
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 5f32e79..bc52281 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -365,2 +365,6 @@ void KOListView::updateList()
+void KOListView::clearList()
+{
+ clear ();
+}
void KOListView::addCat( )
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index dee69f6..f4d6879 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -259,2 +259,3 @@ class KOListView : public KOEventView
void updateList();
+ void clearList();
void setStartDate(const QDate &start);
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 8ee1363..678cab6 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1417,2 +1417,12 @@ void KOMonthView::updateDayLabels()
+void KOMonthView::clearList()
+{
+ unsigned int i;
+ for( i = 0; i < mCells.size(); ++i ) {
+ mCells[i]->clear();
+ }
+ for( i = 0; i < mCellsW.size(); ++i ) {
+ mCellsW[i]->clear();
+ }
+}
void KOMonthView::showDates(const QDate &start, const QDate &)
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index de5c014..65b5e77 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -258,2 +258,3 @@ class KOMonthView: public KOEventView
NavigatorBar* navigatorBar() { return mNavigatorBar ;}
+ void clearList();
public slots:
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index fb4de37..5d9af6d 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -360,2 +360,14 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
+void KOViewManager::clearAllViews()
+{
+
+ if ( mTodoView ) mTodoView->clearList();
+ if ( mListView ) mListView->clearList();
+
+ if ( mAgendaView ) mAgendaView->clearList();
+ if ( mMonthView ) mMonthView->clearList();
+ if ( mWhatsNextView ) mWhatsNextView->clearList();
+ if ( mJournalView ) mJournalView->clearList();
+
+}
void KOViewManager::updateView()
@@ -834,3 +846,2 @@ void KOViewManager::setDocumentId( const QString &id )
if (mTodoView) {
- mTodoView->clearList();
mTodoView->setDocumentId( id );
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 8dc03e0..838583b 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -69,2 +69,3 @@ class KOViewManager : public QObject
void updateView( const QDate &start, const QDate &end );
+ void clearAllViews();
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 65d8ac3..62d7ede 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -141,2 +141,7 @@ int KOWhatsNextView::currentDateCount()
+void KOWhatsNextView::clearList()
+{
+ mTimer->stop();
+ mView->setText(" ");
+}
QPtrList<Incidence> KOWhatsNextView::selectedIncidences()
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index d6727ac..93574ef 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -61,2 +61,3 @@ class KOWhatsNextView : public KOrg::BaseView
virtual QPtrList<Incidence> selectedIncidences();
+ void clearList();
DateList selectedDates()
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 63053a5..d959a7a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1672,2 +1672,3 @@ void MainWindow::importOL()
#ifdef _OL_IMPORT_
+ mView->clearAllViews();
KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );