author | zautrix <zautrix> | 2005-02-02 15:21:26 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 15:21:26 (UTC) |
commit | f94c5075fdd356c7a73b23150287034216ef0bdf (patch) (unidiff) | |
tree | de0cc9b2b2caf41f4c1d3a7a81de8579030abab3 | |
parent | 66c1429e6d29331dac4182d2c42aaf1630916c7d (diff) | |
download | kdepimpi-f94c5075fdd356c7a73b23150287034216ef0bdf.zip kdepimpi-f94c5075fdd356c7a73b23150287034216ef0bdf.tar.gz kdepimpi-f94c5075fdd356c7a73b23150287034216ef0bdf.tar.bz2 |
fihix
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 6 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 7 | ||||
-rw-r--r-- | korganizer/navigatorbar.cpp | 34 | ||||
-rw-r--r-- | korganizer/navigatorbar.h | 2 |
5 files changed, 41 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index be78057..e0380fa 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -360,2 +360,4 @@ void CalendarView::init() | |||
360 | mNavigator, SLOT( selectNextMonth() ) ); | 360 | mNavigator, SLOT( selectNextMonth() ) ); |
361 | connect( mNavigatorBar, SIGNAL( selectWeek( int ) ), | ||
362 | mNavigator, SLOT( selectWeek( int ) ) ); | ||
361 | 363 | ||
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index aed9bae..c018dc7 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -439,4 +439,8 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
439 | int i; | 439 | int i; |
440 | for ( i = 1; i < 54; i++ ) | 440 | for ( i = 1; i < 53; i++ ) |
441 | wpo->insertItem( QString::number( i ),i ); | 441 | wpo->insertItem( QString::number( i ),i ); |
442 | //Qt bug - we must add some empty fields... | ||
443 | for ( i = 53; i < 54; ++i ) { | ||
444 | wpo->insertItem( "", 52 ); | ||
445 | } | ||
442 | dummyAllDayRightB->setPopup( wpo ); | 446 | dummyAllDayRightB->setPopup( wpo ); |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index ab96786..9c1e4c3 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -811,7 +811,2 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
811 | int row, col; | 811 | int row, col; |
812 | QPopupMenu * wpo = new QPopupMenu (this); | ||
813 | wpo->insertItem( i18n("W#"), 0 ); | ||
814 | for ( i = 1; i < 54; i++ ) | ||
815 | wpo->insertItem( i18n("%1").arg(i), i ); | ||
816 | mWeekLabels[mNumWeeks]->setPopup( wpo ); | ||
817 | mCells.resize( mNumCells ); | 812 | mCells.resize( mNumCells ); |
@@ -832,3 +827,2 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
832 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); | 827 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); |
833 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); | ||
834 | mContextMenu = eventPopup(); | 828 | mContextMenu = eventPopup(); |
@@ -836,2 +830,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
836 | 830 | ||
831 | mWeekLabels[mNumWeeks]->setText( i18n("W")); | ||
837 | emit incidenceSelected( 0 ); | 832 | emit incidenceSelected( 0 ); |
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index f339c67..2406bb5 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp | |||
@@ -30,2 +30,3 @@ | |||
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qpopupmenu.h> | ||
31 | #include <qapplication.h> | 32 | #include <qapplication.h> |
@@ -73,3 +74,4 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
73 | #endif | 74 | #endif |
74 | if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 ) | 75 | bool insertWeek = (QString ( name ) == QString("useBigPixmaps")) ; |
76 | if ( insertWeek && QApplication::desktop()->width() > 320 ) | ||
75 | isDesktop = true; | 77 | isDesktop = true; |
@@ -89,2 +91,9 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
89 | 91 | ||
92 | QPushButton * selWeek = 0; | ||
93 | if ( insertWeek ) { | ||
94 | selWeek = new QPushButton( mCtrlFrame ); | ||
95 | QToolTip::add( selWeek, i18n("Select Week") ); | ||
96 | selWeek->setFocusPolicy(NoFocus); | ||
97 | } | ||
98 | |||
90 | mNextYear = new QPushButton( mCtrlFrame ); | 99 | mNextYear = new QPushButton( mCtrlFrame ); |
@@ -104,3 +113,5 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
104 | mPrevYear->setFlat( true); | 113 | mPrevYear->setFlat( true); |
105 | mPrevMonth->setFlat( true); | 114 | mPrevMonth->setFlat( true); |
115 | if ( insertWeek ) | ||
116 | selWeek->setFlat( true); | ||
106 | } | 117 | } |
@@ -125,2 +136,18 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
125 | } | 136 | } |
137 | |||
138 | if ( insertWeek ) { | ||
139 | //shit : bug in Qt. after inserting 53 item, only 51 are shown... | ||
140 | QPopupMenu * wpo = new QPopupMenu (this); | ||
141 | wpo->insertItem( i18n("W#"), 0 ); | ||
142 | for ( i = 1; i < 53; ++i ) { | ||
143 | wpo->insertItem( QString::number(i), i ); | ||
144 | } | ||
145 | for ( i = 53; i < 54; ++i ) { | ||
146 | wpo->insertItem( "", 52 ); | ||
147 | } | ||
148 | selWeek->setPopup( wpo ); | ||
149 | selWeek->setFixedWidth( (size/4)*3 ); | ||
150 | selWeek->setFixedHeight( size ); | ||
151 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeek ( int ) ) ); | ||
152 | } | ||
126 | mSelectMonth->setFixedWidth( maxwidth ); | 153 | mSelectMonth->setFixedWidth( maxwidth ); |
@@ -143,2 +170,4 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
143 | ctrlLayout->addWidget( mNextYear, 3 ); | 170 | ctrlLayout->addWidget( mNextYear, 3 ); |
171 | if ( insertWeek ) | ||
172 | ctrlLayout->addWidget( selWeek ); | ||
144 | 173 | ||
@@ -154,2 +183,3 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
154 | mSelectMonth->setFocusPolicy(NoFocus); | 183 | mSelectMonth->setFocusPolicy(NoFocus); |
184 | |||
155 | } | 185 | } |
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h index 9c5c0cf..ee4c06d 100644 --- a/korganizer/navigatorbar.h +++ b/korganizer/navigatorbar.h | |||
@@ -51,3 +51,3 @@ class NavigatorBar: public QWidget | |||
51 | void monthSelected( int ); | 51 | void monthSelected( int ); |
52 | 52 | void selectWeek( int ); | |
53 | 53 | ||