summaryrefslogtreecommitdiffabout
path: root/korganizer/navigatorbar.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/navigatorbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/navigatorbar.cpp22
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
@@ -179,16 +179,38 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
mSelectMonth->setFocusPolicy(NoFocus);
setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
}
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()
{
int month;
KPopupFrame* popup = new KPopupFrame(this);
KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup);
// -----