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 /// show or hide panel
40 void showPanel(QString const & name, bool show);
41 /// set current panel by logical name
42 void setCurrentPanel(QString const &);
44 bool isCurrentPanel(QString const & name) const;
46 QSize sizeHint() const;
49 /// set current panel from an item
50 void switchPanel(QTreeWidgetItem * it, QTreeWidgetItem * previous = 0);
52 void itemSelected(QTreeWidgetItem *, int);
56 typedef QHash<QString, QTreeWidgetItem *> PanelMap;
60 typedef QHash<QTreeWidgetItem *, QWidget *> WidgetMap;
62 WidgetMap widget_map_;
64 /// contains the items
67 /// contains the panes
68 QStackedWidget * stack_;
71 } // namespace frontend
74 #endif // PANELSTACK_H