• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

korganizer

KOAgendaItem Class Reference

#include <koagendaitem.h>

Inheritance diagram for KOAgendaItem:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class describes the widgets that represent the various calendar items in the agenda view.

The KOAgendaItem has to make sure that it receives all mouse events, which are to be used for dragging and resizing. That means it has to be installed as event filter for its children, if it has children, and it has to pass mouse events from the children to itself. See eventFilter().

Some comments on the movement of multi-day items: Basically, the agenda items are arranged in two implicit double-linked lists. The mMultiItemInfo works like before to describe the currently viewed multi-item. When moving, new events might need to be added to the beginning or the end of the multi-item sequence, or events might need to be hidden. I cannot just delete this items, since I have to restore/show them if the move is reset (i.e. if a drag started). So internally, I keep another doubly-linked list which is longer than the one defined by mMultiItemInfo, but includes the multi-item sequence, too.

The mStartMoveInfo stores the first and last item of the multi-item sequence when the move started. The prev and next members of mStartMoveInfo are used for that longer sequence including all (shown and hidden) items.

Definition at line 83 of file koagendaitem.h.


Public Slots

void addAttendee (const QString &)
void select (bool selected=true)
void updateIcons ()

Signals

void removeAgendaItem (KOAgendaItem *)
void showAgendaItem (KOAgendaItem *)

Public Member Functions

void addConflictItem (KOAgendaItem *ci)
KOAgendaItem * appendMoveItem (KOAgendaItem *)
int cellHeight () const
int cellWidth () const
int cellXLeft () const
int cellXRight () const
int cellYBottom () const
int cellYTop () const
QList< KOAgendaItem * > & conflictItems ()
bool dissociateFromMultiItem ()
void endMove ()
void expandBottom (int dy)
void expandLeft (int dx)
void expandRight (int dx)
void expandTop (int dy)
KOAgendaItem * firstMultiItem () const
Incidence * incidence () const
bool isMultiItem ()
QDate itemDate ()
 KOAgendaItem (Incidence *incidence, const QDate &qd, QWidget *parent)
QString label () const
KOAgendaItem * lastMultiItem () const
MultiItemInfo * moveInfo () const
void moveRelative (int dx, int dy)
KOAgendaItem * nextMoveItem () const
KOAgendaItem * nextMultiItem () const
bool overlaps (KOrg::CellItem *o) const
KOAgendaItem * prependMoveItem (KOAgendaItem *)
KOAgendaItem * prevMoveItem () const
KOAgendaItem * prevMultiItem () const
KOAgendaItem * removeMoveItem (KOAgendaItem *)
void resetMove ()
QColor resourceColor ()
void setCellX (int XLeft, int XRight)
void setCellXRight (int XRight)
void setCellXY (int X, int YTop, int YBottom)
void setCellY (int YTop, int YBottom)
void setConflictItems (QList< KOAgendaItem * >)
bool setIncidence (Incidence *i)
void setItemDate (const QDate &qd)
void setMultiItem (KOAgendaItem *first, KOAgendaItem *prev, KOAgendaItem *next, KOAgendaItem *last)
void setResourceColor (const QColor &color)
void setText (const QString &text)
void startMove ()
QString text ()

Protected Member Functions

void dragEnterEvent (QDragEnterEvent *e)
void dropEvent (QDropEvent *e)
void endMovePrivate ()
bool event (QEvent *event)
void paintEvent (QPaintEvent *e)
void resetMovePrivate ()
void startMovePrivate ()

Protected Attributes

QColor mResourceColor
MultiItemInfo * mStartMoveInfo

Constructor & Destructor Documentation

KOAgendaItem::KOAgendaItem ( Incidence *  incidence,
const QDate &  qd,
QWidget *  parent 
)

Definition at line 77 of file koagendaitem.cpp.


Member Function Documentation

void KOAgendaItem::addAttendee ( const QString &  newAttendee  )  [slot]

Definition at line 601 of file koagendaitem.cpp.

void KOAgendaItem::addConflictItem ( KOAgendaItem *  ci  ) 

Definition at line 669 of file koagendaitem.cpp.

KOAgendaItem * KOAgendaItem::appendMoveItem ( KOAgendaItem *  e  ) 

Definition at line 297 of file koagendaitem.cpp.

int KOAgendaItem::cellHeight (  )  const

Definition at line 197 of file koagendaitem.cpp.

int KOAgendaItem::cellWidth (  )  const

Definition at line 205 of file koagendaitem.cpp.

int KOAgendaItem::cellXLeft (  )  const [inline]

Definition at line 89 of file koagendaitem.h.

int KOAgendaItem::cellXRight (  )  const [inline]

Definition at line 90 of file koagendaitem.h.

int KOAgendaItem::cellYBottom (  )  const [inline]

Definition at line 92 of file koagendaitem.h.

int KOAgendaItem::cellYTop (  )  const [inline]

Definition at line 91 of file koagendaitem.h.

QList< KOAgendaItem * > & KOAgendaItem::conflictItems (  ) 

Definition at line 655 of file koagendaitem.cpp.

bool KOAgendaItem::dissociateFromMultiItem (  ) 

Definition at line 157 of file koagendaitem.cpp.

void KOAgendaItem::dragEnterEvent ( QDragEnterEvent *  e  )  [protected]

Reimplemented from QWidget.

Definition at line 584 of file koagendaitem.cpp.

void KOAgendaItem::dropEvent ( QDropEvent *  e  )  [protected]

Reimplemented from QWidget.

Definition at line 615 of file koagendaitem.cpp.

void KOAgendaItem::endMove (  ) 

End the movement (i.e.

clean up)

Definition at line 489 of file koagendaitem.cpp.

void KOAgendaItem::endMovePrivate (  )  [protected]

Definition at line 498 of file koagendaitem.cpp.

bool KOAgendaItem::event ( QEvent *  event  )  [protected]

Reimplemented from QWidget.

Definition at line 1260 of file koagendaitem.cpp.

void KOAgendaItem::expandBottom ( int  dy  ) 

Definition at line 554 of file koagendaitem.cpp.

void KOAgendaItem::expandLeft ( int  dx  ) 

Definition at line 564 of file koagendaitem.cpp.

void KOAgendaItem::expandRight ( int  dx  ) 

Definition at line 574 of file koagendaitem.cpp.

void KOAgendaItem::expandTop ( int  dy  ) 

Definition at line 544 of file koagendaitem.cpp.

KOAgendaItem* KOAgendaItem::firstMultiItem (  )  const [inline]

Definition at line 132 of file koagendaitem.h.

Incidence* KOAgendaItem::incidence (  )  const [inline]

Definition at line 147 of file koagendaitem.h.

bool KOAgendaItem::isMultiItem (  ) 

Definition at line 251 of file koagendaitem.cpp.

QDate KOAgendaItem::itemDate (  )  [inline]

Definition at line 148 of file koagendaitem.h.

QString KOAgendaItem::label (  )  const

Definition at line 676 of file koagendaitem.cpp.

KOAgendaItem* KOAgendaItem::lastMultiItem (  )  const [inline]

Definition at line 141 of file koagendaitem.h.

MultiItemInfo* KOAgendaItem::moveInfo (  )  const [inline]

Definition at line 121 of file koagendaitem.h.

void KOAgendaItem::moveRelative ( int  dx,
int  dy 
)

Definition at line 534 of file koagendaitem.cpp.

KOAgendaItem* KOAgendaItem::nextMoveItem (  )  const [inline]

Definition at line 118 of file koagendaitem.h.

KOAgendaItem* KOAgendaItem::nextMultiItem (  )  const [inline]

Definition at line 138 of file koagendaitem.h.

bool KOAgendaItem::overlaps ( KOrg::CellItem *  o  )  const

Tells whether this item overlaps item o.

Definition at line 681 of file koagendaitem.cpp.

void KOAgendaItem::paintEvent ( QPaintEvent *  e  )  [protected]

reimp

Reimplemented from QWidget.

Definition at line 750 of file koagendaitem.cpp.

KOAgendaItem * KOAgendaItem::prependMoveItem ( KOAgendaItem *  e  ) 

Definition at line 256 of file koagendaitem.cpp.

KOAgendaItem* KOAgendaItem::prevMoveItem (  )  const [inline]

Definition at line 115 of file koagendaitem.h.

KOAgendaItem* KOAgendaItem::prevMultiItem (  )  const [inline]

Definition at line 135 of file koagendaitem.h.

void KOAgendaItem::removeAgendaItem ( KOAgendaItem *   )  [signal]

KOAgendaItem * KOAgendaItem::removeMoveItem ( KOAgendaItem *  e  ) 

Definition at line 337 of file koagendaitem.cpp.

void KOAgendaItem::resetMove (  ) 

Reset to original values.

Definition at line 416 of file koagendaitem.cpp.

void KOAgendaItem::resetMovePrivate (  )  [protected]

Definition at line 427 of file koagendaitem.cpp.

QColor KOAgendaItem::resourceColor (  )  [inline]

Definition at line 166 of file koagendaitem.h.

void KOAgendaItem::select ( bool  selected = true  )  [slot]

Definition at line 147 of file koagendaitem.cpp.

void KOAgendaItem::setCellX ( int  XLeft,
int  XRight 
)

Definition at line 227 of file koagendaitem.cpp.

void KOAgendaItem::setCellXRight ( int  XRight  ) 

Definition at line 222 of file koagendaitem.cpp.

void KOAgendaItem::setCellXY ( int  X,
int  YTop,
int  YBottom 
)

Definition at line 215 of file koagendaitem.cpp.

void KOAgendaItem::setCellY ( int  YTop,
int  YBottom 
)

Definition at line 233 of file koagendaitem.cpp.

void KOAgendaItem::setConflictItems ( QList< KOAgendaItem * >  ci  ) 

Definition at line 660 of file koagendaitem.cpp.

bool KOAgendaItem::setIncidence ( Incidence *  i  ) 

Definition at line 187 of file koagendaitem.cpp.

void KOAgendaItem::setItemDate ( const QDate &  qd  ) 

Update the date of this item's occurrence (not in the event).

Definition at line 210 of file koagendaitem.cpp.

void KOAgendaItem::setMultiItem ( KOAgendaItem *  first,
KOAgendaItem *  prev,
KOAgendaItem *  next,
KOAgendaItem *  last 
)

Definition at line 239 of file koagendaitem.cpp.

void KOAgendaItem::setResourceColor ( const QColor &  color  )  [inline]

Definition at line 165 of file koagendaitem.h.

void KOAgendaItem::setText ( const QString &  text  )  [inline]

Definition at line 153 of file koagendaitem.h.

void KOAgendaItem::showAgendaItem ( KOAgendaItem *   )  [signal]

void KOAgendaItem::startMove (  ) 

Start movement.

Definition at line 384 of file koagendaitem.cpp.

void KOAgendaItem::startMovePrivate (  )  [protected]

private movement functions.

startMove needs to be called of only one of the multitems. it will then loop through the whole series using startMovePrivate. Same for resetMove and endMove

Definition at line 393 of file koagendaitem.cpp.

QString KOAgendaItem::text (  )  [inline]

Definition at line 154 of file koagendaitem.h.

void KOAgendaItem::updateIcons (  )  [slot]

Definition at line 103 of file koagendaitem.cpp.


Member Data Documentation

QColor KOAgendaItem::mResourceColor [protected]

Definition at line 221 of file koagendaitem.h.

MultiItemInfo* KOAgendaItem::mStartMoveInfo [protected]

Definition at line 219 of file koagendaitem.h.


The documentation for this class was generated from the following files:
  • koagendaitem.h
  • koagendaitem.cpp

korganizer

Skip menu "korganizer"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal