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.
20 class QTreeWidgetItem;
27 class PanelStack : public QWidget
32 PanelStack(QWidget * parent = 0);
34 /// add a category with no associated panel
35 void addCategory(QString const & name, QString const & parent = QString());
36 /// add a widget panel with a given name, under the given parent
37 void addPanel(QWidget * panel, QString const & name,
38 QString const & parent = QString());
39 /// set current panel by logical name
40 void setCurrentPanel(QString const &);
42 QSize sizeHint() const;
45 /// set current panel from an item
46 void switchPanel(QTreeWidgetItem * it, QTreeWidgetItem * previous = 0);
48 void itemSelected(QTreeWidgetItem *, int);
52 typedef QHash<QString, QTreeWidgetItem *> PanelMap;
56 typedef QHash<QTreeWidgetItem *, QWidget *> WidgetMap;
58 WidgetMap widget_map_;
60 /// contains the items
63 /// contains the panes
64 QStackedWidget * stack_;
67 } // namespace frontend
70 #endif // PANELSTACK_H