4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Guillaume Munch
9 * Full author contact details are available in file CREDITS.
20 // The purpose of this custom widget is to allow the use of a QToolBox in a
21 // limited area. The stock QToolBox does not provide a minimum size hint that
22 // depends on the size of the pages; it assumes that there is enough room. This
23 // subclass sets the minimal size of the QToolbox. Without this, the size of the
24 // QToolbox is only determined by values in the ui file and therefore causes
25 // portability and localisation issues. Note that the computation of the minimum
26 // size hint depends on the minimum size hints of the page widgets. Therefore
27 // page widgets must have a layout with layoutSizeContraint = SetMinimumSize or
29 class LyXToolBox : public QToolBox
34 LyXToolBox(QWidget * p = 0, Qt::WindowFlags f = 0) : QToolBox(p, f) {}
35 QSize minimumSizeHint() const;
38 void showEvent(QShowEvent * e);
42 } // namespace frontend
46 #endif // LYXTOOLBOX_H