4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
21 class QTreeWidgetItem;
24 class PanelStack : public QWidget
28 PanelStack(QWidget * parent = 0);
30 /// add a category with no associated panel
31 void addCategory(std::string const & name, std::string const & parent = std::string());
33 /// add a widget panel with a given name, under the given parent
34 void addPanel(QWidget * panel, std::string const & name, std::string const & parent = std::string());
36 /// set current panel by logical name
37 void setCurrentPanel(std::string const &);
40 /// set current panel from an item
41 void switchPanel(QTreeWidgetItem * i, QTreeWidgetItem* previous=0);
44 typedef std::map<std::string, QTreeWidgetItem *> PanelMap;
48 typedef std::map<QTreeWidgetItem *, QWidget *> WidgetMap;
50 WidgetMap widget_map_;
52 /// contains the items
55 /// contains the panes
56 QStackedWidget * stack_;
59 #endif // PANELSTACK_H