author | zautrix <zautrix> | 2005-06-19 08:07:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-19 08:07:46 (UTC) |
commit | 98f69fd81c23d99d9fe80326d4bc4d3af23e18ec (patch) (unidiff) | |
tree | 06472b263700b7d07030876c33f2535bf3ae51cb | |
parent | a2e963324e6db541f322002c307b40f24747e036 (diff) | |
download | kdepimpi-98f69fd81c23d99d9fe80326d4bc4d3af23e18ec.zip kdepimpi-98f69fd81c23d99d9fe80326d4bc4d3af23e18ec.tar.gz kdepimpi-98f69fd81c23d99d9fe80326d4bc4d3af23e18ec.tar.bz2 |
ompi select all
-rw-r--r-- | kmicromail/opiemail.cpp | 9 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 8ac3451..e296d9c 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -487,12 +487,20 @@ void OpieMail::slotDeleteAllMail() | |||
487 | } | 487 | } |
488 | void OpieMail::clearSelection() | 488 | void OpieMail::clearSelection() |
489 | { | 489 | { |
490 | mailView->clearSelection(); | 490 | mailView->clearSelection(); |
491 | 491 | ||
492 | } | 492 | } |
493 | void OpieMail::selectAll() | ||
494 | { | ||
495 | QListViewItem* item = mailView->firstChild (); | ||
496 | while ( item ) { | ||
497 | mailView->setSelected ( item, true ); | ||
498 | item = item->nextSibling(); | ||
499 | } | ||
500 | } | ||
493 | 501 | ||
494 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | 502 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) |
495 | { | 503 | { |
496 | if (!mailView->currentItem()) return; | 504 | if (!mailView->currentItem()) return; |
497 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); | 505 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); |
498 | /* just the RIGHT button - or hold on pda */ | 506 | /* just the RIGHT button - or hold on pda */ |
@@ -517,12 +525,13 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | |||
517 | m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); | 525 | m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); |
518 | m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); | 526 | m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); |
519 | m->insertSeparator(); | 527 | m->insertSeparator(); |
520 | m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); | 528 | m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); |
521 | m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); | 529 | m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); |
522 | m->insertSeparator(); | 530 | m->insertSeparator(); |
531 | m->insertItem(i18n("Select all"),this,SLOT(selectAll())); | ||
523 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); | 532 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); |
524 | } | 533 | } |
525 | m->setFocus(); | 534 | m->setFocus(); |
526 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 535 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
527 | delete m; | 536 | delete m; |
528 | } | 537 | } |
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 48c5dda..bdd9058 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h | |||
@@ -48,12 +48,13 @@ protected slots: | |||
48 | virtual void refreshMailView(const QValueList<RecMailP>&); | 48 | virtual void refreshMailView(const QValueList<RecMailP>&); |
49 | virtual void mailLeftClicked( QListViewItem * ); | 49 | virtual void mailLeftClicked( QListViewItem * ); |
50 | virtual void slotMoveCopyMail(); | 50 | virtual void slotMoveCopyMail(); |
51 | virtual void slotMoveCopyAllMail(); | 51 | virtual void slotMoveCopyAllMail(); |
52 | virtual void reEditMail(); | 52 | virtual void reEditMail(); |
53 | void clearSelection(); | 53 | void clearSelection(); |
54 | void selectAll(); | ||
54 | void slotDownloadMail(); | 55 | void slotDownloadMail(); |
55 | private: | 56 | private: |
56 | ComposeMail* mCurrentComposer; | 57 | ComposeMail* mCurrentComposer; |
57 | void closeViewMail(ViewMail * vm); | 58 | void closeViewMail(ViewMail * vm); |
58 | QString mPendingEmail; | 59 | QString mPendingEmail; |
59 | QString mPendingName; | 60 | QString mPendingName; |