summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/featuresKOPI.txt3
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt6
-rw-r--r--korganizer/koagendaview.cpp8
-rw-r--r--korganizer/koviewmanager.cpp4
-rw-r--r--korganizer/koviewmanager.h2
-rw-r--r--korganizer/mainwindow.cpp51
-rw-r--r--korganizer/mainwindow.h22
7 files changed, 53 insertions, 43 deletions
diff --git a/bin/kdepim/korganizer/featuresKOPI.txt b/bin/kdepim/korganizer/featuresKOPI.txt
index 7f4009c..ab6b224 100644
--- a/bin/kdepim/korganizer/featuresKOPI.txt
+++ b/bin/kdepim/korganizer/featuresKOPI.txt
@@ -154,55 +154,58 @@ 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 aganda 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 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)
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)
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.
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 73940c6..35d2812 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -30,99 +30,96 @@
{ "30 minutes","30 Minuten" },
{ "30th","30." },
{ "31st","31." },
{ "3rd","3." },
{ "4th","4." },
{ "5 (lowest)","5 (Niedrigster)" },
{ "5th","5." },
{ "6th","6." },
{ "7th","7." },
{ "8th","8." },
{ "9th","9." },
{ "About...","Über..." },
{ "&Accept","&Akzeptieren" },
{ "Accept","Akzeptieren" },
{ "Accept A&ll","A&lles Akzepieren" },
{ "Access:","Zugriff:" },
{ "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" },
{ "Actions","Aktionen" },
{ "Add Filter","Filter Hinzufügen" },
{ "&Add","Hinzufügen" },
{ "Add","Hinzufügen" },
{ "Additional email addresses:","Zusätzliche E-Mail Adressen:" },
{ "Additional email address:","Zusätzliche E-Mail Adresse:" },
{ "&Addressbook","&Adressbuch" },
{ "Address &Book...","Adress&buch..." },
{ "Agenda Size","Agende Größe" },
{ "Agenda Size:","Größe der Agenda:" },
{ "Agenda view:","Agenda Ansicht:" },
{ "Agenda view background color:","Hintergrund der Agenda Ansicht:" },
{ "All attendees","Alle Teilnehmer" },
{ "AllDayAgenda Height:","Höhe Ganztages Agenda:" },
{ "All day event","Ganztägig" },
{ "Anonymous","Anonym" },
{ "Apply","Anwenden" },
{ "Apr","Apr" },
{ "April","April" },
{"Ask for every entry on conflict","Frage bei Konflikten nach"},
{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" },
{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" },
{ "Attendees","Teilnehmer" },
{ "Aug","Aug" },
{ "August","August" },
{ "Auto-Save","Automatisches Abspeichern" },
{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" },
{ "Auto saving...","Automatische Sicherung..." },
{ "Begin on:","Starte mit:" },
{ "Begins on: %1","Starte mit: %1" },
{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" },
-{ "Bigger","Größer" },
-{ "Biggest","Riesig" },
-{ "Big","Groß" },
{ "<b>On:</b> %1","<b>Am:</b> %1" },
{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" },
{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" },
{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" },
{ "Busy","Belegt" },
{ "&Cancel","Abbre&chen" },
{ "Cancel","Abbrechen" },
{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" },
{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." },
{ "Categories...","Kategorien..." },
{ "Categories","Kategorien" },
{ "Category","Kategorie" },
{ "Center View","Zentriere Ansicht" },
{ "Change","Ändere" },
{ "Cinema","Kino" },
{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" },
{ "Clone Item","Klone Eintrag" },
{ "&Close","S&chließen" },
{ "Close","Schließen" },
{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" },
{ "Colors","Farben" },
{ "completed","erledigt" },
{ "completed on %1","erledigt am %1" },
{ "Complete","Erledigt" },
{ "Confidential","Vertraulich" },
{ "Configure...","Einstellungen..." },
{ "Confirm &deletes","Löschvogang bestätigen" },
{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." },
{ "Counter-event Viewer","Terminzähler Ansicht" },
{ "Daily ending hour:","Feierabend:" },
{ "Daily starting hour:","Anfangszeit:" },
{ "Daily","Täglich" },
{ "Date Format","Datums Format" },
{ "Date Format:","Datums Format:" },
{ "DateNavigator:(nr)","Datums Navigator" },
{ "Dates: ","Datum: " },
{ "Date && Time","Datum && Zeit" },
{ "Day begins at:","Der Tag beginnt um:" },
{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" },
{ "Days in What's Next:","Tage in What's Next:" },
{ "day(s)","Tag(e)" },
{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" },
{ "day","Tag" },
{ "Dec","Dez" },
{ "December","Dezember" },
{ "Default alarm time:","Standard Alarmzeit:" },
{ "Default appointment time:","Standard Termin Startzeit:" },
{ "Default event color:","Standard Terminfarbe:" },
@@ -361,97 +358,96 @@
{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." },
{ "Show Marcus Bains line","Zeige Marcus Bains Linie" },
{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." },
{ "Show time as:","Zeige Zeit als" },
{ "Show Todo...","Zeige To-Do" },
{ "Show topmost todo prios in What's N.:","Anz. höchster Prios in What's N.:"},
{ "Show topmost todo prios in What's Next:","Anz. höchster Prios in What's Next:"},
{ "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" },
{ "&Show","Zeige" },
{ "Show...","Zeige..." },
{ "Show","Zeige" },
{ "Small","Klein" },
{ "Sorry","Entschuldigung" },
{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"},
{ "Start:","Start:" },
{ "Start Date","Start Datum" },
{ "Start date: %1","Start Datum: %1" },
{ "Start Time","Start Zeit" },
{ "Status:","Status:" },
{ "Status","Status:" },
{ "Summaries","Titel" },
{ "Summary:","Titel:" },
{ "Summary","Titel" },
{ "Sunday","Sonntag" },
{ "Sun","So" },
{ "Sync preferences:","Sync Einstellungen" },
{ "Sync Prefs","Sync Einstellungen" },
{ "Syncronize","Daten abgleich" },
{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" },
{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" },
{ "Template...","Vorlage..." },
{ "This day","Dieser Tag" },
{ "This is an experimental feature. ","Dieses Feature ist experimentel" },
{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." },
{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." },
{ "Thu","Do" },
{ "Thursday","Donnerstag" },
{ "Time associated","Mit Zeit" },
{ "Time bar:","Uhrzeit Zeile:" },
{ "Time && Date","Zeit und Datum" },
{ "Time Format","Zeit Format" },
{ "Time Format(nr):","Zeit Format(Neustart!)" },
{ "Date Labels:","Datumsleiste:" },
{ "Time: ","Zeit: " },
{ "Timezone:","Zeitzone:" },
-{ "Tiny","Sehr klein" },
{ "To: ","Bis: " },
{ "To:","Bis:" },
{ "Today: ","Heute: " },
{ "Todo due today color:","Heute fällige To-Do's" },
{ "To-do items:","To-Do items:" },
{ "Todo overdue color:","Überfällige To-Do's" },
{ "Todo","Todo" },
{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" },
{ "ToDoView:","Todo Ansicht:" },
{ "Toggle Alarm","Wechsle Alarm" },
{ "Toggle Allday","Umschalten Ganztag" },
{ "Tomorrow: ","Morgen: " },
{ "Tue","Di" },
{ "Tuesday","Dienstag" },
{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" },
{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." },
{ "Unknown","Unbekannt" },
{ "Up","Hinauf" },
{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" },
{ "User defined","Benutzerdefiniert" },
{ "User long date:","Format langes Datum:" },
{ "User short date:","Forma kurzes Datum:" },
{ "View","Ansicht" },
{ "View Fonts","Schriftarten Ansichten" },
{ "Views","Ansichten" },
{ "Wed","Mi" },
{ "Wednesday","Mittwoch" },
{ "Week %1","Woche %1" },
{ "Weekly","Wöchentlich" },
{ "Week starts on Sunday","Woche beginnt Sonntags" },
{ "What's Next View:","What's Next Anz." },
{ "What's next ?","Was kommt als nächstes?(What's Next)" },
{ "Working Hours","Tägliche Arbeitszeit" },
{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" },
{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" },
{ "Write back synced file","Syncronisierte Datei zurückschreiben" },
{ "Yearly","Jährlich" },
{ "year(s)","Jahr(e)" },
{ "Yes","Ja" },
{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" },
{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." },
{ "week(s) on:","Woche(n) am: " },
{ "Full menu bar(nr)","Volle Menuleiste(bn)" },
{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
{ "Daylight start:","Sommerzeit Beginn:" },
{ "Daylight end:","Sommerzeit Ende:" },
@@ -1150,52 +1146,52 @@
{ "Use &colors","Nutze Farben" },
{ "Type of View","Typ der Ansicht" },
{ "Print as &Filofax page","Drucke als &Filofax Seite" },
{ "Alt+F","Alt+F" },
{ "Print as &timetable view:","Drucke als Zeittabelle:" },
{ "Alt+T","Alt+T" },
{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
{ "Print month","Drucke Monat" },
{ "CalPrintMonth_Base","CalPrintMonth_Base" },
{ "&Start month:","&Startmonat:" },
{ "&End month:","&Endmonat:" },
{ "Print week &numbers","Drucke Wochen Nummer(n)" },
{ "Print todos","Drucke Todos" },
{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
{ "Include &description of the item","Inclusive Itembeschreibung" },
{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
{ "Include &priority of the item","Inclusive Priorität des Items" },
{ "Items to Print","Zu druckende Items" },
{ "&From:","Von:" },
{ "&To:","Bis:" },
{ "Print &all todo items","Drucke alle Todo Items" },
{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
{ "Todo List","Todo Liste" },
{ "&Title:","&Titel:" },
{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
{ "Todo list","Todo Liste" },
{ "&Print...","Drucke..." },
{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
{ "[Unconfigured]","[Unkonfiguriert]" },
{ "OK","OK" },
{ "FilterEditor","FilterEditor" },
{ "Include","Inclusive" },
{ "Exclude","Exclusive" },
{ "Edit Selection...","Editiere Selektion..." },
{ "recurring events","wiederholende Ereignisse" },
{ "completed to-dos","erledigte Todos" },
{ "events","Ereignisse" },
{ "todos","Todos" },
{ "journals","Journale" },
{ "public","öffentlich" },
{ "private","privat" },
{ "confidential","vertraulich" },
{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
{ "Yesterday","Gestern" },
{ "Day after tomorrow","Übermorgen" },
{ "Tomorrow","Morgen" },
{ "Day before yesterday","Vorgestern" },
-{ "","" },
+{ "Size %1","Größe %1" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 05216a7..f54f7bc 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -171,113 +171,113 @@ int TimeLabels::minimumWidth() const
int width = fm.width("88:88x") + borderWidth;
return width;
}
/** updates widget's internal state */
void TimeLabels::updateConfig()
{
// set the font
// config->setGroup("Fonts");
// QFont font = config->readFontEntry("TimeBar Font");
setFont(KOPrefs::instance()->mTimeBarFont);
// update geometry restrictions based on new settings
setFixedWidth(minimumWidth());
// update HourSize
mCellHeight = KOPrefs::instance()->mHourSize*4;
resizeContents(50,mRows * mCellHeight);
}
/** update time label positions */
void TimeLabels::positionChanged()
{
int adjustment = mAgenda->contentsY();
setContentsPos(0, adjustment);
}
/** */
void TimeLabels::setAgenda(KOAgenda* agenda)
{
mAgenda = agenda;
}
void TimeLabels::contentsMousePressEvent ( QMouseEvent * e)
{
mMouseDownY = e->pos().y();
mOrgCap = topLevelWidget()->caption();
}
void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e )
{
int diff = mMouseDownY - e->pos().y();
if ( diff < 10 && diff > -10 )
return;
int tSize = KOPrefs::instance()->mHourSize + (diff/10) ;
if ( tSize < 4 )
tSize = 4;
- if ( tSize > 18 )
- tSize = 18;
+ if ( tSize > 22 )
+ tSize = 22;
tSize = (tSize-2)/2;
topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize));
}
void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e )
{
topLevelWidget()->setCaption( mOrgCap );
int diff = mMouseDownY - e->pos().y();
if ( diff < 10 && diff > -10 )
return;
int tSize = KOPrefs::instance()->mHourSize + (diff/10);
if ( tSize < 4 )
tSize = 4;
- if ( tSize > 18 )
- tSize = 18;
+ if ( tSize > 22 )
+ tSize = 22;
tSize = (tSize/2)*2;
if ( tSize == KOPrefs::instance()->mHourSize )
return;
KOPrefs::instance()->mHourSize = tSize;
emit scaleChanged();
}
/** This is called in response to repaint() */
void TimeLabels::paintEvent(QPaintEvent*)
{
// kdDebug() << "paintevent..." << endl;
// this is another hack!
// QPainter painter(this);
//QString c
repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight());
}
////////////////////////////////////////////////////////////////////////////
EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
: QFrame(parent,name)
{
mColumns = 1;
mTopBox = 0;
mLocation = loc;
mTopLayout = 0;
mPaintWidget = 0;
mXOffset = 0;
if (mLocation == Top) mPixmap = SmallIcon("1uparrow");
else mPixmap = SmallIcon("1downarrow");
mEnabled.resize(mColumns);
if (mLocation == Top)
setMaximumHeight(0);
else
setMinimumHeight(mPixmap.height());
}
EventIndicator::~EventIndicator()
{
}
void EventIndicator::drawContents(QPainter *p)
{
// kdDebug() << "======== top: " << contentsRect().top() << " bottom " << // contentsRect().bottom() << " left " << contentsRect().left() << " right " << contentsRect().right() << endl;
KDGanttSplitterHandle* han = 0;
if ( mPaintWidget )
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index e255b83..94c459b 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -137,118 +137,120 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
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 );
mMainView->adaptNavigationUnits();
}
void KOViewManager::raiseCurrentView( bool fullScreen )
{
//qDebug("raiseCurrentView ");
mCurrentAgendaView = 0;
int wid = mMainView->width() ;
int hei = mMainView->height();
if ( mCurrentView == mMonthView ) {
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 ( 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->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) {
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 3c251fb..c8c7a7a 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -34,82 +34,84 @@ class KOListView;
class KOAgendaView;
class KOMonthView;
class KOTimeSpanView;
class KOTodoView;
class KOWhatsNextView;
class KOJournalView;
using namespace KCal;
/**
This class manages the views of the calendar. It owns the objects and handles
creation and selection.
*/
class KOViewManager : public QObject
{
Q_OBJECT
public:
KOViewManager( CalendarView * );
virtual ~KOViewManager();
/** changes the view to be the currently selected view */
void showView(KOrg::BaseView *, bool fullScreen = false );
void updateWNview();
void readSettings(KConfig *config);
void writeSettings(KConfig *config);
bool showsNextDays();
/** Read which view was shown last from config file */
void readCurrentView(KConfig *);
/** Write which view is currently shown to config file */
void writeCurrentView(KConfig *);
KOrg::BaseView *currentView();
void setDocumentId( const QString & );
void updateView( const QDate &start, const QDate &end );
void raiseCurrentView( bool fullScreen = 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 updateView();
void showWhatsNextView();
void showListView();
void showAgendaView( bool fullScreen = false );
void showDayView();
void showWorkWeekView();
void showWeekView();
void showNextXView();
void showMonthView();
void showTodoView();
void showJournalView();
void showTimeSpanView();
private:
CalendarView *mMainView;
int mCurrentAgendaView;
KOAgendaView *mAgendaView;
KOListView *mListView;
KOMonthView *mMonthView;
KOTodoView *mTodoView;
KOWhatsNextView *mWhatsNextView;
KOJournalView *mJournalView;
KOTimeSpanView *mTimeSpanView;
KOrg::BaseView *mCurrentView; // currently active event view
int mAgendaViewMode;
bool mFlagShowNextxDays;
};
#endif
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 877b6f2..145b36c 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -515,148 +515,158 @@ void MainWindow::initActions()
selectFilterMenu->setCheckable( true );
syncMenu = new QPopupMenu( this );
configureAgendaMenu = new QPopupMenu( this );
configureToolBarMenu = new QPopupMenu( this );
QPopupMenu *helpMenu = new QPopupMenu( this );
if ( KOPrefs::instance()->mShowFullMenu ) {
QMenuBar *menuBar1;
menuBar1 = menuBar();
menuBar1->insertItem( i18n("File"), importMenu );
menuBar1->insertItem( i18n("View"), viewMenu );
menuBar1->insertItem( i18n("Actions"), actionMenu );
menuBar1->insertItem( i18n("Synchronize"), syncMenu );
menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
//menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
menuBar1->insertItem( i18n("Help"), helpMenu );
} else {
QPEMenuBar *menuBar1;
menuBar1 = new QPEMenuBar( iconToolBar );
QPopupMenu *menuBar = new QPopupMenu( this );
menuBar1->insertItem( i18n("ME"), menuBar);
menuBar->insertItem( i18n("File"), importMenu );
menuBar->insertItem( i18n("View"), viewMenu );
menuBar->insertItem( i18n("Actions"), actionMenu );
menuBar->insertItem( i18n("Synchronize"), syncMenu );
menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
menuBar->insertItem( i18n("Filter"),selectFilterMenu );
menuBar->insertItem( i18n("Help"), helpMenu );
//menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
menuBar1->setMaximumSize( menuBar1->sizeHint( ));
}
connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) );
// ******************
QAction *action;
QIconSet icon;
// QPopupMenu *configureMenu= new QPopupMenu( menuBar );
configureToolBarMenu->setCheckable( true );
QString pathString = "";
if ( !p->mToolBarMiniIcons ) {
if ( QApplication::desktop()->width() < 480 )
pathString += "icons16/";
} else
pathString += "iconsmini/";
configureAgendaMenu->setCheckable( true );
- configureAgendaMenu->insertItem(i18n("Tiny"), 4 );
- configureAgendaMenu->insertItem(i18n("Small"), 6 );
- configureAgendaMenu->insertItem(i18n("Medium"), 8 );
- configureAgendaMenu->insertItem(i18n("Normal"), 10 );
- configureAgendaMenu->insertItem(i18n("Large"), 12 );
- configureAgendaMenu->insertItem(i18n("Big"), 14 );
- configureAgendaMenu->insertItem(i18n("Bigger"), 16 );
- configureAgendaMenu->insertItem(i18n("Biggest"), 18 );
+ int iii ;
+ for ( iii = 1;iii<= 10 ;++iii ){
+ configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
+ }
//configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
+ connect( configureAgendaMenu, SIGNAL( aboutToShow()),
+ this, SLOT( showConfigureAgenda( ) ) );
+
icon = loadPixmap( pathString + "configure" );
action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( edit_options() ) );
actionMenu->insertSeparator();
action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( undo_delete() ) );
actionMenu->insertSeparator();
icon = loadPixmap( pathString + "newevent" );
configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
configureToolBarMenu->insertSeparator();
configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
ne_action->addTo( actionMenu );
connect( ne_action, SIGNAL( activated() ),
mView, SLOT( newEvent() ) );
icon = loadPixmap( pathString + "newtodo" );
configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
nt_action->addTo( actionMenu );
connect( nt_action, SIGNAL( activated() ),
mView, SLOT( newTodo() ) );
icon = loadPixmap( pathString + "navi" );
action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleDateNavigatorWidget() ) );
+ mToggleNav = action ;
icon = loadPixmap( pathString + "filter" );
action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleFilter() ) );
+ mToggleFilter = action;
icon = loadPixmap( pathString + "allday" );
action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleAllDaySize() ) );
+ mToggleAllday = action;
+
+
+ connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
+ mToggleNav, SLOT( setEnabled ( bool ) ) );
+ connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
+ mToggleFilter, SLOT( setEnabled ( bool ) ) );
+ connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
+ mToggleAllday, SLOT( setEnabled ( bool ) ) );
viewMenu->insertSeparator();
icon = loadPixmap( pathString + "picker" );
action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( showDatePicker() ) );
action->addTo( iconToolBar );
viewMenu->insertSeparator();
icon = loadPixmap( pathString + "list" );
configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
showlist_action->addTo( viewMenu );
connect( showlist_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showListView() ) );
icon = loadPixmap( pathString + "day" );
configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
day1_action->addTo( viewMenu );
// action->addTo( toolBar );
connect( day1_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showDayView() ) );
icon = loadPixmap( pathString + "workweek" );
configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
day5_action->addTo( viewMenu );
connect( day5_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showWorkWeekView() ) );
icon = loadPixmap( pathString + "week" );
configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
day7_action->addTo( viewMenu );
connect( day7_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showWeekView() ) );
icon = loadPixmap( pathString + "month" );
configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
month_action->addTo( viewMenu );
connect( month_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showMonthView() ) );
icon = loadPixmap( pathString + "todo" );
configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
@@ -1675,114 +1685,109 @@ void MainWindow::selectFilter( int fil )
mView->selectFilter( fil-2 );
}
}
void MainWindow::configureToolBar( int item )
{
configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
KOPrefs *p = KOPrefs::instance();
p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
// initActions();
}
void MainWindow::setCaptionToDates()
{
QString selDates;
selDates = KGlobal::locale()->formatDate(mView->startDate(), true);
if (mView->startDate() < mView->endDate() )
selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
else {
QString addString;
if ( mView->startDate() == QDateTime::currentDateTime().date() )
addString = i18n("Today");
else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) )
addString = i18n("Tomorrow");
if ( !addString.isEmpty() )
selDates = addString+", "+selDates ;
}
setCaption( i18n("Dates: ") + selDates );
}
-// parameter item == 0: reinit
+void MainWindow::showConfigureAgenda( )
+{
+ int iii;
+ for ( iii = 1;iii<= 10 ;++iii ){
+ configureAgendaMenu->setItemChecked( (iii+1)*2, false );
+ }
+ configureAgendaMenu->setItemChecked( KOPrefs::instance()->mHourSize, true );
+}
void MainWindow::configureAgenda( int item )
{
-
- KOPrefs *p = KOPrefs::instance();
-
- int i;
- // do not allow 4 for widgets higher than 480
- // if ( QApplication::desktop()->height() > 480 ) {
-// if ( item == 4 )
-// item = 6;
-// }
- for ( i = 4; i <= 18; i= i+2 )
- configureAgendaMenu->setItemChecked( i, false );
- configureAgendaMenu->setItemChecked( item, true );
- if ( p->mHourSize == item )
+ if ( KOPrefs::instance()->mHourSize == item )
return;
- p->mHourSize=item;
+ KOPrefs::instance()->mHourSize=item;
mView->viewManager()->agendaView()->updateConfig();
}
void MainWindow::saveCalendar()
{
QString fn = KOPrefs::instance()->mLastSaveFile;
fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this );
if ( fn == "" )
return;
QFileInfo info;
info.setFile( fn );
QString mes;
bool createbup = true;
if ( info. exists() ) {
mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
i18n("Overwrite!"), i18n("Cancel"), 0,
0, 1 );
if ( result != 0 ) {
createbup = false;
}
}
if ( createbup ) {
mView->saveCalendar( fn );
mes = i18n("KO/Pi:Saved %1").arg(fn);
KOPrefs::instance()->mLastSaveFile = fn;
setCaption(mes);
}
}
void MainWindow::loadCalendar()
{
QString fn = KOPrefs::instance()->mLastLoadFile;
fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
if ( fn == "" )
return;
QFileInfo info;
info.setFile( fn );
QString mess;
bool loadbup = true;
if ( info. exists() ) {
mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
int result = QMessageBox::warning( this, "KO/Pi: Warning!",
mess,
i18n("Load!"), i18n("Cancel"), 0,
0, 1 );
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 96e627e..6de0543 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,139 +1,141 @@
#ifndef KORGE_MAINWINDOW_H
#define KORGE_MAINWINDOW_H
#include <qmainwindow.h>
#include <qtimer.h>
#include <qdict.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qregexp.h>
#include <libkcal/incidence.h>
#include "simplealarmclient.h"
#include <ksyncmanager.h>
#ifndef DESKTOP_VERSION
#include <qcopchannel_qws.h>
#endif
class QAction;
class CalendarView;
class KSyncProfile;
#ifdef DESKTOP_VERSION
#define QPEToolBar QToolBar
#define QPEMenuBar QMenuBar
#endif
class QPEToolBar;
namespace KCal {
class CalendarLocal;
}
using namespace KCal;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
~MainWindow();
bool beamReceiveEnabled();
+ static QString defaultFileName();
+ static QString syncFileName();
+ static QString resourcePath();
public slots:
virtual void showMaximized ();
void configureAgenda( int );
void recieve( const QCString& msg, const QByteArray& data );
- static QString defaultFileName();
- static QString syncFileName();
- static QString resourcePath();
protected slots:
void setCaptionToDates();
void about();
void licence();
void faq();
void usertrans();
void features();
void synchowto();
void kdesynchowto();
void multisynchowto();
void whatsNew();
void keyBindings();
void aboutAutoSaving();;
void aboutKnownBugs();
void processIncidenceSelection( Incidence * );
void importQtopia();
void importBday();
void importOL();
void importIcal();
void importFile( QString, bool );
void quickImportIcal();
void slotModifiedChanged( bool );
void save();
void configureToolBar( int );
void printSel();
void printCal();
void saveCalendar();
void loadCalendar();
void exportVCalendar();
void fillFilterMenu();
void selectFilter( int );
void exportToPhone( int );
void toggleBeamReceive();
void disableBR(bool);
+ private slots:
+ void showConfigureAgenda();
+ void getFile( bool );
+ void syncFileRequest();
protected:
void displayText( QString, QString);
-
void enableIncidenceActions( bool );
- private slots:
- QSocket* piSocket;
- QString piFileString;
- QTime piTime;
- void getFile( bool );
- void syncFileRequest();
private:
bool mBRdisabled;
#ifndef DESKTOP_VERSION
QCopChannel* infrared;
#endif
QAction* brAction;
KSyncManager* mSyncManager;
bool mClosed;
void saveOnClose();
bool mFlagKeyPressed;
bool mBlockAtStartup;
QPEToolBar *iconToolBar;
void initActions();
void setDefaultPreferences();
void keyPressEvent ( QKeyEvent * ) ;
void keyReleaseEvent ( QKeyEvent * ) ;
QPopupMenu *configureToolBarMenu;
QPopupMenu *selectFilterMenu;
QPopupMenu *configureAgendaMenu, *syncMenu;
CalendarLocal *mCalendar;
CalendarView *mView;
QAction *mNewSubTodoAction;
QAction *mShowAction;
QAction *mEditAction;
QAction *mDeleteAction;
QAction *mCloneAction;
QAction *mMoveAction;
QAction *mBeamAction;
QAction *mCancelAction;
+ QAction *mToggleNav;
+ QAction *mToggleFilter;
+ QAction *mToggleAllday;
+
+
void closeEvent( QCloseEvent* ce );
SimpleAlarmClient mAlarmClient;
QTimer mSaveTimer;
//bool mBlockSaveFlag;
bool mCalendarModifiedFlag;
QPixmap loadPixmap( QString );
};
#endif