QElectroTech  0.8-dev
gridlayoutanimation.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef TITLEBLOCK_SLASH_GRID_LAYOUT_ANIMATION_H
19 #define TITLEBLOCK_SLASH_GRID_LAYOUT_ANIMATION_H
20 #include <QtWidgets>
21 
26 class GridLayoutAnimation : public QVariantAnimation {
27  // Constructors, destructor
28  public:
29  GridLayoutAnimation(QGraphicsGridLayout * = nullptr, QObject * = nullptr);
30  ~GridLayoutAnimation() override;
31 
32  // methods
33  public:
34  QGraphicsGridLayout *grid();
35  void setGrid(QGraphicsGridLayout *);
36  int index() const;
37  void setIndex(int);
38  bool actsOnRows() const;
39  void setActsOnRows(bool);
40 
41  protected:
42  void updateCurrentValue(const QVariant &) override;
43 
44  // attributes
45  private:
46  QGraphicsGridLayout *grid_;
47  bool row_;
48  int index_;
49 };
50 #endif
GridLayoutAnimation::grid_
QGraphicsGridLayout * grid_
Grid this class will animate.
Definition: gridlayoutanimation.h:46
GridLayoutAnimation
Definition: gridlayoutanimation.h:26
GridLayoutAnimation::grid
QGraphicsGridLayout * grid()
Definition: gridlayoutanimation.cpp:40
GridLayoutAnimation::setGrid
void setGrid(QGraphicsGridLayout *)
Definition: gridlayoutanimation.cpp:47
gridlayoutanimation.h
GridLayoutAnimation::index_
int index_
Index of the row/column to be animated.
Definition: gridlayoutanimation.h:48
GridLayoutAnimation::actsOnRows
bool actsOnRows() const
Definition: gridlayoutanimation.cpp:68
GridLayoutAnimation::row_
bool row_
Whether we should animate a row or a column.
Definition: gridlayoutanimation.h:47
GridLayoutAnimation::setIndex
void setIndex(int)
Definition: gridlayoutanimation.cpp:61
GridLayoutAnimation::GridLayoutAnimation
GridLayoutAnimation(QGraphicsGridLayout *=nullptr, QObject *=nullptr)
Definition: gridlayoutanimation.cpp:25
GridLayoutAnimation::updateCurrentValue
void updateCurrentValue(const QVariant &) override
Definition: gridlayoutanimation.cpp:83
GridLayoutAnimation::~GridLayoutAnimation
~GridLayoutAnimation() override
Definition: gridlayoutanimation.cpp:34
GridLayoutAnimation::index
int index() const
Definition: gridlayoutanimation.cpp:54
GridLayoutAnimation::setActsOnRows
void setActsOnRows(bool)
Definition: gridlayoutanimation.cpp:76