kwin Library API Documentation

ButtonDropSite Class Reference

This class renders and handles the demo titlebar dropsite. More...

#include <buttons.h>

Inheritance diagram for ButtonDropSite:

QFrame List of all members.

Public Slots

bool removeSelectedButton ()
void recalcItemGeometry ()

Signals

void buttonAdded (QChar btn)
void buttonRemoved (QChar btn)
void changed ()

Public Member Functions

 ButtonDropSite (QWidget *parent=0, const char *name=0)
 ~ButtonDropSite ()
void clearLeft ()
void clearRight ()

Public Attributes

ButtonList buttonsLeft
ButtonList buttonsRight

Protected Member Functions

void resizeEvent (QResizeEvent *)
void dragEnterEvent (QDragEnterEvent *e)
void dragMoveEvent (QDragMoveEvent *e)
void dragLeaveEvent (QDragLeaveEvent *e)
void dropEvent (QDropEvent *e)
void mousePressEvent (QMouseEvent *e)
void drawContents (QPainter *p)
ButtonDropSiteItembuttonAt (QPoint p)
bool removeButton (ButtonDropSiteItem *item)
int calcButtonListWidth (const ButtonList &buttons)
void drawButtonList (QPainter *p, const ButtonList &buttons, int offset)
QRect leftDropArea ()
QRect rightDropArea ()

Detailed Description

This class renders and handles the demo titlebar dropsite.

Definition at line 139 of file buttons.h.


Member Function Documentation

bool ButtonDropSite::removeSelectedButton  )  [slot]
 

This slot is called after we drop on the item listbox...

Definition at line 566 of file buttons.cpp.

References ButtonDropSiteItem::button(), recalcItemGeometry(), removeButton(), and Button::type.

void ButtonDropSite::recalcItemGeometry  )  [slot]
 

Call this whenever the item list changes... updates the items' rect property.

Definition at line 500 of file buttons.cpp.

References QValueList::begin(), buttonsLeft, buttonsRight, calcButtonListWidth(), QValueList< ButtonDropSiteItem * >::const_iterator(), QFrame::contentsRect(), QValueList::end(), QRect::left(), QRect::right(), and QRect::top().

Referenced by dropEvent(), removeSelectedButton(), resizeEvent(), ButtonPositionWidget::setButtonsLeft(), and ButtonPositionWidget::setButtonsRight().

void ButtonDropSite::mousePressEvent QMouseEvent e  )  [protected]
 

Starts dragging a button...

Definition at line 484 of file buttons.cpp.

References ButtonDropSiteItem::button(), buttonAt(), Button::icon, and QMouseEvent::pos().

int ButtonDropSite::calcButtonListWidth const ButtonList buttons  )  [protected]
 

Computes the total space the buttons will take in the titlebar.

Definition at line 556 of file buttons.cpp.

References QValueList::begin(), QValueList< ButtonDropSiteItem * >::const_iterator(), and QValueList::end().

Referenced by drawContents(), leftDropArea(), recalcItemGeometry(), and rightDropArea().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kwin Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 30 18:40:45 2005 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003