summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-11 06:57:58 (UTC)
committer zautrix <zautrix>2005-06-11 06:57:58 (UTC)
commit53c616e1fe8855211377aab41b3359df5fea456c (patch) (unidiff)
tree1125bd437738f0bb414486857e14dad6b7bcfa48
parente7ff7858eb79a452b65b77f8bf5ee108503f432a (diff)
downloadkdepimpi-53c616e1fe8855211377aab41b3359df5fea456c.zip
kdepimpi-53c616e1fe8855211377aab41b3359df5fea456c.tar.gz
kdepimpi-53c616e1fe8855211377aab41b3359df5fea456c.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/bell.pngbin234 -> 639 bytes
-rw-r--r--bin/kdepim/korganizer/icons16/trash.pngbin0 -> 626 bytes
-rw-r--r--bin/kdepim/korganizer/trash.pngbin0 -> 626 bytes
-rw-r--r--korganizer/calendarview.cpp7
-rw-r--r--korganizer/calendarview.h2
-rw-r--r--korganizer/kofilterview.cpp64
-rw-r--r--korganizer/kofilterview.h11
7 files changed, 78 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/bell.png b/bin/kdepim/korganizer/bell.png
index 8d2415b..46ab9e3 100644
--- a/bin/kdepim/korganizer/bell.png
+++ b/bin/kdepim/korganizer/bell.png
Binary files differ
diff --git a/bin/kdepim/korganizer/icons16/trash.png b/bin/kdepim/korganizer/icons16/trash.png
new file mode 100644
index 0000000..ee5304a
--- a/dev/null
+++ b/bin/kdepim/korganizer/icons16/trash.png
Binary files differ
diff --git a/bin/kdepim/korganizer/trash.png b/bin/kdepim/korganizer/trash.png
new file mode 100644
index 0000000..ee5304a
--- a/dev/null
+++ b/bin/kdepim/korganizer/trash.png
Binary files differ
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 2a55127..ea100d1 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -448,25 +448,26 @@ void CalendarView::init()
448 topLayout->addWidget( mMainFrame ); 448 topLayout->addWidget( mMainFrame );
449 //mainBoxLayout->addWidget (mLeftFrame); 449 //mainBoxLayout->addWidget (mLeftFrame);
450 mDateNavigator = new DateNavigatorContainer( mLeftFrame, 450 mDateNavigator = new DateNavigatorContainer( mLeftFrame,
451 "CalendarView::DateNavigator" ); 451 "CalendarView::DateNavigator" );
452#if 0 452#if 0
453 // FIXME 453 // FIXME
454 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, 454 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE,
455 "CalendarView::DateNavigator", QDate::currentDate()); 455 "CalendarView::DateNavigator", QDate::currentDate());
456#endif 456#endif
457 // mDateNavigator->blockSignals( true ); 457 // mDateNavigator->blockSignals( true );
458 //leftFrameLayout->addWidget( mDateNavigator ); 458 //leftFrameLayout->addWidget( mDateNavigator );
459 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); 459 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall");
460 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); 460 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView");
461 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView");
461 mTodoList->setNavigator( mNavigator ); 462 mTodoList->setNavigator( mNavigator );
462#if 0 463#if 0
463 if ( QApplication::desktop()->width() < 480 ) { 464 if ( QApplication::desktop()->width() < 480 ) {
464 leftFrameLayout->addWidget(mFilterView); 465 leftFrameLayout->addWidget(mFilterView);
465 leftFrameLayout->addWidget(mTodoList, 2 ); 466 leftFrameLayout->addWidget(mTodoList, 2 );
466 467
467 } else { 468 } else {
468 leftFrameLayout->addWidget(mTodoList,2 ); 469 leftFrameLayout->addWidget(mTodoList,2 );
469 leftFrameLayout->addWidget(mFilterView ); 470 leftFrameLayout->addWidget(mFilterView );
470 } 471 }
471#endif 472#endif
472 mFilterView->hide(); 473 mFilterView->hide();
@@ -3899,26 +3900,30 @@ void CalendarView::toggleFilter()
3899} 3900}
3900 3901
3901KOFilterView *CalendarView::filterView() 3902KOFilterView *CalendarView::filterView()
3902{ 3903{
3903 return mFilterView; 3904 return mFilterView;
3904} 3905}
3905void CalendarView::selectFilter( int fil ) 3906void CalendarView::selectFilter( int fil )
3906{ 3907{
3907 mFilterView->setSelectedFilter( fil ); 3908 mFilterView->setSelectedFilter( fil );
3908} 3909}
3909void CalendarView::showFilter(bool visible) 3910void CalendarView::showFilter(bool visible)
3910{ 3911{
3912 if (visible) mCalEditView->show();
3913 else mCalEditView->hide();
3914#if 0
3911 if (visible) mFilterView->show(); 3915 if (visible) mFilterView->show();
3912 else mFilterView->hide(); 3916 else mFilterView->hide();
3917#endif
3913} 3918}
3914void CalendarView::toggleFilerEnabled( ) 3919void CalendarView::toggleFilerEnabled( )
3915{ 3920{
3916 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); 3921 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() );
3917 if ( !mFilterView->filtersEnabled() ) 3922 if ( !mFilterView->filtersEnabled() )
3918 topLevelWidget()->setCaption( i18n("Filter disabled ") ); 3923 topLevelWidget()->setCaption( i18n("Filter disabled ") );
3919 3924
3920} 3925}
3921void CalendarView::updateFilter() 3926void CalendarView::updateFilter()
3922{ 3927{
3923 CalFilter *filter = mFilterView->selectedFilter(); 3928 CalFilter *filter = mFilterView->selectedFilter();
3924 if (filter) { 3929 if (filter) {
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 1215a99..cdce072 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -41,24 +41,25 @@
41#include <libkcal/resourcecalendar.h> 41#include <libkcal/resourcecalendar.h>
42#include <KDGanttMinimizeSplitter.h> 42#include <KDGanttMinimizeSplitter.h>
43 43
44#include <korganizer/calendarviewbase.h> 44#include <korganizer/calendarviewbase.h>
45 45
46#include <ksyncmanager.h> 46#include <ksyncmanager.h>
47 47
48class QWidgetStack; 48class QWidgetStack;
49class QSplitter; 49class QSplitter;
50 50
51class CalPrinter; 51class CalPrinter;
52class KOFilterView; 52class KOFilterView;
53class KOCalEditView;
53class KOViewManager; 54class KOViewManager;
54class KODialogManager; 55class KODialogManager;
55class KOTodoView; 56class KOTodoView;
56class KDateNavigator; 57class KDateNavigator;
57class DateNavigatorContainer; 58class DateNavigatorContainer;
58class DateNavigator; 59class DateNavigator;
59class KOIncidenceEditor; 60class KOIncidenceEditor;
60class KDatePicker; 61class KDatePicker;
61class ResourceView; 62class ResourceView;
62class KOEventEditor; 63class KOEventEditor;
63class KOTodoEditor ; 64class KOTodoEditor ;
64class KOEventViewerDialog; 65class KOEventViewerDialog;
@@ -557,24 +558,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
557 558
558 QSplitter *mPanner; 559 QSplitter *mPanner;
559 QSplitter *mLeftSplitter; 560 QSplitter *mLeftSplitter;
560 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; 561 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame;
561 QWidgetStack *mRightFrame; 562 QWidgetStack *mRightFrame;
562 563
563 KDatePicker* mDatePicker; 564 KDatePicker* mDatePicker;
564 QVBox* mDateFrame; 565 QVBox* mDateFrame;
565 566
566 DateNavigatorContainer *mDateNavigator; // widget showing small month view. 567 DateNavigatorContainer *mDateNavigator; // widget showing small month view.
567 568
568 KOFilterView *mFilterView; 569 KOFilterView *mFilterView;
570 KOCalEditView *mCalEditView;
569 571
570 ResourceView *mResourceView; 572 ResourceView *mResourceView;
571 573
572 // calendar object for this viewing instance 574 // calendar object for this viewing instance
573 Calendar *mCalendar; 575 Calendar *mCalendar;
574 576
575 CalendarResourceManager *mResourceManager; 577 CalendarResourceManager *mResourceManager;
576 578
577 FileStorage *mStorage; 579 FileStorage *mStorage;
578 580
579 DateNavigator *mNavigator; 581 DateNavigator *mNavigator;
580 582
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index f0d17b5..64675ad 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -15,29 +15,33 @@
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qlayout.h>
28#include <qlabel.h>
27 29
28 30
29#include <libkcal/calfilter.h> 31#include <libkcal/calfilter.h>
30 32
31#include "kofilterview.h" 33#include "kofilterview.h"
34#include <kiconloader.h>
35#include <kglobal.h>
32 36
33KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, 37KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent,
34 const char* name,WFlags fl ) 38 const char* name,WFlags fl )
35 : KOFilterView_base(parent,name,fl) 39 : KOFilterView_base(parent,name,fl)
36{ 40{
37 mFilters = filterList; 41 mFilters = filterList;
38 42
39 connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); 43 connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged()));
40 connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); 44 connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged()));
41 connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); 45 connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters()));
42} 46}
43 47
@@ -87,30 +91,86 @@ void KOFilterView::setSelectedFilter(QString filterName)
87} 91}
88void KOFilterView::setSelectedFilter( int fil ) 92void KOFilterView::setSelectedFilter( int fil )
89{ 93{
90 if ( fil >= mSelectionCombo->count() ) 94 if ( fil >= mSelectionCombo->count() )
91 return; 95 return;
92 mSelectionCombo->setCurrentItem( fil ); 96 mSelectionCombo->setCurrentItem( fil );
93 emit filterChanged(); 97 emit filterChanged();
94} 98}
95 99
96 100
97 101
98KOCalEditView::KOCalEditView(QWidget* parent, 102KOCalEditView::KOCalEditView(QWidget* parent,
99 const char* name,WFlags fl ) 103 const char* name )
100 : QWidget(parent,name,fl) 104 : QWidget(parent,name)
101{ 105{
102 /* 106 /*
103 connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); 107 connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged()));
104 connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); 108 connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged()));
105 connect(mEditButton,SIGNAL(clicked()),SIGNAL(editCalEdits())); 109 connect(mEditButton,SIGNAL(clicked()),SIGNAL(editCalEdits()));
106 */ 110 */
111 QGridLayout* mainLayout = new QGridLayout ( this , 2, 6 );
112 QPushButton * addBut = new QPushButton ( this );
113 mainLayout->addWidget( addBut,0,0 );
114 addBut->setPixmap ( SmallIcon("redcross16"));
115 connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
116 addBut->setMaximumWidth( addBut->sizeHint().height() );
117
118 addBut = new QPushButton ( this );
119 mainLayout->addWidget( addBut,0,1 );
120 addBut->setPixmap ( SmallIcon("redcross16"));
121 connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
122 addBut->setMaximumWidth( addBut->sizeHint().height() );
123
124 QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", this );
125 mainLayout->addWidget( lab,0,2 );
126
127 addBut = new QPushButton ( this );
128 mainLayout->addWidget( addBut,0,3 );
129 addBut->setPixmap ( SmallIcon("redcross16"));
130 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
131 addBut->setMaximumWidth( addBut->sizeHint().height() );
132
133 addBut = new QPushButton ( this );
134 mainLayout->addWidget( addBut,0,4 );
135 addBut->setPixmap ( SmallIcon("redcross16"));
136 connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
137 addBut->setMaximumWidth( addBut->sizeHint().height() );
138
139 addBut = new QPushButton ( this );
140 mainLayout->addWidget( addBut,0,5 );
141 addBut->setPixmap ( SmallIcon("trash"));
142 connect(addBut,SIGNAL(clicked()),SLOT(deleteAll()));
143 addBut->setMaximumWidth( addBut->sizeHint().height() );
144
145
146
107} 147}
108 148
109KOCalEditView::~KOCalEditView() 149KOCalEditView::~KOCalEditView()
110{ 150{
111 // no need to delete child widgets, Qt does it all for us 151 // no need to delete child widgets, Qt does it all for us
112} 152}
113void KOCalEditView::readConfig( KConfig *) 153void KOCalEditView::readConfig( KConfig *)
114{ 154{
115 155
116} 156}
157void KOCalEditView::addCal()
158{
159 qDebug("addcal ");
160}
161void KOCalEditView::enableAll()
162{
163 qDebug("enableAll");
164}
165void KOCalEditView::enableAlarm()
166{
167 qDebug("enableAlarm");
168}
169void KOCalEditView::disableRO()
170{
171 qDebug("OCalEditView::disableRO() ");
172}
173void KOCalEditView::deleteAll()
174{
175 qDebug("delteAll");
176}
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 2ac4da1..d434c52 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -15,25 +15,25 @@
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOFILTERVIEW_H 23#ifndef KOFILTERVIEW_H
24#define KOFILTERVIEW_H 24#define KOFILTERVIEW_H
25 25
26#include <qstring.h> 26#include <qstring.h>
27#include <kconfig.h> 27#include <kconfig.h>
28#include "kofilterview_base.h" 28#include "kofilterview_base.h"
29 29
30#include <libkcal/calfilter.h> 30#include <libkcal/calfilter.h>
31 31
32using namespace KCal; 32using namespace KCal;
33 33
34class KOFilterView : public KOFilterView_base 34class KOFilterView : public KOFilterView_base
35{ 35{
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); 38 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
39 ~KOFilterView(); 39 ~KOFilterView();
@@ -49,29 +49,34 @@ class KOFilterView : public KOFilterView_base
49 signals: 49 signals:
50 void filterChanged(); 50 void filterChanged();
51 void editFilters(); 51 void editFilters();
52 52
53 private: 53 private:
54 QPtrList<CalFilter> *mFilters; 54 QPtrList<CalFilter> *mFilters;
55}; 55};
56 56
57class KOCalEditView : public QWidget 57class KOCalEditView : public QWidget
58{ 58{
59 Q_OBJECT 59 Q_OBJECT
60 public: 60 public:
61 KOCalEditView( QWidget* parent=0,const char* name=0, WFlags fl=0); 61 KOCalEditView( QWidget* parent=0,const char* name=0);
62 ~KOCalEditView(); 62 ~KOCalEditView();
63 63
64 void readConfig( KConfig *); 64 void readConfig( KConfig *);
65 65 public slots:
66 void addCal();
67 void enableAll();
68 void enableAlarm();
69 void disableRO();
70 void deleteAll();
66 signals: 71 signals:
67 void alarmEnabled ( int cal, bool enable ); 72 void alarmEnabled ( int cal, bool enable );
68 void calendarEnabled ( int cal, bool enable ); 73 void calendarEnabled ( int cal, bool enable );
69 void calendarReadonly ( int cal, bool readonly ); 74 void calendarReadonly ( int cal, bool readonly );
70 void setCalendarDefault ( int cal ); 75 void setCalendarDefault ( int cal );
71 void removeCalendar ( int cal ); 76 void removeCalendar ( int cal );
72 77
73 private: 78 private:
74}; 79};
75 80
76 81
77 82