Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
mediaiconservice.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef MEDIAICONSERVICE_H
22 #define MEDIAICONSERVICE_H
23 
24 #include <QObject>
25 #include <QTimer>
26 #include <QMutex>
27 
28 #include "project/media.h"
29 
30 enum IconType {
36 };
37 
38 class MediaIconService : public QObject {
39  Q_OBJECT
40 public:
42 public slots:
43  void SetMediaIcon(Media* media, int icon_type);
44 signals:
45  void IconChanged();
46 private slots:
47  void AnimationUpdate();
48 private:
50  QVector<Media*> throbber_items_;
54 };
55 
56 namespace olive {
57 extern std::unique_ptr<MediaIconService> media_icon_service;
58 }
59 
60 #endif // MEDIAICONSERVICE_H
Definition: mediaiconservice.h:38
int throbber_animation_frame_
Definition: mediaiconservice.h:49
std::unique_ptr< MediaIconService > media_icon_service
Definition: mediaiconservice.cpp:29
Definition: mediaiconservice.h:33
QVector< Media * > throbber_items_
Definition: mediaiconservice.h:50
Definition: mediaiconservice.h:35
QPixmap throbber_pixmap_
Definition: mediaiconservice.h:52
QTimer throbber_animator_
Definition: mediaiconservice.h:51
Definition: mediaiconservice.h:32
Definition: mediaiconservice.h:34
void AnimationUpdate()
Definition: mediaiconservice.cpp:86
MediaIconService()
Definition: mediaiconservice.cpp:31
Definition: mediaiconservice.h:31
Definition: media.h:45
void SetMediaIcon(Media *media, int icon_type)
Definition: mediaiconservice.cpp:40
QMutex throbber_lock_
Definition: mediaiconservice.h:53
IconType
Definition: mediaiconservice.h:30