]> git.sesse.net Git - kdenlive/blob - src/scopes/colorscopes/abstractgfxscopewidget.h
Fix forward declaration
[kdenlive] / src / scopes / colorscopes / abstractgfxscopewidget.h
1 /***************************************************************************
2  *   Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com)      *
3  *   This file is part of kdenlive. See www.kdenlive.org.                  *
4  *                                                                         *
5  *   This program 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
11 #ifndef ABSTRACTGFXSCOPEWIDGET_H
12 #define ABSTRACTGFXSCOPEWIDGET_H
13
14 #include <QtCore>
15 #include <QtCore/QString>
16 #include <QWidget>
17
18 #include "../abstractscopewidget.h"
19
20
21
22 /**
23 \brief Abstract class for scopes analyzing image frames.
24 */
25 class AbstractGfxScopeWidget : public AbstractScopeWidget
26 {
27     Q_OBJECT
28
29 public:
30     explicit AbstractGfxScopeWidget(bool trackMouse = false, QWidget *parent = 0);
31     virtual ~AbstractGfxScopeWidget(); // Must be virtual because of inheritance, to avoid memory leaks
32
33 protected:
34     ///// Variables /////
35
36     /** @brief Scope renderer. Must emit signalScopeRenderingFinished()
37         when calculation has finished, to allow multi-threading.
38         accelerationFactor hints how much faster than usual the calculation should be accomplished, if possible. */
39     virtual QImage renderGfxScope(uint accelerationFactor, const QImage) = 0;
40
41     virtual QImage renderScope(uint accelerationFactor);
42
43     void mouseReleaseEvent(QMouseEvent *);
44
45 private:
46     QImage m_scopeImage;
47     QMutex m_mutex;
48
49 public slots:
50     /** @brief Must be called when the active monitor has shown a new frame.
51       This slot must be connected in the implementing class, it is *not*
52       done in this abstract class. */
53     void slotRenderZoneUpdated(const QImage);
54
55 protected slots:
56     virtual void slotAutoRefreshToggled(bool autoRefresh);
57
58 signals:
59     void signalFrameRequest(const QString widgetName);
60
61 };
62
63 #endif // ABSTRACTGFXSCOPEWIDGET_H