]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/LyXToolBox.h
Not sure why "notr = 'true'" got in there.
[lyx.git] / src / frontends / qt4 / LyXToolBox.h
1 // -*- C++ -*-
2 /**
3  * \file LyXToolBox.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Guillaume Munch
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYXTOOLBOX_H
13 #define LYXTOOLBOX_H
14
15 #include <QToolBox>
16
17 namespace lyx {
18 namespace frontend {
19
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
28 // similar.
29 class LyXToolBox : public QToolBox
30 {
31         Q_OBJECT
32
33 public:
34         LyXToolBox(QWidget * p = 0, Qt::WindowFlags f = 0) : QToolBox(p, f) {}
35         QSize minimumSizeHint() const;
36
37 protected:
38         void showEvent(QShowEvent * e);
39 };
40
41
42 } // namespace frontend
43 } // namespace lyx
44
45
46 #endif // LYXTOOLBOX_H