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"
22 class QTreeWidgetItem;
29 class PanelStack : public QWidget
33 PanelStack(QWidget * parent = 0);
35 /// add a category with no associated panel
36 void addCategory(docstring const & name,
37 docstring const & parent = docstring());
39 /// add a widget panel with a given name, under the given parent
40 void addPanel(QWidget * panel, docstring const & name,
41 docstring const & parent = docstring());
43 /// set current panel by logical name
44 void setCurrentPanel(docstring const &);
46 virtual QSize sizeHint() const;
49 /// set current panel from an item
50 void switchPanel(QTreeWidgetItem * it, QTreeWidgetItem * previous = 0);
53 typedef std::map<docstring, QTreeWidgetItem *> PanelMap;
57 typedef std::map<QTreeWidgetItem *, QWidget *> WidgetMap;
59 WidgetMap widget_map_;
61 /// contains the items
64 /// contains the panes
65 QStackedWidget * stack_;
68 } // namespace frontend
71 #endif // PANELSTACK_H