author | zautrix <zautrix> | 2005-02-07 13:03:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-07 13:03:38 (UTC) |
commit | 7de846e9f01ce27b622541493e6a02e26e37bf2c (patch) (unidiff) | |
tree | df59c7803b1e171b08d3c387f49b1239d1adc3b5 /korganizer/navigatorbar.cpp | |
parent | afc19166fcdc09d3d5b757a84abfeb0b2746f35f (diff) | |
download | kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.zip kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.gz kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.bz2 |
fixxxx
-rw-r--r-- | korganizer/navigatorbar.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index 657f98d..f05e6f6 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp | |||
@@ -133,48 +133,49 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
133 | mNextYear->setFixedHeight ( size ); | 133 | mNextYear->setFixedHeight ( size ); |
134 | // set up control frame layout | 134 | // set up control frame layout |
135 | QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); | 135 | QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); |
136 | ctrlLayout->addWidget( mPrevYear, 3 ); | 136 | ctrlLayout->addWidget( mPrevYear, 3 ); |
137 | ctrlLayout->addWidget( mPrevMonth, 3 ); | 137 | ctrlLayout->addWidget( mPrevMonth, 3 ); |
138 | //ctrlLayout->addStretch( 1 ); | 138 | //ctrlLayout->addStretch( 1 ); |
139 | // ctrlLayout->addSpacing( 1 ); | 139 | // ctrlLayout->addSpacing( 1 ); |
140 | // ctrlLayout->addWidget( mDateLabel ); | 140 | // ctrlLayout->addWidget( mDateLabel ); |
141 | ctrlLayout->addWidget( mSelectMonth ); | 141 | ctrlLayout->addWidget( mSelectMonth ); |
142 | // ctrlLayout->addSpacing( 1 ); | 142 | // ctrlLayout->addSpacing( 1 ); |
143 | // ctrlLayout->addStretch( 1 ); | 143 | // ctrlLayout->addStretch( 1 ); |
144 | ctrlLayout->addWidget( mNextMonth, 3 ); | 144 | ctrlLayout->addWidget( mNextMonth, 3 ); |
145 | ctrlLayout->addWidget( mNextYear, 3 ); | 145 | ctrlLayout->addWidget( mNextYear, 3 ); |
146 | 146 | ||
147 | connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); | 147 | connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); |
148 | connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); | 148 | connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); |
149 | connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); | 149 | connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); |
150 | connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); | 150 | connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); |
151 | connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); | 151 | connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); |
152 | mPrevYear->setFocusPolicy(NoFocus); | 152 | mPrevYear->setFocusPolicy(NoFocus); |
153 | mPrevMonth->setFocusPolicy(NoFocus); | 153 | mPrevMonth->setFocusPolicy(NoFocus); |
154 | mNextMonth->setFocusPolicy(NoFocus); | 154 | mNextMonth->setFocusPolicy(NoFocus); |
155 | mNextYear->setFocusPolicy(NoFocus); | 155 | mNextYear->setFocusPolicy(NoFocus); |
156 | mSelectMonth->setFocusPolicy(NoFocus); | 156 | mSelectMonth->setFocusPolicy(NoFocus); |
157 | setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); | ||
157 | 158 | ||
158 | } | 159 | } |
159 | 160 | ||
160 | NavigatorBar::~NavigatorBar() | 161 | NavigatorBar::~NavigatorBar() |
161 | { | 162 | { |
162 | } | 163 | } |
163 | 164 | ||
164 | void NavigatorBar::selectMonth() | 165 | void NavigatorBar::selectMonth() |
165 | { | 166 | { |
166 | 167 | ||
167 | int month; | 168 | int month; |
168 | KPopupFrame* popup = new KPopupFrame(this); | 169 | KPopupFrame* popup = new KPopupFrame(this); |
169 | int size = 12; | 170 | int size = 12; |
170 | if ( QApplication::desktop()->width() >= 480 ) | 171 | if ( QApplication::desktop()->width() >= 480 ) |
171 | size = 18; | 172 | size = 18; |
172 | KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(size, popup); | 173 | KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(size, popup); |
173 | // ----- | 174 | // ----- |
174 | picker->resize(picker->sizeHint()); | 175 | picker->resize(picker->sizeHint()); |
175 | popup->setMainWidget(picker); | 176 | popup->setMainWidget(picker); |
176 | picker->setFocus(); | 177 | picker->setFocus(); |
177 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); | 178 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); |
178 | if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) | 179 | if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) |
179 | { | 180 | { |
180 | month = picker->getResult(); | 181 | month = picker->getResult(); |