-rw-r--r-- | korganizer/navigatorbar.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index 934e153..27d4d17 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -183,8 +183,30 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam NavigatorBar::~NavigatorBar() { } +void NavigatorBar::showButtons( bool left, bool right ) +{ + if ( left ) { + mPrevYear->show(); + mPrevMonth->show(); + } else { + mPrevYear->hide(); + mPrevMonth->hide(); + } + + if ( right ) { + mNextYear->show(); + mNextMonth->show(); + } else { + mNextYear->hide(); + mNextMonth->hide(); + } + if ( !left && !right ) { + mSelectMonth->setMaximumWidth( 1024 ); + mSelectMonth->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); + } +} void NavigatorBar::selectMonth() { |