-rw-r--r-- | korganizer/kofilterview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 64675ad..e379abc 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -18,159 +18,159 @@ | |||
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> | 27 | #include <qlayout.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | 29 | ||
30 | 30 | ||
31 | #include <libkcal/calfilter.h> | 31 | #include <libkcal/calfilter.h> |
32 | 32 | ||
33 | #include "kofilterview.h" | 33 | #include "kofilterview.h" |
34 | #include <kiconloader.h> | 34 | #include <kiconloader.h> |
35 | #include <kglobal.h> | 35 | #include <kglobal.h> |
36 | 36 | ||
37 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, | 37 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, |
38 | const char* name,WFlags fl ) | 38 | const char* name,WFlags fl ) |
39 | : KOFilterView_base(parent,name,fl) | 39 | : KOFilterView_base(parent,name,fl) |
40 | { | 40 | { |
41 | mFilters = filterList; | 41 | mFilters = filterList; |
42 | 42 | ||
43 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); | 43 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); |
44 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); | 44 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); |
45 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); | 45 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); |
46 | } | 46 | } |
47 | 47 | ||
48 | KOFilterView::~KOFilterView() | 48 | KOFilterView::~KOFilterView() |
49 | { | 49 | { |
50 | // no need to delete child widgets, Qt does it all for us | 50 | // no need to delete child widgets, Qt does it all for us |
51 | } | 51 | } |
52 | 52 | ||
53 | bool KOFilterView::filtersEnabled() | 53 | bool KOFilterView::filtersEnabled() |
54 | { | 54 | { |
55 | return mEnabledCheck->isChecked(); | 55 | return mEnabledCheck->isChecked(); |
56 | } | 56 | } |
57 | 57 | ||
58 | void KOFilterView::setFiltersEnabled(bool set) | 58 | void KOFilterView::setFiltersEnabled(bool set) |
59 | { | 59 | { |
60 | mEnabledCheck->setChecked(set); | 60 | mEnabledCheck->setChecked(set); |
61 | emit filterChanged(); | 61 | emit filterChanged(); |
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
65 | void KOFilterView::updateFilters() | 65 | void KOFilterView::updateFilters() |
66 | { | 66 | { |
67 | mSelectionCombo->clear(); | 67 | mSelectionCombo->clear(); |
68 | 68 | ||
69 | CalFilter *filter = mFilters->first(); | 69 | CalFilter *filter = mFilters->first(); |
70 | while(filter) { | 70 | while(filter) { |
71 | mSelectionCombo->insertItem(filter->name()); | 71 | mSelectionCombo->insertItem(filter->name()); |
72 | filter = mFilters->next(); | 72 | filter = mFilters->next(); |
73 | } | 73 | } |
74 | } | 74 | } |
75 | 75 | ||
76 | CalFilter *KOFilterView::selectedFilter() | 76 | CalFilter *KOFilterView::selectedFilter() |
77 | { | 77 | { |
78 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); | 78 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); |
79 | return f; | 79 | return f; |
80 | } | 80 | } |
81 | 81 | ||
82 | void KOFilterView::setSelectedFilter(QString filterName) | 82 | void KOFilterView::setSelectedFilter(QString filterName) |
83 | { | 83 | { |
84 | int filter_num = mSelectionCombo->count(); | 84 | int filter_num = mSelectionCombo->count(); |
85 | int i; | 85 | int i; |
86 | for (i=0;i<filter_num;i++) { | 86 | for (i=0;i<filter_num;i++) { |
87 | if (mSelectionCombo->text(i)==filterName) | 87 | if (mSelectionCombo->text(i)==filterName) |
88 | mSelectionCombo->setCurrentItem(i); | 88 | mSelectionCombo->setCurrentItem(i); |
89 | } | 89 | } |
90 | emit filterChanged(); | 90 | emit filterChanged(); |
91 | } | 91 | } |
92 | void KOFilterView::setSelectedFilter( int fil ) | 92 | void KOFilterView::setSelectedFilter( int fil ) |
93 | { | 93 | { |
94 | if ( fil >= mSelectionCombo->count() ) | 94 | if ( fil >= mSelectionCombo->count() ) |
95 | return; | 95 | return; |
96 | mSelectionCombo->setCurrentItem( fil ); | 96 | mSelectionCombo->setCurrentItem( fil ); |
97 | emit filterChanged(); | 97 | emit filterChanged(); |
98 | } | 98 | } |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | KOCalEditView::KOCalEditView(QWidget* parent, | 102 | KOCalEditView::KOCalEditView(QWidget* parent, |
103 | const char* name ) | 103 | const char* name ) |
104 | : QWidget(parent,name) | 104 | : QWidget(parent,name) |
105 | { | 105 | { |
106 | /* | 106 | /* |
107 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); | 107 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); |
108 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); | 108 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); |
109 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editCalEdits())); | 109 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editCalEdits())); |
110 | */ | 110 | */ |
111 | QGridLayout* mainLayout = new QGridLayout ( this , 2, 6 ); | 111 | QGridLayout* mainLayout = new QGridLayout ( this , 2, 6 ); |
112 | QPushButton * addBut = new QPushButton ( this ); | 112 | QPushButton * addBut = new QPushButton ( this ); |
113 | mainLayout->addWidget( addBut,0,0 ); | 113 | mainLayout->addWidget( addBut,0,0 ); |
114 | addBut->setPixmap ( SmallIcon("redcross16")); | 114 | addBut->setPixmap ( SmallIcon("plus")); |
115 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); | 115 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); |
116 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 116 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
117 | 117 | ||
118 | addBut = new QPushButton ( this ); | 118 | addBut = new QPushButton ( this ); |
119 | mainLayout->addWidget( addBut,0,1 ); | 119 | mainLayout->addWidget( addBut,0,1 ); |
120 | addBut->setPixmap ( SmallIcon("redcross16")); | 120 | addBut->setPixmap ( SmallIcon("eye")); |
121 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); | 121 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); |
122 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 122 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
123 | 123 | ||
124 | QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", this ); | 124 | QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", this ); |
125 | mainLayout->addWidget( lab,0,2 ); | 125 | mainLayout->addWidget( lab,0,2 ); |
126 | 126 | ||
127 | addBut = new QPushButton ( this ); | 127 | addBut = new QPushButton ( this ); |
128 | mainLayout->addWidget( addBut,0,3 ); | 128 | mainLayout->addWidget( addBut,0,3 ); |
129 | addBut->setPixmap ( SmallIcon("redcross16")); | 129 | addBut->setPixmap ( SmallIcon("bell")); |
130 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | 130 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); |
131 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 131 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
132 | 132 | ||
133 | addBut = new QPushButton ( this ); | 133 | addBut = new QPushButton ( this ); |
134 | mainLayout->addWidget( addBut,0,4 ); | 134 | mainLayout->addWidget( addBut,0,4 ); |
135 | addBut->setPixmap ( SmallIcon("redcross16")); | 135 | addBut->setPixmap ( SmallIcon("redcross16")); |
136 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); | 136 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); |
137 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 137 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
138 | 138 | ||
139 | addBut = new QPushButton ( this ); | 139 | addBut = new QPushButton ( this ); |
140 | mainLayout->addWidget( addBut,0,5 ); | 140 | mainLayout->addWidget( addBut,0,5 ); |
141 | addBut->setPixmap ( SmallIcon("trash")); | 141 | addBut->setPixmap ( SmallIcon("trash")); |
142 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); | 142 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); |
143 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 143 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
144 | 144 | ||
145 | 145 | ||
146 | 146 | ||
147 | } | 147 | } |
148 | 148 | ||
149 | KOCalEditView::~KOCalEditView() | 149 | KOCalEditView::~KOCalEditView() |
150 | { | 150 | { |
151 | // 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 |
152 | } | 152 | } |
153 | void KOCalEditView::readConfig( KConfig *) | 153 | void KOCalEditView::readConfig( KConfig *) |
154 | { | 154 | { |
155 | 155 | ||
156 | } | 156 | } |
157 | void KOCalEditView::addCal() | 157 | void KOCalEditView::addCal() |
158 | { | 158 | { |
159 | qDebug("addcal "); | 159 | qDebug("addcal "); |
160 | } | 160 | } |
161 | void KOCalEditView::enableAll() | 161 | void KOCalEditView::enableAll() |
162 | { | 162 | { |
163 | qDebug("enableAll"); | 163 | qDebug("enableAll"); |
164 | } | 164 | } |
165 | void KOCalEditView::enableAlarm() | 165 | void KOCalEditView::enableAlarm() |
166 | { | 166 | { |
167 | qDebug("enableAlarm"); | 167 | qDebug("enableAlarm"); |
168 | } | 168 | } |
169 | void KOCalEditView::disableRO() | 169 | void KOCalEditView::disableRO() |
170 | { | 170 | { |
171 | qDebug("OCalEditView::disableRO() "); | 171 | qDebug("OCalEditView::disableRO() "); |
172 | } | 172 | } |
173 | void KOCalEditView::deleteAll() | 173 | void KOCalEditView::deleteAll() |
174 | { | 174 | { |
175 | qDebug("delteAll"); | 175 | qDebug("delteAll"); |
176 | } | 176 | } |