]> git.sesse.net Git - kdenlive/blob - src/testwidget.cpp
0e6c942aca4a14538c92b154b8720747e7f364fc
[kdenlive] / src / testwidget.cpp
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 #include "testwidget.h"
12 #include "ui_testwidget_ui.h"
13
14 #include <QMenu>
15 #include <QDebug>
16
17 TestWidget::TestWidget(Monitor *projMonitor, Monitor *clipMonitor, QWidget *parent) :
18     AbstractScopeWidget(projMonitor, clipMonitor, parent)
19 {
20     ui = new Ui::TestWidget_UI();
21     ui->setupUi(this);
22
23     m_aTest = new QAction("Hallo. ", this);
24     m_menu->addAction(m_aTest);
25 }
26
27 TestWidget::~TestWidget()
28 {
29     delete ui;
30     delete m_aTest;
31 }
32
33 ///// Implemented Methods /////
34
35 QImage TestWidget::renderHUD(uint)
36 {
37     emit signalHUDRenderingFinished(0, 1);
38     return QImage();
39 }
40
41 QImage TestWidget::renderScope(uint)
42 {
43     emit signalScopeRenderingFinished(0, 1);
44     return QImage();
45 }
46
47 QImage TestWidget::renderBackground(uint)
48 {
49     emit signalBackgroundRenderingFinished(0, 1);
50     return QImage();
51 }
52
53 QString TestWidget::widgetName() const { return "Testwidget"; }
54 bool TestWidget::isHUDDependingOnInput() const { return false; }
55 bool TestWidget::isScopeDependingOnInput() const { return false; }
56 bool TestWidget::isBackgroundDependingOnInput() const { return false; }
57
58 QRect TestWidget::scopeRect()
59 {
60     return QRect(QPoint(offset, ui->line->y() + 2*offset), this->rect().bottomRight() - QPoint(offset, offset));
61 }
62