-rw-r--r-- | korganizer/kotodoview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 17248dc..07bfdbf 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -483,48 +483,53 @@ KOQuickTodo::KOQuickTodo(QWidget *parent) : | |||
483 | QLineEdit(parent) | 483 | QLineEdit(parent) |
484 | { | 484 | { |
485 | setText(i18n("Click to add new Todo")); | 485 | setText(i18n("Click to add new Todo")); |
486 | setFocusPolicy ( QWidget::ClickFocus ); | 486 | setFocusPolicy ( QWidget::ClickFocus ); |
487 | } | 487 | } |
488 | 488 | ||
489 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) | 489 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) |
490 | { | 490 | { |
491 | if ( text()==i18n("Click to add new Todo") ) | 491 | if ( text()==i18n("Click to add new Todo") ) |
492 | setText(""); | 492 | setText(""); |
493 | QLineEdit::focusInEvent(ev); | 493 | QLineEdit::focusInEvent(ev); |
494 | } | 494 | } |
495 | 495 | ||
496 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 496 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
497 | { | 497 | { |
498 | setText(i18n("Click to add new Todo")); | 498 | setText(i18n("Click to add new Todo")); |
499 | QLineEdit::focusOutEvent(ev); | 499 | QLineEdit::focusOutEvent(ev); |
500 | } | 500 | } |
501 | 501 | ||
502 | ///////////////////////////////////////////////////////////////////////////// | 502 | ///////////////////////////////////////////////////////////////////////////// |
503 | 503 | ||
504 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 504 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
505 | KOrg::BaseView(calendar,parent,name) | 505 | KOrg::BaseView(calendar,parent,name) |
506 | { | 506 | { |
507 | |||
508 | mCurItem = 0; | ||
509 | mCurItemRootParent = 0; | ||
510 | mCurItemParent = 0; | ||
511 | mCurItemAbove = 0; | ||
507 | mActiveItem = 0; | 512 | mActiveItem = 0; |
508 | mCategoryPopupMenu = 0; | 513 | mCategoryPopupMenu = 0; |
509 | mPendingUpdateBeforeRepaint = false; | 514 | mPendingUpdateBeforeRepaint = false; |
510 | isFlatDisplay = false; | 515 | isFlatDisplay = false; |
511 | mNavigator = 0; | 516 | mNavigator = 0; |
512 | QBoxLayout *topLayout = new QVBoxLayout(this); | 517 | QBoxLayout *topLayout = new QVBoxLayout(this); |
513 | mName = QString ( name ); | 518 | mName = QString ( name ); |
514 | mBlockUpdate = false; | 519 | mBlockUpdate = false; |
515 | mQuickBar = new QWidget( this ); | 520 | mQuickBar = new QWidget( this ); |
516 | topLayout->addWidget(mQuickBar); | 521 | topLayout->addWidget(mQuickBar); |
517 | 522 | ||
518 | mQuickAdd = new KOQuickTodo(mQuickBar); | 523 | mQuickAdd = new KOQuickTodo(mQuickBar); |
519 | QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); | 524 | QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); |
520 | quickLayout->addWidget( mQuickAdd ); | 525 | quickLayout->addWidget( mQuickAdd ); |
521 | mNewSubBut = new QPushButton( "sub",mQuickBar ); | 526 | mNewSubBut = new QPushButton( "sub",mQuickBar ); |
522 | QPushButton * s_done = new QPushButton( "D",mQuickBar ); | 527 | QPushButton * s_done = new QPushButton( "D",mQuickBar ); |
523 | QPushButton * s_run = new QPushButton( "R",mQuickBar ); | 528 | QPushButton * s_run = new QPushButton( "R",mQuickBar ); |
524 | QPushButton * allopen = new QPushButton( "O",mQuickBar ); | 529 | QPushButton * allopen = new QPushButton( "O",mQuickBar ); |
525 | QPushButton * allclose = new QPushButton( "C",mQuickBar ); | 530 | QPushButton * allclose = new QPushButton( "C",mQuickBar ); |
526 | QPushButton * flat = new QPushButton( "F",mQuickBar ); | 531 | QPushButton * flat = new QPushButton( "F",mQuickBar ); |
527 | 532 | ||
528 | int fixwid = mQuickAdd->sizeHint().height(); | 533 | int fixwid = mQuickAdd->sizeHint().height(); |
529 | int fixhei = fixwid; | 534 | int fixhei = fixwid; |
530 | if ( QApplication::desktop()->width() > 800 ) | 535 | if ( QApplication::desktop()->width() > 800 ) |