]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/dlg/helpers.h
FormDocument and various fixes.
[lyx.git] / src / frontends / kde / dlg / helpers.h
1 /*
2  * helpers.h
3  *
4  * (C) 2001 LyX Team
5  *
6  * John Levon, moz@compsoc.man.ac.uk
7  */
8
9 #ifndef HELPERS_H
10 #define HELPERS_H
11
12 #include <config.h>
13
14 #include <qcombobox.h>
15 #include <krestrictedline.h> 
16
17 #include "vspace.h"
18
19 #ifdef CXX_WORKING_NAMESPACES
20 namespace kde_helpers {
21 #endif
22  
23 /**
24  * \fn setSizeHint
25  * \brief sets the minimum size of a widget
26  * \param widget the widget 
27  * 
28  * Sets a widget's minimum size to its sizeHint()
29  */
30 inline void setSizeHint(QWidget *widget)
31 {
32         widget->setMinimumSize(widget->sizeHint());
33 }
34  
35 /**
36  * \fn setComboFromStr
37  * \brief sets a combo box item given a string matching one of the entries.
38  * \param box the box to change
39  * \param str the string to match
40  *
41  * Set a combobox current item matching the given string. false is returned if
42  * the item could not be found.
43  */
44 bool setComboFromStr(QComboBox *box, const string & str);
45
46 #ifdef CXX_WORKING_NAMESPACES
47 }; /* namespace kde_helpers */
48 #endif
49
50 #endif /* HELPERS_H */