comparison view/PaneStack.h @ 323:267586900360

* Add [x] button to pane to quickly delete it
author Chris Cannam
date Wed, 07 Nov 2007 16:37:17 +0000
parents 984c1975f1ff
children 6167a28d25fc
comparison
equal deleted inserted replaced
322:07aa52466142 323:267586900360
16 16
17 #ifndef _PANESTACK_H_ 17 #ifndef _PANESTACK_H_
18 #define _PANESTACK_H_ 18 #define _PANESTACK_H_
19 19
20 #include <QFrame> 20 #include <QFrame>
21
22 #include <map>
21 23
22 class QWidget; 24 class QWidget;
23 class QLabel; 25 class QLabel;
24 class QStackedWidget; 26 class QStackedWidget;
25 class QSplitter; 27 class QSplitter;
83 void paneDeleted(); 85 void paneDeleted();
84 86
85 void dropAccepted(Pane *pane, QStringList uriList); 87 void dropAccepted(Pane *pane, QStringList uriList);
86 void dropAccepted(Pane *pane, QString text); 88 void dropAccepted(Pane *pane, QString text);
87 89
90 void paneDeleteButtonClicked(Pane *pane);
91
88 public slots: 92 public slots:
89 void propertyContainerAdded(PropertyContainer *); 93 void propertyContainerAdded(PropertyContainer *);
90 void propertyContainerRemoved(PropertyContainer *); 94 void propertyContainerRemoved(PropertyContainer *);
91 void propertyContainerSelected(View *client, PropertyContainer *); 95 void propertyContainerSelected(View *client, PropertyContainer *);
92 void viewSelected(View *v); 96 void viewSelected(View *v);
93 void paneInteractedWith(); 97 void paneInteractedWith();
94 void rightButtonMenuRequested(QPoint); 98 void rightButtonMenuRequested(QPoint);
95 void paneDropAccepted(QStringList); 99 void paneDropAccepted(QStringList);
96 void paneDropAccepted(QString); 100 void paneDropAccepted(QString);
101 void paneDeleteButtonClicked();
97 102
98 protected: 103 protected:
99 Pane *m_currentPane; 104 Pane *m_currentPane;
100 105
101 struct PaneRec 106 struct PaneRec
108 }; 113 };
109 114
110 std::vector<PaneRec> m_panes; 115 std::vector<PaneRec> m_panes;
111 std::vector<PaneRec> m_hiddenPanes; 116 std::vector<PaneRec> m_hiddenPanes;
112 117
118 std::map<QWidget *, Pane *> m_xButtonMap;
119
113 QSplitter *m_splitter; 120 QSplitter *m_splitter;
114 QStackedWidget *m_propertyStackStack; 121 QStackedWidget *m_propertyStackStack;
115 122
116 ViewManager *m_viewManager; // I don't own this 123 ViewManager *m_viewManager; // I don't own this
117 int m_propertyStackMinWidth; 124 int m_propertyStackMinWidth;