49 files changed, 12 insertions, 55 deletions
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index b82724f..521781e 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp @@ -3,97 +3,96 @@ Copyright (c) 2000 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ // $Id$ #include <qhbox.h> #include <qvbox.h> #include <qapp.h> #include <qlabel.h> #include <qlayout.h> #include <qfile.h> #include <qtimer.h> #include <qsound.h> #include <qpushbutton.h> #include <qspinbox.h> #include <stdlib.h> #ifndef _WIN32_ #include <unistd.h> #include <sys/ioctl.h> #endif #include <stdio.h> #include <fcntl.h> #ifndef DESKTOP_VERSION #include <qtopia/alarmserver.h> #include <qpe/resource.h> #include <qtopia/sound.h> #endif #include "alarmdialog.h" -#include "alarmdialog.moc" AlarmDialog::AlarmDialog(QWidget *parent,const char *name) : QDialog (parent, name, true, Qt::WStyle_StaysOnTop ) { setCaption( "KO/Pi Alarm!" ); QVBoxLayout* layout = new QVBoxLayout( this); QLabel* l = new QLabel("The following event triggered alarm:",this); layout->addWidget ( l ); l->setAlignment( AlignCenter); mMessage = new QLabel ( " ", this ); int fs = 18; int fs2 = 12; if ( QApplication::desktop()->width() < 480 ) { setMaximumSize(220, 260); fs2 = 10; } else { setMaximumSize(440, 440); } layout->setSpacing( 3 ); layout->setMargin( 3 ); l->setFont( QFont("helvetica",fs2, QFont::Bold) ); mMessage->setFont( QFont("helvetica",fs, QFont::Bold) ); mMessage->setAlignment( AlignCenter); l = new QLabel("Missed Alarms:",this); l->setAlignment( AlignCenter); layout->addWidget ( mMessage ); layout->addWidget ( l ); mMissedAlarms= new QLabel ( "", this ); mMissedAlarms->setAlignment( AlignCenter); playSoundTimer = new QTimer( this ); connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) ); playSoundTimer->stop(); layout->addWidget ( mMissedAlarms ); QHBox *suspendBox = new QHBox( this ); suspendBox->setSpacing(3); layout->addWidget ( suspendBox ); (void)new QLabel("Suspend duration (minutes):",suspendBox); mSuspendSpin = new QSpinBox(1,1440,1,suspendBox); mSuspendSpin->setValue(7); // default suspend duration QHBox * bbox = new QHBox ( this ); layout->addWidget ( bbox ); bbox->layout()->setSpacing( 5 ); diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 7ac5b11..0956c78 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3426,51 +3426,51 @@ bool CalendarView::removeCompletedSubTodos( Todo* t ) return deleteTodo; } void CalendarView::purgeCompleted() { int result = KMessageBox::warningContinueCancel(this, i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge")); if (result == KMessageBox::Continue) { QPtrList<Todo> todoCal; QPtrList<Todo> rootTodos; //QPtrList<Incidence> rel; Todo *aTodo;//, *rTodo; Incidence *rIncidence; bool childDelete = false; bool deletedOne = true; todoCal = calendar()->todos(); for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { if ( !aTodo->relatedTo() ) rootTodos.append( aTodo ); } for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { removeCompletedSubTodos( aTodo ); } updateView(); } } void CalendarView::slotCalendarChanged() { ; } NavigatorBar *CalendarView::navigatorBar() { return mNavigatorBar; } void CalendarView::keyPressEvent ( QKeyEvent *e) { //qDebug(" alendarView::keyPressEvent "); e->ignore(); } -#include "calendarview.moc" +//#include "calendarview.moc" -#include "calendarviewbase.moc" +//#include "calendarviewbase.moc" diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp index 8d35c42..e26e20b 100644 --- a/korganizer/datenavigator.cpp +++ b/korganizer/datenavigator.cpp @@ -239,49 +239,49 @@ void DateNavigator::selectNextMonth() firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 ); if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) selectMonthByDate( firstSelected ); else selectWeekByDay( weekDay, firstSelected ); } void DateNavigator::selectNextYear() { QDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 ); selectWeekByDay( weekDay, firstSelected ); } void DateNavigator::selectPrevious() { int offset = -7; if ( datesCount() == 1 ) { offset = -1; } if ( mViewManager ) if ( mViewManager->showsNextDays() ) offset = -datesCount(); selectDates( mSelectedDates.first().addDays( offset ), datesCount() ); } void DateNavigator::selectNext() { int offset = 7; if ( datesCount() == 1 ) { offset = 1; } if ( mViewManager ) if ( mViewManager->showsNextDays() ) offset = datesCount(); selectDates( mSelectedDates.first().addDays( offset ), datesCount() ); } void DateNavigator::emitSelected() { emit datesSelected( mSelectedDates ); } -#include "datenavigator.moc" +//#include "datenavigator.moc" diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp index 2943e41..ca09844 100644 --- a/korganizer/filtereditdialog.cpp +++ b/korganizer/filtereditdialog.cpp @@ -1,91 +1,91 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlayout.h> #include <qpushbutton.h> #include <qcombobox.h> #include <qcheckbox.h> #include <qradiobutton.h> #include <qlistbox.h> #include <qapplication.h> #include <kdebug.h> #include <klocale.h> #include <klineeditdlg.h> #include <kmessagebox.h> #include <libkdepim/categoryselectdialog.h> #include "koprefs.h" #include "filteredit_base.h" #include "filtereditdialog.h" -#include "filtereditdialog.moc" +//#include "filtereditdialog.moc" // TODO: Make dialog work on a copy of the filters objects. class ComboFilterBox: public QComboBox { public: ComboFilterBox( QWidget *parent=0, const char *name=0) : QComboBox( parent,name ) { } void popupBox() { popup(); } }; FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, const char *name) : KDialogBase(parent,name,true,i18n("Edit Calendar Filters"), Ok|Apply|Cancel) { mFilters = filters; QWidget *mainWidget = new QWidget(this); setMainWidget(mainWidget); mSelectionCombo = new ComboFilterBox(mainWidget); connect(mSelectionCombo,SIGNAL(activated(int)),SLOT(filterSelected())); // mSelectionCombo->setEditable ( true ); QPushButton *addButton = new QPushButton(i18n("Add Filter"),mainWidget); connect(addButton,SIGNAL(clicked()),SLOT(slotAdd())); addButton->setMaximumSize( addButton->sizeHint()); mRemoveButton = new QPushButton( i18n("Remove"), mainWidget ); connect( mRemoveButton, SIGNAL( clicked() ), SLOT( slotRemove() ) ); mRemoveButton->setMaximumSize( mRemoveButton->sizeHint()); QPushButton *upButton = new QPushButton(i18n("Up"),mainWidget); upButton->setMaximumSize( upButton->sizeHint()); connect(upButton,SIGNAL(clicked()),SLOT(slotUp())); mEditor = new FilterEdit_base(mainWidget); QGridLayout *topLayout = new QGridLayout(mainWidget,2,2); topLayout->setSpacing(spacingHint()); topLayout->addWidget(mSelectionCombo,0,0); topLayout->addWidget(upButton,0,1); topLayout->addWidget(addButton,0,2); topLayout->addWidget(mRemoveButton,0,3); topLayout->addMultiCellWidget(mEditor,1,1,0,3); mSelectionCombo->setMaximumWidth ( QApplication::desktop()->width() - addButton->maximumWidth() - diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp index 490d21e..f3bd09f 100644 --- a/korganizer/incomingdialog.cpp +++ b/korganizer/incomingdialog.cpp @@ -479,49 +479,49 @@ bool IncomingDialog::automaticAction(ScheduleItemIn *item) if ( checkAttendeesInAddressbook(inc) ) autoAction = acceptMessage(item); } else return false; } else { if ( method==Scheduler::Refresh ) { if ( KOPrefs::instance()->mIMIPAutoRefresh==KOPrefs::addressbookAuto ) { // send refresh-information if ( checkAttendeesInAddressbook(inc) ) autoAction = acceptMessage(item); else return false; } else return false; } else return false; } } } return autoAction; } bool IncomingDialog::checkOrganizerInAddressbook(QString organizer) { bool inBook = false; #ifndef KORG_NOKABC KABC::AddressBook *add_book = KABC::StdAddressBook::self(); KABC::Addressee::List addressList; addressList = add_book->findByEmail(organizer); if ( addressList.size()>0 ) inBook = true; #endif return inBook; } bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc) { bool inBook = false; #ifndef KORG_NOKABC KABC::AddressBook *add_book = KABC::StdAddressBook::self(); KABC::Addressee::List addressList; QPtrList <Attendee> attendees; Attendee *att; attendees = inc->attendees(); for (att=attendees.first();att;att=attendees.next()) { addressList = add_book->findByEmail(att->email()); if (addressList.size()>0 ) inBook = true; } #endif return inBook; } -#include "incomingdialog.moc" +//#include "incomingdialog.moc" diff --git a/korganizer/incomingdialog_base.cpp b/korganizer/incomingdialog_base.cpp index 91740a4..8589803 100644 --- a/korganizer/incomingdialog_base.cpp +++ b/korganizer/incomingdialog_base.cpp @@ -89,49 +89,49 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo */ IncomingDialog_base::~IncomingDialog_base() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void IncomingDialog_base::languageChange() { setCaption( tr2i18n( "Scheduler - Incoming Messages" ) ); PushButton4->setText( tr2i18n( "Retrieve &Messages" ) ); PushButton7->setText( tr2i18n( "&Close" ) ); mMessageListView->header()->setLabel( 0, tr2i18n( "Summary" ) ); mMessageListView->header()->setLabel( 1, tr2i18n( "Start Date" ) ); mMessageListView->header()->setLabel( 2, tr2i18n( "Start Time" ) ); mMessageListView->header()->setLabel( 3, tr2i18n( "End Date" ) ); mMessageListView->header()->setLabel( 4, tr2i18n( "End Time" ) ); mMessageListView->header()->setLabel( 5, tr2i18n( "Organizer" ) ); mMessageListView->header()->setLabel( 6, tr2i18n( "Method" ) ); mMessageListView->header()->setLabel( 7, tr2i18n( "Status" ) ); PushButton7_2->setText( tr2i18n( "Accept A&ll" ) ); PushButton8->setText( tr2i18n( "&Accept" ) ); PushButton9->setText( tr2i18n( "&Reject" ) ); } void IncomingDialog_base::acceptAllMessages() { qWarning( "IncomingDialog_base::acceptAllMessages(): Not implemented yet" ); } void IncomingDialog_base::acceptMessage() { qWarning( "IncomingDialog_base::acceptMessage(): Not implemented yet" ); } void IncomingDialog_base::rejectMessage() { qWarning( "IncomingDialog_base::rejectMessage(): Not implemented yet" ); } void IncomingDialog_base::retrieve() { qWarning( "IncomingDialog_base::retrieve(): Not implemented yet" ); } -#include "incomingdialog_base.moc" +//#include "incomingdialog_base.moc" diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index d1d7946..7af5cf4 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -1,90 +1,90 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ // // Journal Entry #include <qlabel.h> #include <qlayout.h> #include <kdebug.h> #include <kglobal.h> #include <klocale.h> #include <ktextedit.h> #include "koprefs.h" #include <libkcal/journal.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <kresources/resourceselectdialog.h> #include "journalentry.h" -#include "journalentry.moc" +//#include "journalentry.moc" #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #endif JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : QFrame(parent) { mCalendar = calendar; mJournal = 0; mDirty = false; mTitleLabel = new QLabel(i18n("Title"),this); mTitleLabel->setMargin(2); mTitleLabel->setAlignment(AlignCenter); mEditor = new KTextEdit(this); connect(mEditor,SIGNAL(textChanged()),SLOT(setDirty())); #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold ); #endif mEditor->setWordWrap( KTextEdit::WidgetWidth ); QBoxLayout *topLayout = new QVBoxLayout(this); topLayout->addWidget(mTitleLabel); topLayout->addWidget(mEditor); mEditor->installEventFilter(this); } JournalEntry::~JournalEntry() { } void JournalEntry::setDate(const QDate &date) { writeJournal(); mTitleLabel->setText(KGlobal::locale()->formatDate(date)); mDate = date; } void JournalEntry::setJournal(Journal *journal) { writeJournal(); mJournal = journal; mEditor->setText(mJournal->description()); diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 12e983b..7d0c516 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -316,49 +316,49 @@ void KDateNavigator::selectDates(const DateList& dateList) daymatrix->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end())); updateView(); } } int KDateNavigator::dayNum(int row, int col) { return 7 * (row - 1) + (col + 1) - m_fstDayOfWk; } int KDateNavigator::dayToIndex(int dayNum) { int row, col; row = (dayNum+m_fstDayOfWk-1-(KGlobal::locale()->weekStartsMonday() ? 1 : 0)) / 7; if (KGlobal::locale()->weekStartsMonday() && (m_fstDayOfWk == 1)) row++; col = (dayNum+m_fstDayOfWk-1-(KGlobal::locale()->weekStartsMonday() ? 1 : 0)) % 7; return row * 7 + col; } void KDateNavigator::wheelEvent (QWheelEvent *e) { if(e->delta()>0) emit goPrevious(); else emit goNext(); e->accept(); } bool KDateNavigator::eventFilter (QObject *o,QEvent *e) { if (e->type() == QEvent::MouseButtonPress) { int i; for(i=0;i<6;++i) { if (o == weeknos[i]) { QDate weekstart = daymatrix->getDate(i*7); emit weekClicked(weekstart); break; } } return true; } else { return false; } } -#include "kdatenavigator.moc" +//#include "kdatenavigator.moc" diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 607c250..6532705 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1,97 +1,96 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> Marcus Bains line. Copyright (c) 2001 Ali Rahimi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef _WIN32_ #define protected public #include <qwidget.h> #undef protected #endif #include <qintdict.h> #include <qdatetime.h> #include <qapplication.h> #include <qpopupmenu.h> #include <qcursor.h> #include <qpainter.h> #include <kdebug.h> #include <klocale.h> #include <kiconloader.h> #include <kglobal.h> #include "koagendaitem.h" #include "koprefs.h" #include "koglobals.h" #include "koagenda.h" -#include "koagenda.moc" #include <libkcal/event.h> #include <libkcal/todo.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #endif //extern bool globalFlagBlockPainting; extern int globalFlagBlockAgenda; extern int globalFlagBlockAgendaItemPaint; extern int globalFlagBlockAgendaItemUpdate; extern int globalFlagBlockStartup; //////////////////////////////////////////////////////////////////////////// MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) : QFrame(_agenda->viewport(),name), agenda(_agenda) { setLineWidth(0); setMargin(0); setBackgroundColor(Qt::red); minutes = new QTimer(this); connect(minutes, SIGNAL(timeout()), this, SLOT(updateLoc())); minutes->start(0, true); mTimeBox = new QLabel(this); mTimeBox->setAlignment(Qt::AlignRight | Qt::AlignBottom); QPalette pal = mTimeBox->palette(); pal.setColor(QColorGroup::Foreground, Qt::red); mTimeBox->setPalette(pal); //mTimeBox->setAutoMask(true); agenda->addChild(mTimeBox); oldToday = -1; } MarcusBains::~MarcusBains() { delete minutes; } int MarcusBains::todayColumn() { QDate currentDate = QDate::currentDate(); DateList dateList = agenda->dateList(); DateList::ConstIterator it; diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 02fd33b..a39feb1 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -2,97 +2,97 @@ This file is part of KOrganizer. Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qlabel.h> #include <qlayout.h> #include <qhbox.h> #include <qvbox.h> #include <qtooltip.h> #include <qwhatsthis.h> #include <qdragobject.h> #include <qdrawutil.h> #include <qpainter.h> #include <kiconloader.h> #include <kdebug.h> #include <kglobal.h> #include <klocale.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #define AGENDA_ICON_SIZE 5 #else #define AGENDA_ICON_SIZE 7 #endif #include <libkcal/icaldrag.h> #include <libkcal/vcaldrag.h> #include <libkdepim/kincidenceformatter.h> extern int globalFlagBlockAgenda; extern int globalFlagBlockAgendaItemPaint; extern int globalFlagBlockAgendaItemUpdate; #include "koprefs.h" #include "koagendaitem.h" -#include "koagendaitem.moc" +//#include "koagendaitem.moc" //-------------------------------------------------------------------------- QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; //-------------------------------------------------------------------------- KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, const char *name,WFlags) : QWidget(parent, name), mIncidence(incidence), mDate(qd) { #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); #endif int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase setWFlags ( wflags); mAllDay = allday; init ( incidence, qd ); setMouseTracking(true); //setAcceptDrops(true); xPaintCoord = -1; yPaintCoord = -1; } void KOAgendaItem::init ( Incidence *incidence, QDate qd ) { mIncidence = incidence; mDate = qd; mFirstMultiItem = 0; mNextMultiItem = 0; mLastMultiItem = 0; computeText(); if ( (incidence->type() == "Todo") && ( !((static_cast<Todo*>(incidence))->isCompleted()) && ((static_cast<Todo*>(incidence))->dtDue().date() <= QDate::currentDate()) ) ) { if ( (static_cast<Todo*>(incidence))->dtDue() < QDateTime::currentDateTime().date()) mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; else mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; } else { QStringList categories = mIncidence->categories(); QString cat = categories.first(); if (cat.isEmpty()) { mBackgroundColor =KOPrefs::instance()->mEventColor; } else { diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 9e057e4..77a3164 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -21,97 +21,97 @@ without including the source code for Qt in the source distribution. */ #include <qhbox.h> #include <qvbox.h> #include <qlabel.h> #include <qframe.h> #include <qlayout.h> #ifndef KORG_NOSPLITTER #include <qsplitter.h> #endif #include <qfont.h> #include <qfontmetrics.h> #include <qpopupmenu.h> #include <qtooltip.h> #include <qpainter.h> #include <qpushbutton.h> #include <qapplication.h> #include <kapplication.h> #include <KDGanttMinimizeSplitter.h> #include <kdebug.h> #include <kstandarddirs.h> #include <kiconloader.h> #include <klocale.h> #include <kconfig.h> #include <kglobal.h> #include "calendarview.h" #include "koviewmanager.h" #include <libkcal/calendar.h> #include <libkcal/icaldrag.h> #include <libkcal/dndfactory.h> #include <kcalendarsystem.h> #include "koglobals.h" #ifndef KORG_NOPLUGINS #include "kocore.h" #endif #include "koprefs.h" #include "koagenda.h" #include "koagendaitem.h" #ifndef KORG_NOPRINTER #include "calprinter.h" #endif #include "koagendaview.h" -#include "koagendaview.moc" +//#include "koagendaview.moc" //extern bool globalFlagBlockPainting; extern int globalFlagBlockAgenda; extern int globalFlagBlockStartup; extern int globalFlagBlockAgendaItemPaint; extern int globalFlagBlockAgendaItemUpdate; extern int globalFlagBlockLabel; using namespace KOrg; TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : QScrollView(parent,name,f) { mRows = rows; setMinimumHeight( 20 ); mCellHeight = KOPrefs::instance()->mHourSize*4; enableClipper(true); setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); resizeContents(50,mRows * mCellHeight); viewport()->setBackgroundMode( PaletteBackground ); } void TimeLabels::setCellHeight(int height) { mCellHeight = height; } /* Optimization so that only the "dirty" portion of the scroll view is redrawn. Unfortunately, this is not called by default paintEvent() method. */ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) { // if ( globalFlagBlockAgenda ) // return; // bug: the parameters cx, cy, cw, ch are the areas that need to be // redrawn, not the area of the widget. unfortunately, this // code assumes the latter... // now, for a workaround... // these two assignments fix the weird redraw bug cx = contentsX() + 2; diff --git a/korganizer/kocounterdialog.cpp b/korganizer/kocounterdialog.cpp index 8a9ae44..82a7072 100644 --- a/korganizer/kocounterdialog.cpp +++ b/korganizer/kocounterdialog.cpp @@ -1,66 +1,66 @@ /* This file is part of KOrganizer. Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <klocale.h> #include <libkcal/event.h> #include "koeventviewer.h" #include "kocounterdialog.h" -#include "kocounterdialog.moc" +//#include "kocounterdialog.moc" KOCounterDialog::KOCounterDialog(QWidget *parent,const char *name) : KDialogBase(parent,name,false,i18n("Counter-event Viewer"),User1|User2,User1, false,i18n("Decline"),i18n("Accept")) { mEventViewer = new KOEventViewer(this); setMainWidget(mEventViewer); connect(this,SIGNAL(user1Clicked()),this,SLOT(slotCancel())); connect(this,SIGNAL(user2Clicked()),this,SLOT(slotOk())); // TODO: Set a sensible size (based on the content?). setMinimumSize(300,200); resize(320,300); } KOCounterDialog::~KOCounterDialog() { } void KOCounterDialog::setEvent(Event *event) { mEventViewer->setEvent(event); } void KOCounterDialog::addEvent(Event *event) { mEventViewer->addEvent(event); } void KOCounterDialog::setTodo(Todo *event) { mEventViewer->setTodo(event); } void KOCounterDialog::addText(QString text) { mEventViewer->addText(text); } diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 779d67c..fc00828 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -1,97 +1,96 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Eitzenberger Thomas <thomas.eitzenberger@siemens.at> Parts of the source code have been copied from kdpdatebutton.cpp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qevent.h> #include <qpainter.h> #include <qptrlist.h> #include <kglobal.h> #include <kdebug.h> #include <klocale.h> #include <libkcal/vcaldrag.h> #include <libkcal/icaldrag.h> #include <libkcal/dndfactory.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <kresources/resourceselectdialog.h> #include <kcalendarsystem.h> #ifndef KORG_NOPLUGINS #include "kocore.h" #endif #include "koprefs.h" #include "koglobals.h" #include "kodaymatrix.h" -#include "kodaymatrix.moc" // ============================================================================ // D Y N A M I C T I P // ============================================================================ DynamicTip::DynamicTip( QWidget * parent ) : QToolTip( parent ) { matrix = (KODayMatrix*)parent; } void DynamicTip::maybeTip( const QPoint &pos ) { //calculate which cell of the matrix the mouse is in QRect sz = matrix->frameRect(); int dheight = sz.height()*7 / 42; int dwidth = sz.width() / 7; int row = pos.y()/dheight; int col = pos.x()/dwidth; QRect rct(col*dwidth, row*dheight, dwidth, dheight); // kdDebug() << "DynamicTip::maybeTip matrix cell index [" << // col << "][" << row << "] => " <<(col+row*7) << endl; //show holiday names only QString str = matrix->getHolidayLabel(col+row*7); if (str.isEmpty()) return; tip(rct, str); } // ============================================================================ // K O D A Y M A T R I X // ============================================================================ const int KODayMatrix::NOSELECTION = -1000; const int KODayMatrix::NUMDAYS = 42; KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) : QFrame(parent, name) { mCalendar = calendar; // initialize dynamic arrays days = new QDate[NUMDAYS]; daylbls = new QString[NUMDAYS]; diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index caf7599..58198a2 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -1,91 +1,90 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <libkdepim/categoryeditdialog.h> #include "calendarview.h" #include "incomingdialog.h" #include "outgoingdialog.h" #include "koprefsdialog.h" #include "koeventeditor.h" #include "koprefs.h" #include "datenavigator.h" #include "kotodoeditor.h" #include "searchdialog.h" #include "filtereditdialog.h" #ifndef KORG_NOPLUGINS #include "plugindialog.h" #endif #ifndef KORG_NOARCHIVE #include "archivedialog.h" #endif #include "kconfig.h" #include "kodialogmanager.h" -#include "kodialogmanager.moc" KODialogManager::KODialogManager( CalendarView *mainView ) : QObject(), mMainView( mainView ) { mOutgoingDialog = 0; mIncomingDialog = 0; mOptionsDialog = 0; mSearchDialog = 0; mArchiveDialog = 0; mFilterEditDialog = 0; mPluginDialog = 0; // mCategoryEditDialog = new KPIM::CategoryEditDialog(KOPrefs::instance(),mMainView); //KOGlobals::fitDialogToScreen( mCategoryEditDialog ); } KODialogManager::~KODialogManager() { delete mOutgoingDialog; delete mIncomingDialog; delete mOptionsDialog; delete mSearchDialog; #ifndef KORG_NOARCHIVE delete mArchiveDialog; #endif delete mFilterEditDialog; #ifndef KORG_NOPLUGINS delete mPluginDialog; #endif } OutgoingDialog *KODialogManager::outgoingDialog() { createOutgoingDialog(); return mOutgoingDialog; } void KODialogManager::createOutgoingDialog() { if (!mOutgoingDialog) { mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), mMainView,SIGNAL(numOutgoingChanged(int))); } } void KODialogManager::showOptionsDialog( bool showSync ) diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index 7c4c382..c0e7bdd 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -1,96 +1,95 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in thse hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qtooltip.h> #include <qfiledialog.h> #include <qlayout.h> #include <qvbox.h> #include <qbuttongroup.h> #include <qvgroupbox.h> #include <qwidgetstack.h> #include <qdatetime.h> #include <qapp.h> #include <klocale.h> #include <kglobal.h> #include <kiconloader.h> #include <kstandarddirs.h> #include <kmessagebox.h> #ifndef KORG_NOKABC #include <kabc/addresseedialog.h> #endif #include <libkcal/incidence.h> #include "koprefs.h" #include "koeditordetails.h" -#include "koeditordetails.moc" template <> CustomListViewItem<class Attendee *>::~CustomListViewItem() { delete mData; } template <> void CustomListViewItem<class Attendee *>::updateItem() { setText(0,mData->name()); setText(1,mData->email()); setText(2,mData->roleStr()); setText(3,mData->statusStr()); if (mData->RSVP() && !mData->email().isEmpty()) setPixmap(4,SmallIcon("mailappt")); else setPixmap(4,SmallIcon("nomailappt")); } KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) : QWidget( parent, name), mDisableItemUpdate( false ) { QGridLayout *topLayout = new QGridLayout(this); topLayout->setSpacing(spacing); QString organizer = KOPrefs::instance()->email(); mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); mListView = new KListView(this,"mListView"); mListView->addColumn(i18n("Name"),180); mListView->addColumn(i18n("Email"),180); mListView->addColumn(i18n("Role"),60); mListView->addColumn(i18n("Status"),100); mListView->addColumn(i18n("RSVP"),35); if ( KOPrefs::instance()->mCompactDialogs ) { //mListView->setFixedHeight(78); } connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), SLOT(updateAttendeeInput())); QLabel *attendeeLabel = new QLabel(this); attendeeLabel->setText(i18n("Name:")); attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); mNameEdit = new QLineEdit(this); connect(mNameEdit,SIGNAL(textChanged(const QString &)), diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index ad1389f..94e1f4c 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -5,97 +5,96 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qwidget.h> #include <qtooltip.h> #include <qlayout.h> #include <qvbox.h> #include <qbuttongroup.h> #include <qvgroupbox.h> #include <qwidgetstack.h> #include <qdatetime.h> #include <qfile.h> #include <kglobal.h> #include <kdebug.h> #include <klocale.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kfiledialog.h> #include <kstandarddirs.h> #include <libkcal/todo.h> #include <libkcal/event.h> #include <libkdepim/categoryselectdialog.h> #include <libkdepim/kdateedit.h> #include "koprefs.h" #include "koglobals.h" #include "koeditorgeneral.h" #include "kolocationbox.h" -#include "koeditorgeneral.moc" #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #else #include <qapplication.h> #endif KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : QObject( parent, name) { } KOEditorGeneral::~KOEditorGeneral() { } void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) { QGridLayout *headerLayout = new QGridLayout(topLayout); #if 0 mOwnerLabel = new QLabel(i18n("Owner:"),parent); headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); #endif QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent); headerLayout->addWidget(summaryLabel,1,0); mSummaryEdit = new KOLocationBox(TRUE,parent, 10); mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) ); //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() ); int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2; if ( QApplication::desktop()->width() > 320 ) mSummaryEdit->setMaximumHeight( hei +6 ); //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding ); // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink } // mSummaryEdit = new QLineEdit(parent); headerLayout->addWidget(mSummaryEdit,1,1); connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); QLabel *locationLabel = new QLabel(i18n("Location:"),parent); headerLayout->addWidget(locationLabel,2,0); mLocationEdit = new KOLocationBox(TRUE,parent,10); mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); if ( QApplication::desktop()->width() > 320 ) mLocationEdit->setMaximumHeight( hei + 6); diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index 9b93e7e..42c3df1 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -1,96 +1,95 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qtooltip.h> #include <qlayout.h> #include <qvbox.h> #include <qbuttongroup.h> #include <qvgroupbox.h> #include <qwidgetstack.h> #include <qdatetime.h> #include <kdebug.h> #include <kglobal.h> #include <klocale.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kfiledialog.h> #include <kstandarddirs.h> #include <libkcal/event.h> #include <libkdepim/kdateedit.h> #include "koprefs.h" #include "koeditorgeneralevent.h" #include "kolocationbox.h" -#include "koeditorgeneralevent.moc" KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent, const char* name) : KOEditorGeneral( parent, name) { connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), SLOT(setDuration())); connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), SLOT(emitDateTimeStr())); } KOEditorGeneralEvent::~KOEditorGeneralEvent() { } void KOEditorGeneralEvent::finishSetup() { //disabled // QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); // QWidget::setTabOrder( mLocationEdit, mStartDateEdit ); // QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); // QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); // QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); // QWidget::setTabOrder( mEndTimeEdit, mNoTimeButton ); // QWidget::setTabOrder( mNoTimeButton, mAlarmButton ); // QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); // QWidget::setTabOrder( mFreeTimeCombo, mCategoriesButton ); // QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); // QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); mSummaryEdit->load(KOLocationBox::SUMMARYEVENT); mSummaryEdit->setFocus(); } void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) { QBoxLayout *timeLayout = new QVBoxLayout(topLayout); QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, i18n("Date && Time"),parent); timeLayout->addWidget(timeGroupBox); timeGroupBox->layout()->setSpacing( 0 ); timeGroupBox->layout()->setMargin( 5 ); QFrame *timeBoxFrame = new QFrame(timeGroupBox); diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 57837bb..7db7da0 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp @@ -3,97 +3,96 @@ Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qtooltip.h> #include <qfiledialog.h> #include <qlayout.h> #include <qvbox.h> #include <qbuttongroup.h> #include <qvgroupbox.h> #include <qwidgetstack.h> #include <qdatetime.h> #include <kglobal.h> #include <klocale.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kdebug.h> #include <krestrictedline.h> #include <kstandarddirs.h> #include <kfiledialog.h> #include <libkcal/todo.h> #include <libkdepim/kdateedit.h> #include "koprefs.h" #include "ktimeedit.h" #include "koeditorgeneraltodo.h" #include "kolocationbox.h" -#include "koeditorgeneraltodo.moc" KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, const char* name) : KOEditorGeneral( parent, name) { } KOEditorGeneralTodo::~KOEditorGeneralTodo() { } void KOEditorGeneralTodo::finishSetup() { // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); // QWidget::setTabOrder(mLocationEdit, mDueCheck); // QWidget::setTabOrder(mDueCheck, mDueDateEdit); // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); // QWidget::setTabOrder(mStartCheck, mStartDateEdit); // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); // QWidget::setTabOrder(mTimeButton, mCompletedCombo); // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); mSummaryEdit->load(KOLocationBox::SUMMARYTODO); mSummaryEdit->setFocus(); } void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) { QBoxLayout *timeLayout = new QVBoxLayout(topLayout); QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, i18n("Date && Time"),parent); timeLayout->addWidget(timeGroupBox); timeGroupBox->layout()->setSpacing( 0 ); timeGroupBox->layout()->setMargin( 5 ); QFrame *timeBoxFrame = new QFrame(timeGroupBox); QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); layoutTimeBox->setSpacing(topLayout->spacing()); layoutTimeBox->setColStretch( 1, 1 ); mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index d82172f..98356fe 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -3,97 +3,96 @@ Copyright (c) 2000-2003 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qtooltip.h> #include <qfiledialog.h> #include <qlayout.h> #include <qvbox.h> #include <qbuttongroup.h> #include <qvgroupbox.h> #include <qwidgetstack.h> #include <qdatetime.h> #include <qlistbox.h> #include <qspinbox.h> #include <qcheckbox.h> #include <qapplication.h> #include <kdialog.h> #include <kglobal.h> #include <klocale.h> #include <kiconloader.h> #include <kdebug.h> #include <knumvalidator.h> #include <libkcal/event.h> #include <libkdepim/kdateedit.h> #include "koprefs.h" #include "koeditorrecurrence.h" -#include "koeditorrecurrence.moc" /////////////////////////// RecurBase /////////////////////////////// RecurBase::RecurBase( QWidget *parent, const char *name ) : QWidget( parent, name ) { mFrequencyEdit = new QSpinBox( 1, 9999, 1, this ); mFrequencyEdit->setValue( 1 ); } QWidget *RecurBase::frequencyEdit() { return mFrequencyEdit; } void RecurBase::setFrequency( int f ) { if ( f < 1 ) f = 1; mFrequencyEdit->setValue( f ); } int RecurBase::frequency() { return mFrequencyEdit->value(); } /////////////////////////// RecurDaily /////////////////////////////// RecurDaily::RecurDaily( QWidget *parent, const char *name ) : RecurBase( parent, name ) { QBoxLayout *topLayout = new QHBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); QLabel *preLabel = new QLabel( i18n("Recur every"), this ); topLayout->addWidget( preLabel ); topLayout->addWidget( frequencyEdit() ); QLabel *postLabel = new QLabel( i18n("day(s)"), this ); topLayout->addWidget( postLabel ); } /////////////////////////// RecurWeekly /////////////////////////////// RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index b3edec6..0ff99a4 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp @@ -2,97 +2,96 @@ This file is part of KOrganizer. Copyright (c) 2001,2002 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qtooltip.h> #include <qframe.h> #include <qpixmap.h> #include <qhbox.h> #include <qdir.h> #include <qlayout.h> #include <qwidgetstack.h> #include <qapplication.h> #include <kiconloader.h> #include <kstandarddirs.h> #include <kdebug.h> #include <klocale.h> #include <kfiledialog.h> #include <kmessagebox.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <kresources/resourceselectdialog.h> #include <libkdepim/categoryselectdialog.h> #include <libkcal/calendarlocal.h> #include <libkcal/icalformat.h> #include "koprefs.h" #include "koeventeditor.h" -#include "koeventeditor.moc" extern int globalFlagBlockAgenda; KOEventEditor::KOEventEditor( Calendar *calendar, QWidget *parent ) : KOIncidenceEditor( i18n("Edit Event"), calendar, parent ) { mEvent = 0; init(); } KOEventEditor::~KOEventEditor() { //emit dialogClose( mEvent ); } void KOEventEditor::init() { setupGeneral(); setupAttendeesTab(); setupRecurrence(); // Propagate date time settings to recurrence tab connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), mRecurrence,SLOT(setDateTimes(QDateTime,QDateTime))); connect(mGeneral,SIGNAL(dateTimeStrChanged(const QString &)), mRecurrence,SLOT(setDateTimeStr(const QString &))); // Category dialog // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); //connect(mCategoryDialog,SIGNAL(categoriesSelected(const QString &)), // mGeneral,SLOT(setCategories(const QString &))); } void KOEventEditor::reload() { if ( mEvent ) readEvent( mEvent ); } void KOEventEditor::setSecrecy( int sec ) { mGeneral->setSecrecy( sec ); } void KOEventEditor::setCategories( QString s ) { mGeneral->setCategories(s); diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp index 410bceb..b274810 100644 --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp @@ -1,81 +1,80 @@ /* This file is part of KOrganizer. Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qcursor.h> #include <klocale.h> #include <kdebug.h> #include <kiconloader.h> #include <libkcal/event.h> #include "koeventpopupmenu.h" -#include "koeventpopupmenu.moc" KOEventPopupMenu::KOEventPopupMenu() { mCurrentIncidence = 0; mHasAdditionalItems = false; insertItem (i18n("&Show"),this,SLOT(popupShow())); mEditOnlyItems.append(insertItem (i18n("&Edit..."),this,SLOT(popupEdit()))); mEditOnlyItems.append(insertItem (i18n("&Delete"), this,SLOT(popupDelete()))); mEditOnlyItems.append(insertItem (i18n("&Clone..."), this,SLOT(popupClone()))); mEditOnlyItems.append(insertItem (i18n("&Move..."), this,SLOT(popupMove()))); #ifndef DESKTOP_VERSION mEditOnlyItems.append(insertItem (i18n("&Beam..."), this,SLOT(popupBeam()))); #endif mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), this,SLOT(popupCancel()))); } void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) { mCurrentIncidence = incidence; if (mCurrentIncidence) { // Enable/Disabled menu items only valid for editable events. QValueList<int>::Iterator it; for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); } popup(QCursor::pos()); } else { kdDebug() << "KOEventPopupMenu::showEventPopup(): No event selected" << endl; } } void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, const QObject *receiver, const char *member, bool editOnly) { if (!mHasAdditionalItems) { mHasAdditionalItems = true; insertSeparator(); } int id = insertItem(icon,text,receiver,member); if (editOnly) mEditOnlyItems.append(id); diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp index 4553b0b..bce2626 100644 --- a/korganizer/koeventview.cpp +++ b/korganizer/koeventview.cpp @@ -1,133 +1,130 @@ /* This file is part of KOrganizer. Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qpopupmenu.h> #include <qcursor.h> #include <klocale.h> #include <kdebug.h> #include <kiconloader.h> #include <kmessagebox.h> #include <libkcal/calendar.h> #include "koprefs.h" #include "koeventview.h" using namespace KOrg; -#include "koeventview.moc" //--------------------------------------------------------------------------- KOEventView::KOEventView(Calendar *cal,QWidget *parent,const char *name) : KOrg::BaseView(cal,parent,name) { } //--------------------------------------------------------------------------- KOEventView::~KOEventView() { } //--------------------------------------------------------------------------- KOEventPopupMenu *KOEventView::eventPopup() { KOEventPopupMenu *eventPopup = new KOEventPopupMenu; connect(eventPopup,SIGNAL(editIncidenceSignal(Incidence *)), SIGNAL(editIncidenceSignal(Incidence *))); connect(eventPopup,SIGNAL(showIncidenceSignal(Incidence *)), SIGNAL(showIncidenceSignal(Incidence *))); connect(eventPopup,SIGNAL(deleteIncidenceSignal(Incidence *)), SIGNAL(deleteIncidenceSignal(Incidence *))); connect(eventPopup,SIGNAL(cancelIncidenceSignal(Incidence *)), SIGNAL(cancelIncidenceSignal(Incidence *))); connect(eventPopup,SIGNAL(cloneIncidenceSignal(Incidence *)), SIGNAL(cloneIncidenceSignal(Incidence *))); connect(eventPopup,SIGNAL(beamIncidenceSignal(Incidence *)), SIGNAL(beamIncidenceSignal(Incidence *))); connect(eventPopup,SIGNAL(moveIncidenceSignal(Incidence *)), SIGNAL(moveIncidenceSignal(Incidence *))); return eventPopup; } //--------------------------------------------------------------------------- void KOEventView::showIncidencePopup(QPopupMenu *popup,Incidence *event) { mCurrentIncidence = event; if (event) popup->popup(QCursor::pos()); else kdDebug() << "KOEventView::showEventPopup(): No event selected" << endl; } //--------------------------------------------------------------------------- void KOEventView::popupShow() { emit showIncidenceSignal(mCurrentIncidence); } //--------------------------------------------------------------------------- void KOEventView::popupEdit() { emit editIncidenceSignal(mCurrentIncidence); } //--------------------------------------------------------------------------- void KOEventView::popupDelete() { emit deleteIncidenceSignal(mCurrentIncidence); } void KOEventView::popupClone() { emit cloneIncidenceSignal(mCurrentIncidence); } void KOEventView::popupCancel() { emit cancelIncidenceSignal(mCurrentIncidence); } //--------------------------------------------------------------------------- void KOEventView::defaultAction( Incidence *incidence ) { if ( !incidence ) return; if ( incidence->isReadOnly() ) emit showIncidenceSignal(incidence); else { if ( KOPrefs::instance()->mEditOnDoubleClick ) emit editIncidenceSignal(incidence); else emit showIncidenceSignal(incidence); } } //--------------------------------------------------------------------------- -#include "baseview.moc" - diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 9f8bd9b..bac66d3 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -1,97 +1,96 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qcstring.h> #include <qwhatsthis.h> #include <qdialog.h> #include <qapplication.h> #include <qlabel.h> #include <qlayout.h> #include <klocale.h> #include <kapplication.h> #include <libkcal/event.h> #include <libkcal/todo.h> #include <kdebug.h> #include <kiconloader.h> #include <krun.h> #include <kglobal.h> #include <kprocess.h> #include "koprefs.h" #include <libkdepim/addresseeview.h> #include <kabc/stdaddressbook.h> #ifndef KORG_NODCOP #include <dcopclient.h> #include "korganizer.h" #include "koprefs.h" #include "actionmanager.h" #endif #include "koeventviewer.h" -#include "koeventviewer.moc" #ifndef KORG_NOKABC #include <kabc/stdaddressbook.h> #define size count #endif KOEventViewer::KOEventViewer(QWidget *parent,const char *name) : QTextBrowser(parent,name) { mSyncMode = false; mColorMode = 0; } KOEventViewer::~KOEventViewer() { } void KOEventViewer::setSource(const QString& n) { KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); KABC::AddressBook::Iterator it; for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { // LR I do not understand, why the uid string is different on zaurus and desktop #ifdef DESKTOP_VERSION QString uid = "uid://"+(*it).uid(); #else QString uid = "uid:"+(*it).uid(); #endif //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); if (n == uid ) { //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); QDialog dia( this,"dia123", true ); dia.setCaption( i18n("Details of attendee") ); QVBoxLayout lay ( &dia ); KPIM::AddresseeView av ( &dia ); av.setAddressee( (*it) ); lay.addWidget( &av ); if ( QApplication::desktop()->width() < 480 ) dia.resize( 220, 240); else { dia.resize( 400,400); } dia.exec(); break; } } #ifndef KORG_NODCOP diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 64ab94d..be183eb 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -1,79 +1,78 @@ /* This file is part of KOrganizer. Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <klocale.h> #include <libkcal/event.h> #include <qpushbutton.h> #include "koeventviewer.h" #include "koprefs.h" #include <libkcal/todo.h> #include "qapp.h" #include "koeventviewerdialog.h" -#include "koeventviewerdialog.moc" extern int globalFlagBlockAgenda; KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) : KDialogBase(parent,name, #ifndef DESKTOP_VERSION true , #else false, #endif i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) { mEventViewer = new KOEventViewer(this); mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); setMainWidget(mEventViewer); setButtonText(Ok, i18n("Edit") ); QObject::connect(findButton( Ok ),SIGNAL(clicked()), SLOT(editIncidence())); QObject::connect(this,SIGNAL(user1Clicked()), SLOT(showIncidence())); mIncidence = 0; // TODO: Set a sensible size (based on the content?). //showMaximized(); //qDebug("++++++++++++KOEventViewerDialog() "); // if ( KOPrefs::instance()->mCompactDialogs ) { // setFixedSize( 240,284 ); // move( 0, 15 ); // } else { // setMinimumSize(300,200); // resize(320,300); // } mSyncMode = false; mSyncResult = 0; } KOEventViewerDialog::~KOEventViewerDialog() { //qDebug("-------~KOEventViewerDialog() "); } void KOEventViewerDialog::showMe() { #ifdef DESKTOP_VERSION show(); #else showMaximized(); diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index b22bc54..1479208 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -1,79 +1,78 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qcheckbox.h> #include <qcombobox.h> #include <qpushbutton.h> #include <libkcal/calfilter.h> #include "kofilterview.h" -#include "kofilterview.moc" KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, const char* name,WFlags fl ) : KOFilterView_base(parent,name,fl) { mFilters = filterList; connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); } KOFilterView::~KOFilterView() { // no need to delete child widgets, Qt does it all for us } bool KOFilterView::filtersEnabled() { return mEnabledCheck->isChecked(); } void KOFilterView::setFiltersEnabled(bool set) { mEnabledCheck->setChecked(set); emit filterChanged(); } void KOFilterView::updateFilters() { mSelectionCombo->clear(); CalFilter *filter = mFilters->first(); while(filter) { mSelectionCombo->insertItem(filter->name()); filter = mFilters->next(); } } CalFilter *KOFilterView::selectedFilter() { CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); return f; } void KOFilterView::setSelectedFilter(QString filterName) { diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp index e10a188..51df123 100644 --- a/korganizer/koincidenceeditor.cpp +++ b/korganizer/koincidenceeditor.cpp @@ -1,96 +1,95 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qtooltip.h> #include <qframe.h> #include <qpixmap.h> #include <qlayout.h> #include <qwidgetstack.h> #include <qdatetime.h> #include <qdir.h> #include <kdebug.h> #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" -#include "koincidenceeditor.moc" 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...") ); QString saveTemplateText; // if ( KOPrefs::instance()->mCompactDialogs ) { // showButton( User1, false ); // showButton( Apply, false ); // } else { showButton( Apply, false ); saveTemplateText = i18n("Ok+Agenda"); // } setButtonText( User1, saveTemplateText ); //mCategoryDialog = new KPIM::CategorySelectDialog( KOPrefs::instance(), this ); // KOGlobals::fitDialogToScreen( mCategoryDialog ); //connect(mCategoryDialog,SIGNAL(editCategories()),SIGNAL(editCategories())); //connect( this, SIGNAL( defaultClicked() ), SLOT( slotLoadTemplate() ) ); // connect( this, SIGNAL( user1Clicked() ), SLOT( slotSaveTemplate() ) ); connect( this, SIGNAL( user1Clicked() ), SLOT( slotShowIncidence() ) ); } KOIncidenceEditor::~KOIncidenceEditor() { //delete mCategoryDialog; } void KOIncidenceEditor::setupAttendeesTab() { QFrame *topFrame = addPage(i18n("Attendees")); QBoxLayout *topLayout = new QVBoxLayout(topFrame); mDetails = new KOEditorDetails(spacingHint(),topFrame); topLayout->addWidget(mDetails); } void KOIncidenceEditor::slotApply() diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 579f24d..6e6a939 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -1,88 +1,87 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ // // View of Journal entries #include <qlayout.h> #include <qpopupmenu.h> #include <klocale.h> #include <kdebug.h> #include "koprefs.h" #include <libkcal/calendar.h> #include "journalentry.h" #include "kojournalview.h" using namespace KOrg; -#include "kojournalview.moc" KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, const char *name) : KOrg::BaseView(calendar, parent, name) { mEntry = new JournalEntry(calendar,this); mEntry->setFont ( KOPrefs::instance()->mJornalViewFont ); QBoxLayout *topLayout = new QVBoxLayout(this); topLayout->addWidget(mEntry); connect ( mEntry,SIGNAL(deleteJournal(Journal *) ),this ,SIGNAL(deleteJournal(Journal *) ) ) ; } KOJournalView::~KOJournalView() { } int KOJournalView::currentDateCount() { return 0; } QPtrList<Incidence> KOJournalView::selectedIncidences() { QPtrList<Incidence> eventList; return eventList; } void KOJournalView::updateConfig() { mEntry->setFont ( KOPrefs::instance()->mJornalViewFont ); } void KOJournalView::updateView() { mEntry->setFont ( KOPrefs::instance()->mJornalViewFont ); } void KOJournalView::flushView() { mEntry->flushEntry(); } void KOJournalView::showDates(const QDate &start, const QDate &) { // kdDebug() << "KOJournalView::selectDates()" << endl; mEntry->setDate(start); Journal *j = calendar()->journal(start); diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index b6061d0..9a3ba73 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -14,97 +14,96 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlistview.h> #include <qlayout.h> #include <qlabel.h> #include <qpopupmenu.h> #include <qprogressbar.h> #include <qfileinfo.h> #include <qmessagebox.h> #include <qdialog.h> #include <qtextstream.h> #include <qdir.h> #include <klocale.h> #include <kdebug.h> #include <kiconloader.h> #include <kglobal.h> #include <libkcal/calendar.h> #include <libkcal/calendarlocal.h> #include <libkcal/icalformat.h> #include <libkcal/vcalformat.h> #include <libkcal/recurrence.h> #include <libkcal/filestorage.h> #include <libkdepim/categoryselectdialog.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #else #include <qapplication.h> #endif #ifndef KORG_NOPRINTER #include "calprinter.h" #endif #include "koglobals.h" #include "koprefs.h" #include "kfiledialog.h" #include "kolistview.h" -#include "kolistview.moc" ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) { mItem = item; mDate = date; } ListItemVisitor::~ListItemVisitor() { } bool ListItemVisitor::visit(Event *e) { bool ok = false; QString start, end; if ( e->doesRecur() ) { QDate d = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); if ( ok ) { int days = e->dtStart().date().daysTo(e->dtEnd().date() ); start = KGlobal::locale()->formatDate(d,true); end = KGlobal::locale()->formatDate(d.addDays( days),true); } } if ( ! ok ) { start =e->dtStartDateStr(); end = e->dtEndDateStr(); } mItem->setText(0,e->summary()); mItem->setText(1,start); mItem->setText(2,e->dtStartTimeStr()); mItem->setText(3,end); mItem->setText(4,e->dtEndTimeStr()); mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No")); mItem->setText(6, e->recurrence()->recurrenceText()); mItem->setText(7,"---"); mItem->setText(8,"---"); mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); mItem->setText(10,e->categoriesStr()); QString key; QDate d = e->dtStart().date(); QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute()); mItem->setSortKey(1,key); d = e->dtEnd().date(); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index c4bc51b..df60564 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -7,97 +7,96 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qpopupmenu.h> #include <qfont.h> #include <qfontmetrics.h> #include <qkeycode.h> #include <qhbox.h> #include <qvbox.h> #include <qpushbutton.h> #include <qtooltip.h> #include <qpainter.h> #include <qwhatsthis.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #else #include <qapplication.h> #endif #include <kdebug.h> #include <klocale.h> #include <kglobal.h> #include <kconfig.h> #include <kiconloader.h> #include <kcalendarsystem.h> #ifndef KORG_NOPRINTER #include "calprinter.h" #endif #include "koprefs.h" #ifndef KORG_NOPLUGINS #include "kocore.h" #endif #include "koglobals.h" #include <libkdepim/kincidenceformatter.h> #include "komonthview.h" -#include "komonthview.moc" #define PIXMAP_SIZE 5 class KNOWhatsThis :public QWhatsThis { public: KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; protected: virtual QString text( const QPoint& p) { return _wid->getWhatsThisText(p) ; }; private: KNoScrollListBox* _wid; }; KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) : QListBox(parent, name) { #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); #endif new KNOWhatsThis(this); } QString KNoScrollListBox::getWhatsThisText(QPoint p) { QListBoxItem* item = itemAt ( p ); if ( ! item ) { return i18n("Click in the cell or\non the date label\nto add an event!"); } return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence()); } void KNoScrollListBox::keyPressEvent(QKeyEvent *e) { switch(e->key()) { case Key_Right: // if ( e->state() == Qt::ControlButton ) { e->ignore(); return; } scrollBy(4,0); break; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 04fffe2..da6644f 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -22,97 +22,96 @@ */ #include <qlayout.h> #include <qlabel.h> #include <qgroupbox.h> #include <qbuttongroup.h> #include <qlineedit.h> #include <qfont.h> #include <qslider.h> #include <qfile.h> #include <qtextstream.h> #include <qcombobox.h> #include <qvbox.h> #include <qhbox.h> #include <qregexp.h> #include <qspinbox.h> #include <qdatetime.h> #include <qcheckbox.h> #include <qradiobutton.h> #include <qpushbutton.h> #include <qstrlist.h> #include <qapplication.h> #include <kcolorbutton.h> #include <kdebug.h> #include <klocale.h> #include <kglobal.h> #include <kfontdialog.h> #include <kfiledialog.h> #include <kmessagebox.h> #include <kcolordialog.h> #include <kiconloader.h> #include <kemailsettings.h> #include <kstandarddirs.h> #include <kurlrequester.h> #include <klineedit.h> #if defined(USE_SOLARIS) #include <sys/param.h> #define ZONEINFODIR "/usr/share/lib/zoneinfo" #define INITFILE "/etc/default/init" #endif #include "koprefs.h" #include "koprefsdialog.h" -#include "koprefsdialog.moc" KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : KPrefsDialog(KOPrefs::instance(),parent,name,true) { setCaption( i18n("Preferences - some settings need a restart (nr)")); mCategoryDict.setAutoDelete(true); KGlobal::locale()->insertCatalogue("timezones"); setupMainTab(); setupLocaleTab(); setupTimeZoneTab(); setupTimeTab(); setupLocaleDateTab(); setupFontsTab(); setupColorsTab(); setupViewsTab(); //setupSyncTab(); //setupSyncAlgTab(); //setupPrinterTab(); //setupGroupSchedulingTab(); //setupGroupAutomationTab(); } KOPrefsDialog::~KOPrefsDialog() { } void KOPrefsDialog::setupLocaleDateTab() { QFrame *topFrame = addPage(i18n("Date Format"),0,0); QGridLayout *topLayout = new QGridLayout(topFrame,3,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); int iii = 0; KPrefsWidRadios *syncPrefsGroup = addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); QString format; if ( QApplication::desktop()->width() < 480 ) format = "(%d.%m.%Y)"; else format = "(%d.%m.%Y|%A %d %B %Y)"; syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); diff --git a/korganizer/kosyncprefsdialog.cpp b/korganizer/kosyncprefsdialog.cpp index 2e051f2..b7e4265 100644 --- a/korganizer/kosyncprefsdialog.cpp +++ b/korganizer/kosyncprefsdialog.cpp @@ -18,97 +18,96 @@ As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlayout.h> #include <qlabel.h> #include <qgroupbox.h> #include <qbuttongroup.h> #include <qlineedit.h> #include <qfont.h> #include <qslider.h> #include <qfile.h> #include <qtextstream.h> #include <qcombobox.h> #include <qvbox.h> #include <qhbox.h> #include <qspinbox.h> #include <qdatetime.h> #include <qcheckbox.h> #include <qradiobutton.h> #include <qpushbutton.h> #include <qstrlist.h> #include <qapplication.h> #include <kcolorbutton.h> #include <kdebug.h> #include <klocale.h> #include <kglobal.h> #include <kfontdialog.h> #include <kmessagebox.h> #include <kcolordialog.h> #include <kiconloader.h> #include <kemailsettings.h> #include <kstandarddirs.h> #include <kfiledialog.h> #include <kmessagebox.h> #include <kurlrequester.h> #include <klineedit.h> #include <libkdepim/ksyncprofile.h> #include "koprefs.h" #include "kosyncprefsdialog.h" #include "koglobals.h" -#include "kosyncprefsdialog.moc" KOSyncPrefsDialog::KOSyncPrefsDialog(QWidget *parent, char *name, bool modal) : KDialog(parent,name,true) { setCaption( i18n("Synchronization Preferences")); mSyncProfiles.setAutoDelete( true ); setupSyncAlgTab(); } KOSyncPrefsDialog::~KOSyncPrefsDialog() { } #include <qlayout.h> #include <qscrollview.h> void KOSyncPrefsDialog::setupSyncAlgTab() { QLabel * lab; //QFrame *page = addPage(i18n("Sync Prefs"),0,0); QVBox * mainbox = new QVBox( this ); QScrollView* sv = new QScrollView( mainbox ); QHBoxLayout * lay = new QHBoxLayout( this ); lay->addWidget( mainbox ); QHBox * b_box = new QHBox( mainbox ); QPushButton* button = new QPushButton( i18n("Ok"), b_box ); connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); button = new QPushButton( i18n("Cancel"), b_box ); connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) ); //QBoxLayout * sl = new QVBoxLayout(this ); //sl->addWidget ( sv ); sv->setResizePolicy ( QScrollView::AutoOneFit ); QFrame *topFrame = new QFrame ( sv ); sv->addChild( topFrame ); mSetupSyncAlgTab = topFrame; QGridLayout *topLayout = new QGridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); //lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame); int iii = 0; //topLayout->addMultiCellWidget(lab , iii,iii,0,1); //++iii; diff --git a/korganizer/kotimespanview.cpp b/korganizer/kotimespanview.cpp index 266a403..3265a3a 100644 --- a/korganizer/kotimespanview.cpp +++ b/korganizer/kotimespanview.cpp @@ -1,57 +1,56 @@ #include <qlayout.h> #include <kconfig.h> #include "timespanview.h" #include "koglobals.h" #include "kotimespanview.h" -#include "kotimespanview.moc" KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent, const char *name) : KOEventView( calendar, parent, name ) { QBoxLayout *topLayout = new QVBoxLayout( this ); mTimeSpanView = new TimeSpanView( this ); topLayout->addWidget( mTimeSpanView ); connect( mTimeSpanView, SIGNAL( dateRangeChanged() ), SLOT( updateView() ) ); } KOTimeSpanView::~KOTimeSpanView() { } void KOTimeSpanView::readSettings() { readSettings(KOGlobals::config()); } void KOTimeSpanView::readSettings(KConfig *config) { // kdDebug() << "KOTimeSpanView::readSettings()" << endl; config->setGroup("Views"); QValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView"); if (sizes.count() == 2) { mTimeSpanView->setSplitterSizes(sizes); } } void KOTimeSpanView::writeSettings(KConfig *config) { // kdDebug() << "KOTimeSpanView::writeSettings()" << endl; config->setGroup("Views"); QValueList<int> list = mTimeSpanView->splitterSizes(); config->writeEntry("Separator TimeSpanView",list); } int KOTimeSpanView::maxDatesHint() { return 0; } diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 1c44f2b..abeb068 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -2,97 +2,96 @@ This file is part of KOrganizer. Copyright (c) 1997, 1998 Preston Brown Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qtooltip.h> #include <qframe.h> #include <qpixmap.h> #include <qlayout.h> #include <qhbox.h> #include <qdir.h> #include <qdatetime.h> #include <qapplication.h> #include <kiconloader.h> #include <klocale.h> #include <kfiledialog.h> #include <kstandarddirs.h> #include <kmessagebox.h> #include <libkdepim/categoryselectdialog.h> #include <libkcal/calendarlocal.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <libkcal/icalformat.h> #include <kresources/resourceselectdialog.h> #include "koprefs.h" #include "kotodoeditor.h" -#include "kotodoeditor.moc" extern int globalFlagBlockAgenda; KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent ) { mTodo = 0; mRelatedTodo = 0; findButton(User1)->hide(); init(); } KOTodoEditor::~KOTodoEditor() { emit dialogClose( mTodo ); } void KOTodoEditor::init() { setupGeneral(); setupAttendeesTab(); } void KOTodoEditor::setCategories( QString s ) { mGeneral->setCategories(s); } void KOTodoEditor::setSecrecy( int sec ) { mGeneral->setSecrecy( sec ); } void KOTodoEditor::reload() { if ( mTodo ) readTodo( mTodo ); } void KOTodoEditor::setupGeneral() { mGeneral = new KOEditorGeneralTodo(this); connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)), // mGeneral,SLOT(setCategories(const QString &))); if (KOPrefs::instance()->mCompactDialogs) { QFrame *topFrame = addPage(i18n("General")); QBoxLayout *topLayout = new QVBoxLayout(topFrame); if ( QApplication::desktop()->width() < 480 ) { diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 0708a69..d9e0a03 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -7,97 +7,96 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlayout.h> #include <qheader.h> #include <qcursor.h> #include <qvbox.h> #include <kdebug.h> #include "koprefs.h" #include <klocale.h> #include <kglobal.h> #include <kiconloader.h> #include <kmessagebox.h> #include <libkcal/icaldrag.h> #include <libkcal/vcaldrag.h> #include <libkcal/calfilter.h> #include <libkcal/dndfactory.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <kresources/resourceselectdialog.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #else #include <qapplication.h> #endif #ifndef KORG_NOPRINTER #include "calprinter.h" #endif #include "docprefs.h" #include "kotodoview.h" using namespace KOrg; -#include "kotodoview.moc" KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, const char *name) : KListView(parent,name) { mCalendar = calendar; #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); #endif mOldCurrent = 0; mMousePressed = false; setAcceptDrops(true); viewport()->setAcceptDrops(true); int size = 16; if (qApp->desktop()->width() < 300 ) size = 12; setTreeStepSize( size + 6 ); } void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) { #ifndef KORG_NODND // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && !QTextDrag::canDecode( e ) ) { e->ignore(); return; } mOldCurrent = currentItem(); #endif } void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) { #ifndef KORG_NODND // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && !QTextDrag::canDecode( e ) ) { e->ignore(); return; } e->accept(); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 88d69c6..fc2bc77 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -1,97 +1,96 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qwidgetstack.h> #include <kconfig.h> #include <kglobal.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #else #include <qapplication.h> #endif #include "calendarview.h" #include "datenavigator.h" #include "kotodoview.h" #include "koagendaview.h" #include "kodialogmanager.h" #include "komonthview.h" #include "kolistview.h" #include "kowhatsnextview.h" #include "kojournalview.h" #include "kotimespanview.h" #include "koprefs.h" #include "navigatorbar.h" #include "koviewmanager.h" -#include "koviewmanager.moc" //extern bool externFlagMonthviewBlockPainting; //bool globalFlagBlockPainting = false; int globalFlagBlockAgenda = 0; int globalFlagBlockLabel = 0; int globalFlagBlockAgendaItemPaint = 1; int globalFlagBlockAgendaItemUpdate = 1; KOViewManager::KOViewManager( CalendarView *mainView ) : QObject(), mMainView( mainView ) { mCurrentView = 0; mWhatsNextView = 0; mTodoView = 0; mAgendaView = 0; mMonthView = 0; mListView = 0; mJournalView = 0; mTimeSpanView = 0; mCurrentAgendaView = 0 ; mFlagShowNextxDays = false; } KOViewManager::~KOViewManager() { } KOrg::BaseView *KOViewManager::currentView() { return mCurrentView; } void KOViewManager::readSettings(KConfig *config) { config->setGroup("General"); QString view = config->readEntry("Current View"); if (view == "WhatsNext") showWhatsNextView(); else if (view == "Month") showMonthView(); else if (view == "List") showListView(); else if (view == "Journal") showJournalView(); else if (view == "TimeSpan") showTimeSpanView(); else if (view == "Todo") showTodoView(); else { showAgendaView(); } diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index ffaea37..0547a2e 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -1,93 +1,92 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qlayout.h> #include <qtextbrowser.h> #include <qtextcodec.h> #include <qfileinfo.h> #include <qlabel.h> #include <qapplication.h> #include <kglobal.h> #include <klocale.h> #include <kdebug.h> #include <kiconloader.h> #include <kmessagebox.h> #include <libkcal/calendar.h> #ifndef KORG_NOPRINTER #include "calprinter.h" #endif #include "koglobals.h" #include "koprefs.h" #include "koeventviewerdialog.h" #include "kowhatsnextview.h" using namespace KOrg; -#include "kowhatsnextview.moc" void WhatsNextTextBrowser::setSource(const QString& n) { if (n.startsWith("event:")) { emit showIncidence(n); return; } else if (n.startsWith("todo:")) { emit showIncidence(n); return; } else { QTextBrowser::setSource(n); } } KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, const char *name) : KOrg::BaseView(calendar, parent, name) { // mDateLabel = // new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this); // mDateLabel->setMargin(2); // mDateLabel->setAlignment(AlignCenter); setFont( KOPrefs::instance()->mWhatsNextFont ); mView = new WhatsNextTextBrowser(this); connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); mEventViewer = 0; QBoxLayout *topLayout = new QVBoxLayout(this); // topLayout->addWidget(mDateLabel); topLayout->addWidget(mView); } KOWhatsNextView::~KOWhatsNextView() { } int KOWhatsNextView::maxDatesHint() { return 0; } int KOWhatsNextView::currentDateCount() { return 0; } diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp index f9720f6..cf07a1a 100644 --- a/korganizer/ktimeedit.cpp +++ b/korganizer/ktimeedit.cpp @@ -1,86 +1,85 @@ /* This file is part of KOrganizer. Copyright (c) 1999 Preston Brown, Ian Dawes This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qkeycode.h> #include <qcombobox.h> #include <qdatetime.h> #include <qlineedit.h> #include <qapplication.h> #include <kmessagebox.h> #include <kglobal.h> #include <kdebug.h> #include <klocale.h> #include "ktimeedit.h" #include "koprefs.h" #include <qvalidator.h> -#include "ktimeedit.moc" // Validator for a time value with only hours and minutes (no seconds) // Mostly locale aware. Author: David Faure <faure@kde.org> class KOTimeValidator : public QValidator { public: KOTimeValidator(QWidget* parent, const char* name=0) : QValidator(parent, name) {} virtual State validate(QString& str, int& /*cursorPos*/) const { return Acceptable; bool ok = false; // TODO use KLocale::WithoutSeconds in HEAD /*QTime time =*/ KGlobal::locale()->readTime(str, &ok); if ( ok ) return Acceptable; // readTime doesn't help knowing when the string is "Intermediate". int length = str.length(); if ( !str ) // empty string? return Invalid; // there should always be a ':' in it, right? // HACK. Not fully locale aware etc. (esp. the separator is '.' in sv_SE...) QChar sep = ':'; // I want to allow "HH:", ":MM" and ":" to make editing easier if ( str[0] == sep ) { if ( length == 1 ) // just ":" return Intermediate; QString minutes = str.mid(1); int m = minutes.toInt(&ok); if ( ok && m >= 0 && m < 60 ) return Intermediate; } else if ( str.at(str.length()-1) == sep ) { QString hours = str.left(length-1); int h = hours.toInt(&ok); if ( ok && h >= 0 && h < 24 ) return Intermediate; } return Invalid; } }; // KTimeWidget/QTimeEdit provide nicer editing, but don't provide a combobox. // Difficult to get all in one... // But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help. KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) : QComboBox(TRUE, parent, name) { diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp index f1ff29f..e72e41c 100644 --- a/korganizer/lineview.cpp +++ b/korganizer/lineview.cpp @@ -1,56 +1,55 @@ #include <qpainter.h> #include <kdebug.h> #include "koprefs.h" #include "lineview.h" -#include "lineview.moc" LineView::LineView( QWidget *parent, const char *name ) : QScrollView( parent, name ) { mPixelWidth = 1000; mLines.setAutoDelete( true ); resizeContents( mPixelWidth, contentsHeight() ); viewport()->setBackgroundColor(KOPrefs::instance()->mAgendaBgColor); } LineView::~LineView() { } int LineView::pixelWidth() { return mPixelWidth; } void LineView::addLine( int start, int end ) { int count = mLines.count(); if( start < 0 ) start = 0; if( end > mPixelWidth) end = mPixelWidth; kdDebug() << "LineView::addLine() col: " << count << " start: " << start << " end: " << end << endl; mLines.append( new Line( count, start, end ) ); } void LineView::clear() { mLines.clear(); update(); } void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch) { // kdDebug() << "LineView::drawContents()" << endl; int mGridSpacingX = 10; int mGridSpacingY = 20; diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index 1052a99..f339c67 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -151,49 +151,48 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam mPrevMonth->setFocusPolicy(NoFocus); mNextMonth->setFocusPolicy(NoFocus); mNextYear->setFocusPolicy(NoFocus); mSelectMonth->setFocusPolicy(NoFocus); } NavigatorBar::~NavigatorBar() { } void NavigatorBar::selectMonth() { int month; KPopupFrame* popup = new KPopupFrame(this); int size = 12; if ( QApplication::desktop()->width() >= 480 ) size = 18; KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(size, popup); // ----- picker->resize(picker->sizeHint()); popup->setMainWidget(picker); picker->setFocus(); connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) { month = picker->getResult(); emit monthSelected ( month ); } else { KNotifyClient::beep(); } delete popup; } void NavigatorBar::selectDates( const KCal::DateList &dateList ) { if (dateList.count() > 0) { QDate date = dateList.first(); const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); // compute the label at the top of the navigator QString dtstr = i18n(calSys->monthName( date )) + " '" + QString::number( calSys->year( date ) ).right(2); mSelectMonth->setText( dtstr ); } } -#include "navigatorbar.moc" diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp index 4eb64f3..0fc90c4 100644 --- a/korganizer/outgoingdialog.cpp +++ b/korganizer/outgoingdialog.cpp @@ -346,49 +346,48 @@ void OutgoingDialog::loadMessages() case 1:method=Scheduler::Request; break; case 2:method=Scheduler::Refresh; break; case 3:method=Scheduler::Cancel; break; case 4:method=Scheduler::Add; break; case 5:method=Scheduler::Reply; break; case 6:method=Scheduler::Counter; break; case 7:method=Scheduler::Declinecounter; break; default :method=Scheduler::NoMethod; break; } begin_pos = messageString.find("RECIPIENTS-BEGIN:"); begin_pos = messageString.find('\n',begin_pos)+1; int end_pos = messageString.find(":RECIPIENTS-END",begin_pos)-1; recipients = messageString.mid(begin_pos, end_pos-begin_pos); kdDebug() << "Outgoing::loadMessage(): Recipients: " << recipients << endl; if (message) { bool inserted = false; QMap<IncidenceBase*, QString>::Iterator iter; for ( iter = mMessageMap.begin(); iter != mMessageMap.end(); ++iter ) { if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true; } if (!inserted) { kdDebug() << "OutgoingDialog::loadMessage(): got message '" << (*it) << "'" << endl; IncidenceBase *inc = message->event(); new ScheduleItemOut(mMessageListView,inc,method,recipients); mMessageMap[message->event()]=outgoingDirName + "/" + (*it); } } else { QString errorMessage; if (mFormat->exception()) { errorMessage = mFormat->exception()->message(); } kdDebug() << "OutgoingDialog::loadMessage(): Error parsing " "message: " << errorMessage << endl; } f.close(); } } } emit numMessagesChanged(mMessageListView->childCount()); } void OutgoingDialog::setDocumentId( const QString &id ) { mDocPrefs->setDoc( id ); } -#include "outgoingdialog.moc" diff --git a/korganizer/outgoingdialog_base.cpp b/korganizer/outgoingdialog_base.cpp index e5b913a..1873b44 100644 --- a/korganizer/outgoingdialog_base.cpp +++ b/korganizer/outgoingdialog_base.cpp @@ -60,50 +60,48 @@ OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, boo OutgoingDialog_baseLayout->addWidget( PushButton6, 3, 1 ); QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); OutgoingDialog_baseLayout->addItem( spacer, 2, 1 ); languageChange(); resize( QSize(582, 274).expandedTo(minimumSizeHint()) ); // signals and slots connections connect( PushButton6, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( PushButton5, SIGNAL( clicked() ), this, SLOT( send() ) ); connect( PushButton7, SIGNAL( clicked() ), this, SLOT( deleteItem() ) ); } /* * Destroys the object and frees any allocated resources */ OutgoingDialog_base::~OutgoingDialog_base() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void OutgoingDialog_base::languageChange() { setCaption( tr2i18n( "Scheduler - Outgoing Messages" ) ); mMessageListView->header()->setLabel( 0, tr2i18n( "Summary" ) ); mMessageListView->header()->setLabel( 1, tr2i18n( "Start Date" ) ); mMessageListView->header()->setLabel( 2, tr2i18n( "Start Time" ) ); mMessageListView->header()->setLabel( 3, tr2i18n( "End Date" ) ); mMessageListView->header()->setLabel( 4, tr2i18n( "End Time" ) ); mMessageListView->header()->setLabel( 5, tr2i18n( "Method" ) ); PushButton5->setText( tr2i18n( "&Send Messages" ) ); PushButton7->setText( tr2i18n( "&Remove" ) ); PushButton6->setText( tr2i18n( "&Close" ) ); } void OutgoingDialog_base::send() { qWarning( "OutgoingDialog_base::send(): Not implemented yet" ); } void OutgoingDialog_base::deleteItem() { qWarning( "OutgoingDialog_base::deleteItem(): Not implemented yet" ); } - -#include "outgoingdialog_base.moc" diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp index 176595a..4323b91 100644 --- a/korganizer/publishdialog.cpp +++ b/korganizer/publishdialog.cpp @@ -103,50 +103,48 @@ void PublishDialog::removeItem() mNameLineEdit->setEnabled(false); mEmailLineEdit->setEnabled(false); } } void PublishDialog::openAddressbook() { #ifndef KORG_NOKABC KABC::Addressee::List addressList; addressList = KABC::AddresseeDialog::getAddressees(this); //KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); KABC::Addressee a = addressList.first(); if (!a.isEmpty()) { uint i; for (i=0;i<addressList.count();i++) { a = addressList[i]; mNameLineEdit->setEnabled(true); mEmailLineEdit->setEnabled(true); QListViewItem *item = new QListViewItem(mAddressListView); mAddressListView->setSelected(item,true); mNameLineEdit->setText(a.realName()); mEmailLineEdit->setText(a.preferredEmail()); mAddressListView->insertItem(item); } } #endif } void PublishDialog::updateItem() { QListViewItem *item; item = mAddressListView->selectedItem(); if (!item) return; item->setText(0,mNameLineEdit->text()); item->setText(1,mEmailLineEdit->text()); } void PublishDialog::updateInput() { QListViewItem *item; item = mAddressListView->selectedItem(); if (!item) return; mNameLineEdit->setEnabled(true); mEmailLineEdit->setEnabled(true); QString mail = item->text(1); mNameLineEdit->setText(item->text(0)); mEmailLineEdit->setText(mail); } - -#include "publishdialog.moc" diff --git a/korganizer/publishdialog_base.cpp b/korganizer/publishdialog_base.cpp index 75e4746..683f7e9 100644 --- a/korganizer/publishdialog_base.cpp +++ b/korganizer/publishdialog_base.cpp @@ -113,50 +113,48 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool setTabOrder( PushButton9, PushButton8 ); } /* * Destroys the object and frees any allocated resources */ PublishDialog_base::~PublishDialog_base() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void PublishDialog_base::languageChange() { setCaption( tr2i18n( "Form1" ) ); mAddressListView->header()->setLabel( 0, tr2i18n( "Name" ) ); mAddressListView->header()->setLabel( 1, tr2i18n( "Email" ) ); TextLabel1->setText( tr2i18n( "Name:" ) ); TextLabel2->setText( tr2i18n( "Email:" ) ); PushButton10->setText( tr2i18n( "&New" ) ); PushButton12->setText( tr2i18n( "&Addressbook" ) ); PushButton11->setText( tr2i18n( "&Remove" ) ); PushButton9->setText( tr2i18n( "&OK" ) ); PushButton8->setText( tr2i18n( "&Cancel" ) ); } void PublishDialog_base::addItem() { qWarning( "PublishDialog_base::addItem(): Not implemented yet" ); } void PublishDialog_base::removeItem() { qWarning( "PublishDialog_base::removeItem(): Not implemented yet" ); } void PublishDialog_base::openAddressbook() { qWarning( "PublishDialog_base::openAddressbook(): Not implemented yet" ); } void PublishDialog_base::updateItem() { qWarning( "PublishDialog_base::updateItem(): Not implemented yet" ); } - -#include "publishdialog_base.moc" diff --git a/korganizer/savetemplatedialog.cpp b/korganizer/savetemplatedialog.cpp index 0da524f..3544081 100644 --- a/korganizer/savetemplatedialog.cpp +++ b/korganizer/savetemplatedialog.cpp @@ -1,76 +1,75 @@ /* This file is part of KOrganizer. Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlayout.h> #include <keditlistbox.h> #include <klocale.h> #include "koprefs.h" #include "savetemplatedialog.h" -#include "savetemplatedialog.moc" SaveTemplateDialog::SaveTemplateDialog( IncidenceType type, QWidget *parent ) : KDialogBase( Plain, i18n("Save Template"), Ok | Cancel, Ok, parent, 0, true, false ), mType( type ) { QFrame *topFrame = plainPage(); QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() ); mEditListBox = new KEditListBox( i18n("Select Template Name"), topFrame, 0, false, KEditListBox::Add | KEditListBox::Remove ); topLayout->addWidget( mEditListBox ); connect( mEditListBox, SIGNAL( changed() ), SLOT( slotChanged() ) ); QStringList templates; if ( mType == EventType ) { templates = KOPrefs::instance()->mEventTemplates; } else if( mType == TodoType ) { templates = KOPrefs::instance()->mTodoTemplates; } mEditListBox->insertStringList( templates ); } SaveTemplateDialog::~SaveTemplateDialog() { } void SaveTemplateDialog::slotOk() { emit templateSelected( mEditListBox->currentText() ); accept(); } void SaveTemplateDialog::slotChanged() { if ( mType == EventType ) { KOPrefs::instance()->mEventTemplates = mEditListBox->items(); } else if( mType == TodoType ) { KOPrefs::instance()->mTodoTemplates = mEditListBox->items(); } } diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 74d48b9..5bd7c6f 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -1,91 +1,90 @@ /* This file is part of KOrganizer. Copyright (c) 1998 Preston Brown Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qlayout.h> #include <qcheckbox.h> #include <qgroupbox.h> #include <qlabel.h> #include <qlineedit.h> #include <qpushbutton.h> #include <klocale.h> #include <kmessagebox.h> #include <libkdepim/kdateedit.h> #include "koglobals.h" #include "koprefs.h" #include "calendarview.h" #include "koviewmanager.h" #include "searchdialog.h" -#include "searchdialog.moc" SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) : KDialogBase(Plain,i18n("KO/Pi Find "),User1|Close,User1,parent,0,false,false, i18n("&Find")) { mCalendar = calendar; QFrame *topFrame = plainPage(); QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint()); // Search expression QHBoxLayout *subLayout = new QHBoxLayout(); layout->addLayout(subLayout); searchLabel = new QLabel(topFrame); searchLabel->setText(i18n("Search for:")); subLayout->addWidget(searchLabel); searchEdit = new QLineEdit(topFrame); subLayout->addWidget(searchEdit); searchEdit->setText("*"); // Find all events by default searchEdit->setFocus(); connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); // Subjects to search // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), // topFrame); QHBox *incidenceGroup = new QHBox( topFrame ); layout->addWidget(incidenceGroup); mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); mSearchEvent->setChecked(true); mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); QHBox *subjectGroup = new QHBox( topFrame ); layout->addWidget(subjectGroup); mSummaryCheck = new QCheckBox(i18n("Summaries"),subjectGroup); mSummaryCheck->setChecked(true); mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); QHBox *attendeeGroup = new QHBox( topFrame ); layout->addWidget(attendeeGroup ); new QLabel( i18n("Attendee:"),attendeeGroup ); diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp index 78efeb0..7137c49 100644 --- a/korganizer/statusdialog.cpp +++ b/korganizer/statusdialog.cpp @@ -1,67 +1,66 @@ /* This file is part of KOrganizer. Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qlabel.h> #include <qpushbutton.h> #include <qstringlist.h> #include <qlayout.h> #include <kdebug.h> #include <klocale.h> #include "statusdialog.h" -#include "statusdialog.moc" StatusDialog::StatusDialog(QWidget* parent, const char* name) : KDialog(parent,name,true) { setCaption(i18n("Set Your Status")); QBoxLayout *topLayout = new QVBoxLayout( this ); topLayout->setSpacing( spacingHint() ); topLayout->setMargin( marginHint() ); QBoxLayout *statusLayout = new QHBoxLayout( topLayout ); QLabel *text = new QLabel(i18n("Set your status"),this); statusLayout->addWidget( text ); mStatus = new QComboBox(false,this); mStatus->insertStringList(Attendee::statusList()); statusLayout->addWidget( mStatus ); QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); QPushButton *ok = new QPushButton(i18n("&OK"), this); connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) ); buttonLayout->addWidget( ok ); QPushButton *cancel = new QPushButton(i18n("&Cancel"), this); connect ( cancel,SIGNAL(clicked()), this,SLOT(reject()) ); buttonLayout->addWidget( cancel ); } StatusDialog::~StatusDialog() { } Attendee::PartStat StatusDialog::status() { return Attendee::PartStat( mStatus->currentItem() ) ; } diff --git a/korganizer/timeline.cpp b/korganizer/timeline.cpp index 6f9c8dd..11be432 100644 --- a/korganizer/timeline.cpp +++ b/korganizer/timeline.cpp @@ -1,54 +1,53 @@ #include <qpainter.h> #include <kdebug.h> #include "timeline.h" -#include "timeline.moc" TimeLine::TimeLine( QWidget *parent, const char *name ) : QScrollView( parent, name ) { mPixelWidth = 1000; resizeContents( mPixelWidth, 20 ); viewport()->setBackgroundMode( PaletteBackground ); setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); } TimeLine::~TimeLine() { } void TimeLine::drawContents(QPainter* p, int cx, int cy, int cw, int ch) { int spacingX = mDaySpacing; int offsetX = mDayOffset; // Draw vertical lines of grid // kdDebug() << "drawContents cx: " << cx << " cy: " << cy << " cw: " << cw << " ch: " << ch << endl; int cell = int( (cx - ( spacingX - offsetX ) ) / spacingX ); int x = cell * spacingX + ( spacingX - offsetX ); // kdDebug() << " x: " << x << endl; while (x < cx + cw) { // kdDebug() << " x: " << x << endl; p->drawLine(x,cy,x,cy+ch); p->drawText( x + 5, 15, QString::number( mStartDate.addDays( cell + 1 ).date().day() ) ); x += spacingX; cell++; } } void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end ) { mStartDate = start; mEndDate = end; mSecsPerPixel = mStartDate.secsTo( mEndDate ) / mPixelWidth; mDaySpacing = 60 * 60 * 24 / mSecsPerPixel; mDayOffset = QDateTime( mStartDate.date() ).secsTo( mStartDate ) / mSecsPerPixel; diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp index f8314e7..67a3811 100644 --- a/korganizer/timespanview.cpp +++ b/korganizer/timespanview.cpp @@ -1,67 +1,66 @@ #ifndef DESKTOP_VERSION #include <qksplitter.h> #else #include <qsplitter.h> #endif #include <qlistview.h> #include <qlayout.h> #include <qheader.h> #include <qpushbutton.h> #include <klocale.h> #include <kdebug.h> #include "lineview.h" #include "timeline.h" #include "timespanview.h" -#include "timespanview.moc" TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : QWidget( parent, name ) { QBoxLayout *topLayout = new QVBoxLayout( this ); #ifndef DESKTOP_VERSION mSplitter = new QKSplitter( this ); #else mSplitter = new QSplitter( this ); #endif topLayout->addWidget( mSplitter ); mList = new QListView( mSplitter ); mList->addColumn( i18n("Summary") ); QWidget *rightPane = new QWidget( mSplitter ); QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); mTimeLine = new TimeLine( rightPane ); mTimeLine->setFixedHeight( mList->header()->height() ); rightPaneLayout->addWidget( mTimeLine ); mLineView = new LineView( rightPane ); rightPaneLayout->addWidget( mLineView ); QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) ); buttonLayout->addWidget( zoomInButton ); QPushButton *zoomOutButton = new QPushButton( i18n("Zoom Out"), rightPane ); connect( zoomOutButton, SIGNAL( clicked() ), SLOT( zoomOut() ) ); buttonLayout->addWidget( zoomOutButton ); QPushButton *centerButton = new QPushButton( i18n("Center View"), rightPane ); connect( centerButton, SIGNAL( clicked() ), SLOT( centerView() ) ); buttonLayout->addWidget( centerButton ); connect(mLineView->horizontalScrollBar(),SIGNAL(valueChanged(int)), mTimeLine,SLOT(setContentsPos(int))); } TimeSpanView::~TimeSpanView() { } diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index dc198bd..32aac7a 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -378,49 +378,49 @@ void Calendar::removeRelations( Incidence *incidence ) i->setRelatedTo( 0 ); i->setRelatedToUid( uid ); } // If this incidence is related to something else, tell that about it if( incidence->relatedTo() ) incidence->relatedTo()->removeRelation( incidence ); // Remove this one from the orphans list if( mOrphanUids.remove( uid ) ) // This incidence is located in the orphans list - it should be removed if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) { // Removing wasn't that easy for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { if( it.current()->uid() == uid ) { mOrphans.remove( it.currentKey() ); break; } } } } void Calendar::registerObserver( Observer *observer ) { mObserver = observer; mNewObserver = true; } void Calendar::setModified( bool modified ) { if ( mObserver ) mObserver->calendarModified( modified, this ); if ( modified != mModified || mNewObserver ) { mNewObserver = false; // if ( mObserver ) mObserver->calendarModified( modified, this ); mModified = modified; } } void Calendar::setLoadedProductId( const QString &id ) { mLoadedProductId = id; } QString Calendar::loadedProductId() { return mLoadedProductId; } -#include "calendar.moc" +//#include "calendar.moc" |