1 /***************************************************************************
2 * Copyright (C) 2011 by Till Theato (root@ttill.de) *
3 * This file is part of Kdenlive (www.kdenlive.org). *
5 * Kdenlive 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. *
10 * Kdenlive 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. *
15 * You should have received a copy of the GNU General Public License *
16 * along with Kdenlive. If not, see <http://www.gnu.org/licenses/>. *
17 ***************************************************************************/
19 #ifndef MONITOREDITWIDGET_H_
20 #define MONITOREDITWIDGET_H_
22 #include "ui_monitoreditwidget_ui.h"
25 #include <QGraphicsView>
35 class MonitorEditWidget : public QWidget
40 explicit MonitorEditWidget(Render *renderer, QWidget* parent = 0);
41 virtual ~MonitorEditWidget();
43 /** @brief Updates the necessary settings on a profile change. */
44 void resetProfile(Render *renderer);
46 /** @brief Returns the on-monitor scene. */
47 MonitorScene *getScene();
49 /** @brief Returns the action toggling between the normal monitor and the editor. */
50 QAction *getVisibilityAction();
51 /** @brief Shows/Hides the visibility button/action. */
52 void showVisibilityButton(bool show);
54 /** @brief Adds a custom widget to the controls. */
55 void addCustomControl(QWidget *widget);
56 void addCustomButton(const QIcon &icon, const QString &text, const QObject *receiver, const char *member, bool checkable = true, bool checked = true);
57 /** @brief Empties the list of custom controls. */
58 void removeCustomControls();
61 /** @brief Sets the KdenliveSetting directupdate with true = update parameters (rerender frame) during mouse move (before mouse button is released) */
62 void slotSetDirectUpdate(bool directUpdate);
63 /** @brief Update zoom slider value */
64 void slotZoom(int value);
66 Ui::MonitorEditWidget_UI m_ui;
67 MonitorScene *m_scene;
68 QGraphicsView *m_view;
69 QAction *m_visibilityAction;
70 QVBoxLayout *m_customControlsLayout;
73 /** true = show edit monitor, false = show normal monitor */
74 void showEdit(bool show, bool manuallyTriggered = true);