kwin Library API Documentation

Redmond::RedmondDeco Class Reference

Inheritance diagram for Redmond::RedmondDeco:

KDecoration QObject KDecorationDefines List of all members.

Public Member Functions

 RedmondDeco (KDecorationBridge *, KDecorationFactory *)
 ~RedmondDeco ()
void init ()

Protected Slots

void slotReset ()
void slotMaximize ()
void menuButtonPressed ()

Protected Member Functions

void resizeEvent (QResizeEvent *)
void paintEvent (QPaintEvent *)
void showEvent (QShowEvent *)
void mouseDoubleClickEvent (QMouseEvent *)
void captionChange (const QString &name)
void maximizeChange (bool m)
void activeChange (bool)
void iconChange ()
void calcHiddenButtons ()
Position mousePosition (const QPoint &) const
void borders (int &, int &, int &, int &) const
void resize (const QSize &)
QSize minimumSize () const
void activeChange ()
void captionChange ()
void maximizeChange ()
void desktopChange ()
void shadeChange ()
bool eventFilter (QObject *, QEvent *)

Detailed Description

Definition at line 68 of file redmond.h.


Member Function Documentation

void Redmond::RedmondDeco::init  )  [virtual]
 

This function is called immediately after the decoration object is created.

Due to some technical reasons, initialization should be done here instead of in the constructor.

Implements KDecoration.

Definition at line 370 of file redmond.cpp.

References QGridLayout::addColSpacing(), QBoxLayout::addItem(), QGridLayout::addItem(), QGridLayout::addLayout(), QGridLayout::addRowSpacing(), QBoxLayout::addSpacing(), QBoxLayout::addWidget(), QGridLayout::addWidget(), Redmond::borderWidth, Redmond::close_bits, KDecoration::closeWindow(), QObject::connect(), KDecoration::createMainWidget(), iconChange(), Redmond::iconify_bits, KDecoration::isCloseable(), KDecoration::isMaximizable(), KDecoration::isMinimizable(), KDecoration::isPreview(), QWidget::layout(), Redmond::maximize_bits, menuButtonPressed(), KDecoration::minimize(), Redmond::normalTitleHeight, KDecoration::providesContextHelp(), Redmond::question_bits, QWidget::setBackgroundMode(), QGridLayout::setRowStretch(), KDecoration::showContextHelp(), slotMaximize(), and KDecoration::widget().

void Redmond::RedmondDeco::iconChange  )  [protected, virtual]
 

This function is called whenever the window icon changes.

Use icon() to get it.

Implements KDecoration.

Definition at line 472 of file redmond.cpp.

References Redmond::defaultMenuPix, KDecoration::icon(), QPixmap::isNull(), QIconSet::pixmap(), and Redmond::RedmondButton::setPixmap().

Referenced by init().

RedmondDeco::Position Redmond::RedmondDeco::mousePosition const QPoint  )  const [protected, virtual]
 

This function should return mouse cursor position in the decoration.

Positions at the edge will result in window resizing with mouse button pressed, center position will result in moving.

Implements KDecoration.

Definition at line 720 of file redmond.cpp.

References Redmond::borderWidth, KDecoration::height(), KDecoration::width(), QPoint::x(), and QPoint::y().

void Redmond::RedmondDeco::borders int &  ,
int &  ,
int &  ,
int & 
const [protected, virtual]
 

This function should return the distance from each window side to the inner window.

The sizes may depend on the state of the decorated window, such as whether it's shaded. Decorations often turn off their bottom border when the window is shaded, and turn off their left/right/bottom borders when the window is maximized and moving and resizing of maximized windows is disabled. This function mustn't do any repaints or resizes. Also, if the sizes returned by this function don't match the real values, this may result in drawing errors or other problems.

See also:
KDecorationOptions::moveResizeMaximizedWindows()

Implements KDecoration.

Definition at line 751 of file redmond.cpp.

References Redmond::borderWidth.

void Redmond::RedmondDeco::resize const QSize  )  [protected, virtual]
 

This method is called by kwin when the style should resize the decoration window.

The usual implementation is to resize the main widget of the decoration to the given size.

Parameters:
s Specifies the new size of the decoration window.

Implements KDecoration.

Definition at line 760 of file redmond.cpp.

References QWidget::resize(), and KDecoration::widget().

QSize Redmond::RedmondDeco::minimumSize  )  const [protected, virtual]
 

This function should return the minimum required size for the decoration.

Note that the returned size shouldn't be too large, because it will be used to keep the decorated window at least as large.

Implements KDecoration.

Definition at line 765 of file redmond.cpp.

void Redmond::RedmondDeco::activeChange  )  [protected, virtual]
 

This function is called whenever the window either becomes or stops being active.

Use isActive() to find out the current state.

Implements KDecoration.

Definition at line 770 of file redmond.cpp.

References KDecoration::icon(), QPixmap::isNull(), Redmond::kdelogo, QIconSet::pixmap(), QWidget::repaint(), Redmond::RedmondButton::reset(), Redmond::RedmondButton::setPixmap(), and KDecoration::widget().

void Redmond::RedmondDeco::captionChange  )  [protected, virtual]
 

This function is called whenever the caption changes.

Use caption() to get it.

Implements KDecoration.

Definition at line 787 of file redmond.cpp.

References QWidget::repaint(), and KDecoration::widget().

void Redmond::RedmondDeco::maximizeChange  )  [protected, virtual]
 

This function is called whenever the maximalization state of the window changes.

Use maximizeMode() to get the current state.

Implements KDecoration.

Definition at line 792 of file redmond.cpp.

References QToolTip::add(), Redmond::maximize_bits, KDecorationDefines::MaximizeFull, KDecoration::maximizeMode(), Redmond::minmax_bits, QToolTip::remove(), and Redmond::RedmondButton::setBitmap().

void Redmond::RedmondDeco::desktopChange  )  [protected, virtual]
 

This function is called whenever the desktop for the window changes.

Use desktop() or isOnAllDesktops() to find out the current desktop on which the window is.

Implements KDecoration.

Definition at line 800 of file redmond.cpp.

void Redmond::RedmondDeco::shadeChange  )  [protected, virtual]
 

This function is called whenever the window is shaded or unshaded.

Use isShade() to get the current state.

Implements KDecoration.

Definition at line 804 of file redmond.cpp.


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 Tue Jun 13 19:28:04 2006 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003