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.
15 #include "support/docstring.h"
24 class QTreeWidgetItem;
29 class PanelStack : public QWidget
33 PanelStack(QWidget * parent = 0);
35 /// add a category with no associated panel
36 void addCategory(lyx::docstring const & name,
37 lyx::docstring const & parent = lyx::docstring());
39 /// add a widget panel with a given name, under the given parent
40 void addPanel(QWidget * panel, lyx::docstring const & name,
41 lyx::docstring const & parent = lyx::docstring());
43 /// set current panel by logical name
44 void setCurrentPanel(lyx::docstring const &);
47 /// set current panel from an item
48 void switchPanel(QTreeWidgetItem * i, QTreeWidgetItem* previous=0);
51 typedef std::map<lyx::docstring, QTreeWidgetItem *> PanelMap;
55 typedef std::map<QTreeWidgetItem *, QWidget *> WidgetMap;
57 WidgetMap widget_map_;
59 /// contains the items
62 /// contains the panes
63 QStackedWidget * stack_;
69 #endif // PANELSTACK_H