]> git.sesse.net Git - kdenlive/blob - src/monitoreditwidget.h
const'ify
[kdenlive] / src / 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 #include <QGraphicsView>
26
27 class QIcon;
28 class MonitorScene;
29 class Render;
30 class QGraphicsView;
31 class QVBoxLayout;
32
33
34 class MonitorEditWidget : public QWidget
35 {
36     Q_OBJECT
37
38 public:
39     explicit MonitorEditWidget(Render *renderer, QWidget* parent = 0);
40     virtual ~MonitorEditWidget();
41
42     /** @brief Updates the necessary settings on a profile change. */
43     void resetProfile(Render *renderer);
44
45     /** @brief Returns the on-monitor scene. */
46     MonitorScene *getScene() const;
47
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);
52
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();
58
59 private slots:
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);
64 private:
65     Ui::MonitorEditWidget_UI m_ui;
66     MonitorScene *m_scene;
67     QGraphicsView *m_view;
68     QAction *m_visibilityAction;
69     QVBoxLayout *m_customControlsLayout;
70
71 signals:
72     /** true = show edit monitor, false = show normal monitor */
73     void showEdit(bool show, bool manuallyTriggered = true);
74 };
75
76
77 #endif