kwin Library API Documentation

ButtonDropSite Class Reference

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

#include <buttons.h>

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)
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(), 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 calcButtonListWidth(), ButtonDropSiteItem::rect, and ButtonDropSiteItem::width().

Referenced by removeSelectedButton().

void ButtonDropSite::mousePressEvent QMouseEvent *  e  )  [protected]
 

Starts dragging a button...

Definition at line 484 of file buttons.cpp.

References ButtonDropSiteItem::button(), and Button::icon.

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 ButtonDropSiteItem::width().

Referenced by recalcItemGeometry().


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.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jun 14 01:19:59 2006 by doxygen 1.4.0 written by Dimitri van Heesch, © 1997-2003