synthclone  0.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 <QtGui/QWidget>
24 
25 namespace synthclone {
26 
27  class CloseEventFilter;
28 
38  class View: public QObject {
39 
40  Q_OBJECT
41 
42  public:
43 
52  bool
53  isCloseEnabled() const;
54 
62  bool
63  isVisible() const;
64 
65  public slots:
66 
76  virtual void
77  setCloseEnabled(bool enabled);
78 
86  virtual void
87  setVisible(bool visible);
88 
89  signals:
90 
98  void
99  closeEnabledChanged(bool enabled);
100 
105  void
106  closeRequest();
107 
115  void
116  visibilityChanged(bool visible);
117 
118  protected:
119 
132  explicit
133  View(QWidget *rootWidget, QObject *parent=0);
134 
139  virtual
140  ~View();
141 
149  const QWidget *
150  getRootWidget() const;
151 
159  QWidget *
160  getRootWidget();
161 
162  private:
163 
164  CloseEventFilter *closeEventFilter;
165  QWidget *rootWidget;
166 
167  };
168 
169 }
170 
171 #endif