QElectroTech  0.70
gridlayoutanimation.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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
QGraphicsGridLayout * grid_
Grid this class will animate.
GridLayoutAnimation(QGraphicsGridLayout *=nullptr, QObject *=nullptr)
void setGrid(QGraphicsGridLayout *)
int index_
Index of the row/column to be animated.
bool row_
Whether we should animate a row or a column.
void updateCurrentValue(const QVariant &) override
QGraphicsGridLayout * grid()