Debian Codegraph @

src/widgetpanel.h

raw symbols SCIP
1 /*
2 Copyright (C) 2008, 2009 Andres Cabrera
3 [email protected]
4
5 This file is part of CsoundQt.
6
7 CsoundQt is free software; you can redistribute it
8 and/or modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 CsoundQt is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with Csound; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA
21 */
22
23 #ifndef WIDGETPANEL_H
24 #define WIDGETPANEL_H
25
26 #include <QtWidgets>
27
28 class WidgetLayout;
29
30 class WidgetPanel : public QDockWidget
31 {
32 Q_OBJECT
33
34 friend class CsoundQt; // To allow edit actions- TODO- can this be done all here?
35 friend class QuteWidget; // To allow edit actions
36 public:
37 WidgetPanel(QWidget *parent);
38 ~WidgetPanel();
39
40 void addWidgetLayout(WidgetLayout *layoutWidget);
41 WidgetLayout * takeWidgetLayout(QRect outerGeometry);
42
43 QRect getOuterGeometry();
44
45 void setWidgetScrollBarsActive(bool active);
46
47
48 public slots:
49 void showAndRaise(bool show) {
50 this->setVisible(show);
51 if(show)
52 this->raise();
53 }
54
55 protected:
56 virtual void contextMenuEvent(QContextMenuEvent *event);
57 virtual void mousePressEvent(QMouseEvent * event);
58 virtual void mouseReleaseEvent(QMouseEvent * event);
59 virtual void mouseMoveEvent (QMouseEvent * event);
60
61 virtual void closeEvent(QCloseEvent * event);
62
63 private:
64 QStackedWidget *m_stack;
65
66 QStringList clipboard;
67 QSize oldSize;
68 int m_width;
69 int m_height;
70
71 private slots:
72 void scrollBarMoved(int);
73
74 signals:
75 void Close(bool visible);
76 };
77
78 #endif