synthclone 0.3.0
Loading...
Searching...
No Matches
view.h
Go to the documentation of this file.
1/*
2 * libsynthclone - a plugin API for `synthclone`
3 * Copyright (C) 2011 Devin Anderson
4 *
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by the
7 * Free Software Foundation; either version 2.1 of the License, or (at your
8 * option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef __SYNTHCLONE_VIEW_H__
21#define __SYNTHCLONE_VIEW_H__
22
23#include <QWidget>
24
25namespace synthclone {
26
27 class CloseEventFilter;
28
37
38 class View: public QObject {
39
40 Q_OBJECT
41
42 public:
43
51
52 bool
54
61
62 bool
63 isVisible() const;
64
65 public slots:
66
75
76 virtual void
77 setCloseEnabled(bool enabled);
78
85
86 virtual void
87 setVisible(bool visible);
88
89 signals:
90
97
98 void
99 closeEnabledChanged(bool enabled);
100
104
105 void
107
114
115 void
116 visibilityChanged(bool visible);
117
118 protected:
119
131
132 explicit
133 View(QWidget *rootWidget, QObject *parent=0);
134
138
139 virtual
141
148
149 const QWidget *
151
158
159 QWidget *
161
162 private:
163
164 CloseEventFilter *closeEventFilter;
165 QWidget *rootWidget;
166
167 };
168
169}
170
171#endif
bool isVisible() const
Gets a boolean indicating whether or not the view is visible.
QWidget * getRootWidget()
Gets the root widget for this view.
virtual void setVisible(bool visible)
Sets the visibility of the root widget.
View(QWidget *rootWidget, QObject *parent=0)
Constructs a new View.
bool isCloseEnabled() const
Gets a boolean indicating whether or not closing of this view is enabled.
virtual ~View()
Destroys the View object.
virtual void setCloseEnabled(bool enabled)
Enables/disables closing for this view.
void visibilityChanged(bool visible)
Emitted when the visibility flag for the view changes.
const QWidget * getRootWidget() const
Gets the root widget for this view.
void closeEnabledChanged(bool enabled)
Emitted when closing is enabled/disabled.
void closeRequest()
Emitted when a root widget's close button is pressed.
Definition component.h:26