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;
31 class PanelStack : public QWidget
35 PanelStack(QWidget * parent = 0);
37 /// add a category with no associated panel
38 void addCategory(lyx::docstring const & name,
39 lyx::docstring const & parent = lyx::docstring());
41 /// add a widget panel with a given name, under the given parent
42 void addPanel(QWidget * panel, lyx::docstring const & name,
43 lyx::docstring const & parent = lyx::docstring());
45 /// set current panel by logical name
46 void setCurrentPanel(lyx::docstring const &);
48 virtual QSize sizeHint() const;
50 /// set current panel from an item
51 void switchPanel(QTreeWidgetItem * i, QTreeWidgetItem* previous=0);
54 typedef std::map<lyx::docstring, QTreeWidgetItem *> PanelMap;
58 typedef std::map<QTreeWidgetItem *, QWidget *> WidgetMap;
60 WidgetMap widget_map_;
62 /// contains the items
65 /// contains the panes
66 QStackedWidget * stack_;
69 } // namespace frontend
72 #endif // PANELSTACK_H