summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-25 21:08:48 (UTC)
committer zautrix <zautrix>2005-03-25 21:08:48 (UTC)
commit6427570041c902840fe0f557415a07bb7aa8c031 (patch) (side-by-side diff)
treee397342aca97119927ec6c312be5ac5f953d5eec /korganizer
parent4d93404e3453229e58c2ff9305beae131c9f1af9 (diff)
downloadkdepimpi-6427570041c902840fe0f557415a07bb7aa8c031.zip
kdepimpi-6427570041c902840fe0f557415a07bb7aa8c031.tar.gz
kdepimpi-6427570041c902840fe0f557415a07bb7aa8c031.tar.bz2
fix
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/datenavigatorcontainer.cpp2
-rw-r--r--korganizer/datenavigatorcontainer.h1
-rw-r--r--korganizer/kdatenavigator.cpp3
-rw-r--r--korganizer/kdatenavigator.h1
-rw-r--r--korganizer/koviewmanager.cpp10
-rw-r--r--korganizer/koviewmanager.h1
7 files changed, 21 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 6ed6a1c..92fd59c 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -357,32 +357,36 @@ void CalendarView::init()
//mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() );
//mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() );
//leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() );
}
if ( !KOPrefs::instance()->mShowDateNavigator)
mDateNavigator->hide();
//qDebug("Calendarview Size %d %d ", width(), height());
#endif
connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
SLOT( showDates( const KCal::DateList & ) ) );
connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
+
+ connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ),
+ mViewManager, SLOT( showMonth( const QDate & ) ) );
+
connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
mNavigator, SLOT( selectWeek( const QDate & ) ) );
connect( mDateNavigator, SIGNAL( goPrevYear() ),
mNavigator, SLOT( selectPreviousYear() ) );
connect( mDateNavigator, SIGNAL( goNextYear() ),
mNavigator, SLOT( selectNextYear() ) );
connect( mDateNavigator, SIGNAL( goPrevMonth() ),
mNavigator, SLOT( selectPreviousMonth() ) );
connect( mDateNavigator, SIGNAL( goNextMonth() ),
mNavigator, SLOT( selectNextMonth() ) );
connect( mDateNavigator, SIGNAL( goPrevious() ),
mNavigator, SLOT( selectPrevious() ) );
connect( mDateNavigator, SIGNAL( goNext() ),
mNavigator, SLOT( selectNext() ) );
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 11dc592..edeebdf 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -58,32 +58,34 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
DateNavigatorContainer::~DateNavigatorContainer()
{
}
void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v )
{
connect( v, SIGNAL( datesSelected( const KCal::DateList & ) ),
SIGNAL( datesSelected( const KCal::DateList & ) ) );
#if 0
connect( v, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ),
SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) );
connect( v, SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ),
SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) );
#endif
connect( v, SIGNAL( weekClicked( const QDate & ) ),
SIGNAL( weekClicked( const QDate & ) ) );
+ connect( v, SIGNAL( showMonth( const QDate & ) ),
+ SIGNAL( showMonth( const QDate & ) ) );
connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) );
connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) );
connect( v, SIGNAL( goNextMonth() ), SLOT( slotgoNextMonth() ) );
connect( v, SIGNAL( goPrevMonth() ), SLOT( slotgoPrevMonth() ) );
connect( v, SIGNAL( goNextYear() ), SLOT( slotgoNextYear() ) );
connect( v, SIGNAL( goPrevYear() ), SLOT( slotgoPrevYear() ) );
connect( v, SIGNAL( monthSelected( int ) ), SLOT( slotMonthSelected( int ) ) );
}
void DateNavigatorContainer::slotgoNextYear()
{
jumpMonth( 12 );
emit goNextYear();
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index ac9745d..87cc59f 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -65,32 +65,33 @@ class DateNavigatorContainer: public QWidget
void slotgoPrevYear();
void setResizeEnabled();
signals:
void datesSelected( const KCal::DateList & );
void incidenceDropped( Incidence *, const QDate & );
void incidenceDroppedMove( Incidence *, const QDate & );
void weekClicked( const QDate &);
void goPrevious();
void goNext();
void goNextMonth();
void goPrevMonth();
void goNextYear();
void goPrevYear();
+ void showMonth( const QDate & );
void monthSelected( int month );
protected:
void computeMonthSelected( int month , bool forceEmit );
void jumpMonth( int month );
void resizeEvent( QResizeEvent * );
void setBaseDates();
void connectNavigatorView( KDateNavigator *v );
private:
bool mResizeEnabled;
QTimer* mUpdateTimer;
int mLastDisplayedDN;
QDate mFirstSelectedDate;
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 5eccfd6..38bddc2 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -434,34 +434,37 @@ void KDateNavigator::wheelEvent (QWheelEvent *e)
bool KDateNavigator::eventFilter (QObject *o,QEvent *e)
{
if (e->type() == QEvent::MouseButtonPress) {
int i;
for(i=0;i<6;++i) {
if (o == weeknos[i]) {
QDate weekstart = daymatrix->getDate(i*7);
emit weekClicked(weekstart);
break;
}
}
for(i=0;i<7;++i) {
if (o == headings[i]) {
KCal::DateList selDays;
QDate date = daymatrix->getDate(14);
+ emit showMonth(date );
+#if 0
int dio = date.daysInMonth();
int j;
int ye = date.year();
int mo = date.month();
for ( j = 1; j <= dio; ++j ) {
selDays.append( QDate( ye, mo, j ) );
}
emit datesSelected( selDays );
+#endif
break;
}
}
return true;
} else {
return false;
}
}
//#include "kdatenavigator.moc"
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 93bbceb..780ebb8 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -73,32 +73,33 @@ class KDateNavigator: public QFrame
bool fontChanged() {return mFontChanged; }
void unsetFontChanged() { mFontChanged = false; }
KODayMatrix *dayMatrix() { return daymatrix ;}
QSize sizeHint() const;
QSize sizeHintTwoButtons( int butnum = 2 ) const;
void changeFont ( QFont fo );
public slots:
void selectDates( const KCal::DateList & );
void updateView();
void updateConfig();
void updateDayMatrix();
signals:
void datesSelected( const KCal::DateList & );
void eventDropped( Event * );
void weekClicked( const QDate &);
+ void showMonth( const QDate & );
void goPrevious();
void goNext();
void goNextMonth();
void goPrevMonth();
void goNextYear();
void goPrevYear();
void monthSelected( int );
// Signals emitted at midnight carrying the new date.
void dayPassed( QDate );
void monthPassed( QDate );
protected slots:
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index c6e76c4..5a2dce3 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -115,34 +115,35 @@ void KOViewManager::showDateView( int view, QDate date)
static int lastMode = 0;
static int lastCount = 0;
static bool lastNDMode = false;
static QDate lastDate;
//qDebug("date %d %s", view, date.toString().latin1());
if (view != 9)
lastMode = 0;
//qDebug("%d %d ", lastNDMode, mFlagShowNextxDays );
bool savemFlagShowNextxDays = mFlagShowNextxDays;
mFlagShowNextxDays = false;
if ( view == 3 ) {
//mCurrentAgendaView = 1 ;
lastDate = mMainView->dateNavigator()->selectedDates().first();
lastCount = mMainView->dateNavigator()->selectedDates().count();
lastNDMode = savemFlagShowNextxDays;
- mMainView->showDay( date );
+ mMainView->dateNavigator()->selectDate( date );
lastMode = 1;
+ mCurrentAgendaView = 1 ;
} else if (view == 4 ) {
mCurrentAgendaView = 7 ;
mMainView->dateNavigator()->selectDates( date, 7 );
} else if (view == 5 ) {
mCurrentAgendaView = 14 ;
mMainView->dateNavigator()->selectDates( date, 14);
} else if (view == 6 ) {
//mMainView->dateNavigator()->selectDates( date, 7 );
showMonthView();
} else if (view == 7 ) {
mMainView->dateNavigator()->selectDate( date );
showJournalView();
} else if (view == 8 ) {
globalFlagBlockAgenda = 1;
if ( mCurrentAgendaView != 3 )
mCurrentAgendaView = -1;
@@ -564,32 +565,39 @@ void KOViewManager::showMonthViewWeek()
createMonthView();
globalFlagBlockAgenda = 1;
bool full = true;
if ( mCurrentView == mMonthView)
full = mMainView->leftFrame()->isVisible();
if ( !KOPrefs::instance()->mMonthViewWeek ) {
mMonthView->switchView();
if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
full = false;
else
full = true;
}
mMainView->dateNavigator()->selectWeek();
showView(mMonthView, full );
}
+void KOViewManager::showMonth( const QDate & date )
+{
+ mMainView->dateNavigator()->blockSignals( true );
+ mMainView->dateNavigator()->selectDate( date );
+ mMainView->dateNavigator()->blockSignals( false );
+ showMonthView();
+}
void KOViewManager::showMonthView()
{
createMonthView();
globalFlagBlockAgenda = 1;
//mFlagShowNextxDays = false;
bool full = true;
if ( mCurrentView == mMonthView)
full = mMainView->leftFrame()->isVisible();
// if(mMonthView == mCurrentView) return;
if ( KOPrefs::instance()->mMonthViewWeek ) {
mMonthView->switchView();
if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
full = false;
else
full = true;
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 8f0bf82..6290227 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -69,32 +69,33 @@ class KOViewManager : public QObject
void updateView( const QDate &start, const QDate &end );
void raiseCurrentView( bool fullScreen = false , bool updateView = false);
void addView(KOrg::BaseView *);
Incidence *currentSelection();
QDate currentSelectionDate();
KOAgendaView *agendaView() const { return mAgendaView; }
signals:
void printWNV();
void signalFullScreen( bool );
void signalAgendaView( bool );
public slots:
+ void showMonth( const QDate & );
void showDateView( int, QDate );
void updateView();
void showWhatsNextView();
void showListView();
void showAgendaView( bool fullScreen = false );
void showDayView();
void showWorkWeekView();
void showWeekView();
void showNextXView();
void showMonthView();
void showMonthViewWeek();
void showTodoView();
void showJournalView();
void showTimeSpanView();
private: