]> git.sesse.net Git - kdenlive/blob - src/widgets/monitoreditwidget.h
Moving choosecolorwidget and colorpickerwidget in the widget folder.
[kdenlive] / src / widgets / monitoreditwidget.h
1 /***************************************************************************
2  *   Copyright (C) 2011 by Till Theato (root@ttill.de)                     *
3  *   This file is part of Kdenlive (www.kdenlive.org).                     *
4  *                                                                         *
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.                                   *
9  *                                                                         *
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.                          *
14  *                                                                         *
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  ***************************************************************************/
18
19 #ifndef MONITOREDITWIDGET_H_
20 #define MONITOREDITWIDGET_H_
21
22 #include "ui_monitoreditwidget_ui.h"
23
24 #include <QWidget>
25
26 class QIcon;
27 class MonitorScene;
28 class Render;
29 class QGraphicsView;
30 class QVBoxLayout;
31
32
33 class MonitorEditWidget : public QWidget
34 {
35     Q_OBJECT
36
37 public:
38     explicit MonitorEditWidget(Render *renderer, QWidget* parent = 0);
39     ~MonitorEditWidget();
40
41     /** @brief Updates the necessary settings on a profile change. */
42     void resetProfile(Render *renderer);
43
44     /** @brief Returns the on-monitor scene. */
45     MonitorScene *getScene() const;
46
47     /** @brief Returns the action toggling between the normal monitor and the editor. */
48     QAction *getVisibilityAction();
49     /** @brief Shows/Hides the visibility button/action. */
50     void showVisibilityButton(bool show);
51
52     /** @brief Adds a custom widget to the controls. */
53     void addCustomControl(QWidget *widget);
54     void addCustomButton(const QIcon &icon, const QString &text, const QObject *receiver, const char *member, bool checkable = true, bool checked = true);
55     /** @brief Empties the list of custom controls. */
56     void removeCustomControls();
57
58 private slots:
59     /** @brief Sets the KdenliveSetting directupdate with true = update parameters (rerender frame) during mouse move (before mouse button is released) */
60     void slotSetDirectUpdate(bool directUpdate);
61     /** @brief Update zoom slider value */
62     void slotZoom(int value);
63 private:
64     Ui::MonitorEditWidget_UI m_ui;
65     MonitorScene *m_scene;
66     QGraphicsView *m_view;
67     QAction *m_visibilityAction;
68     QVBoxLayout *m_customControlsLayout;
69
70 signals:
71     /** true = show edit monitor, false = show normal monitor */
72     void showEdit(bool show, bool manuallyTriggered = true);
73 };
74
75
76 #endif