summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-06 13:44:49 (UTC)
committer zautrix <zautrix>2005-02-06 13:44:49 (UTC)
commit26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f (patch) (side-by-side diff)
tree34c4f5e6b2d77dc1210822e1539d9516842b5691
parent118f5aab05c9ace5612d5c4fd69e7c5a59bed67b (diff)
downloadkdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.zip
kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.tar.gz
kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.tar.bz2
many small fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/koeditorgeneraltodo.cpp7
-rw-r--r--korganizer/koeventviewer.cpp10
-rw-r--r--korganizer/komonthview.cpp61
-rw-r--r--korganizer/komonthview.h6
-rw-r--r--korganizer/koviewmanager.cpp5
6 files changed, 48 insertions, 45 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index e9ba8db..523c054 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1213,18 +1213,18 @@
{ " and "," und " },
{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
{ "Mail to selected","Mail an Ausgewählte" },
{ "Mail to all","Mail an Alle" },
{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
{ " on"," am" },
{ " completed on "," erledigt am " },
{ "Save as Event template","Speichere als Vorlage" },
{ "Load Event template","Lade Termin Vorlage" },
{ "Save as Journal template","Speichere als Journal Vorlage" },
{ "Insert Journal template","Füge Journal Vorlage ein" },
-{ "","" },
-{ "","" },
+{ "Sub todos:<br>","Unter Todos:<br>" },
+{ "Parent todo:<br>","Über Todo:<br>" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index cd78f54..ce66863 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -151,26 +151,29 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
mCompletedLabel = new QLabel(i18n("completed"),parent);
topLayout->addWidget(mCompletedLabel);
mCompleteDateEdit = new KDateEdit(parent);
topLayout->addWidget(mCompleteDateEdit );
mCompleteTimeEdit = new KOTimeEdit(parent);
topLayout->addWidget( mCompleteTimeEdit);
mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) );
mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) );
- if ( QApplication::desktop()->width() < 320 ) {
- mCompleteDateEdit->setMaximumWidth( 85 );
+ if ( QApplication::desktop()->width() <= 480 ) {
+ if ( QApplication::desktop()->width() < 320 )
+ mCompleteDateEdit->setMaximumWidth( 85 );
+ else
+ mCompleteDateEdit->setMaximumWidth( 130 );
topLayout->setSpacing( 0 );
}
}
void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
{
QHBox* h = new QHBox ( parent );
topLayout->addWidget( h );
QLabel *priorityLabel = new QLabel(i18n("Priority:"), h);
// topLayout->addWidget(priorityLabel);
mPriorityCombo = new QComboBox( h );
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 2faf18f..de11c13 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -412,25 +412,25 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
addTag("p",i18n("<b>Details: </b>"));
addTag("p",event->description());
}
formatCategories(event);
mText.append(i18n("<p><b>Priority:</b> %2</p>")
.arg(QString::number(event->priority())));
formatReadOnly(event);
formatAttendees(event);
if ( event->relatedTo() ) {
- addTag("b",i18n("Parent todo: "));
+ addTag("b",i18n("Parent todo:<br>"));
mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>");
}
QPtrList<Incidence> Relations = event->relations();
Incidence *to;
if ( Relations.first() )
addTag("b",i18n("Sub todos:<br>"));
for (to=Relations.first();to;to=Relations.next()) {
mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>");
}
setText(mText);
}
@@ -525,57 +525,57 @@ void KOEventViewer::formatAttendees(Incidence *event)
//qDebug("nokabc ");
mText += "<li><a href=\"uid:" + a->uid() + "\">";
if (!a->name().isEmpty()) mText += a->name();
else mText += a->email();
mText += "</a>\n";
#endif
if (!a->email().isEmpty()) {
if (iconPath) {
mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">";
if ( a->RSVP() ) {
- ++a_count;
+ ++a_count_nr;
mText += "<IMG src=\"" + iconPath + "\">";
}
else {
- ++a_count_nr;
+ ++a_count;
mText += "<IMG src=\"" + NOiconPath + "\">";
}
mText += "</a>\n";
}
}
if (a->status() != Attendee::NeedsAction )
mText +="[" + a->statusStr() + "] ";
if (a->role() == Attendee::Chair )
mText +="(" + a->roleStr().left(1) + ".)";
}
mText.append("</li></ul>");
- if ( a_count > 1 ) {
+ if ( (a_count+a_count_nr) > 1 ) {
mText += "<a href=\"mailto:ALL\">";
mText += i18n( "Mail to all" );
mText += "</a> ( ";
mText += "<IMG src=\"" + iconPath + "\">";
mText += i18n( " and " );
mText += "<IMG src=\"" + NOiconPath + "\"> )";
mText += "<br>\n";
}
if ( a_count_nr > 1 ) {
mText += "<a href=\"mailto:RSVP\">";
mText += i18n( "Mail to selected" );
mText += "</a> ( ";
mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath );
- mText += "\n";
+ mText += "<br>\n";
}
}
}
void KOEventViewer::appendJournal(Journal *jour, int mode )
{
bool shortDate = KOPrefs::instance()->mShortDateInViewer;
if (mode == 0 ) {
addTag("h2",i18n("Journal from: "));
}
else {
if ( mode == 1 ) {
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 65accdc..5926abe 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -786,47 +786,48 @@ void MonthViewCell::selection( QListBoxItem *item )
mMonthView->setSelectedCell( this );
}
// *******************************************************************************
// *******************************************************************************
// *******************************************************************************
KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
: KOEventView( calendar, parent, name ),
mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
- mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
+ mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
{
-
+ ignoreResizeEvent = 0;
+ mShortDayLabelsW = false;
+ mShortDayLabelsM = false;
clPending = true;
mWidStack = new QWidgetStack( this );
QHBoxLayout* hb = new QHBoxLayout( this );
mMonthView = new QWidget( mWidStack );
mWeekView = new QWidget( mWidStack );
#if QT_VERSION >= 0x030000
mWidStack->addWidget(mMonthView );
mWidStack->addWidget(mWeekView );
#else
mWidStack->addWidget( mMonthView, 1 );
mWidStack->addWidget( mWeekView , 1 );
#endif
hb->addWidget( mWidStack );
mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
mShowWeekView = KOPrefs::instance()->mMonthViewWeek;
if ( mShowWeekView )
mWeekStartsMonday = true;
updatePossible = false;
mCells.setAutoDelete( true );
- mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
mDayLabels.resize( mDaysPerWeek );
mDayLabelsW.resize( mDaysPerWeek );
QFont bfont = font();
if ( QApplication::desktop()->width() < 650 ) {
bfont.setPointSize( bfont.pointSize() - 2 );
}
bfont.setBold( true );
int i;
for( i = 0; i < mDaysPerWeek; i++ ) {
QLabel *label = new QLabel( mMonthView );
label->setFont(bfont);
@@ -897,32 +898,28 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
connect( cell, SIGNAL( defaultAction( Incidence * ) ),
SLOT( defaultAction( Incidence * ) ) );
connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
SIGNAL( newEventSignal( QDateTime ) ) );
connect( cell, SIGNAL( showDaySignal( QDate ) ),
SIGNAL( showDaySignal( QDate ) ) );
cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
}
//connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
mContextMenu = eventPopup();
- // updateConfig(); //useless here
+ updateConfig(); //useless here
//mWeekLabels[mNumWeeks]->setText( i18n("W"));
-#if 0
- mWidStack = new QWidgetStack( this );
- mMonthView = new QWidget( mWidStack );
- mWeekView = new QWidget( mWidStack );
-#endif
+
if ( mShowWeekView )
mWidStack->raiseWidget( mWeekView );
else
mWidStack->raiseWidget( mMonthView );
emit incidenceSelected( 0 );
}
KOMonthView::~KOMonthView()
{
delete mContextMenu;
}
@@ -1001,33 +998,30 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
}
void KOMonthView::updateConfig()
{
mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
if ( mShowWeekView ) {
mWeekStartsMonday = true;
}
QFontMetrics fontmetric(mDayLabels[0]->font());
mWidthLongDayLabel = 0;
-
+ qDebug("KOMonthView::updateConfig() ");
for (int i = 0; i < 7; i++) {
int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
}
- bool temp = mShowSatSunComp ;
- mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
if ( ! mShowWeekView ) {
- if ( temp != KOPrefs::instance()->mMonthViewSatSunTog )
computeLayout();
}
updateDayLabels();
//qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks);
//int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks;
//resizeEvent( 0 );
for (uint i = 0; i < mCells.count(); ++i) {
mCells[i]->updateConfig();
}
for (uint i = 0; i < mCellsW.count(); ++i) {
mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
@@ -1039,48 +1033,48 @@ void KOMonthView::updateConfig()
}
void KOMonthView::updateDayLabels()
{
QPtrVector<QLabel> *mDayLabelsT;
#if 0
if (mShowWeekView )
mDayLabelsT = &mDayLabelsW;
else
mDayLabelsT = &mDayLabels;
#endif
-
+ qDebug("updateDayLabels W %d M %d ",mShortDayLabelsW ,mShortDayLabelsM);
mDayLabelsT = &mDayLabelsW;
for (int i = 0; i < 7; i++) {
if (mWeekStartsMonday) {
- bool show = mShortDayLabels;
- if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
+ bool show = mShortDayLabelsW;
+ if ( i > 4 && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
show = true;
(*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
} else {
- if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels));
- else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels));
+ if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW));
+ else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW));
}
}
mDayLabelsT = &mDayLabels;
for (int i = 0; i < 7; i++) {
if (mWeekStartsMonday) {
- bool show = mShortDayLabels;
- if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
+ bool show = mShortDayLabelsM;
+ if ( i > 4 && KOPrefs::instance()->mMonthViewSatSunTog && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
show = true;
(*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
} else {
- if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels));
- else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels));
+ if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM));
+ else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM));
}
}
}
void KOMonthView::showDates(const QDate &start, const QDate &)
{
// kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl;
QPtrVector<MonthViewCell> *cells;
QPtrVector<QLabel> *dayLabels;
@@ -1260,55 +1254,57 @@ void KOMonthView::updateView()
//qDebug("KOMonthView::updateView() ");
processSelectionChange();
// qDebug("---------------------------------------------------------------------+ ");
(*cells)[0]->setFocus();
#endif
//qDebug("update time %d ", ti.elapsed());
}
void KOMonthView::resizeEvent(QResizeEvent * e)
{
+ qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
+ if ( ignoreResizeEvent ) {
+ qDebug("KOMonthView::resizeEvent ignored ");
+ --ignoreResizeEvent;
+ return;
+ }
+ if ( e->size().width()+ e->size().height() < 240 )
+ return;
computeLayout();
clPending = true;
if ( mShowWeekView )
mCellsW[0]->setFocus();
else
mCells[0]->setFocus();
}
void KOMonthView::computeLayoutWeek()
{
int daysToShow;
- bool combinedSatSun = false;
- if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
- daysToShow = 6;
- combinedSatSun = true;
- }
int tWid = topLevelWidget()->size().width();
int tHei = topLevelWidget()->size().height();
int wid = size().width();//e
int hei = size().height()-1;
if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
return;
if ( wid < hei )
daysToShow = 2;
else
daysToShow = 3;
- mShowSatSunComp = true;
- combinedSatSun = true;
+ bool combinedSatSun = true;
//qDebug("KOMonthView::computeLayout()------------------------------------ ");
QFontMetrics fm ( mWeekLabels[0]->font() );
int weeklabelwid = fm.width( "888" );
wid -= weeklabelwid;
int colWid = wid / daysToShow;
int lastCol = wid - ( colWid*6 );
int dayLabelHei = mDayLabelsW[0]->sizeHint().height();
int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
int colModulo = wid % daysToShow;
int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1;
@@ -1371,45 +1367,45 @@ void KOMonthView::computeLayoutWeek()
x += w;
if ( x + w/2 > wid ) {
x = 0;
y += h+dayLabelHei ;
}
}
y= dayLabelHei;
h = cellHei ;
mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei);
mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
// qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
//qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
- mShortDayLabels = mDayLabelsW[0]->width() < mWidthLongDayLabel ;
+ mShortDayLabelsW = mDayLabelsW[0]->width() < mWidthLongDayLabel ;
updateDayLabels();
bool forceUpdate = !updatePossible;
updatePossible = true;
//mWeekLabels[mNumWeeks]->setText( i18n("M"));
if ( forceUpdate )
updateView();
}
void KOMonthView::computeLayout()
{
// select the appropriate heading string size. E.g. "Wednesday" or "Wed".
// note this only changes the text if the requested size crosses the
// threshold between big enough to support the full name and not big
// enough.
if ( mShowWeekView ){
computeLayoutWeek();
return;
}
int daysToShow = 7;
bool combinedSatSun = false;
- if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
+ if (KOPrefs::instance()->mMonthViewSatSunTog ) {
daysToShow = 6;
combinedSatSun = true;
}
int tWid = topLevelWidget()->size().width();
int tHei = topLevelWidget()->size().height();
int wid = size().width();//e
int hei = size().height()-1;
if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
return;
//qDebug("KOMonthView::computeLayout()------------------------------------ ");
@@ -1478,25 +1474,26 @@ void KOMonthView::computeLayout()
}
y= dayLabelHei;
h = cellHei ;
for ( i = 0; i < 6; i++) {
if ( i == (6-rowModulo))
++h;
mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h);
y += h;
}
mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
// qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
//qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
- mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ;
+ mShortDayLabelsM = mDayLabels[0]->width() < mWidthLongDayLabel ;
+ qDebug("dlwid %d %d ",mDayLabels[0]->width() , mWidthLongDayLabel);
updateDayLabels();
bool forceUpdate = !updatePossible;
updatePossible = true;
//mWeekLabels[mNumWeeks]->setText( i18n("W"));
if ( forceUpdate )
updateView();
}
void KOMonthView::showContextMenu( Incidence *incidence )
{
mContextMenu->showIncidencePopup(incidence);
/*
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 51eb9e6..9dbe319 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -217,24 +217,25 @@ class KOMonthView: public KOEventView
virtual int currentDateCount();
/** returns the currently selected events */
virtual QPtrList<Incidence> selectedIncidences();
/** returns dates of the currently selected events */
virtual DateList selectedDates();
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
bool isMonthView() { return true; }
bool isUpdatePossible() { return updatePossible; }
+ void setIgnoreResizeEvent( int c ) { ignoreResizeEvent = c ;}
MonthViewCell * selectedCell();
public slots:
virtual void updateView();
virtual void updateConfig();
virtual void showDates(const QDate &start, const QDate &end);
virtual void showEvents(QPtrList<Event> eventList);
void changeEventDisplay(Event *, int);
void clearSelection();
@@ -249,47 +250,48 @@ class KOMonthView: public KOEventView
signals:
void nextMonth();
void prevMonth();
void showNavigator( bool );
void selectWeekNum ( int );
void showDaySignal( QDate );
protected:
void resizeEvent(QResizeEvent *);
void viewChanged();
void updateDayLabels();
private:
+ int ignoreResizeEvent;
int currentWeek();
bool clPending;
QWidgetStack * mWidStack;
QWidget* mMonthView;
QWidget* mWeekView;
bool mShowWeekView;
bool updatePossible;
int mDaysPerWeek;
int mNumWeeks;
int mNumCells;
bool mWeekStartsMonday;
- bool mShowSatSunComp;
void computeLayout();
void computeLayoutWeek();
QPtrVector<MonthViewCell> mCells;
QPtrVector<QLabel> mDayLabels;
QPtrVector<KOWeekButton> mWeekLabels;
QPtrVector<MonthViewCell> mCellsW;
QPtrVector<QLabel> mDayLabelsW;
QPtrVector<KOWeekButton> mWeekLabelsW;
- bool mShortDayLabels;
+ bool mShortDayLabelsM;
+ bool mShortDayLabelsW;
int mWidthLongDayLabel;
QDate mStartDate;
MonthViewCell *mSelectedCell;
KOEventPopupMenu *mContextMenu;
void keyPressEvent ( QKeyEvent * ) ;
};
#endif
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index a74c5fe..dcb51dc 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -113,25 +113,25 @@ void KOViewManager::showDateView( int view, QDate date)
//mCurrentAgendaView = 1 ;
lastDate = mMainView->dateNavigator()->selectedDates().first();
lastCount = mMainView->dateNavigator()->selectedDates().count();
lastNDMode = savemFlagShowNextxDays;
mMainView->showDay( date );
} 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 );
+ //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;
showAgendaView(KOPrefs::instance()->mFullViewMonth);
globalFlagBlockAgenda = 2;
mMainView->dateNavigator()->selectDates( date ,
KOPrefs::instance()->mNextXDays );
@@ -214,24 +214,25 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
//mMainView->updateView();
raiseCurrentView( full, true );
mMainView->adaptNavigationUnits();
}
void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
{
mCurrentAgendaView = 0;
int wid = mMainView->width() ;
int hei = mMainView->height();
if ( mCurrentView == mMonthView ) {
if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
+ mMonthView->setIgnoreResizeEvent( 2 );
mMainView->navigatorBar()->show();
hei -= mMainView->navigatorBar()->sizeHint().height();
}
//mMainView->navigatorBar()->hide();
} else {
mMainView->navigatorBar()->hide();
}
if ( fullScreen ) {
mMainView->leftFrame()->hide();
} else {
mMainView->leftFrame()->show();
if ( KOPrefs::instance()->mVerticalScreen )
@@ -482,25 +483,25 @@ void KOViewManager::showNextXView()
showAgendaView(KOPrefs::instance()->mFullViewMonth);
globalFlagBlockAgenda = 2;
mMainView->dateNavigator()->selectDates( QDate::currentDate(),
KOPrefs::instance()->mNextXDays );
mFlagShowNextxDays = true;
mCurrentAgendaView = 3 ;
}
bool KOViewManager::showsNextDays()
{
return mFlagShowNextxDays;
}
void KOViewManager::showMonthView()
-{
+ {
if (!mMonthView) {
mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView");
addView(mMonthView);
// mMonthView->show();
// SIGNALS/SLOTS FOR MONTH VIEW
connect(mMonthView, SIGNAL(newEventSignal(QDateTime)),
mMainView, SLOT(newEvent(QDateTime)));
connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)),
mMainView, SLOT(showIncidence(Incidence *)));
connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)),