]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/dlg/helpers.h
remove CXX_WORKING_NAMESPACES
[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 namespace kde_helpers {
20  
21 /**
22  * \fn setSizeHint
23  * \brief sets the minimum size of a widget
24  * \param widget the widget 
25  * 
26  * Sets a widget's minimum size to its sizeHint()
27  */
28 inline void setSizeHint(QWidget *widget)
29 {
30         widget->setMinimumSize(widget->sizeHint());
31 }
32  
33 /**
34  * \fn setComboFromStr
35  * \brief sets a combo box item given a string matching one of the entries.
36  * \param box the box to change
37  * \param str the string to match
38  *
39  * Set a combobox current item matching the given string. false is returned if
40  * the item could not be found.
41  */
42 bool setComboFromStr(QComboBox *box, const string & str);
43
44 } // namespace kde_helpers
45
46 #endif /* HELPERS_H */