QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
gridlayoutanimation.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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
26class 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
Definition gridlayoutanimation.h:26
void setActsOnRows(bool)
Definition gridlayoutanimation.cpp:80
void setIndex(int)
Definition gridlayoutanimation.cpp:64
int index_
Index of the row/column to be animated.
Definition gridlayoutanimation.h:48
void setGrid(QGraphicsGridLayout *)
Definition gridlayoutanimation.cpp:49
bool actsOnRows() const
Definition gridlayoutanimation.cpp:71
QGraphicsGridLayout * grid()
Definition gridlayoutanimation.cpp:41
int index() const
Definition gridlayoutanimation.cpp:56
~GridLayoutAnimation() override
Definition gridlayoutanimation.cpp:34
bool row_
Whether we should animate a row or a column.
Definition gridlayoutanimation.h:47
void updateCurrentValue(const QVariant &) override
Definition gridlayoutanimation.cpp:87
QGraphicsGridLayout * grid_
Grid this class will animate.
Definition gridlayoutanimation.h:46