author | zautrix <zautrix> | 2005-06-11 09:22:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-11 09:22:29 (UTC) |
commit | d4501288ba7414ba89a791dd2c306e9f74eeb3fa (patch) (unidiff) | |
tree | a99b30c87947a22f9c2da3ab5426f4e5ed8de9ab /korganizer | |
parent | b214921b2072079ec59a87ac84231f83532009d5 (diff) | |
download | kdepimpi-d4501288ba7414ba89a791dd2c306e9f74eeb3fa.zip kdepimpi-d4501288ba7414ba89a791dd2c306e9f74eeb3fa.tar.gz kdepimpi-d4501288ba7414ba89a791dd2c306e9f74eeb3fa.tar.bz2 |
fixx
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 50 |
3 files changed, 54 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index ea100d1..8d992b9 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -462,24 +462,25 @@ void CalendarView::init() | |||
462 | mTodoList->setNavigator( mNavigator ); | 462 | mTodoList->setNavigator( mNavigator ); |
463 | #if 0 | 463 | #if 0 |
464 | if ( QApplication::desktop()->width() < 480 ) { | 464 | if ( QApplication::desktop()->width() < 480 ) { |
465 | leftFrameLayout->addWidget(mFilterView); | 465 | leftFrameLayout->addWidget(mFilterView); |
466 | leftFrameLayout->addWidget(mTodoList, 2 ); | 466 | leftFrameLayout->addWidget(mTodoList, 2 ); |
467 | 467 | ||
468 | } else { | 468 | } else { |
469 | leftFrameLayout->addWidget(mTodoList,2 ); | 469 | leftFrameLayout->addWidget(mTodoList,2 ); |
470 | leftFrameLayout->addWidget(mFilterView ); | 470 | leftFrameLayout->addWidget(mFilterView ); |
471 | } | 471 | } |
472 | #endif | 472 | #endif |
473 | mFilterView->hide(); | 473 | mFilterView->hide(); |
474 | mCalEditView->hide(); | ||
474 | QWidget *rightBox = new QWidget( mMainFrame ); | 475 | QWidget *rightBox = new QWidget( mMainFrame ); |
475 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 476 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
476 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 477 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
477 | mRightFrame = new QWidgetStack( rightBox ); | 478 | mRightFrame = new QWidgetStack( rightBox ); |
478 | rightLayout->addWidget( mRightFrame, 10 ); | 479 | rightLayout->addWidget( mRightFrame, 10 ); |
479 | 480 | ||
480 | //mLeftFrame = (QWidget *)leftFrame; | 481 | //mLeftFrame = (QWidget *)leftFrame; |
481 | if ( KOPrefs::instance()->mVerticalScreen ) { | 482 | if ( KOPrefs::instance()->mVerticalScreen ) { |
482 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 483 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
483 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); | 484 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); |
484 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); | 485 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); |
485 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); | 486 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); |
@@ -3900,27 +3901,28 @@ void CalendarView::toggleFilter() | |||
3900 | } | 3901 | } |
3901 | 3902 | ||
3902 | KOFilterView *CalendarView::filterView() | 3903 | KOFilterView *CalendarView::filterView() |
3903 | { | 3904 | { |
3904 | return mFilterView; | 3905 | return mFilterView; |
3905 | } | 3906 | } |
3906 | void CalendarView::selectFilter( int fil ) | 3907 | void CalendarView::selectFilter( int fil ) |
3907 | { | 3908 | { |
3908 | mFilterView->setSelectedFilter( fil ); | 3909 | mFilterView->setSelectedFilter( fil ); |
3909 | } | 3910 | } |
3910 | void CalendarView::showFilter(bool visible) | 3911 | void CalendarView::showFilter(bool visible) |
3911 | { | 3912 | { |
3913 | #if 0 | ||
3912 | if (visible) mCalEditView->show(); | 3914 | if (visible) mCalEditView->show(); |
3913 | else mCalEditView->hide(); | 3915 | else mCalEditView->hide(); |
3914 | #if 0 | 3916 | #else |
3915 | if (visible) mFilterView->show(); | 3917 | if (visible) mFilterView->show(); |
3916 | else mFilterView->hide(); | 3918 | else mFilterView->hide(); |
3917 | #endif | 3919 | #endif |
3918 | } | 3920 | } |
3919 | void CalendarView::toggleFilerEnabled( ) | 3921 | void CalendarView::toggleFilerEnabled( ) |
3920 | { | 3922 | { |
3921 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 3923 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
3922 | if ( !mFilterView->filtersEnabled() ) | 3924 | if ( !mFilterView->filtersEnabled() ) |
3923 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 3925 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
3924 | 3926 | ||
3925 | } | 3927 | } |
3926 | void CalendarView::updateFilter() | 3928 | void CalendarView::updateFilter() |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 1bfe4dd..dc6237b 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -129,25 +129,25 @@ KOCalEditView::KOCalEditView(QWidget* parent, | |||
129 | addBut->setPixmap ( SmallIcon("bell")); | 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("pencil")); | 135 | addBut->setPixmap ( SmallIcon("pencil")); |
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("minus")); |
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 *) |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index d434c52..060108f 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -15,24 +15,26 @@ | |||
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 <qcheckbox.h> | ||
28 | #include <qpushbutton.h> | ||
27 | #include <kconfig.h> | 29 | #include <kconfig.h> |
28 | #include "kofilterview_base.h" | 30 | #include "kofilterview_base.h" |
29 | 31 | ||
30 | #include <libkcal/calfilter.h> | 32 | #include <libkcal/calfilter.h> |
31 | 33 | ||
32 | using namespace KCal; | 34 | using namespace KCal; |
33 | 35 | ||
34 | class KOFilterView : public KOFilterView_base | 36 | class KOFilterView : public KOFilterView_base |
35 | { | 37 | { |
36 | Q_OBJECT | 38 | Q_OBJECT |
37 | public: | 39 | public: |
38 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); | 40 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); |
@@ -69,15 +71,63 @@ class KOCalEditView : public QWidget | |||
69 | void disableRO(); | 71 | void disableRO(); |
70 | void deleteAll(); | 72 | void deleteAll(); |
71 | signals: | 73 | signals: |
72 | void alarmEnabled ( int cal, bool enable ); | 74 | void alarmEnabled ( int cal, bool enable ); |
73 | void calendarEnabled ( int cal, bool enable ); | 75 | void calendarEnabled ( int cal, bool enable ); |
74 | void calendarReadonly ( int cal, bool readonly ); | 76 | void calendarReadonly ( int cal, bool readonly ); |
75 | void setCalendarDefault ( int cal ); | 77 | void setCalendarDefault ( int cal ); |
76 | void removeCalendar ( int cal ); | 78 | void removeCalendar ( int cal ); |
77 | 79 | ||
78 | private: | 80 | private: |
79 | }; | 81 | }; |
80 | 82 | ||
83 | class KOCalButton : public QPushButton | ||
84 | { | ||
85 | Q_OBJECT | ||
86 | public: | ||
87 | KOCalButton( QWidget *parent=0, const char *name=0 ) : | ||
88 | QPushButton( parent, name) | ||
89 | { | ||
90 | connect( this, SIGNAL( clicked() ), | ||
91 | SLOT( bottonClicked() )); | ||
92 | mNumber = -1; | ||
93 | } | ||
94 | void setNum ( int num ) {mNumber = num; } | ||
95 | signals: | ||
96 | void selectNum ( int ); | ||
97 | private: | ||
98 | int mNumber; | ||
99 | void keyPressEvent ( QKeyEvent * e ) | ||
100 | { | ||
101 | e->ignore(); | ||
102 | } | ||
103 | |||
104 | private slots : | ||
105 | void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } | ||
106 | }; | ||
107 | class KOCalCheckButton : public QCheckBox | ||
108 | { | ||
109 | Q_OBJECT | ||
110 | public: | ||
111 | KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : | ||
112 | QCheckBox( parent, name) | ||
113 | { | ||
114 | connect( this, SIGNAL( toggled ( bool ) ), | ||
115 | SLOT( bottonClicked( bool ) )); | ||
116 | mNumber = -1; | ||
117 | } | ||
118 | void setNum ( int num ) {mNumber = num; } | ||
119 | signals: | ||
120 | void selectNum ( int, bool ); | ||
121 | private: | ||
122 | int mNumber; | ||
123 | void keyPressEvent ( QKeyEvent * e ) | ||
124 | { | ||
125 | e->ignore(); | ||
126 | } | ||
127 | |||
128 | private slots : | ||
129 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } | ||
130 | }; | ||
81 | 131 | ||
82 | 132 | ||
83 | #endif // KOFILTERVIEW_H | 133 | #endif // KOFILTERVIEW_H |