summaryrefslogtreecommitdiffabout
path: root/korganizer/navigatorbar.cpp
authorzautrix <zautrix>2005-02-06 01:23:43 (UTC)
committer zautrix <zautrix>2005-02-06 01:23:43 (UTC)
commit118f5aab05c9ace5612d5c4fd69e7c5a59bed67b (patch) (side-by-side diff)
treee097f3fecb6e2ae692b91ac29e58e6d5a51154c8 /korganizer/navigatorbar.cpp
parent659f07aa44f44aebb74c83e7319021cfeb87f275 (diff)
downloadkdepimpi-118f5aab05c9ace5612d5c4fd69e7c5a59bed67b.zip
kdepimpi-118f5aab05c9ace5612d5c4fd69e7c5a59bed67b.tar.gz
kdepimpi-118f5aab05c9ace5612d5c4fd69e7c5a59bed67b.tar.bz2
better week choose
Diffstat (limited to 'korganizer/navigatorbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/navigatorbar.cpp39
1 files changed, 2 insertions, 37 deletions
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index 24de01f..657f98d 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -72,8 +72,7 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
#else
bool isDesktop = true;
#endif
- bool insertWeek = (QString ( name ) == QString("useBigPixmaps")) ;
- if ( insertWeek && QApplication::desktop()->width() > 320 )
+ if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 )
isDesktop = true;
// Create backward navigation buttons
mPrevYear = new QPushButton( mCtrlFrame );
@@ -89,13 +88,6 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") );
QToolTip::add( mNextMonth, i18n("Next Month") );
- QPushButton * selWeek = 0;
- if ( insertWeek ) {
- selWeek = new QPushButton( mCtrlFrame );
- QToolTip::add( selWeek, i18n("Select Week") );
- selWeek->setFocusPolicy(NoFocus);
- }
-
mNextYear = new QPushButton( mCtrlFrame );
mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") );
QToolTip::add( mNextYear, i18n("Next Year") );
@@ -111,9 +103,7 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
mNextYear->setFlat( true);
mSelectMonth->setFlat( true);
mPrevYear->setFlat( true);
- mPrevMonth->setFlat( true);
- if ( insertWeek )
- selWeek->setFlat( true);
+ mPrevMonth->setFlat( true);
}
mSelectMonth->setFont( tfont );
// Set minimum width to width of widest month name label
@@ -135,29 +125,6 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
maxwidth+= 6;
}
- if ( insertWeek ) {
- QPopupMenu * wpo = new QPopupMenu (this);
- QPopupMenu * all = new QPopupMenu (this);
- //wpo->insertItem( i18n("W#"), 0 );
- int first = 1;
- for ( i = 1; i < 50; ++i ) {
- if ( !(i%10) ) {
- all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo );
- connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeek ( int ) ) );
- first = i;
- wpo = new QPopupMenu (this);
- }
- wpo->insertItem( QString::number(i), i );
- }
- for ( i = 50; i < 53; ++i ) {
- wpo->insertItem( QString::number(i), i);
- }
- all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo );
- selWeek->setPopup( all );
- selWeek->setFixedWidth( (size/5)*4 );
- selWeek->setFixedHeight( size );
- connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeek ( int ) ) );
- }
mSelectMonth->setFixedWidth( maxwidth );
mSelectMonth->setFixedHeight( size );
mPrevYear->setFixedHeight( size );
@@ -176,8 +143,6 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
// ctrlLayout->addStretch( 1 );
ctrlLayout->addWidget( mNextMonth, 3 );
ctrlLayout->addWidget( mNextYear, 3 );
- if ( insertWeek )
- ctrlLayout->addWidget( selWeek );
connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) );
connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) );