-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | korganizer/filteredit_base.cpp | 73 | ||||
-rw-r--r-- | korganizer/filteredit_base.h | 18 | ||||
-rw-r--r-- | korganizer/filteredit_base.ui | 123 | ||||
-rw-r--r-- | korganizer/korganizer.pro | 4 | ||||
-rw-r--r-- | libkcal/calfilter.h | 2 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 10 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 4 |
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 @@ -993,12 +993,23 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int 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(); 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,10 +1,10 @@ /**************************************************************************** ** 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" @@ -17,12 +17,13 @@ #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 ) @@ -32,47 +33,65 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) 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 ); @@ -82,17 +101,16 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) 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 */ @@ -106,23 +124,22 @@ FilterEdit_base::~FilterEdit_base() * 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,10 +1,10 @@ /**************************************************************************** ** 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 @@ -17,15 +17,15 @@ 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 @@ -35,30 +35,36 @@ public: ~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(); }; 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 @@ -5,14 +5,14 @@ <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"> @@ -38,111 +38,157 @@ </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> @@ -155,13 +201,13 @@ </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> @@ -187,15 +233,18 @@ <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 @@ -42,14 +42,14 @@ QMAKE_LINK += /NODEFAULTLIB:LIBC #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 \ diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h index d6d4717..5ad0064 100644 --- a/libkcal/calfilter.h +++ b/libkcal/calfilter.h @@ -99,13 +99,13 @@ class CalFilter { /** 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); /** diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 33b4a65..6c1f444 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -249,13 +249,17 @@ void KSyncManager::slotSyncMenu( int action ) 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(); @@ -581,12 +585,16 @@ int KSyncManager::ringSync() 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 diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 2d0a4ab..6d89950 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -145,12 +145,16 @@ class KSyncManager : public QObject 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 ); |