-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 @@ -459,96 +459,101 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) } void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) { QListView::contentsMouseReleaseEvent(e); mMousePressed = false; } void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) { if (!e) return; QPoint vp = contentsToViewport(e->pos()); QListViewItem *item = itemAt(vp); emit double_Clicked(item); if (!item) return; emit doubleClicked(item,vp,0); } ///////////////////////////////////////////////////////////////////////////// KOQuickTodo::KOQuickTodo(QWidget *parent) : QLineEdit(parent) { setText(i18n("Click to add new Todo")); setFocusPolicy ( QWidget::ClickFocus ); } void KOQuickTodo::focusInEvent(QFocusEvent *ev) { if ( text()==i18n("Click to add new Todo") ) setText(""); QLineEdit::focusInEvent(ev); } void KOQuickTodo::focusOutEvent(QFocusEvent *ev) { setText(i18n("Click to add new Todo")); QLineEdit::focusOutEvent(ev); } ///////////////////////////////////////////////////////////////////////////// KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : KOrg::BaseView(calendar,parent,name) { + + mCurItem = 0; + mCurItemRootParent = 0; + mCurItemParent = 0; + mCurItemAbove = 0; mActiveItem = 0; mCategoryPopupMenu = 0; mPendingUpdateBeforeRepaint = false; isFlatDisplay = false; mNavigator = 0; QBoxLayout *topLayout = new QVBoxLayout(this); mName = QString ( name ); mBlockUpdate = false; mQuickBar = new QWidget( this ); topLayout->addWidget(mQuickBar); mQuickAdd = new KOQuickTodo(mQuickBar); QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); quickLayout->addWidget( mQuickAdd ); mNewSubBut = new QPushButton( "sub",mQuickBar ); QPushButton * s_done = new QPushButton( "D",mQuickBar ); QPushButton * s_run = new QPushButton( "R",mQuickBar ); QPushButton * allopen = new QPushButton( "O",mQuickBar ); QPushButton * allclose = new QPushButton( "C",mQuickBar ); QPushButton * flat = new QPushButton( "F",mQuickBar ); int fixwid = mQuickAdd->sizeHint().height(); int fixhei = fixwid; if ( QApplication::desktop()->width() > 800 ) fixwid = (fixwid*3)/2; connect ( flat, SIGNAL ( clicked()), SLOT ( setAllFlat())); connect ( allopen, SIGNAL ( clicked()), SLOT ( setAllOpen())); connect ( allclose, SIGNAL ( clicked()), SLOT ( setAllClose())); s_done->setPixmap( SmallIcon("greenhook16")); connect ( s_done, SIGNAL ( clicked()), SLOT ( toggleCompleted())); s_run->setPixmap( SmallIcon("ko16old")); connect ( s_run, SIGNAL ( clicked()), SLOT ( toggleRunning())); connect ( mNewSubBut, SIGNAL ( clicked()), SLOT ( newSubTodo())); mNewSubBut->setFixedWidth(mNewSubBut->sizeHint().width() ); mNewSubBut->setEnabled( false ); flat->setFixedWidth( fixwid ); s_done->setFixedWidth( fixwid ); allopen->setFixedWidth( fixwid ); allclose->setFixedWidth( fixwid ); s_run->setFixedWidth( fixwid ); flat->setFixedHeight(fixhei ); s_done->setFixedHeight(fixhei ); allopen->setFixedHeight(fixhei ); allclose->setFixedHeight(fixhei ); s_run->setFixedHeight(fixhei ); |