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.
19 class QTreeWidgetItem;
26 class PanelStack : public QWidget
31 PanelStack(QWidget * parent = 0);
33 /// add a category with no associated panel
34 void addCategory(QString const & name, QString const & parent = QString());
35 /// add a widget panel with a given name, under the given parent
36 void addPanel(QWidget * panel, QString const & name,
37 QString const & parent = QString());
38 /// set current panel by logical name
39 void setCurrentPanel(QString const &);
41 QSize sizeHint() const;
44 /// set current panel from an item
45 void switchPanel(QTreeWidgetItem * it, QTreeWidgetItem * previous = 0);
49 typedef QHash<QString, QTreeWidgetItem *> PanelMap;
53 typedef QHash<QTreeWidgetItem *, QWidget *> WidgetMap;
55 WidgetMap widget_map_;
57 /// contains the items
60 /// contains the panes
61 QStackedWidget * stack_;
64 } // namespace frontend
67 #endif // PANELSTACK_H