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>
34 class MonitorEditWidget : public QWidget
39 explicit MonitorEditWidget(Render *renderer, QWidget* parent = 0);
40 virtual ~MonitorEditWidget();
42 /** @brief Updates the necessary settings on a profile change. */
43 void resetProfile(Render *renderer);
45 /** @brief Returns the on-monitor scene. */
46 MonitorScene *getScene() const;
48 /** @brief Returns the action toggling between the normal monitor and the editor. */
49 QAction *getVisibilityAction();
50 /** @brief Shows/Hides the visibility button/action. */
51 void showVisibilityButton(bool show);
53 /** @brief Adds a custom widget to the controls. */
54 void addCustomControl(QWidget *widget);
55 void addCustomButton(const QIcon &icon, const QString &text, const QObject *receiver, const char *member, bool checkable = true, bool checked = true);
56 /** @brief Empties the list of custom controls. */
57 void removeCustomControls();
60 /** @brief Sets the KdenliveSetting directupdate with true = update parameters (rerender frame) during mouse move (before mouse button is released) */
61 void slotSetDirectUpdate(bool directUpdate);
62 /** @brief Update zoom slider value */
63 void slotZoom(int value);
65 Ui::MonitorEditWidget_UI m_ui;
66 MonitorScene *m_scene;
67 QGraphicsView *m_view;
68 QAction *m_visibilityAction;
69 QVBoxLayout *m_customControlsLayout;
72 /** true = show edit monitor, false = show normal monitor */
73 void showEdit(bool show, bool manuallyTriggered = true);