File: animations.h

package info (click to toggle)
musescore 2.3.2%2Bdfsg2-7~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 187,932 kB
  • sloc: cpp: 264,610; xml: 176,707; sh: 3,311; ansic: 1,384; python: 356; makefile: 188; perl: 82; pascal: 78
file content (226 lines) | stat: -rw-r--r-- 7,116 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
//////////////////////////////////////////////////////////////////////////////
// oxygenanimations.h
// container for all animation engines
// -------------------
//
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//////////////////////////////////////////////////////////////////////////////

#ifndef __ANIMATIONS_H__

#include "dockseparatorengine.h"
#include "headerviewengine.h"
#include "mdiwindowengine.h"
#include "menubarengine.h"
#include "menuengine.h"
#include "progressbarengine.h"
#include "scrollbarengine.h"
#include "sliderengine.h"
#include "spinboxengine.h"
#include "splitterengine.h"
#include "tabbarengine.h"
#include "toolbarengine.h"
#include "toolboxengine.h"
#include "widgetstateengine.h"

#include "baseengine.h"

class Animations: public QObject {

            Q_OBJECT

      public:

            //! constructor
            explicit Animations( QObject* );

            //! destructor
            virtual ~Animations( void )
                  {}

            //! register animations corresponding to given widget, depending on its type.
            void registerWidget( QWidget* widget ) const;

            /*! unregister all animations associated to a widget */
            void unregisterWidget( QWidget* widget ) const;

            //! enability engine
            WidgetStateEngine& widgetEnabilityEngine( void ) const {
                  return *widgetEnabilityEngine_;
                  }

            //! abstractButton engine
            WidgetStateEngine& widgetStateEngine( void ) const {
                  return *widgetStateEngine_;
                  }

            //! editable combobox arrow hover engine
            WidgetStateEngine& comboBoxEngine( void ) const {
                  return *comboBoxEngine_;
                  }

            //! Tool buttons arrow hover engine
            WidgetStateEngine& toolButtonEngine( void ) const {
                  return *toolButtonEngine_;
                  }

            //! lineEdit engine
            WidgetStateEngine& lineEditEngine( void ) const {
                  return *lineEditEngine_;
                  }

            //! splitter engine
            SplitterEngine& splitterEngine( void ) const {
                  return *splitterEngine_;
                  }

            //! dock separators engine
            DockSeparatorEngine& dockSeparatorEngine( void ) const {
                  return *dockSeparatorEngine_;
                  }

            //! header view engine
            HeaderViewEngine& headerViewEngine( void ) const {
                  return *headerViewEngine_;
                  }

            //! progressbar engine
            ProgressBarEngine& progressBarEngine( void ) const {
                  return *progressBarEngine_;
                  }

            //! menubar engine
            MenuBarBaseEngine& menuBarEngine( void ) const {
                  return *menuBarEngine_;
                  }

            //! menu engine
            MenuBaseEngine& menuEngine( void ) const {
                  return *menuEngine_;
                  }

            //! scrollbar engine
            ScrollBarEngine& scrollBarEngine( void ) const {
                  return *scrollBarEngine_;
                  }

            //! slider engine
            SliderEngine& sliderEngine( void ) const {
                  return *sliderEngine_;
                  }

            //! spinbox engine
            SpinBoxEngine& spinBoxEngine( void ) const {
                  return *spinBoxEngine_;
                  }

            //! tabbar
            TabBarEngine& tabBarEngine( void ) const {
                  return *tabBarEngine_;
                  }

            //! toolbar
            ToolBarEngine& toolBarEngine( void ) const {
                  return *toolBarEngine_;
                  }

            //! toolbox
            ToolBoxEngine& toolBoxEngine( void ) const {
                  return *toolBoxEngine_;
                  }

            //! mdi windows
            MdiWindowEngine& mdiWindowEngine( void ) const {
                  return *mdiWindowEngine_;
                  }

            //! setup engines
            void setupEngines( void );

      protected slots:

            //! enregister engine
            void unregisterEngine( QObject* );
      private:

            //! register new engine
            void registerEngine( BaseEngine* engine );

            //! dock separator handle hover effect
            DockSeparatorEngine* dockSeparatorEngine_;

            //! headerview hover effect
            HeaderViewEngine* headerViewEngine_;

            //! widget enability engine
            WidgetStateEngine* widgetEnabilityEngine_;

            //! abstract button engine
            WidgetStateEngine* widgetStateEngine_;

            //! editable combobox arrow hover effect
            WidgetStateEngine* comboBoxEngine_;

            //! mennu toolbutton arrow hover effect
            WidgetStateEngine* toolButtonEngine_;

            //! line editor engine
            WidgetStateEngine* lineEditEngine_;

            //! QSplitter engine
            SplitterEngine* splitterEngine_;

            //! progressbar engine
            ProgressBarEngine* progressBarEngine_;

            //! menubar engine
            MenuBarBaseEngine* menuBarEngine_;

            //! menu engine
            MenuBaseEngine* menuEngine_;

            //! scrollbar engine
            ScrollBarEngine* scrollBarEngine_;

            //! slider engine
            SliderEngine* sliderEngine_;

            //! spinbox engine
            SpinBoxEngine* spinBoxEngine_;

            //! tabbar engine
            TabBarEngine* tabBarEngine_;

            //! toolbar engine
            ToolBarEngine* toolBarEngine_;

            //! toolbar engine
            ToolBoxEngine* toolBoxEngine_;

            //! mdi window
            MdiWindowEngine* mdiWindowEngine_;

            //! keep list of existing engines
            QList<BaseEngine::Pointer> engines_;

      };

#endif