summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp11
-rw-r--r--korganizer/filteredit_base.cpp73
-rw-r--r--korganizer/filteredit_base.h18
-rw-r--r--korganizer/filteredit_base.ui123
-rw-r--r--korganizer/korganizer.pro4
-rw-r--r--libkcal/calfilter.h2
-rw-r--r--libkdepim/ksyncmanager.cpp10
-rw-r--r--libkdepim/ksyncmanager.h4
8 files changed, 170 insertions, 75 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 378c7d4..8258c74 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -951,96 +951,107 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( eventR ) {
eventRSync = (Event*) eventR->clone();
remote->deleteEvent(eventR );
} else {
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) {
eventRSync = (Event*)eventLSync->clone();
} else {
fullDateRange = true;
eventRSync = new Event();
eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event"));
eventRSync->setUid("last-syncEvent-"+mCurrentSyncName );
eventRSync->setDtStart( mLastCalendarSync );
eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
eventRSync->setCategories( i18n("SyncEvent") );
}
}
if ( eventLSync->dtStart() == mLastCalendarSync )
fullDateRange = true;
if ( ! fullDateRange ) {
if ( eventLSync->dtStart() != eventRSync->dtStart() ) {
// qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() );
//qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec());
fullDateRange = true;
}
}
if ( mSyncManager->syncWithDesktop() ) {
fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync );
}
if ( fullDateRange )
mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365);
else
mLastCalendarSync = eventLSync->dtStart();
// for resyncing if own file has changed
if ( mCurrentSyncDevice == "deleteaftersync" ) {
mLastCalendarSync = loadedFileVersion;
//qDebug("setting mLastCalendarSync ");
}
//qDebug("*************************** ");
qDebug("mLastCalendarSync %s full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
QPtrList<Incidence> er = remote->rawIncidences();
Incidence* inR = er.first();
Incidence* inL;
QProgressBar bar( er.count(),0 );
bar.setCaption (i18n("Syncing - close to abort!") );
+ // ************** setting up filter *************
+ CalFilter *filterIN = 0;
+ CalFilter *filterOUT = 0;
+ CalFilter *filter = mFilters.first();
+ while(filter) {
+ if ( filter->name() == mSyncManager->mFilterInCal )
+ filterIN = filter;
+ if ( filter->name() == mSyncManager->mFilterOutCal )
+ filterOUT = filter;
+ filter = mFilters.next();
+ }
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar.sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
bar.show();
int modulo = (er.count()/10)+1;
int incCounter = 0;
while ( inR ) {
if ( ! bar.isVisible() )
return false;
if ( incCounter % modulo == 0 )
bar.setProgress( incCounter );
++incCounter;
uid = inR->uid();
bool skipIncidence = false;
if ( uid.left(15) == QString("last-syncEvent-") )
skipIncidence = true;
QString idS;
qApp->processEvents();
if ( !skipIncidence ) {
inL = local->incidence( uid );
if ( inL ) { // maybe conflict - same uid in both calendars
if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
//qDebug("take %d %s ", take, inL->summary().latin1());
if ( take == 3 )
return false;
if ( take == 1 ) {// take local **********************
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
else
idS = inR->IDStr();
remote->deleteIncidence( inR );
inR = inL->clone();
inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL )
inR->setIDStr( idS );
remote->addIncidence( inR );
if ( mSyncManager->syncWithDesktop() )
inR->setPilotId( 2 );
++changedRemote;
} else {// take remote **********************
idS = inL->IDStr();
int pid = inL->pilotId();
local->deleteIncidence( inL );
inL = inR->clone();
diff --git a/korganizer/filteredit_base.cpp b/korganizer/filteredit_base.cpp
index 21a0954..e724da4 100644
--- a/korganizer/filteredit_base.cpp
+++ b/korganizer/filteredit_base.cpp
@@ -1,128 +1,145 @@
/****************************************************************************
** Form implementation generated from reading ui file 'filteredit_base.ui'
**
-** Created: Di Mai 4 15:30:31 2004
+** Created: So Jan 16 11:23:21 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "filteredit_base.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qframe.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qlistbox.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
+#include "filteredit_base.ui.h"
/*
* Constructs a FilterEdit_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "FilterEdit_base" );
FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout");
mCriteriaFrame = new QFrame( this, "mCriteriaFrame" );
mCriteriaFrame->setFrameShape( QFrame::StyledPanel );
mCriteriaFrame->setFrameShadow( QFrame::Raised );
- mCriteriaFrameLayout = new QGridLayout( mCriteriaFrame, 1, 1, 3, 2, "mCriteriaFrameLayout");
+ mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout");
ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" );
ButtonGroup1->setColumnLayout(0, Qt::Vertical );
ButtonGroup1->layout()->setSpacing( 6 );
- ButtonGroup1->layout()->setMargin( 11 );
- ButtonGroup1Layout = new QVBoxLayout( ButtonGroup1->layout() );
+ ButtonGroup1->layout()->setMargin( 6 );
+ ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
ButtonGroup1Layout->setAlignment( Qt::AlignTop );
+ layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
+
mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" );
- ButtonGroup1Layout->addWidget( mCatShowCheck );
+ layout4->addWidget( mCatShowCheck );
mCatHideCheck = new QRadioButton( ButtonGroup1, "mCatHideCheck" );
- ButtonGroup1Layout->addWidget( mCatHideCheck );
-
- mCatList = new QListBox( ButtonGroup1, "mCatList" );
- ButtonGroup1Layout->addWidget( mCatList );
+ layout4->addWidget( mCatHideCheck );
mCatEditButton = new QPushButton( ButtonGroup1, "mCatEditButton" );
- ButtonGroup1Layout->addWidget( mCatEditButton );
+ layout4->addWidget( mCatEditButton );
- mCriteriaFrameLayout->addWidget( ButtonGroup1, 0, 0 );
+ ButtonGroup1Layout->addLayout( layout4, 0, 0 );
- layout1 = new QHBoxLayout( 0, 0, 0, "layout1");
+ mCatList = new QListBox( ButtonGroup1, "mCatList" );
+
+ ButtonGroup1Layout->addWidget( mCatList, 1, 0 );
+ mCriteriaFrameLayout->addWidget( ButtonGroup1 );
+
+ layout7 = new QHBoxLayout( 0, 0, 6, "layout7");
textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" );
- layout1->addWidget( textLabel1 );
+ layout7->addWidget( textLabel1 );
mRecurringCheck = new QCheckBox( mCriteriaFrame, "mRecurringCheck" );
- layout1->addWidget( mRecurringCheck );
+ layout7->addWidget( mRecurringCheck );
mCompletedCheck = new QCheckBox( mCriteriaFrame, "mCompletedCheck" );
- layout1->addWidget( mCompletedCheck );
+ layout7->addWidget( mCompletedCheck );
+ mCriteriaFrameLayout->addLayout( layout7 );
+
+ layout9 = new QHBoxLayout( 0, 0, 6, "layout9");
- mCriteriaFrameLayout->addLayout( layout1, 1, 0 );
+ textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" );
+ layout9->addWidget( textLabel1_2 );
+
+ mEventCheck = new QCheckBox( mCriteriaFrame, "mEventCheck" );
+ layout9->addWidget( mEventCheck );
+
+ mTodoCheck = new QCheckBox( mCriteriaFrame, "mTodoCheck" );
+ layout9->addWidget( mTodoCheck );
+
+ mJournalCheck = new QCheckBox( mCriteriaFrame, "mJournalCheck" );
+ layout9->addWidget( mJournalCheck );
+ mCriteriaFrameLayout->addLayout( layout9 );
layout2 = new QHBoxLayout( 0, 0, 0, "layout2");
textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" );
layout2->addWidget( textLabel2 );
mPublicCheck = new QCheckBox( mCriteriaFrame, "mPublicCheck" );
layout2->addWidget( mPublicCheck );
mPrivateCheck = new QCheckBox( mCriteriaFrame, "mPrivateCheck" );
layout2->addWidget( mPrivateCheck );
mConfidentialCheck = new QCheckBox( mCriteriaFrame, "mConfidentialCheck" );
mConfidentialCheck->setChecked( FALSE );
layout2->addWidget( mConfidentialCheck );
-
- mCriteriaFrameLayout->addLayout( layout2, 2, 0 );
+ mCriteriaFrameLayout->addLayout( layout2 );
FilterEdit_baseLayout->addWidget( mCriteriaFrame );
languageChange();
- resize( QSize(284, 241).expandedTo(minimumSizeHint()) );
+ resize( QSize(351, 275).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
}
/*
* Destroys the object and frees any allocated resources
*/
FilterEdit_base::~FilterEdit_base()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void FilterEdit_base::languageChange()
{
setCaption( tr( "FilterEditor" ) );
ButtonGroup1->setTitle( tr( "Categories" ) );
- mCatShowCheck->setText( tr( "Show only selected" ) );
- mCatHideCheck->setText( tr( "Show all but selected" ) );
+ mCatShowCheck->setText( tr( "Include" ) );
+ mCatHideCheck->setText( tr( "Exclude" ) );
mCatEditButton->setText( tr( "Edit Selection..." ) );
- textLabel1->setText( tr( "Hide" ) );
+ textLabel1->setText( tr( "Exclude" ) );
mRecurringCheck->setText( tr( "recurring events" ) );
mCompletedCheck->setText( tr( "completed to-dos" ) );
- textLabel2->setText( tr( "Show" ) );
+ textLabel1_2->setText( tr( "Exclude" ) );
+ mEventCheck->setText( tr( "events" ) );
+ mTodoCheck->setText( tr( "todos" ) );
+ mJournalCheck->setText( tr( "journals" ) );
+ textLabel2->setText( tr( "Include" ) );
mPublicCheck->setText( tr( "public" ) );
mPrivateCheck->setText( tr( "private" ) );
mConfidentialCheck->setText( tr( "confidential" ) );
}
-void FilterEdit_base::updateFilter()
-{
- qWarning( "FilterEdit_base::updateFilter(): Not implemented yet" );
-}
-
diff --git a/korganizer/filteredit_base.h b/korganizer/filteredit_base.h
index 664598a..0c2988a 100644
--- a/korganizer/filteredit_base.h
+++ b/korganizer/filteredit_base.h
@@ -1,66 +1,72 @@
/****************************************************************************
** Form interface generated from reading ui file 'filteredit_base.ui'
**
-** Created: Di Mai 4 15:24:50 2004
+** Created: So Jan 16 11:23:21 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef FILTEREDIT_BASE_H
#define FILTEREDIT_BASE_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QFrame;
class QButtonGroup;
class QRadioButton;
+class QPushButton;
class QListBox;
class QListBoxItem;
-class QPushButton;
class QLabel;
class QCheckBox;
class FilterEdit_base : public QWidget
{
Q_OBJECT
public:
FilterEdit_base( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~FilterEdit_base();
QFrame* mCriteriaFrame;
QButtonGroup* ButtonGroup1;
QRadioButton* mCatShowCheck;
QRadioButton* mCatHideCheck;
- QListBox* mCatList;
QPushButton* mCatEditButton;
+ QListBox* mCatList;
QLabel* textLabel1;
QCheckBox* mRecurringCheck;
QCheckBox* mCompletedCheck;
+ QLabel* textLabel1_2;
+ QCheckBox* mEventCheck;
+ QCheckBox* mTodoCheck;
+ QCheckBox* mJournalCheck;
QLabel* textLabel2;
QCheckBox* mPublicCheck;
QCheckBox* mPrivateCheck;
QCheckBox* mConfidentialCheck;
public slots:
virtual void updateFilter();
protected:
QVBoxLayout* FilterEdit_baseLayout;
- QGridLayout* mCriteriaFrameLayout;
- QVBoxLayout* ButtonGroup1Layout;
- QHBoxLayout* layout1;
+ QVBoxLayout* mCriteriaFrameLayout;
+ QGridLayout* ButtonGroup1Layout;
+ QHBoxLayout* layout4;
+ QHBoxLayout* layout7;
+ QHBoxLayout* layout9;
QHBoxLayout* layout2;
protected slots:
virtual void languageChange();
};
#endif // FILTEREDIT_BASE_H
diff --git a/korganizer/filteredit_base.ui b/korganizer/filteredit_base.ui
index b7cbb59..2436f57 100644
--- a/korganizer/filteredit_base.ui
+++ b/korganizer/filteredit_base.ui
@@ -1,201 +1,250 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>FilterEdit_base</class>
<widget class="QWidget">
<property name="name">
<cstring>FilterEdit_base</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>284</width>
- <height>241</height>
+ <width>351</width>
+ <height>275</height>
</rect>
</property>
<property name="caption">
<string>FilterEditor</string>
</property>
<property name="layoutMargin" stdset="0">
</property>
<property name="layoutSpacing" stdset="0">
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QFrame">
<property name="name">
<cstring>mCriteriaFrame</cstring>
</property>
<property name="frameShape">
<enum>StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>Raised</enum>
</property>
<property name="layoutMargin" stdset="0">
</property>
- <grid>
+ <vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>3</number>
</property>
<property name="spacing">
<number>2</number>
</property>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="QButtonGroup">
<property name="name">
<cstring>ButtonGroup1</cstring>
</property>
<property name="title">
<string>Categories</string>
</property>
- <vbox>
+ <grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
- <number>11</number>
+ <number>6</number>
</property>
<property name="spacing">
<number>6</number>
</property>
- <widget class="QRadioButton">
+ <widget class="QLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>mCatShowCheck</cstring>
- </property>
- <property name="text">
- <string>Show only selected</string>
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>mCatShowCheck</cstring>
+ </property>
+ <property name="text">
+ <string>Include</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>mCatHideCheck</cstring>
+ </property>
+ <property name="text">
+ <string>Exclude</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>mCatEditButton</cstring>
+ </property>
+ <property name="text">
+ <string>Edit Selection...</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QListBox" row="1" column="0">
+ <property name="name">
+ <cstring>mCatList</cstring>
</property>
</widget>
- <widget class="QRadioButton">
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
<property name="name">
- <cstring>mCatHideCheck</cstring>
+ <cstring>textLabel1</cstring>
</property>
<property name="text">
- <string>Show all but selected</string>
+ <string>Exclude</string>
</property>
</widget>
- <widget class="QListBox">
+ <widget class="QCheckBox">
<property name="name">
- <cstring>mCatList</cstring>
+ <cstring>mRecurringCheck</cstring>
+ </property>
+ <property name="text">
+ <string>recurring events</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="QCheckBox">
<property name="name">
- <cstring>mCatEditButton</cstring>
+ <cstring>mCompletedCheck</cstring>
</property>
<property name="text">
- <string>Edit Selection...</string>
+ <string>completed to-dos</string>
</property>
</widget>
- </vbox>
+ </hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>layout9</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>0</number>
- </property>
<widget class="QLabel">
<property name="name">
- <cstring>textLabel1</cstring>
+ <cstring>textLabel1_2</cstring>
</property>
<property name="text">
- <string>Hide</string>
+ <string>Exclude</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
- <cstring>mRecurringCheck</cstring>
+ <cstring>mEventCheck</cstring>
</property>
<property name="text">
- <string>recurring events</string>
+ <string>events</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
- <cstring>mCompletedCheck</cstring>
+ <cstring>mTodoCheck</cstring>
</property>
<property name="text">
- <string>completed to-dos</string>
+ <string>todos</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>mJournalCheck</cstring>
+ </property>
+ <property name="text">
+ <string>journals</string>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="QLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
- <string>Show</string>
+ <string>Include</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>mPublicCheck</cstring>
</property>
<property name="text">
<string>public</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>mPrivateCheck</cstring>
</property>
<property name="text">
<string>private</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>mConfidentialCheck</cstring>
</property>
<property name="text">
<string>confidential</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</hbox>
</widget>
- </grid>
+ </vbox>
</widget>
</vbox>
</widget>
+<includes>
+ <include location="local" impldecl="in implementation">filteredit_base.ui.h</include>
+</includes>
<slots>
<slot>updateFilter()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index 2816c6e..628d84e 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,97 +1,97 @@
TEMPLATE = app
CONFIG = qt warn_on
TARGET = kopi
OBJECTS_DIR = _obj/
MOC_DIR = _moc
DESTDIR= ../bin
include( ../variables.pri )
INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim
#../qtcompat
DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL
DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
#KORG_NOPRINTER KORG_NOKABC
DEFINES += KORG_NOLVALTERNATION
DEFINES += DESKTOP_VERSION
unix : {
LIBS += ../bin/libmicrokdepim.so
LIBS += ../bin/libmicrokcal.so
LIBS += ../bin/libmicrokde.so
LIBS += ../bin/libmicrokabc.so
#LIBS += -lbluetooth
#LIBS += -lsdp
#LIBS += -lldap
OBJECTS_DIR = obj/unix
MOC_DIR = moc/unix
}
win32: {
RC_FILE = winicons.rc
DEFINES += _WIN32_
LIBS += ../bin/microkdepim.lib
LIBS += ../bin/microkcal.lib
LIBS += ../bin/microkde.lib
LIBS += ../bin/microkabc.lib
LIBS += ../libical/lib/ical.lib
LIBS += ../libical/lib/icalss.lib
#LIBS += atls.lib
LIBS += mfc71u.lib
QMAKE_LINK += /NODEFAULTLIB:LIBC
#QMAKE_LINK += /NODEFAULTLIB:MSVCRT
#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib
OBJECTS_DIR = obj/win
MOC_DIR = moc/win
}
-INTERFACES = kofilterview_base.ui
-# filteredit_base.ui
+INTERFACES = kofilterview_base.ui
+# filteredit_base.ui
# kdateedit.h \
HEADERS = \
filteredit_base.h \
alarmclient.h \
calendarview.h \
customlistviewitem.h \
datenavigator.h \
docprefs.h \
filtereditdialog.h \
incomingdialog.h \
incomingdialog_base.h \
interfaces/korganizer/baseview.h \
interfaces/korganizer/calendarviewbase.h \
journalentry.h \
kdatenavigator.h \
koagenda.h \
koagendaitem.h \
koagendaview.h \
kocounterdialog.h \
kodaymatrix.h \
kodialogmanager.h \
koeditordetails.h \
koeditorgeneral.h \
koeditorgeneralevent.h \
koeditorgeneraltodo.h \
koeditorrecurrence.h \
koeventeditor.h \
koeventpopupmenu.h \
koeventview.h \
koeventviewer.h \
koeventviewerdialog.h \
kofilterview.h \
koglobals.h \
koincidenceeditor.h \
kojournalview.h \
kolistview.h \
kolocationbox.h \
komonthview.h \
koprefs.h \
koprefsdialog.h \
kotimespanview.h \
kotodoeditor.h \
kotodoview.h \
kotodoviewitem.h \
koviewmanager.h \
kowhatsnextview.h \
diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h
index d6d4717..5ad0064 100644
--- a/libkcal/calfilter.h
+++ b/libkcal/calfilter.h
@@ -57,72 +57,72 @@ class CalFilter {
void apply(QPtrList<Event> *eventlist);
/**
Apply filter to todolist, all todos not matching filter criterias are
removed from the list.
*/
void apply(QPtrList<Todo> *todolist);
/**
Apply filter criteria on the specified event. Return true, if event passes
criteria, otherwise return false.
*/
bool filterEvent(Event *);
/**
Apply filter criteria on the specified todo. Return true, if event passes
criteria, otherwise return false.
*/
bool filterTodo(Todo *);
/**
Apply filter criteria on the specified incidence. Return true, if event passes
criteria, otherwise return false.
*/
bool filterIncidence(Incidence *);
/**
Enable or disable filter.
*/
void setEnabled(bool);
/**
Return wheter the filter is enabled or not.
*/
bool isEnabled();
bool showCategories();
int getSecrecy();
/**
Set list of categories, which is used for showing/hiding categories of
events.
See related functions.
*/
void setCategoryList(const QStringList &);
/**
Return category list, used for showing/hiding categories of events.
See related functions.
*/
QStringList categoryList();
- enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4 ,ShowPublic = 8, ShowPrivate = 16, ShowConfidential = 32 };
+ enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4 ,ShowPublic = 8, ShowPrivate = 16, ShowConfidential = 32, HideEvents = 64, HideTodos = 128, HideJournals = 256 };
/**
Set criteria, which have to be fulfilled by events passing the filter.
*/
void setCriteria(int);
/**
Get inclusive filter criteria.
*/
int criteria();
private:
QString mName;
int mCriteria;
bool mEnabled;
QStringList mCategoryList;
};
}
#endif /* _CALFILTER_H */
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 33b4a65..6c1f444 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -207,97 +207,101 @@ void KSyncManager::slotSyncMenu( int action )
enableQuick();
QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
return;
}
if ( action == 3 ) {
delete mServerSocket;
mServerSocket = 0;
QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
return;
}
if (blockSave())
return;
setBlockSave(true);
bool silent = false;
if ( action == 999 ) {
//special mode for silent syncing
action = 1000;
silent = true;
}
mCurrentSyncProfile = action - 1000 ;
mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ;
mCurrentSyncName = mLocalMachineName ;
KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
KSyncProfile* temp = new KSyncProfile ();
temp->setName(mSyncProfileNames[mCurrentSyncProfile]);
temp->readConfig(&config);
if (silent) {
mAskForPreferences = false;
mShowSyncSummary = false;
mWriteBackFile = true;
mSyncAlgoPrefs = 2;// take newest
}
else {
mAskForPreferences = temp->getAskForPreferences();
mShowSyncSummary = temp->getShowSummaryAfterSync();
mWriteBackFile = temp->getWriteBackFile();
mSyncAlgoPrefs = temp->getSyncPrefs();
}
mWriteBackExistingOnly = temp->getWriteBackExisting();
mIsKapiFile = temp->getIsKapiFile();
mWriteBackInFuture = 0;
if ( temp->getWriteBackFuture() ) {
mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
mWriteBackInPast = temp->getWriteBackPastWeeks( );
}
-
+ mFilterInCal = temp->getFilterInCal();
+ mFilterOutCal = temp->getFilterOutCal();
+ mFilterInAB = temp->getFilterInAB();
+ mFilterOutAB = temp->getFilterOutAB();
+
if ( action == 1000 ) {
mIsKapiFile = false;
#ifdef DESKTOP_VERSION
syncKDE();
#else
syncSharp();
#endif
} else if ( action == 1001 ) {
syncLocalFile();
} else if ( action == 1002 ) {
mWriteBackFile = false;
mAskForPreferences = false;
mShowSyncSummary = false;
mSyncAlgoPrefs = 3;
quickSyncLocalFile();
} else if ( action >= 1003 ) {
if ( temp->getIsLocalFileSync() ) {
switch(mTargetApp)
{
case (KAPI):
if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
break;
case (KOPI):
if ( syncWithFile( temp->getRemoteFileName( ), false ) )
mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
break;
case (PWMPI):
if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
break;
default:
qDebug("KSyncManager::slotSyncMenu: invalid apptype selected");
break;
}
} else {
if ( temp->getIsPhoneSync() ) {
mPhoneDevice = temp->getPhoneDevice( ) ;
mPhoneConnection = temp->getPhoneConnection( );
mPhoneModel = temp->getPhoneModel( );
syncPhone();
} else if ( temp->getIsPiSync() ) {
if ( mTargetApp == KAPI ) {
mPassWordPiSync = temp->getRemotePwAB();
@@ -539,96 +543,100 @@ void KSyncManager::multiSync( bool askforPrefs )
int KSyncManager::ringSync()
{
int syncedProfiles = 0;
unsigned int i;
QTime timer;
KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
QStringList syncProfileNames = mSyncProfileNames;
KSyncProfile* temp = new KSyncProfile ();
mAskForPreferences = false;
for ( i = 0; i < syncProfileNames.count(); ++i ) {
mCurrentSyncProfile = i;
temp->setName(syncProfileNames[mCurrentSyncProfile]);
temp->readConfig(&config);
bool includeInRingSync;
switch(mTargetApp)
{
case (KAPI):
includeInRingSync = temp->getIncludeInRingSyncAB();
break;
case (KOPI):
includeInRingSync = temp->getIncludeInRingSync();
break;
case (PWMPI):
includeInRingSync = temp->getIncludeInRingSyncPWM();
break;
default:
qDebug("KSyncManager::ringSync: invalid apptype selected");
break;
}
if ( includeInRingSync && ( i < 1 || i > 2 )) {
mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
++syncedProfiles;
mSyncWithDesktop = false;
// mAskForPreferences = temp->getAskForPreferences();
mWriteBackFile = temp->getWriteBackFile();
mWriteBackExistingOnly = temp->getWriteBackExisting();
mIsKapiFile = temp->getIsKapiFile();
mWriteBackInFuture = 0;
if ( temp->getWriteBackFuture() ) {
mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
mWriteBackInPast = temp->getWriteBackPastWeeks( );
}
+ mFilterInCal = temp->getFilterInCal();
+ mFilterOutCal = temp->getFilterOutCal();
+ mFilterInAB = temp->getFilterInAB();
+ mFilterOutAB = temp->getFilterOutAB();
mShowSyncSummary = false;
mCurrentSyncDevice = syncProfileNames[i] ;
mCurrentSyncName = mLocalMachineName;
if ( i == 0 ) {
mIsKapiFile = false;
#ifdef DESKTOP_VERSION
syncKDE();
#else
syncSharp();
#endif
} else {
if ( temp->getIsLocalFileSync() ) {
switch(mTargetApp)
{
case (KAPI):
if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
break;
case (KOPI):
if ( syncWithFile( temp->getRemoteFileName( ), false ) )
mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
break;
case (PWMPI):
if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
break;
default:
qDebug("KSyncManager::slotSyncMenu: invalid apptype selected");
break;
}
} else {
if ( temp->getIsPhoneSync() ) {
mPhoneDevice = temp->getPhoneDevice( ) ;
mPhoneConnection = temp->getPhoneConnection( );
mPhoneModel = temp->getPhoneModel( );
syncPhone();
} else if ( temp->getIsPiSync() ) {
if ( mTargetApp == KAPI ) {
mPassWordPiSync = temp->getRemotePwAB();
mActiveSyncPort = temp->getRemotePortAB();
mActiveSyncIP = temp->getRemoteIPAB();
} else if ( mTargetApp == KOPI ) {
mPassWordPiSync = temp->getRemotePw();
mActiveSyncPort = temp->getRemotePort();
mActiveSyncIP = temp->getRemoteIP();
} else {
mPassWordPiSync = temp->getRemotePwPWM();
mActiveSyncPort = temp->getRemotePortPWM();
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 2d0a4ab..6d89950 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -103,96 +103,100 @@ class KCommandSocket : public QObject
class KSyncManager : public QObject
{
Q_OBJECT
public:
enum TargetApp {
KOPI = 0,
KAPI = 1,
PWMPI = 2 };
KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu);
~KSyncManager() ;
void multiSync( bool askforPrefs );
bool blockSave() { return mBlockSaveFlag; }
void setBlockSave(bool sa) { mBlockSaveFlag = sa; }
void setDefaultFileName( QString s) { mDefFileName = s ;}
QString defaultFileName() { return mDefFileName ;}
QString syncFileName();
void enableQuick( bool ask = true);
bool syncWithDesktop () { return mSyncWithDesktop;}
QString getCurrentSyncDevice() { return mCurrentSyncDevice; }
QString getCurrentSyncName() { return mCurrentSyncName; }
void showProgressBar(int percentage, QString caption = QString::null, int total=100);
void hideProgressBar();
bool isProgressBarCanceled();
// sync stuff
QString mLocalMachineName;
QStringList mExternSyncProfiles;
QStringList mSyncProfileNames;
bool mAskForPreferences;
bool mShowSyncSummary;
bool mIsKapiFile;
bool mWriteBackExistingOnly;
int mSyncAlgoPrefs;
bool mWriteBackFile;
int mWriteBackInFuture;
int mWriteBackInPast;
QString mPhoneDevice;
QString mPhoneConnection;
QString mPhoneModel;
QString mPassWordPiSync;
QString mActiveSyncPort;
QString mActiveSyncIP ;
+ QString mFilterInCal;
+ QString mFilterOutCal;
+ QString mFilterInAB;
+ QString mFilterOutAB;
static QDateTime mRequestedSyncEvent;
signals:
void save();
void request_file();
void getFile( bool );
public slots:
void slotSyncMenu( int );
void slotClearMenu( int action );
void deleteCommandSocket(KCommandSocket*s, int state);
void readFileFromSocket();
void fillSyncMenu();
private:
void syncPi();
KServerSocket * mServerSocket;
KPimPrefs* mPrefs;
QString mDefFileName;
QString mCurrentSyncDevice;
QString mCurrentSyncName;
void quickSyncLocalFile();
bool syncWithFile( QString fn , bool quick );
void syncLocalFile();
void syncPhone();
void syncSharp();
void syncKDE();
bool syncExternalApplication(QString);
int mCurrentSyncProfile ;
void syncRemote( KSyncProfile* prof, bool ask = true);
bool edit_sync_options();
bool edit_pisync_options();
int ringSync();
QString getPassword( );
bool mPisyncFinished;
bool mBlockSaveFlag;
QWidget* mParent;
KSyncInterface* mImplementation;
TargetApp mTargetApp;
QPopupMenu* mSyncMenu;
QProgressBar* bar;
bool mSyncWithDesktop;
private slots:
void confSync();
};