author | zautrix <zautrix> | 2005-07-06 21:48:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-06 21:48:53 (UTC) |
commit | 93bc4dbbef774e28672c947281291b12d5971803 (patch) (side-by-side diff) | |
tree | eac12b91fffe75bfd0c40046c7a13cd746fafc6f /korganizer | |
parent | 630904c92dc014538ff0b08731efb10dcc25426f (diff) | |
download | kdepimpi-93bc4dbbef774e28672c947281291b12d5971803.zip kdepimpi-93bc4dbbef774e28672c947281291b12d5971803.tar.gz kdepimpi-93bc4dbbef774e28672c947281291b12d5971803.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/kotodoview.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 06d40b1..2c017e1 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -447,115 +447,119 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) e->ignore(); break; } return; } e->ignore(); } 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 a new Todo")); + setText(i18n("Click to add new Todo")); } void KOQuickTodo::focusInEvent(QFocusEvent *ev) { - if ( text()==i18n("Click to add a new Todo") ) + if ( text()==i18n("Click to add new Todo") ) setText(""); QLineEdit::focusInEvent(ev); } void KOQuickTodo::focusOutEvent(QFocusEvent *ev) { - setText(i18n("Click to add a new Todo")); + setText(i18n("Click to add new Todo")); QLineEdit::focusOutEvent(ev); } ///////////////////////////////////////////////////////////////////////////// KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : KOrg::BaseView(calendar,parent,name) { 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 ); QPushButton * flat = new QPushButton( "F",mQuickBar ); int fixwid = flat->sizeHint().height(); if ( QApplication::desktop()->width() > 320 ) fixwid *= 2; flat->setFixedWidth( fixwid ); connect ( flat, SIGNAL ( clicked()), SLOT ( setAllFlat())); QPushButton * allopen = new QPushButton( "O",mQuickBar ); allopen->setFixedWidth( fixwid ); connect ( allopen, SIGNAL ( clicked()), SLOT ( setAllOpen())); QPushButton * allclose = new QPushButton( "C",mQuickBar ); allclose->setFixedWidth( fixwid ); connect ( allclose, SIGNAL ( clicked()), SLOT ( setAllClose())); QPushButton * s_done = new QPushButton( "D",mQuickBar ); + s_done->setPixmap( SmallIcon("greenhook16")); s_done->setFixedWidth( fixwid ); + s_done->setFixedHeight( flat->sizeHint().height() ); connect ( s_done, SIGNAL ( clicked()), SLOT ( toggleCompleted())); QPushButton * s_run = new QPushButton( "R",mQuickBar ); + s_run->setPixmap( SmallIcon("ko16old")); s_run->setFixedWidth( fixwid ); + s_run->setFixedHeight( flat->sizeHint().height() ); connect ( s_run, SIGNAL ( clicked()), SLOT ( toggleRunning())); mNewSubBut = new QPushButton( "sub",mQuickBar ); mNewSubBut->setFixedWidth( fixwid*3/2 ); connect ( mNewSubBut, SIGNAL ( clicked()), SLOT ( newSubTodo())); mNewSubBut->setEnabled( false ); quickLayout->addWidget( mNewSubBut ); quickLayout->addWidget( s_done ); quickLayout->addWidget( s_run ); quickLayout->addWidget( allopen ); quickLayout->addWidget( allclose ); quickLayout->addWidget( flat ); if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickBar->hide(); mTodoListView = new KOTodoListView(calendar,this, name ); topLayout->addWidget(mTodoListView); //mTodoListView->header()->setMaximumHeight(30); mTodoListView->setRootIsDecorated(true); mTodoListView->setAllColumnsShowFocus(true); mTodoListView->setShowSortIndicator(true); mTodoListView->addColumn(i18n("Todo")); mTodoListView->addColumn(i18n("Prio")); mTodoListView->setColumnAlignment(1,AlignHCenter); mTodoListView->addColumn(i18n("Complete")); mTodoListView->setColumnAlignment(2,AlignCenter); mTodoListView->addColumn(i18n("Due Date")); mTodoListView->setColumnAlignment(3,AlignLeft); @@ -1089,65 +1093,65 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) { pendingSubtodo = 0; mActiveItem = (KOTodoViewItem *)item; if (item) { switch (column){ case 1: mPriorityPopupMenu->popup(QCursor::pos ()); break; case 2: mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; case 3: moveTodo(); break; case 8: mCategoryPopupMenu->popup(QCursor::pos ()); break; case 9: mCalPopupMenu->popup(QCursor::pos ()); break; default: mItemPopupMenu->popup(QCursor::pos()); } } else mPopupMenu->popup(QCursor::pos()); } void KOTodoView::newTodo() { emit newTodoSignal(); } void KOTodoView::newSubTodo() { mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); if (mActiveItem) { - if ( mQuickAdd->isVisible() && !mQuickAdd->text().isEmpty() && mQuickAdd->text() != i18n("Click to add a new Todo") ) { + if ( mQuickAdd->isVisible() && !mQuickAdd->text().isEmpty() && mQuickAdd->text() != i18n("Click to add new Todo") ) { addQuickTodoPar( mActiveItem->todo()); } else emit newSubTodoSignal(mActiveItem->todo()); } } void KOTodoView::unparentTodo() { if (mActiveItem) { emit unparentTodoSignal(mActiveItem->todo()); } } void KOTodoView::reparentTodo() { if (mActiveItem) { topLevelWidget()->setCaption(i18n("Click on new parent item")); pendingSubtodo = mActiveItem; } } void KOTodoView::editTodo() { if (mActiveItem) { emit editTodoSignal(mActiveItem->todo()); } } void KOTodoView::cloneTodo() { if (mActiveItem) { emit cloneTodoSignal((Incidence*)mActiveItem->todo()); } } void KOTodoView::cancelTodo() |