QElectroTech  0.70
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
GridLayoutAnimation Class Reference

#include <gridlayoutanimation.h>

Public Member Functions

 GridLayoutAnimation (QGraphicsGridLayout *=nullptr, QObject *=nullptr)
 
 ~GridLayoutAnimation () override
 
QGraphicsGridLayout * grid ()
 
void setGrid (QGraphicsGridLayout *)
 
int index () const
 
void setIndex (int)
 
bool actsOnRows () const
 
void setActsOnRows (bool)
 

Protected Member Functions

void updateCurrentValue (const QVariant &) override
 

Private Attributes

QGraphicsGridLayout * grid_
 Grid this class will animate. More...
 
bool row_
 Whether we should animate a row or a column. More...
 
int index_
 Index of the row/column to be animated. More...
 

Detailed Description

This class allows animating a dimension change for a QGraphicsGridLayout row or column.

Definition at line 26 of file gridlayoutanimation.h.

Constructor & Destructor Documentation

◆ GridLayoutAnimation()

GridLayoutAnimation::GridLayoutAnimation ( QGraphicsGridLayout *  grid = nullptr,
QObject *  parent = nullptr 
)

Constructor

Parameters
gridGrid to be animated
parentParent QObject

Definition at line 25 of file gridlayoutanimation.cpp.

◆ ~GridLayoutAnimation()

GridLayoutAnimation::~GridLayoutAnimation ( )
override

Destructor

Definition at line 34 of file gridlayoutanimation.cpp.

Member Function Documentation

◆ actsOnRows()

bool GridLayoutAnimation::actsOnRows ( ) const
Returns
true if this object acts on a row, false if it acts on a column.

Definition at line 68 of file gridlayoutanimation.cpp.

References row_.

◆ grid()

QGraphicsGridLayout * GridLayoutAnimation::grid ( )
Returns
the animated grid

Definition at line 40 of file gridlayoutanimation.cpp.

References grid_.

Referenced by setGrid().

◆ index()

int GridLayoutAnimation::index ( ) const
Returns
the index of the row/column to be animated

Definition at line 54 of file gridlayoutanimation.cpp.

References index_.

Referenced by setIndex().

◆ setActsOnRows()

void GridLayoutAnimation::setActsOnRows ( bool  acts_on_row)
Parameters
acts_on_rowtrue for this object to act on a row, false for it to act on a column.

Definition at line 76 of file gridlayoutanimation.cpp.

References row_.

◆ setGrid()

void GridLayoutAnimation::setGrid ( QGraphicsGridLayout *  grid)
Parameters
gridThe grid to be animated

Definition at line 47 of file gridlayoutanimation.cpp.

References grid(), and grid_.

◆ setIndex()

void GridLayoutAnimation::setIndex ( int  index)
Parameters
indexthe index of the row/column to be animated

Definition at line 61 of file gridlayoutanimation.cpp.

References index(), and index_.

◆ updateCurrentValue()

void GridLayoutAnimation::updateCurrentValue ( const QVariant &  value)
overrideprotected

Implementation of QVariantAnimation::updateCurrentValue().

Definition at line 83 of file gridlayoutanimation.cpp.

References grid_, index_, and row_.

Member Data Documentation

◆ grid_

QGraphicsGridLayout* GridLayoutAnimation::grid_
private

Grid this class will animate.

Definition at line 46 of file gridlayoutanimation.h.

Referenced by grid(), setGrid(), and updateCurrentValue().

◆ index_

int GridLayoutAnimation::index_
private

Index of the row/column to be animated.

Definition at line 48 of file gridlayoutanimation.h.

Referenced by index(), setIndex(), and updateCurrentValue().

◆ row_

bool GridLayoutAnimation::row_
private

Whether we should animate a row or a column.

Definition at line 47 of file gridlayoutanimation.h.

Referenced by actsOnRows(), setActsOnRows(), and updateCurrentValue().


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