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 &);
46 virtual QSize sizeHint() const;
48 /// set current panel from an item
49 void switchPanel(QTreeWidgetItem * i, QTreeWidgetItem* previous=0);
52 typedef std::map<lyx::docstring, QTreeWidgetItem *> PanelMap;
56 typedef std::map<QTreeWidgetItem *, QWidget *> WidgetMap;
58 WidgetMap widget_map_;
60 /// contains the items
63 /// contains the panes
64 QStackedWidget * stack_;
70 #endif // PANELSTACK_H