summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-17 14:27:55 (UTC)
committer zautrix <zautrix>2005-04-17 14:27:55 (UTC)
commitb411ec2d8961d07c3e2e9aefc9e04322b7851859 (patch) (side-by-side diff)
tree79e2a70f1ad32562456b0bfa03aa2b916095fbb0
parent2d81c75c4ffb8f144ae58e90e68496500d07a19e (diff)
downloadkdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.zip
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.gz
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.bz2
qdebugcleanup
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kde2file/abdump/main.cpp3
-rw-r--r--kde2file/caldump/main.cpp3
-rw-r--r--korganizer/kdatenavigator.cpp4
-rw-r--r--korganizer/koagendaview.cpp6
-rw-r--r--korganizer/kodaymatrix.cpp1
-rw-r--r--korganizer/koeditorgeneral.cpp2
-rw-r--r--korganizer/koeditorrecurrence.cpp10
-rw-r--r--korganizer/koeventviewer.cpp4
-rw-r--r--korganizer/koglobals.cpp31
-rw-r--r--korganizer/koglobals.h5
-rw-r--r--korganizer/koincidenceeditor.cpp1
-rw-r--r--korganizer/kolistview.cpp9
-rw-r--r--korganizer/kolistview.h2
-rw-r--r--korganizer/komonthview.cpp14
-rw-r--r--korganizer/korganizer.pro2
-rw-r--r--korganizer/korganizerE.pro2
-rw-r--r--korganizer/kotodoview.cpp31
-rw-r--r--korganizer/koviewmanager.cpp10
-rw-r--r--korganizer/kowhatsnextview.cpp2
-rw-r--r--korganizer/ktimeedit.cpp2
-rw-r--r--korganizer/mainwindow.cpp6
-rw-r--r--korganizer/mainwindow.h9
-rw-r--r--korganizer/searchdialog.cpp3
23 files changed, 33 insertions, 129 deletions
diff --git a/kde2file/abdump/main.cpp b/kde2file/abdump/main.cpp
index b359cfe..824d054 100644
--- a/kde2file/abdump/main.cpp
+++ b/kde2file/abdump/main.cpp
@@ -93,25 +93,26 @@ int main( int argc, char *argv[] )
QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf";
KABC::StdAddressBook* standardAddressBook = KABC::StdAddressBook::self();
standardAddressBook->setAutomaticSave( false );
qDebug("************************************* ");
qDebug("***************kdeABdump************* ");
qDebug("************************************* ");
if ( !read ) {
KABC::AddressBook::Iterator it;
KABC::VCardConverter converter;
QString datastream;
for( it = standardAddressBook->begin(); it != standardAddressBook->end(); ++it ) {
- if ( (*it).isEmpty() || ! (*it).resource() )
+ // if ( (*it).isEmpty() || ! (*it).resource() )
+ if ( (*it).isEmpty() )
continue;
KABC::Addressee a = ( *it );
QString vcard = converter.createVCard( a );
vcard += QString("\r\n");
datastream += vcard;
}
QFile outFile(fileName);
if ( outFile.open(IO_WriteOnly) ) {
QTextStream t( &outFile ); // use a text stream
t.setEncoding( QTextStream::UnicodeUTF8 );
t <<datastream;
t << "\r\n\r\n";
diff --git a/kde2file/caldump/main.cpp b/kde2file/caldump/main.cpp
index 9cc1a73..c8755cd 100644
--- a/kde2file/caldump/main.cpp
+++ b/kde2file/caldump/main.cpp
@@ -120,25 +120,26 @@ int main( int argc, char *argv[] )
qDebug("**************kdecaldump************* ");
qDebug("************************************* ");
qDebug("Using timezone ID: %s", calendarResource->timeZoneId().latin1());
if ( !read ) {
localCalendar = new CalendarLocal();
localCalendar->setTimeZoneId( calendarResource->timeZoneId());
KCal::Incidence::List allInc = calendarResource->rawIncidences();
Incidence::List::ConstIterator it;
int num = 0;
for( it = allInc.begin(); it != allInc.end(); ++it ) {
ResourceCalendar * re = calendarResource->resource( (*it) );
- if ( re ) {
+ //if ( re )
+ {
++num;
Incidence* cl = (*it)->clone();
cl->setLastModified( (*it)->lastModified() );
if ( cl->type() == "Journal" )
localCalendar->addJournal( (Journal *) cl );
else if ( cl->type() == "Todo" )
localCalendar->addTodo( (Todo *) cl );
else if ( cl->type() == "Event" )
localCalendar->addEvent( (Event *) cl );
}
}
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 5aa1c9b..6697602 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -136,29 +136,27 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b)
fo.setPointSize( fontPoint );
setFont( fo );
mFontChanged = true;
mNavigatorBar->resetFont( fo );
QSize sh = sizeHintTwoButtons( 2 );
//qDebug("fp %d %d %d %d %d", fontPoint, si.width() , sh.width() , si.height() , sh.height() );
if ( si.width() > sh.width() && si.height() > sh.height()) {
if ( si.width() / sh.width() == 1 ) {
if ( si.width() < sizeHintTwoButtons( 4 ).width())
continue;
}
*b = true;
- //qDebug("fooooooooooooooooooooooouuuuund ");
break;
}
}
- //qDebug("returnnnnnnnnnnnnnnnnnnn %d", fo.pointSize() );
return fo;
}
QSize KDateNavigator::sizeHint() const
{
QFontMetrics fm ( font() );
QSize day = daymatrix->sizeHint();
QSize nav = mNavigatorBar->sizeHint();
int wid = fm.width( "30") + day.width()+3;
int hei = fm.height() +day.height()+nav.height()+2;
if ( wid < nav.width() )
wid = nav.width() ;
//qDebug("KDateNavigator+++++++++++++ %d %d", wid , hei);
@@ -359,25 +357,25 @@ void KDateNavigator::updateConfig()
}
QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( day,
true );
if ( KOPrefs::instance()->mCompactDialogs ) dayName = dayName.left( 1 );
headings[i]->setText( dayName );
}
updateDates();
updateView();
}
void KDateNavigator::setShowWeekNums(bool enabled)
{
- qDebug("KDateNavigator::setShowWeekNums***************************** ");
+
m_bShowWeekNums = enabled;
for(int i=0; i<6; i++) {
if(enabled)
weeknos[i]->show();
else
weeknos[i]->hide();
}
resize(size());
}
void KDateNavigator::selectDates(const DateList& dateList)
{
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index b43c40e..b5a4199 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -907,25 +907,25 @@ void KOAgendaView::updateView()
/*
Update configuration settings for the agenda view. This method is not
complete.
*/
void KOAgendaView::updateConfig()
{
if ( mBlockUpdating )
return;
if ( mAgenda->height() > 96 * KOPrefs::instance()->mHourSize ) {
int old = KOPrefs::instance()->mHourSize;
KOPrefs::instance()->mHourSize = mAgenda->height()/96 +1;
- qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize );
+ //qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize );
}
// update config for children
mTimeLabels->updateConfig();
mAgenda->storePosition();
mAgenda->updateConfig();
mAllDayAgenda->updateConfig();
// widget synchronization
//TODO: find a better way, maybe signal/slot
mTimeLabels->positionChanged();
@@ -1155,28 +1155,28 @@ void KOAgendaView::fillAgenda()
// kdDebug() << " beginX: " << beginX << " endX: " << endX << endl;
if (event->doesFloat()) {
if (event->recurrence()->doesRecur()) {
if (event->isMultiDay() ) {
endX = endX - beginX;// endX is now number of days
if ( event->recursOn( currentDate ) ) {
endX += curCol;
beginX = curCol;
mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
} else {
- qDebug("days %d %s",endX , currentDate.toString().latin1());
+ //qDebug("days %d %s",endX , currentDate.toString().latin1());
QDate dateit = currentDate.addDays( -endX );
if ( event->recursOn( dateit ) ) {
- qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() );
+ //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() );
if ( curCol-endX < 0 ) {
mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol);
}
}
}
} else {
mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
}
} else {
if (beginX <= 0 && curCol == 0) {
mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index ecca374..17a1d13 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -488,25 +488,24 @@ void KODayMatrix::updateViewTimed()
#else
//qDebug("KODayMatrix::updateViewTimed ");
for(int i = 0; i < NUMDAYS; i++) {
// if events are set for the day then remember to draw it bold
QPtrList<Event> eventlist = mCalendar->events(days[i]);
Event *event;
int numEvents = eventlist.count();
QString holiStr = "";
bDays.clearBit(i);
hDays.clearBit(i);
eDays.clearBit(i);
for(event=eventlist.first();event != 0;event=eventlist.next()) {
- qDebug("FFFFFFFFFFFFFFFFFFFFFFFFF ");
ushort recurType = event->recurrence()->doesRecur();
if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) ||
(recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) {
numEvents--;
}
if ( event->isHoliday()) {
hDays.setBit(i);
if ( !holiStr.isEmpty() )
holiStr += "\n";
holiStr += event->summary();
if ( !event->location().isEmpty() )
holiStr += " (" + event->location() + ")";
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 9df76e7..0045b7f 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -223,25 +223,25 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
alarmLayout->addWidget(mAlarmProgramButton);
mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 );
mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 );
// if ( KOPrefs::instance()->mCompactDialogs ) {
// mAlarmSoundButton->hide();
// mAlarmProgramButton->hide();
// }
}
void KOEditorGeneral::pickAlarmSound()
{
- qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
+ //qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
bool oldState = mAlarmSoundButton->isOn();
QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
i18n("*.wav|Wav Files"), 0));
if (!fileName.isEmpty()) {
mAlarmSound = fileName;
QToolTip::remove(mAlarmSoundButton);
QString dispStr = i18n("Playing '%1'").arg(fileName);
QToolTip::add(mAlarmSoundButton, dispStr);
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index 01c5773..47e73dd 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -930,49 +930,49 @@ void KOEditorRecurrence::readEvent(Incidence *event)
recurrenceType = RecurrenceChooser::Monthly;
rmd = r->monthDays();
day = *rmd.first() - 1;
mMonthly->setByDay( day );
mMonthly->setFrequency( f );
break;
case Recurrence::rYearlyMonth:
{
recurrenceType = RecurrenceChooser::Yearly;
- qDebug("Recurrence::rYearlyMonth: ");
+ //qDebug("Recurrence::rYearlyMonth: ");
day = event->dtStart().date().day();
rmd = r->yearNums();
if ( rmd.count() > 0 )
month = *rmd.first();
else
month = event->dtStart().date().month() ;
mYearly->setByMonth( month, day );
#if 0
- qDebug("2day = %d ",day );
+ //qDebug("2day = %d ",day );
QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
int month;
if ( !monthlist.isEmpty() ) {
month = monthlist.first()->rPos ;
} else {
month = event->dtStart().date().month() ;
}
mYearly->setByMonth( day, month );
#endif
mYearly->setFrequency( f );
}
break;
case Recurrence::rYearlyDay:
- qDebug("Recurrence::rYearlyDay: ");
+ //qDebug("Recurrence::rYearlyDay: ");
recurrenceType = RecurrenceChooser::Yearly;
mYearly->setByDay( event->dtStart().date().dayOfYear() );
mYearly->setFrequency( f );
break;
default:
setDefaults( event->dtStart(), dtEnd, true );
break;
}
mRecurrenceChooser->setType( recurrenceType );
showCurrentRule( recurrenceType );
@@ -1012,25 +1012,25 @@ void KOEditorRecurrence::writeEvent( Incidence *event )
if ( duration != 0 ) r->setDaily( freq, duration );
else r->setDaily( freq, endDate );
} else if ( recurrenceType == RecurrenceChooser::Weekly ) {
int freq = mWeekly->frequency();
QBitArray days = mWeekly->days();
int j;
bool found = false;
for (j = 0; j < 7 ; ++j ) {
found |=days.at(j);
}
if ( !found ) {
days.setBit( event->dtStart().date().dayOfWeek()-1);
- qDebug("bit set %d ", event->dtStart().date().dayOfWeek()-1);
+ //qDebug("bit set %d ", event->dtStart().date().dayOfWeek()-1);
}
if ( duration != 0 ) r->setWeekly( freq, days, duration );
else r->setWeekly( freq, days, endDate );
} else if ( recurrenceType == RecurrenceChooser::Monthly ) {
int freq = mMonthly->frequency();
if ( mMonthly->byPos() ) {
int pos = mMonthly->count();
QBitArray days( 7 );
days.fill( false );
days.setBit( mMonthly->weekday() );
@@ -1042,25 +1042,25 @@ void KOEditorRecurrence::writeEvent( Incidence *event )
} else {
// it's by day
int day = mMonthly->day();
if ( duration != 0 ) {
r->setMonthly( Recurrence::rMonthlyDay, freq, duration );
} else {
r->setMonthly( Recurrence::rMonthlyDay, freq, endDate );
}
r->addMonthlyDay( day );
}
} else if ( recurrenceType == RecurrenceChooser::Yearly ) {
- qDebug("RecurrenceChooser::Yearly ");
+ //qDebug("RecurrenceChooser::Yearly ");
int freq = mYearly->frequency();
if ( mYearly->byDay() ) {
if ( duration != 0 ) {
r->setYearly( Recurrence::rYearlyDay, freq, duration );
} else {
r->setYearly( Recurrence::rYearlyDay, freq, endDate );
}
r->addYearlyNum( event->dtStart().date().dayOfYear() );
} else {
if ( duration != 0 ) {
r->setYearly( Recurrence::rYearlyMonth, freq, duration );
} else {
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index fefc778..f39b5e1 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -90,27 +90,25 @@ void KOEventViewer::printMe()
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
if ( dx < dy )
scale = dx;
else
scale = dy;
p.translate( m.width()/10,0 );
- qDebug("Scale: %f ", scale );
if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
- qDebug("SCALE ");
p.scale( scale, scale );
}
drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
p.end();
#endif
}
void KOEventViewer::setSource(const QString& n)
{
if ( n.left(3) == "uid" )
#ifdef DESKTOP_VERSION
@@ -158,29 +156,27 @@ void KOEventViewer::setSource(const QString& n)
}
}
return;
}
//requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
// the result should now arrive through method insertAttendees
//QString uid = "uid:"+(*it).uid();
#endif
if ( n.left(6) == "mailto" ) {
// qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
#ifndef DESKTOP_VERSION
if ( n.mid(7,3) == "ALL" ) {
- qDebug("all ");
mailToAttendees( true );
} else if ( n.mid(7,4) == "RSVP" ) {
mailToAttendees( false );
- qDebug("rsvp ");
} else {
QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
e << n.mid(7);
}
#endif
}
#ifndef KORG_NODCOP
kdDebug() << "KOEventViewer::setSource(): " << n << endl;
QString tmpStr;
diff --git a/korganizer/koglobals.cpp b/korganizer/koglobals.cpp
index 8016034..9ece77f 100644
--- a/korganizer/koglobals.cpp
+++ b/korganizer/koglobals.cpp
@@ -23,99 +23,70 @@
#include <qapplication.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kstandarddirs.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <kcalendarsystem.h>
-#ifndef KORG_NOKALARMD
-#include "kalarmdclient.h"
-#endif
-#include "simplealarmclient.h"
#include "koglobals.h"
#include "koprefs.h"
-class NopAlarmClient : public AlarmClient
-{
- public:
- void startDaemon() {}
- bool setCalendars( const QStringList & ) { return false; }
- bool addCalendar( const QString & ) { return false; }
- bool removeCalendar( const QString & ) { return false; }
- bool reloadCalendar( const QString & ) { return false; }
-};
KOGlobals *KOGlobals::mSelf = 0;
KOGlobals *KOGlobals::self()
{
if (!mSelf) {
mSelf = new KOGlobals;
}
return mSelf;
}
KOGlobals::KOGlobals()
{
KConfig *cfg = KOGlobals::config();
cfg->setGroup("General");
mCalendarSystem = KGlobal::locale()->calendar();
- cfg->setGroup("AlarmDaemon");
- QString alarmClient = cfg->readEntry( "Daemon", "kalarmd" );
- if ( alarmClient == "simple" ) {
- mAlarmClient = new SimpleAlarmClient;
-#ifndef KORG_NOKALARMD
- } else if ( alarmClient == "kalarmd" ) {
- mAlarmClient = new KalarmdClient;
-#endif
- } else {
- mAlarmClient = new NopAlarmClient;
- }
}
KConfig* KOGlobals::config()
{
static KConfig *mConfig = 0;
if (!mConfig) {
KOPrefs *p = KOPrefs::instance();
mConfig = p->getConfig();
//mConfig = new KConfig( locateLocal( "config", "korganizerrc" ) );
}
return mConfig;
}
KOGlobals::~KOGlobals()
{
- delete mAlarmClient;
+
}
const KCalendarSystem *KOGlobals::calendarSystem() const
{
return mCalendarSystem;
}
-AlarmClient *KOGlobals::alarmClient() const
-{
- return mAlarmClient;
-}
-
void KOGlobals::fitDialogToScreen( QWidget *wid, bool force )
{
bool resized = false;
int w = wid->frameSize().width();
int h = wid->frameSize().height();
QRect desk = KGlobalSettings::desktopGeometry(wid);
if ( w > desk.width() ) {
w = desk.width();
resized = true;
}
diff --git a/korganizer/koglobals.h b/korganizer/koglobals.h
index 357ff5f..b3ff67b 100644
--- a/korganizer/koglobals.h
+++ b/korganizer/koglobals.h
@@ -34,26 +34,23 @@ class KOGlobals
static KOGlobals *self();
enum { EVENTADDED, EVENTEDITED, EVENTDELETED };
enum { PRIORITY_MODIFIED, COMPLETION_MODIFIED, CATEGORY_MODIFIED, UNKNOWN_MODIFIED };
static void fitDialogToScreen( QWidget *widget, bool force=false );
static KConfig *config();
static bool reverseLayout();
const KCalendarSystem *calendarSystem() const;
- AlarmClient *alarmClient() const;
-
protected:
KOGlobals();
~KOGlobals();
private:
static KOGlobals *mSelf;
- const KCalendarSystem *mCalendarSystem;
- AlarmClient *mAlarmClient;
+ const KCalendarSystem *mCalendarSystem;
};
#endif
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 51df123..9813a80 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -33,25 +33,24 @@
#include <klocale.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
#include <libkdepim/categoryselectdialog.h>
#include <libkdepim/kinputdialog.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/icalformat.h>
#include "koprefs.h"
-#include "koglobals.h"
#include "koincidenceeditor.h"
KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
Calendar *calendar, QWidget *parent ) :
KDialogBase( Tabbed, caption, Ok | Apply | Cancel |/* Default | */User1, Ok,
parent, caption, true, false ),
mSaveTemplateDialog( 0 )
{
mCalendar = calendar;
setButtonText( Default, i18n("Template...") );
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 341f473..e1b393d 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -322,24 +322,25 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
SLOT(processSelectionChange(QListViewItem *)));
QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
SIGNAL(showIncidenceSignal(Incidence *)) );
readSettings(KOGlobals::config(),"KOListView Layout");
}
KOListView::~KOListView()
{
delete mPopupMenu;
}
+
QString KOListView::getWhatsThisText(QPoint p)
{
KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
if ( item )
return KIncidenceFormatter::instance()->getFormattedText( item->data(),
KOPrefs::instance()->mWTshowDetails,
KOPrefs::instance()->mWTshowCreated,
KOPrefs::instance()->mWTshowChanged);
return i18n("That is the list view" );
}
@@ -419,24 +420,25 @@ void KOListView::setAlarm()
alarm->setType(Alarm::Invalid);
}
}
temp = item;
item = sel.next();
mUidDict.remove( inc->uid() );
delete temp;;
addIncidence( inc );
}
topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) );
qDebug("KO: Set alarm for %d items", count);
calendar()->reInitAlarmSettings();
+ QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
}
void KOListView::setCategories( bool removeOld )
{
KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
if (! csd->exec()) {
delete csd;
return;
}
QStringList catList = csd->selectedCategories();
delete csd;
// if ( catList.count() == 0 )
@@ -466,24 +468,25 @@ void KOListView::setCategories( bool removeOld )
if ( !itemList.contains (catList[i]))
itemList.append( catList[i] );
}
itemList.sort();
inc->setCategories( itemList.join(",") );
}
temp = item;
item = sel.next();
mUidDict.remove( inc->uid() );
delete temp;;
addIncidence( inc );
}
+ QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
}
void KOListView::beamSelected()
{
int icount = 0;
QPtrList<Incidence> delSel ;
QListViewItem *item = mListView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
delSel.append(((KOListViewItem *)item)->data());
++icount;
}
@@ -690,24 +693,25 @@ void KOListView::writeToFile( bool iCal )
ICalFormat format;
format.save( &cal, fn );
} else {
VCalFormat format;
format.save( &cal, fn );
}
mes = i18n("KO/Pi:Saved %1").arg(fn );
KOPrefs::instance()->mLastSaveFile = fn;
topLevelWidget()->setCaption(mes);
}
}
+ QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
}
void KOListView::deleteAll()
{
int icount = 0;
QPtrList<Incidence> delSel ;
QListViewItem *item = mListView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
delSel.append(((KOListViewItem *)item)->data());
++icount;
}
@@ -820,26 +824,29 @@ void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd,
#endif
}
void KOListView::showDates()
{
showDates(true);
}
void KOListView::hideDates()
{
showDates(false);
}
+
void KOListView::resetFocus()
-{
+{
+ topLevelWidget()->setActiveWindow();
+ topLevelWidget()->raise();
mListView->setFocus();
}
void KOListView::updateView()
{
mListView->setFocus();
if ( mListView->firstChild () )
mListView->setCurrentItem( mListView->firstChild () );
}
void KOListView::updateConfig()
{
mListView->setFont ( KOPrefs::instance()->mListViewFont );
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index bb0e23e..eb5bb6e 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -250,30 +250,30 @@ class KOListView : public KOEventView
Incidence* currentItem();
void addTodos(QPtrList<Todo> eventList);
void addJournals(QPtrList<Journal> eventList);
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
void readSettings(KConfig *config, QString setting = "KOListView Layout");
void writeSettings(KConfig *config, QString setting = "KOListView Layout");
void updateList();
void setStartDate(const QDate &start);
int count();
QString getWhatsThisText(QPoint p);
- void resetFocus();
signals:
void signalNewEvent();
void beamIncidenceList(QPtrList<Incidence>);
public slots:
+ void resetFocus();
virtual void updateView();
virtual void showDates(const QDate &start, const QDate &end);
virtual void showEvents(QPtrList<Event> eventList);
void clearSelection();
void allSelection();
void clear();
void beamDone( Ir *ir );
void showDates();
void hideDates();
void deleteAll();
void saveToFile();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 2b7e41f..843526d 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -278,47 +278,43 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
{
mblockRepaint = true;
setText( s );
mMultiday = 0;
mIncidence = incidence;
mDate = qd;
mRecur = false;
mAlarm = false;
mReply = false;
mInfo = false;
mdayPos = 0;
isWeekItem = KOPrefs::instance()->mMonthViewWeek;
- //qDebug("NEWWWWWWWWWWWWW ");
}
void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s)
{
setText( s );
mMultiday = 0;
mIncidence = incidence;
mDate = qd;
mRecur = false;
mAlarm = false;
mReply = false;
mInfo = false;
mdayPos = 0;
- //qDebug("recucleeeeeeeeeeeeeeeee ");
}
void MonthViewItem::paint(QPainter *p)
{
if ( mblockRepaint ) {
- //qDebug("block ");
return;
}
- //qDebug("NON block ");
#if QT_VERSION >= 0x030000
bool sel = isSelected();
#else
bool sel = selected();
#endif
if (KOPrefs::instance()->mMonthViewUsesCategoryColor)
{
p->setBackgroundColor( palette().color( QPalette::Normal, \
sel ? QColorGroup::Highlight : QColorGroup::Background ) );
p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) );
@@ -451,25 +447,24 @@ int MonthViewItem::width(const QListBox *lb) const
}
if( mReply ) {
x += size+1;
}
}
if( mMultiday ) {
x += size+1+2+size/2;
}
return( x + lb->fontMetrics().width( text() ) + 1 );
}
if ( ! lb )
return 10;
- //qDebug("ret wid %d ", lb->width());
return lb->width();
}
MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
: KNoScrollListBox( par ),
mMonthView( parent )
{
//QVBoxLayout *topLayout = new QVBoxLayout( this );
currentPalette = 0;
// mLabel = new QLabel( this );QPushButton
mLabel = new QPushButton( this );
@@ -603,30 +598,25 @@ void MonthViewCell::startUpdateCell()
if ( !mMonthView->isUpdatePossible() )
return;
MonthViewItem *mitem = (MonthViewItem*) firstItem ();
while ( mitem ) {
mitem->setBlockRepaint( true );
mitem = (MonthViewItem *)mitem->next();
}
if ( mAvailItemList.count() > 20 ) {
mAvailItemList.setAutoDelete( true );
mAvailItemList.clear();
mAvailItemList.setAutoDelete( false );
}
- /*
- if ( !isVisible() ){
- return;
- }
- */
- // qDebug("MonthViewCell::updateCell() ");
+
setPrimary( mDate.month()%2 );
setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays);
if ( mDate == QDate::currentDate() ) {
setLineWidth( 3 );
} else {
setLineWidth( 1 );
}
MonthViewItem* CurrentAvailItem = (MonthViewItem*) firstItem ();
//clear();
while ( CurrentAvailItem ) {
MonthViewItem *item = CurrentAvailItem;
CurrentAvailItem = (MonthViewItem *)item->next();
@@ -862,25 +852,24 @@ void MonthViewCell::finishUpdateCell()
QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),"");
}
#endif
//sort();
//setMyPalette();
setMyPalette();
resizeEvent( 0 );
}
void MonthViewCell::updateCell()
{
- //qDebug("MonthViewCell::updateCell() ");
if ( !mMonthView->isUpdatePossible() )
return;
startUpdateCell();
//mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
QPtrList<Event> events = mMonthView->calendar()->events( mDate, true );
Event *event;
for( event = events.first(); event; event = events.next() ) { // for event
insertEvent(event);
}
// insert due todos
QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
Todo *todo;
@@ -1044,25 +1033,24 @@ void MonthViewCell::defaultAction( QListBoxItem *item )
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 )
{
mMonthView->setSelectedCell( this );
- qDebug("CELL ");
if ( item == 0 ) {
QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
emit newEventSignal( dt );
return;
}
}
void MonthViewCell::contextMenu( QListBoxItem *item )
{
mMonthView->setPopupCell( this );
if ( !item ) {
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index 1a81c7d..d88c300 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -126,25 +126,24 @@ HEADERS += datenavigatorcontainer.h \
koviewmanager.h \
kowhatsnextview.h \
ktimeedit.h \
lineview.h \
mainwindow.h \
navigatorbar.h \
outgoingdialog.h \
outgoingdialog_base.h \
publishdialog.h \
publishdialog_base.h \
savetemplatedialog.h \
searchdialog.h \
- simplealarmclient.h \
statusdialog.h \
timeline.h \
timespanview.h \
version.h \
../kalarmd/alarmdialog.h \
SOURCES += datenavigatorcontainer.cpp \
filteredit_base.cpp \
calendarview.cpp \
datenavigator.cpp \
docprefs.cpp \
@@ -186,25 +185,24 @@ filteredit_base.cpp \
kowhatsnextview.cpp \
ktimeedit.cpp \
lineview.cpp \
main.cpp \
mainwindow.cpp \
navigatorbar.cpp \
outgoingdialog.cpp \
outgoingdialog_base.cpp \
publishdialog.cpp \
publishdialog_base.cpp \
savetemplatedialog.cpp \
searchdialog.cpp \
- simplealarmclient.cpp \
statusdialog.cpp \
timeline.cpp \
timespanview.cpp \
../kalarmd/alarmdialog.cpp
HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h
INTERFACES += calprintdayconfig_base.ui \
calprintmonthconfig_base.ui \
calprinttodoconfig_base.ui \
calprintweekconfig_base.ui
SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp
diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro
index 91b5a01..553c265 100644
--- a/korganizer/korganizerE.pro
+++ b/korganizer/korganizerE.pro
@@ -76,25 +76,24 @@ HEADERS = datenavigatorcontainer.h \
koviewmanager.h \
kowhatsnextview.h \
ktimeedit.h \
lineview.h \
mainwindow.h \
navigatorbar.h \
outgoingdialog.h \
outgoingdialog_base.h \
publishdialog.h \
publishdialog_base.h \
savetemplatedialog.h \
searchdialog.h \
- simplealarmclient.h \
statusdialog.h \
timeline.h \
timespanview.h \
version.h \
../kalarmd/alarmdialog.h
SOURCES = datenavigatorcontainer.cpp \
filteredit_base.cpp \
calendarview.cpp \
datenavigator.cpp \
docprefs.cpp \
filtereditdialog.cpp \
@@ -135,18 +134,17 @@ SOURCES = datenavigatorcontainer.cpp \
kowhatsnextview.cpp \
ktimeedit.cpp \
lineview.cpp \
main.cpp \
mainwindow.cpp \
navigatorbar.cpp \
outgoingdialog.cpp \
outgoingdialog_base.cpp \
publishdialog.cpp \
publishdialog_base.cpp \
savetemplatedialog.cpp \
searchdialog.cpp \
- simplealarmclient.cpp \
statusdialog.cpp \
timeline.cpp \
timespanview.cpp \
../kalarmd/alarmdialog.cpp
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index dd2c081..0a608dc 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -699,37 +699,31 @@ void KOTodoView::updateView()
incidence = 0;
} else {
//qDebug("related found ");
incidence = incidence->relatedTo();
}
} else
incidence = 0;
}
if ( next )
todo = todoList.next();
}
-// qDebug("again .... ");
-// for(todo = todoList.first(); todo; todo = todoList.next()) {
-
-// qDebug("yytodo %s ", todo->summary().latin1());
-// }
- //qDebug("for ");
+
for(todo = todoList.first(); todo; todo = todoList.next()) {
if (!mTodoMap.contains(todo) && checkTodo( todo ) )
{
insertTodoItem(todo);
}
}
- //qDebug("for end ");
// Restore opened/closed state
mTodoListView->blockSignals( true );
if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() );
mTodoListView->blockSignals( false );
resetCurrentItem();
processSelectionChange();
}
void KOTodoView::storeCurrentItem()
{
mCurItem = 0;
mCurItemRootParent = 0;
@@ -903,25 +897,24 @@ void KOTodoView::showEvents(QPtrList<Event>)
}
void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
const QDate &td)
{
#ifndef KORG_NOPRINTER
calPrinter->preview(CalPrinter::Todolist, fd, td);
#endif
}
void KOTodoView::editItem(QListViewItem *item )
{
- // qDebug("editItem(QListViewItem *item ) ");
emit editTodoSignal(((KOTodoViewItem *)item)->todo());
}
void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
{
emit showTodoSignal(((KOTodoViewItem *)item)->todo());
}
void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
{
pendingSubtodo = 0;
mActiveItem = (KOTodoViewItem *)item;
@@ -1087,25 +1080,25 @@ void KOTodoView::changedCategories(int index)
mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
}
}
void KOTodoView::itemDoubleClicked(QListViewItem *item)
{
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;
//int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
- qDebug("ROW %d ", row);
+ //qDebug("ROW %d ", row);
if (!item) {
newTodo();
return;
} else {
if ( row == 2 || row == 1 ) {
mActiveItem = (KOTodoViewItem *) item;
newSubTodo();
return;
}
if ( row == 5 || row == 6 ) {
mActiveItem = (KOTodoViewItem *) item;
toggleRunningItem();
@@ -1161,43 +1154,25 @@ void KOTodoView::itemClicked(QListViewItem *item)
}
if ( !allowReparent ) {
topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
pendingSubtodo = 0;
} else {
Todo* newParent = todoItem->todo();
Todo* newSub = pendingSubtodo->todo();
pendingSubtodo = 0;
emit reparentTodoSignal( newParent,newSub );
return;
}
}
-#if 0
- // handled by the item itself
- bool completed = todoItem->todo()->isCompleted(); // Completed or not?
- qDebug("com %d ",completed );
- qDebug("itemclicked ");
- if (todoItem->isOn()) {
- qDebug("on ");
- if (!completed) {
- qDebug("set true ");
- todoItem->todo()->setCompleted(QDateTime::currentDateTime());
- }
- } else {
- qDebug("not on ");
- if (completed) {
- qDebug("set false ");
- todoItem->todo()->setCompleted(false);
- }
- }
-#endif
+
}
void KOTodoView::setDocumentId( const QString &id )
{
mDocPrefs->setDoc( id );
}
void KOTodoView::itemStateChanged( QListViewItem *item )
{
if (!item) return;
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index f1f2dd2..3aa9b6c 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -541,33 +541,25 @@ void KOViewManager::showWorkWeekView()
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();
- */
-
-
+
mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
mFlagShowNextxDays = false;
globalFlagBlockAgenda = 1;
globalFlagBlockLabel = 1;
if ( mCurrentAgendaView != 7 )
mCurrentAgendaView = -1;
showAgendaView();
qApp->processEvents();
globalFlagBlockAgenda = 2;
globalFlagBlockLabel = 0;
mMainView->dateNavigator()->selectWeek();
mCurrentAgendaView = 7 ;
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 8473db9..65d8ac3 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -75,27 +75,25 @@ void WhatsNextTextBrowser::printMe()
QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
if ( dx < dy )
scale = dx;
else
scale = dy;
p.translate( m.width()/10,0 );
- qDebug("Scale: %f ", scale );
if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
- qDebug("SCALE ");
p.scale( scale, scale );
}
drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
p.end();
#endif
}
KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
const char *name)
: KOrg::BaseView(calendar, parent, name)
{
// mDateLabel =
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index 61a0931..df9b2fc 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -328,36 +328,34 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
lineEdit()->setCursorPosition(++cpos);
setSelect ( cpos , 1 );
}
break;
// rest
case Key_Prior:
subTime(QTime(1,0,0));
break;
case Key_Next:
addTime(QTime(1,0,0));
break;
case Key_Backspace:
- qDebug("+++++++++++back ");
if ( cpos > 0) {
if ( cpos == 3 )
--cpos;
if ( cpos > 5)
cpos = 5;
text.at( cpos-1 ) = '0';
lineEdit()->setText( text );
lineEdit()->setCursorPosition(--cpos);
setSelect ( cpos , 1 );
changedText();
- qDebug("---------back ");
}
break;
} // switch arrows
// if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos
if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Key_Left ) {
lineEdit()->deselect();
cpos = 0;
lineEdit()->setCursorPosition(cpos);
setSelect(cpos , 1);
}
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8e5d108..95bef66 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -51,25 +51,24 @@
#include "kodialogmanager.h"
#include "kdialogbase.h"
#include "kapplication.h"
#include "kofilterview.h"
#include "kstandarddirs.h"
#include "koprefs.h"
#include "kfiledialog.h"
#include "koglobals.h"
#include "kglobal.h"
#include "ktoolbar.h"
#include "klocale.h"
#include "kconfig.h"
-#include "simplealarmclient.h"
#include "externalapphandler.h"
using namespace KCal;
#ifndef _WIN32_
#include <unistd.h>
#else
#ifdef _OL_IMPORT_
#include "koimportoldialog.h"
#endif
#endif
#include "mainwindow.h"
@@ -276,25 +275,24 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
vh -= iconToolBar->height();
} else {
vw -= iconToolBar->height();
}
//mView->setMaximumSize( splash->size() );
//mView->resize( splash->size() );
//qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
mView->readSettings();
bool newFile = false;
if( !QFile::exists( defaultFileName() ) ) {
QFileInfo finfo ( defaultFileName() );
QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics");
- qDebug("oldfile %s ", oldFile.latin1());
QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n";
finfo.setFile( oldFile );
if (finfo.exists() ) {
KMessageBox::information( this, message);
mView->openCalendar( oldFile );
qApp->processEvents();
} else {
oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
finfo.setFile( oldFile );
if (finfo.exists() ) {
KMessageBox::information( this, message);
mView->openCalendar( oldFile );
@@ -409,31 +407,31 @@ bool MainWindow::beamReceiveEnabled()
#ifndef DESKTOP_VERSION
return ( infrared != 0 );
#endif
return false;
}
void MainWindow::toggleBeamReceive()
{
if ( mBRdisabled )
return;
#ifndef DESKTOP_VERSION
if ( infrared ) {
- qDebug("disable BeamReceive ");
+ qDebug("KO: Disable BeamReceive ");
delete infrared;
infrared = 0;
brAction->setOn(false);
return;
}
- qDebug("enable BeamReceive ");
+ qDebug("KO: Enable BeamReceive ");
brAction->setOn(true);
infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
#endif
}
void MainWindow::showMaximized ()
{
#ifndef DESKTOP_VERSION
if ( ! globalFlagBlockStartup )
if ( mClosed )
mView->goToday();
#endif
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index f2a6c60..45ed04d 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,52 +1,44 @@
#ifndef KORGE_MAINWINDOW_H
#define KORGE_MAINWINDOW_H
#include <qmainwindow.h>
#include <qtimer.h>
#include <qdict.h>
#include <qfile.h>
#include <qmenubar.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;
class QPEMenuBar;
namespace KCal {
class CalendarLocal;
}
-class KOMenuBar : public QMenuBar
-{
- public:
- KOMenuBar( QWidget *parent=0 ): QMenuBar (parent ) {;}
- QSize sizeHint () const{ qDebug("sizejint ");return QSize ( 40,25 );}
-};
-
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();
@@ -155,21 +147,20 @@ class MainWindow : public QMainWindow
QAction *mDeleteAction;
QAction *mCloneAction;
QAction *mMoveAction;
QAction *mBeamAction;
QAction *mCancelAction;
QAction *mToggleNav;
QAction *mToggleFilter;
QAction *mToggleAllday;
QAction *actionFilterMenuTB;
void closeEvent( QCloseEvent* ce );
- SimpleAlarmClient mAlarmClient;
QTimer mSaveTimer;
//bool mBlockSaveFlag;
bool mCalendarModifiedFlag;
QPixmap loadPixmap( QString );
};
#endif
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 7a945e3..de65b53 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -436,29 +436,28 @@ void SearchDialog::search(const QRegExp &re)
continue;
}
}
}
}
}
void SearchDialog::keyPressEvent ( QKeyEvent *e)
{
switch ( e->key() ) {
case Qt::Key_Escape:
- hide();
+ close();
break;
case Qt::Key_F:
if ( e->state() == Qt::ControlButton ) {
- qDebug("full ");
}
break;
case Qt::Key_Return:
case Qt::Key_Enter:
doSearch();
break;
default:
e->ignore();
}
}