summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--bin/kdepim/korganizer/featuresKOPI.txt29
-rw-r--r--korganizer/komonthview.cpp33
-rw-r--r--korganizer/komonthview.h6
-rw-r--r--korganizer/koviewmanager.cpp4
5 files changed, 46 insertions, 33 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 4f8fcc7..ac70a55 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,109 +1,110 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.0.2 ************
KO/Pi:
Fixed the layout problem of the day label buttons
of the agenda view introduced in version 2.0.1.
Added WhatsThis support for the todo view and the list view.
-Added a quite useful and quite hidden feature (to KO/Pi).
-Who does find it first?
-Hint: You have to click somewhere in the views ...
+Added a quite useful feature to the montview.
+Just click on the week numbers on the left.
+And on top of the week numbers there is now a "week view quick selector".
+(Click on the black triangle).
********** VERSION 2.0.1 ************
Oooops ... I forgot to test on the Zaurus 5500 ...
Fixed many problems of new (english) strings (and german translations)
introduced in the latest versions, where the text was not fitting on the
240x320 display of the Zaurus 5500.
KO/Pi:
Added a popup menu ( press pen and hold to get popup ) to the agenda view
with many useful items (add event/todo, show next week, two weeks, month, journal).
Added items to the todolist popup menu for:
Display all opened, all closed or all todos flat.
The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
Made the reparenting of todos on the desktop possible via Drag&Drop.
Fixed several bugs in setting the completed datetime for todos.
Added info about completed datetime of todos to the todo viewer.
Now displaying a completed todo (with completed datetime set) in the agenda view
at the time of the completion. Such that now it is possible to see in the agenda view
when what todo was completed.
Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
Now the behaviour is:
Setting a parent to complete sets all (sub)childs to complete.
Setting a parent to uncomplete does not change the childs.
Setting a child to uncomplete sets all parent to uncomplete.
Setting a child to complete does not change the parents.
Smart updating and double buffering of the daymatrix.
Showing holidays in the day matrix.
Many other small performance updates.
Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
Now the translation file usertranslation.txt is supposed to be in utf8 format.
If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
********** VERSION 2.0.0 ************
Stable release 2.0.0!
KO/Pi:
Fixed problem in edit dialog recreation at startup.
Made "toggle view*" menu items enabled context sensitive.
Changed agenda size menu to items 1-10.
Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
Usebility enhancements in the KO/Pi menus.
Birthday import now adds year to summary.
What's Next view shows age in years for birthday.
OM/Pi:
Added three info lines to display subject, from and to of selected mails.
KA/Pi:
Fixed jump bar behaviour on Zaurus.
Now KA/Pi search field supports searching for a range of starting characters.
E.g. to search for all contact beginning with b to n, type
b-n
in the search field.
********** VERSION 1.9.20 ************
KO/Pi:
Added for the "dislplay one day" agenda mode
info in the caption and in the day lables:
Now it is displayed, if the selected day is from "day before yesterday"
to "day after tomorrow".
Made it possible to delete a Todo, which has sub-todos.
Fixed two small problems in the todo view.
Added missing German translation for filter edit and print dialog.
Made search dialog closeable by cancel key.
Made it possible to select in the date picker the (ligt grey )
dates of the prev./next month with the mouse.
OM/Pi:
"Delete mail" icon in main window now deletes all selected mails.
Fixed the problem, that the state flag of imap mails was ignored.
Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
to indecate that they are already seen.
Fixed the problem that the body of some mails was not displayed in the
mail viewer when fetching them from the imap server directly to read them.
Made it (configurable) possible to show the "To:" field in the list view.
Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
local storage folder (specified in account settings) of the account of the mail.
Removed some memory leaks in OM/Pi.
********** VERSION 1.9.19 ************
Added a lot of missing translations to KA/Pi,
Added some missing translations to KO/Pi and OM/Pi.
diff --git a/bin/kdepim/korganizer/featuresKOPI.txt b/bin/kdepim/korganizer/featuresKOPI.txt
index 052680e..c056dca 100644
--- a/bin/kdepim/korganizer/featuresKOPI.txt
+++ b/bin/kdepim/korganizer/featuresKOPI.txt
@@ -47,198 +47,193 @@ KO/Pi can import/export ics and vcs files.
KO/Pi can save/load ics backup files.
KO/Pi can send ics and vcs files via infrared, with and without timezone settings.( Zaurus only )
KO/Pi can receive files via infrared directly, after beam receive is enabled.( Zaurus only )
Via the search function you can send any number/selection of events/tasks/journal via infrared.
Via the search function you can export and save any number/selection of events/tasks/journal to an ics file.
Via the search function you can export and save any number/selection of journals and descriptions of events/todos to a plain text file.
KO/Pi can import xml calendar/todo data from Opie/old Qtopia environment.
KO/Pi can sync calendar/todo data with new Sharp Rom DTM model PIM applications, found on Zaurus 7x0/860 and Sharp Rom 3.1 (and above) for 5x00 series.
(Hint: Rename /home/QtPalmtop/bin/datebook to e.g. /home/QtPalmtop/bin/datebookwech
to prevent alarm notification by the Sharp calendar app)
KO/Pi can sync calendar/todo/journal data with any local ics file.
In KO/Pi you can create a specific profile for each device to sync with.
KO/Pi can automatically down/upload a remote ics file to a temp file via user specified system command (e.g. ssh/scp, ftp, ...) to sync with.
KO/Pi can ask you, if a conflict while syncing is detected and displays a detailed view of both events/todos.
Multiple sync with many profiles at once is supported. Read "Multi Sync HowTo".
KO/Pi can sync after an easy and quick setup via network in the "Pi-Sync" mode with another running instance of KO/Pi with "Pi-Sync" enabled.
KO/Pi on Linux can sync with KDE calendar data.
KO/Pi on the Zaurus can sync with KDE calendar data on desktop via Pi-Sync. Read "KDE-Sync HowTo".
KO/Pi can sync and export data to mobile phones. Supported models are depending of the used lib, libgammu.
If KO/Pi detects that the saved file on disk has changed,(e.g. a remote sync from somewhere has happened),
it asks you, if you want to overwrite the file or if you want to sync with the file. Such that no data is lost.
KO/Pi can save/load templates for events/todos.
2)
Filter:
You can define filters for displaying/not displaying specified categories.
Quick access to the first 20 filters via hotkeys 1-0 and <ctrl>1-0
3)
Managing categories:
After importing/loading/syncing there may be new categories in events or todos which are not in the category list.
You can choose what to do with these categories:
-Add to category list
-Or remove them from events/todos
In the list view/search dialog you can quickly assign categories to all selected items.
You can choose
-to add a selection of categories to the list of categories
-to set a selection of categories as the new list of categories
You can specify a color to every categorie.
The events/tasks of this categorie are displayed with this color in the agenda view.
You can configure, if the events/tasks categorie color is shown in todo view/month view as well.
4)
Cancelling of items:
You can cancel an event/todo without deleting them.
The cancelled event/todo is then displayed stricked out.
5)
Addressbook access:
You can access address entries stored in KA/Pi.
You cam import birtdays from KA/Pi.
In KA/Pi you can configure a new resource to get read-only acces to Opie addressbook data.
6)
Quick editing:
You can quickly clone, move, cancel, beam events/todos.
When dragging a recurrent event in agenda view, this recurrence is automatically added to the list of recurrence exceptions and a non-recurring clone is created.
If you click on a day number in month view, a new edit event dialog pops up.
7)
Fast navigation:
There are many shortcuts for fast changing the view. Please refer to shortcut-key description.
If you click on the week number in month view, this week is shown in agenda view.
8)
Printing:
On the desktop version, you can print out a vertical range of the agenda view "as you see it".
And you can print on the desktop version a day view, three kinds of a week view and a month view.
You can print the todo list as well.
9)
Configuration:
There are many advanced configuration possibilities.
You can configure for every item in the toolbar, whether it should be shown or not.
There are two item sizes for toolbar icons available. (Useful for 5x00 user and small display).
You can configure the font/fontsize for every view.
10)
Language:
KO/Pi is available in English, German, French and Italian.
11)
Alarm:
For Zaurus there is an alarm applet available with additional timer functionality.
This alarm applet will make the Zaurus wake up, if the device is in suspend mode.
On the desktop (e.g. Windows) you can enable in KO/Pi the internal alarm notification,
such that you are informed about an alarm, if the program is running.
12)
What'sThis Help:
To use the What'sThis Help, you have to enable the What'sThis icon in the toolbar.
(Choose menu: ME-Toolbar or Action-Configure Toolbar ).
(You have to restart to reload the changed toolbar config).
Now click on the QWhat'sThis Icon
in the top right corner of KO/Pi.
Then click now after that on an item in the Agenda View or in the month view
you will get a detailed display of the items content.
******************************************************
B) Useful features, that are not straighforward to see
******************************************************
1) Right mouse click on Zaurus
2) Moving of items in the agenda view
3) Creating exceptions for recurring events
-4) Accessing the week in agenda view from the Month view
-5) Navigation in month view
-6) Navigation in agenda view
-7) Monthview as week view
-8) Switching display mode in date edit
+4) Navigation in month view
+5) Navigation in agenda view
+6) Monthview as week view
+7) Switching display mode in date edit
1)
Right mouse click on Zaurus:
In KO/Pi on the desktop a right mouse click will popup an menu on some items.
On the Zaurus there can only the stylus be used.
To simulte a right mouse click with the stylus press is and hold it down
for 1-2 seconds. If you release it then, a menu pops up, if there is
a menu available for this particular item.
On some places the menu pops up without releasing the stylus.
That bevaviour is not a bug, it is caused by the the behaviour of the
single left click on the item.
2)
Moving of items in the agenda view:
In the agenda view you can move an item by clicking on it and holding
the mouse down.
You have to move the mouse some distance before the items actually
starts to move. That is not abug, that is a feature to prevent
you to make unwanted moves of the item when you click on it(and moving the
mouse only a small distance with this click)
3)
Creating exceptions for recurring events:
To create an exception for a recurring event,
move this event in the agenda view.
This recurrence is automatically added to the list
of recurrence exceptions and a non-recurring clone is created.
To cancel a single recurrence, create an exception by moving it
and then move it back and cancel it.
-4)
-Accessing the week in agenda view from the month view:
-In the month view there are on the left week numbers displayed.
-Click on a week number to see this week in the agenda view.
-
-5)
+4)
Navigation in month view:
If you select the month view with the icon in the toolbar,
the selected data range in the date navigator
is set automatically to the complete month.
(Click on month view and then the space bar to see the
selected data range in the date navigator).
If you select in the data navigator
(automatically by clicking on the month view or manually)
a date range from the first of the month to the
28.-31. of the month (the 28.-31. is valid for every month!)
then the (month-)navigation keys will select automatically the
complete next month as date range.
-6)
+5)
Navigation in agenda view:
If you select (as an example) 4 days in the date navigator
the (week-) navigation key will select the same 4 days in the next week.
If you want to get the next 4 days after the selected 4 days selected,
you have to switch the navigation mode to "next days mode"
by clicking on the next days icons.
Now the next days from today are selected, but after selecting
4 days in the day navigator the (week-) navigation key
will select the next 4 days.
The "next days mode" is turned off by clicking on the
week view, work week view or day view button.
The agenda view has "time labels" on the left, which displays the hours from 0-24.
If you press the mouse on the timelabels and move it up/down you can
increase/decrease the agenda size quickly.
In the agenda view you can click on the day labels (e.g. Mon 14)
to see the selected date in single day mode.
If you click in single day mode the day label you will switch back to
the previously selected date range.
Right of the day labels is a ">" button.
If you click this button, you will go one day ahead.
Left of the day labels is the month name displayed.
If you click this button, the month view is shown.
-7)
+6)
Monthview as week view:
On the left side of the monthview are the week number labels displayed.
-On top of these labels is a "W" displayed.
-If you click on this button the month view mode will switch to week view mode.
-To switch back, please click the button, which now displays a "M".
+If you click on these labels, the month view will show this week zoomed.
+To go back to monthly view click the left label again.
+You can quickly select a week number by clicking the black triangle
+on top of the week number labels.
-8)
+7)
Switching display mode in date edit:
On several places is a date edit used.
You can scroll the dates by selecting the part of the date (month, day, year)
in the lineedit and pressing the key up/key down key.
The display mode of a date edit is initially short date mode.
(I.e. weekday names are not displayed)
If you doubleclick in the lineedit the mode switches to long date mode.
Now the weekday names are displayed for better overview.
To switch back simply doubleclick again in the line edit.
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 00b1e92..f2cfb75 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -705,237 +705,252 @@ void MonthViewCell::defaultAction( QListBoxItem *item )
{
if ( !item ) return;
MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
Incidence *incidence = eventItem->incidence();
if ( incidence ) mMonthView->defaultAction( incidence );
}
void MonthViewCell::showDay()
{
emit showDaySignal( date() );
}
void MonthViewCell::newEvent()
{
QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
emit newEventSignal( dt );
}
void MonthViewCell::cellClicked( QListBoxItem *item )
{
static QListBoxItem * lastClicked = 0;
if ( item == 0 ) {
QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
emit newEventSignal( dt );
return;
}
/*
if ( lastClicked )
if ( ! item ) {
if ( lastClicked->listBox() != item->listBox() )
lastClicked->listBox()->clearSelection();
}
*/
mMonthView->setSelectedCell( this );
if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true );
select();
}
void MonthViewCell::contextMenu( QListBoxItem *item )
{
if ( !item ) return;
MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
Incidence *incidence = eventItem->incidence();
if ( incidence ) mMonthView->showContextMenu( incidence );
}
void MonthViewCell::selection( QListBoxItem *item )
{
if ( !item ) return;
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 )
{
mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
mShowWeekView = KOPrefs::instance()->mMonthViewWeek;
if ( mShowWeekView )
mWeekStartsMonday = true;
updatePossible = false;
mCells.setAutoDelete( true );
mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
// mDayLayout = new QGridLayout( this );
// create the day of the week labels (Sun, Mon, etc) and add them to
// the layout.
mDayLabels.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( this );
label->setFont(bfont);
label->setFrameStyle(QFrame::Panel|QFrame::Raised);
label->setLineWidth(1);
label->setAlignment(AlignCenter);
mDayLabels.insert( i, label );
}
bfont.setBold( false );
mWeekLabels.resize( mNumWeeks+1 );
for( i = 0; i < mNumWeeks+1; i++ ) {
KOWeekButton *label = new KOWeekButton( this );
label->setFont(bfont);
- connect( label, SIGNAL( selectWeekNum ( int )),this, SIGNAL( selectWeekNum ( int )) );
+ connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
label->setFlat(true);
- QWhatsThis::add(label,i18n("Click on the week number to\nshow week in agenda view"));
+ QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
//label->setFrameStyle(QFrame::Panel|QFrame::Raised);
//label->setLineWidth(1);
//label->setAlignment(AlignCenter);
mWeekLabels.insert( i, label );
}
- mWeekLabels[mNumWeeks]->setText( i18n("W"));
- QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nswitch to week mode view"));
+ mWeekLabels[mNumWeeks]->setText( i18n(""));
+ QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
int row, col;
+ QPopupMenu * wpo = new QPopupMenu (this);
+ wpo->insertItem( i18n("W#"), 0 );
+ for ( i = 1; i < 54; i++ )
+ wpo->insertItem( i18n("%1").arg(i), i );
+ mWeekLabels[mNumWeeks]->setPopup( wpo );
mCells.resize( mNumCells );
for( row = 0; row < mNumWeeks; ++row ) {
for( col = 0; col < mDaysPerWeek; ++col ) {
MonthViewCell *cell = new MonthViewCell( this );
mCells.insert( row * mDaysPerWeek + col, cell );
connect( cell, SIGNAL( defaultAction( Incidence * ) ),
SLOT( defaultAction( Incidence * ) ) );
connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
SIGNAL( newEventSignal( QDateTime ) ) );
connect( cell, SIGNAL( showDaySignal( QDate ) ),
SIGNAL( showDaySignal( QDate ) ) );
}
}
- connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ),
- SLOT( switchView() ) );
+ //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
+ connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) );
mContextMenu = eventPopup();
// updateConfig(); //useless here
emit incidenceSelected( 0 );
}
KOMonthView::~KOMonthView()
{
delete mContextMenu;
}
+void KOMonthView::selectDateWeekNum ( int )
+{
+
+}
+void KOMonthView::selectInternalWeekNum ( int n )
+{
+ emit selectWeekNum ( n );
+ switchView();
+}
+
void KOMonthView::switchView()
{
if ( selectedCell( ) )
selectedCell()->deselect();
mShowWeekView = !mShowWeekView;
KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
- emit showNavigator( !mShowWeekView );
+ //emit showNavigator( !mShowWeekView );
computeLayout();
updateConfig();
}
int KOMonthView::maxDatesHint()
{
return mNumCells;
}
int KOMonthView::currentDateCount()
{
return mNumCells;
}
QPtrList<Incidence> KOMonthView::selectedIncidences()
{
QPtrList<Incidence> selected;
if ( mSelectedCell ) {
Incidence *incidence = mSelectedCell->selectedIncidence();
if ( incidence ) selected.append( incidence );
}
return selected;
}
DateList KOMonthView::selectedDates()
{
DateList selected;
if ( mSelectedCell ) {
QDate qd = mSelectedCell->selectedIncidenceDate();
if ( qd.isValid() ) selected.append( qd );
}
return selected;
}
void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
const QDate &td)
{
#ifndef KORG_NOPRINTER
calPrinter->preview(CalPrinter::Month, fd, td);
#endif
}
void KOMonthView::updateConfig()
{
mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
if ( mShowWeekView )
mWeekStartsMonday = true;
QFontMetrics fontmetric(mDayLabels[0]->font());
mWidthLongDayLabel = 0;
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 ( 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();
}
#ifdef DESKTOP_VERSION
MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
#endif
updateView();
}
void KOMonthView::updateDayLabels()
{
for (int i = 0; i < 7; i++) {
if (mWeekStartsMonday) {
bool show = mShortDayLabels;
if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > mDayLabels[i]->width() )
show = true;
mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
} else {
if (i==0) mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels));
else mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels));
}
}
}
void KOMonthView::showDates(const QDate &start, const QDate &)
{
@@ -1129,284 +1144,284 @@ void KOMonthView::computeLayoutWeek()
if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
return;
if ( wid < hei )
daysToShow = 2;
else
daysToShow = 3;
mShowSatSunComp = true;
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 = mDayLabels[0]->sizeHint().height();
int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
int colModulo = wid % daysToShow;
int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1;
//qDebug("rowmod %d ", rowModulo);
int i;
int x,y,w,h;
x= 0;
y= 0;
w = colWid;
h = dayLabelHei ;
for ( i = 0; i < 7; i++) {
if ( i && !( i % daysToShow) && i < 6) {
y += hei/(5-daysToShow);
x = 0;
w = colWid;
}
if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
++w;
}
if ( i >= 5 ) {
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
x -= (w/2 );
}
else
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
x += w;
}
x= 0;
y= dayLabelHei;
w = colWid;
h = cellHei;
for ( i = 0; i < mCells.count(); ++i) {
if ( i > 6 ) {
mCells[i]->hide();
continue;
}
w = colWid;
if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
++w;
}
if ( i == (daysToShow-1-rowModulo)*7)
++h;
if ( i >= 5 ) {
if ( i ==5 ) {
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
x -= w ;y += h/2;
} else {
if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) {
++w;
}
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
y -= h/2;
}
} else
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
x += w;
if ( x + w/2 > wid ) {
x = 0;
y += h+dayLabelHei ;
}
}
y= dayLabelHei;
h = cellHei ;
mWeekLabels[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei);
for ( i = 1; i < 6; i++) {
mWeekLabels[i]->hide();
}
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 ;
updateDayLabels();
bool forceUpdate = !updatePossible;
updatePossible = true;
- mWeekLabels[mNumWeeks]->setText( i18n("M"));
+ //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 ) {
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()------------------------------------ ");
QFontMetrics fm ( mWeekLabels[0]->font() );
int weeklabelwid = fm.width( "888" );
wid -= weeklabelwid;
int colWid = wid / daysToShow;
int lastCol = wid - ( colWid*6 );
int dayLabelHei = mDayLabels[0]->sizeHint().height();
int cellHei = (hei - dayLabelHei) /6;
int colModulo = wid % daysToShow;
int rowModulo = (hei- dayLabelHei) % 6;
//qDebug("rowmod %d ", rowModulo);
int i;
int x,y,w,h;
x= 0;
y= 0;
w = colWid;
h = dayLabelHei ;
for ( i = 0; i < 7; i++) {
if ( i == daysToShow-colModulo )
++w;
if ( combinedSatSun ) {
if ( i >= daysToShow-1 ) {
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
x -= w/2 ;
}
else
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
} else
mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
x += w;
}
x= 0;
y= dayLabelHei;
w = colWid;
h = cellHei ;
for ( i = 0; i < mCells.count(); ++i) {
mCells[i]->show();
w = colWid;
if ( ((i) % 7) >= 7-colModulo ) {
++w;
}
if ( i == (6-rowModulo)*7)
++h;
if ( combinedSatSun ) {
if ( (i)%7 >= daysToShow-1 ) {
if ( (i)%7 == daysToShow-1 ) {
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
x -= w ;y += h/2;
} else {
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
y -= h/2;
}
} else
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
}
else
mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
x += w;
if ( x + w/2 > wid ) {
x = 0;
y += h;
}
}
y= dayLabelHei;
h = cellHei ;
for ( i = 0; i < 6; i++) {
mWeekLabels[i]->show();
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 ;
updateDayLabels();
bool forceUpdate = !updatePossible;
updatePossible = true;
- mWeekLabels[mNumWeeks]->setText( i18n("W"));
+ //mWeekLabels[mNumWeeks]->setText( i18n("W"));
if ( forceUpdate )
updateView();
}
void KOMonthView::showContextMenu( Incidence *incidence )
{
mContextMenu->showIncidencePopup(incidence);
/*
if( incidence && incidence->type() == "Event" ) {
Event *event = static_cast<Event *>(incidence);
mContextMenu->showEventPopup(event);
} else {
kdDebug() << "MonthView::showContextMenu(): cast failed." << endl;
}
*/
}
MonthViewCell * KOMonthView::selectedCell( )
{
return mSelectedCell;
}
void KOMonthView::setSelectedCell( MonthViewCell *cell )
{
// qDebug("KOMonthView::setSelectedCell ");
if ( mSelectedCell && mSelectedCell != cell ) {
MonthViewCell * mvc = mSelectedCell;
mSelectedCell = cell;
mvc->deselect();
} else
mSelectedCell = cell;
// if ( mSelectedCell )
// mSelectedCell->select();
if ( !mSelectedCell )
emit incidenceSelected( 0 );
else
emit incidenceSelected( mSelectedCell->selectedIncidence() );
}
void KOMonthView::processSelectionChange()
{
QPtrList<Incidence> incidences = selectedIncidences();
if (incidences.count() > 0) {
emit incidenceSelected( incidences.first() );
} else {
emit incidenceSelected( 0 );
}
}
void KOMonthView::clearSelection()
{
if ( mSelectedCell ) {
mSelectedCell->deselect();
mSelectedCell = 0;
}
}
void KOMonthView::keyPressEvent ( QKeyEvent * e )
{
//qDebug("KOMonthView::keyPressEvent ");
switch(e->key()) {
case Key_Up:
{
emit prevMonth();
mCells[0]->setFocus();
}
e->accept();
break;
case Key_Down:
{
emit nextMonth();
mCells[0]->setFocus();
}
e->accept();
break;
default:
e->ignore();
break;
}
}
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 0bc3743..1ed200b 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -147,137 +147,139 @@ class MonthViewCell : public QWidget
void enableScrollBars( bool );
Incidence *selectedIncidence();
QDate selectedIncidenceDate();
void deselect();
void select();
void clear();
#ifdef DESKTOP_VERSION
static QToolTipGroup *toolTipGroup();
#endif
signals:
void defaultAction( Incidence * );
void newEventSignal( QDateTime );
void showDaySignal( QDate );
protected:
QString mToolTip;
void resizeEvent( QResizeEvent * );
protected slots:
void defaultAction( QListBoxItem * );
void contextMenu( QListBoxItem * );
void selection( QListBoxItem * );
void cellClicked( QListBoxItem * );
void newEvent();
void showDay();
private:
KOMonthView *mMonthView;
QDate mDate;
bool mPrimary;
bool mHoliday;
QString mHolidayString;
//QLabel *mLabel;
QPushButton *mLabel;
QListBox *mItemList;
#ifdef DESKTOP_VERSION
static QToolTipGroup *mToolTipGroup;
#endif
QSize mLabelSize;
QSize mLabelBigSize;
QPalette mHolidayPalette;
QPalette mStandardPalette;
QPalette mPrimaryPalette;
QPalette mNonPrimaryPalette;
void setMyPalette();
QPalette getPalette ();
void keyPressEvent ( QKeyEvent * ) ;
};
class KOMonthView: public KOEventView
{
Q_OBJECT
public:
KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
~KOMonthView();
/** Returns maximum number of days supported by the komonthview */
virtual int maxDatesHint();
/** Returns number of currently shown dates. */
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; }
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();
void showContextMenu( Incidence * );
void setSelectedCell( MonthViewCell * );
protected slots:
+ void selectDateWeekNum ( int );
+ void selectInternalWeekNum ( int );
void switchView();
void processSelectionChange();
signals:
void nextMonth();
void prevMonth();
void showNavigator( bool );
- void selectWeekNum ( int );
- void showDaySignal( QDate );
+ void selectWeekNum ( int );
+ void showDaySignal( QDate );
protected:
void resizeEvent(QResizeEvent *);
void viewChanged();
void updateDayLabels();
private:
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;
bool mShortDayLabels;
int mWidthLongDayLabel;
QDate mStartDate;
MonthViewCell *mSelectedCell;
KOEventPopupMenu *mContextMenu;
void keyPressEvent ( QKeyEvent * ) ;
};
#endif
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 8aa0697..ca3de59 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -129,193 +129,193 @@ void KOViewManager::showDateView( int view, QDate 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 );
mFlagShowNextxDays = true;
mCurrentAgendaView = 3 ;
} if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode )
if ( lastMode ) {
mCurrentAgendaView = lastCount ;
mMainView->dateNavigator()->selectDates( lastDate, lastCount);
mFlagShowNextxDays = lastNDMode;
if ( mFlagShowNextxDays ) {
mCurrentAgendaView = 3 ;
}
} else
showWeekView();
} else if (view == 10) {
mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() );
}
lastMode = view;
}
void KOViewManager::writeSettings(KConfig *config)
{
config->setGroup("General");
QString view;
if (mCurrentView == mWhatsNextView) view = "WhatsNext";
else if (mCurrentView == mMonthView) view = "Month";
else if (mCurrentView == mListView) view = "List";
else if (mCurrentView == mJournalView) view = "Journal";
else if (mCurrentView == mTimeSpanView) view = "TimeSpan";
else if (mCurrentView == mTodoView) view = "Todo";
else view = "Agenda";
config->writeEntry("Current View",view);
if (mAgendaView) {
mAgendaView->writeSettings(config);
}
if (mTimeSpanView) {
mTimeSpanView->writeSettings(config);
}
if (mListView) {
mListView->writeSettings(config);
}
if (mTodoView) {
mTodoView->saveLayout(config,"Todo View");
}
}
void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
{
//mFlagShowNextxDays = false;
//if(view == mCurrentView) return;
if ( view == 0 ) {
view = mCurrentView;
if ( view == 0 )
return;
}
bool full = fullScreen;
if(view == mCurrentView && view != mWhatsNextView ) {
if ( mCurrentAgendaView < 0 )
return;
full = mMainView->leftFrame()->isVisible();
} else {
mCurrentView = view;
// bool full = fullScreen;
bool isFull = !mMainView->leftFrame()->isVisible();
if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
full = true;
if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
full = false;
}
if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
//raiseCurrentView( full );
mMainView->processIncidenceSelection( 0 );
//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 ( !KOPrefs::instance()->mMonthViewWeek ) {
+ if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
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 )
hei -= mMainView->leftFrame()->height();
else
wid -= mMainView->leftFrame()->width();
}
emit signalFullScreen( !fullScreen );
if ( callUpdateView )
mMainView->updateView();
if ( globalFlagBlockAgenda == 5 ) {
globalFlagBlockAgenda = 4;
globalFlagBlockAgendaItemPaint = 1;
}
mMainView->viewStack()->raiseWidget(mCurrentView);
if ( globalFlagBlockAgenda == 4 ) {
if ( mCurrentView == mAgendaView ) {
//globalFlagBlockAgenda =1 ;
if ( KOPrefs::instance()->mSetTimeToDayStartAt )
mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins );
else if ( KOPrefs::instance()->mCenterOnCurrentTime )
mAgendaView->setStartHour( QTime::currentTime ().hour() );
qApp->processEvents();
//qDebug("qApp->processEvents() ");
globalFlagBlockAgenda = 0;
mAgendaView->repaintAgenda();
}
globalFlagBlockAgenda = 0;
}
emit signalAgendaView( mCurrentView == mAgendaView );
//qDebug("raiseCurrentView ende ");
}
void KOViewManager::updateView()
{
// qDebug("KOViewManager::updateView() ");
// if we are updating mTodoView, we get endless recursion
if ( mTodoView == mCurrentView )
return;
if ( mCurrentView ) mCurrentView->updateView();
}
void KOViewManager::updateView(const QDate &start, const QDate &end)
{
// kdDebug() << "KOViewManager::updateView()" << endl;
if (mCurrentView) mCurrentView->showDates(start, end);
if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView();
}
void KOViewManager::updateWNview()
{
if ( mCurrentView == mWhatsNextView && mWhatsNextView )
mWhatsNextView->updateView();
}
void KOViewManager::showWhatsNextView()
{
if (!mWhatsNextView) {
mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(),
"KOViewManager::WhatsNextView");
mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog());
connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig()));
addView(mWhatsNextView);
connect(this, SIGNAL( printWNV() ),
mWhatsNextView, SLOT( printMe() ) );
}
globalFlagBlockAgenda = 1;
showView(mWhatsNextView, true );
//mWhatsNextView->updateView();
}
void KOViewManager::showListView()
{
if (!mListView) {
mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView");
addView(mListView);
connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)),
mMainView, SLOT(showIncidence(Incidence *)));
@@ -425,193 +425,193 @@ void KOViewManager::showDayView()
showAgendaView();
qApp->processEvents();
globalFlagBlockAgenda = 2;
globalFlagBlockLabel = 0;
mMainView->dateNavigator()->selectDates( 1 );
mCurrentAgendaView = 1 ;
}
void KOViewManager::showWorkWeekView()
{
mFlagShowNextxDays = false;
globalFlagBlockAgenda = 1;
globalFlagBlockLabel = 1;
if ( mCurrentAgendaView != 5 )
mCurrentAgendaView = -1;
showAgendaView();
qApp->processEvents();
globalFlagBlockAgenda = 2;
globalFlagBlockLabel = 0;
mMainView->dateNavigator()->selectWorkWeek();
mCurrentAgendaView = 5 ;
}
void KOViewManager::showWeekView()
{
/*
globalFlagBlockAgenda = 2;
qDebug("4globalFlagBlockAgenda = 2; ");
//globalFlagBlockPainting = true;
mMainView->dateNavigator()->selectWeek();
showAgendaView();
*/
mFlagShowNextxDays = false;
globalFlagBlockAgenda = 1;
globalFlagBlockLabel = 1;
if ( mCurrentAgendaView != 7 )
mCurrentAgendaView = -1;
showAgendaView();
qApp->processEvents();
globalFlagBlockAgenda = 2;
globalFlagBlockLabel = 0;
mMainView->dateNavigator()->selectWeek();
mCurrentAgendaView = 7 ;
}
void KOViewManager::showNextXView()
{
globalFlagBlockAgenda = 1;
if ( mCurrentAgendaView != 3 )
mCurrentAgendaView = -1;
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 *)),
mMainView, SLOT(editIncidence(Incidence *)));
connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)),
mMainView, SLOT(deleteIncidence(Incidence *)));
connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ),
mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( moveIncidence( Incidence * ) ) );
connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
mMainView, SLOT ( beamIncidence( Incidence * ) ) );
connect( mMonthView, SIGNAL( selectWeekNum( int ) ),
- mMainView, SLOT ( selectWeekNum( int ) ) );
+ mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),
mMainView, SLOT ( showDay( QDate ) ) );
connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig()));
connect( mMonthView, SIGNAL(nextMonth() ),
mMainView->navigatorBar(), SIGNAL(goNextMonth() ) );
connect( mMonthView, SIGNAL(prevMonth() ),
mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) );
connect( mMonthView, SIGNAL( showNavigator(bool) ),
mMainView, SLOT ( showNavigatorBar(bool) ) );
}
globalFlagBlockAgenda = 1;
//mFlagShowNextxDays = false;
// if(mMonthView == mCurrentView) return;
if ( KOPrefs::instance()->mMonthViewWeek )
mMainView->dateNavigator()->selectWeek();
else
mMainView->dateNavigator()->selectMonth();
showView(mMonthView, true );
}
void KOViewManager::showTodoView()
{
//mFlagShowNextxDays = false;
if ( !mTodoView ) {
mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(),
"KOViewManager::TodoView" );
addView( mTodoView );
// QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold );
// SIGNALS/SLOTS FOR TODO VIEW
connect( mTodoView, SIGNAL( newTodoSignal() ),
mMainView, SLOT( newTodo() ) );
connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ),
mMainView, SLOT( newSubTodo( Todo *) ) );
connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ),
mMainView, SLOT( showTodo( Todo * ) ) );
connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ),
mMainView, SLOT( editTodo( Todo * ) ) );
connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ),
mMainView, SLOT( deleteTodo( Todo * ) ) );
connect( mTodoView, SIGNAL( purgeCompletedSignal() ),
mMainView, SLOT( purgeCompleted() ) );
connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ),
mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
connect( mMainView, SIGNAL( configChanged() ), mTodoView,
SLOT( updateConfig() ) );
connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView,
SLOT( updateTodo( Todo *, int ) ) );
connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ),
mMainView, SIGNAL ( todoModified( Todo *, int ) ) );
connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ),
mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ),
mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ),
mMainView, SLOT ( todo_unsub( Todo * ) ) );
connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
mMainView, SLOT ( todo_resub( Todo *, Todo *) ) );
connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ),
mMainView, SLOT ( moveIncidence( Incidence * ) ) );
connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ),
mMainView, SLOT ( beamIncidence( Incidence * ) ) );
KConfig *config = KOGlobals::config();
mTodoView->restoreLayout(config,"Todo View");
mTodoView->setNavigator( mMainView->dateNavigator() );
}
globalFlagBlockAgenda = 1;
showView( mTodoView, true );
}
void KOViewManager::showJournalView()
{
//mFlagShowNextxDays = false;
if (!mJournalView) {
mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(),
"KOViewManager::JournalView");
connect( mMainView, SIGNAL( configChanged() ), mJournalView,
SLOT( updateConfig() ) );
connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) );
addView(mJournalView);
}
showView(mJournalView);
mMainView->dateNavigator()->selectDates( 1 );
}
void KOViewManager::showTimeSpanView()
{