Developer Documentation
QtSlideWindow Class Reference

#include <OpenFlipper/widgets/glWidget/QtSlideWindow.hh>

Inheritance diagram for QtSlideWindow:

Public Member Functions

 QtSlideWindow (const QString &_name=0, QGraphicsItem *_parent=0)
 
void updateGeometry ()
 recalculate geometry More...
 
void attachWidget (QWidget *_m)
 attach a child widget More...
 
void detachWidget ()
 detach child widget More...
 
void saveState (QSettings &_settings)
 saves the current state More...
 
void restoreState (QSettings &_settings)
 restores the state More...
 
void updateParentGeometry ()
 Call this to correctly set start and ending positions. More...
 

Private Slots

void detachPressed ()
 detach button pressed More...
 
void dialogClosed ()
 detached dialog closed More...
 
void autohidePressed ()
 autohide button presed More...
 
void slideUp ()
 Slide widget up. More...
 
void slideDown ()
 Slide widget down. More...
 
void animationFinished ()
 Slot is called whenever the animation is finished. More...
 
void startSlideDownAnimation ()
 Start actual slide down. More...
 

Private Member Functions

virtual void paintWindowFrame (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget=0)
 paints decoration More...
 
virtual bool windowFrameEvent (QEvent *_e)
 track frame events More...
 
virtual Qt::WindowFrameSection windowFrameSectionAt (const QPointF &_pos) const
 categorize frame area More...
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
 hove event tracking More...
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event)
 
virtual void resizeEvent (QGraphicsSceneResizeEvent *_event)
 size & position event tracking More...
 
virtual void moveEvent (QGraphicsSceneMoveEvent *_event)
 

Private Attributes

QString name_
 name More...
 
QWidget * mainWidget_
 child widget More...
 
QtGraphicsButtonautohideButton_
 buttons More...
 
QtGraphicsButtondetachButton_
 
QDialog * dialog_
 detached dialog More...
 
QPointF startP_
 Starting position (for animation) More...
 
QPointF endP_
 Ending position (for animation) More...
 
bool down_
 Track if widget is at bottom position. More...
 
QPropertyAnimation * animation_
 Animation object. More...
 
bool animating_
 Is widget animating in this moment? More...
 
QTimer * timer_
 Wait some milliseconds before sliding widget down. More...
 
const int fontHeight_
 height of the default font More...
 

Detailed Description

A graphics scene widget that has a hover slide effect and detach functionality for a child widget

Definition at line 77 of file QtSlideWindow.hh.

Constructor & Destructor Documentation

◆ QtSlideWindow()

QtSlideWindow::QtSlideWindow ( const QString &  _name = 0,
QGraphicsItem *  _parent = 0 
)

Create a glViewer.

Parameters
_namedisplayed titlebar name
_parentparent graphics item

Definition at line 75 of file QtSlideWindow.cc.

Member Function Documentation

◆ animationFinished

void QtSlideWindow::animationFinished ( )
privateslot

Slot is called whenever the animation is finished.

Definition at line 323 of file QtSlideWindow.cc.

◆ attachWidget()

void QtSlideWindow::attachWidget ( QWidget *  _m)

attach a child widget

Definition at line 127 of file QtSlideWindow.cc.

◆ autohidePressed

void QtSlideWindow::autohidePressed ( )
privateslot

autohide button presed

Definition at line 303 of file QtSlideWindow.cc.

◆ detachPressed

void QtSlideWindow::detachPressed ( )
privateslot

detach button pressed

Definition at line 259 of file QtSlideWindow.cc.

◆ detachWidget()

void QtSlideWindow::detachWidget ( )

detach child widget

Definition at line 148 of file QtSlideWindow.cc.

◆ dialogClosed

void QtSlideWindow::dialogClosed ( )
privateslot

detached dialog closed

Definition at line 288 of file QtSlideWindow.cc.

◆ hoverEnterEvent()

void QtSlideWindow::hoverEnterEvent ( QGraphicsSceneHoverEvent *  _event)
privatevirtual

hove event tracking

Definition at line 209 of file QtSlideWindow.cc.

◆ hoverLeaveEvent()

void QtSlideWindow::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  _event)
privatevirtual

Definition at line 233 of file QtSlideWindow.cc.

◆ moveEvent()

void QtSlideWindow::moveEvent ( QGraphicsSceneMoveEvent *  _event)
privatevirtual

Definition at line 252 of file QtSlideWindow.cc.

◆ paintWindowFrame()

void QtSlideWindow::paintWindowFrame ( QPainter *  _painter,
const QStyleOptionGraphicsItem *  _option,
QWidget *  _widget = 0 
)
privatevirtual

paints decoration

Definition at line 168 of file QtSlideWindow.cc.

◆ resizeEvent()

void QtSlideWindow::resizeEvent ( QGraphicsSceneResizeEvent *  _event)
privatevirtual

size & position event tracking

Definition at line 245 of file QtSlideWindow.cc.

◆ restoreState()

void QtSlideWindow::restoreState ( QSettings &  _settings)

restores the state

Definition at line 413 of file QtSlideWindow.cc.

◆ saveState()

void QtSlideWindow::saveState ( QSettings &  _settings)

saves the current state

Definition at line 403 of file QtSlideWindow.cc.

◆ slideDown

void QtSlideWindow::slideDown ( )
privateslot

Slide widget down.

Definition at line 354 of file QtSlideWindow.cc.

◆ slideUp

void QtSlideWindow::slideUp ( )
privateslot

Slide widget up.

Definition at line 337 of file QtSlideWindow.cc.

◆ startSlideDownAnimation

void QtSlideWindow::startSlideDownAnimation ( )
privateslot

Start actual slide down.

Definition at line 365 of file QtSlideWindow.cc.

◆ updateGeometry()

void QtSlideWindow::updateGeometry ( )

recalculate geometry

Definition at line 378 of file QtSlideWindow.cc.

◆ updateParentGeometry()

void QtSlideWindow::updateParentGeometry ( )

Call this to correctly set start and ending positions.

Definition at line 312 of file QtSlideWindow.cc.

◆ windowFrameEvent()

bool QtSlideWindow::windowFrameEvent ( QEvent *  _e)
privatevirtual

track frame events

Definition at line 183 of file QtSlideWindow.cc.

◆ windowFrameSectionAt()

Qt::WindowFrameSection QtSlideWindow::windowFrameSectionAt ( const QPointF &  _pos) const
privatevirtual

categorize frame area

Definition at line 198 of file QtSlideWindow.cc.

Member Data Documentation

◆ animating_

bool QtSlideWindow::animating_
private

Is widget animating in this moment?

Definition at line 176 of file QtSlideWindow.hh.

◆ animation_

QPropertyAnimation* QtSlideWindow::animation_
private

Animation object.

Definition at line 173 of file QtSlideWindow.hh.

◆ autohideButton_

QtGraphicsButton* QtSlideWindow::autohideButton_
private

buttons

Definition at line 157 of file QtSlideWindow.hh.

◆ detachButton_

QtGraphicsButton* QtSlideWindow::detachButton_
private

Definition at line 158 of file QtSlideWindow.hh.

◆ dialog_

QDialog* QtSlideWindow::dialog_
private

detached dialog

Definition at line 161 of file QtSlideWindow.hh.

◆ down_

bool QtSlideWindow::down_
private

Track if widget is at bottom position.

Definition at line 170 of file QtSlideWindow.hh.

◆ endP_

QPointF QtSlideWindow::endP_
private

Ending position (for animation)

Definition at line 167 of file QtSlideWindow.hh.

◆ fontHeight_

const int QtSlideWindow::fontHeight_
private

height of the default font

Definition at line 182 of file QtSlideWindow.hh.

◆ mainWidget_

QWidget* QtSlideWindow::mainWidget_
private

child widget

Definition at line 154 of file QtSlideWindow.hh.

◆ name_

QString QtSlideWindow::name_
private

name

Definition at line 151 of file QtSlideWindow.hh.

◆ startP_

QPointF QtSlideWindow::startP_
private

Starting position (for animation)

Definition at line 164 of file QtSlideWindow.hh.

◆ timer_

QTimer* QtSlideWindow::timer_
private

Wait some milliseconds before sliding widget down.

Definition at line 179 of file QtSlideWindow.hh.


The documentation for this class was generated from the following files: