]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/dlg/helpers.C
FormDocument and various fixes.
[lyx.git] / src / frontends / kde / dlg / helpers.C
1 /*
2  * helpers.C
3  * (C) 2001 LyX Team
4  *
5  * John Levon, moz@compsoc.man.ac.uk
6  */
7  
8 /**
9  * \file helpers.C
10  * \brief various useful functions for manipulating dialog widgets
11  */
12
13 #include <config.h>
14  
15 #include "helpers.h"
16
17 #include "gettext.h"
18 #include "debug.h"
19
20 using std::endl;
21
22 #ifdef CXX_WORKING_NAMESPACES
23 namespace kde_helpers {
24 #endif
25
26 bool setComboFromStr(QComboBox *box, const string & str)
27 {
28         for (int i = 0; i < box->count(); i++) {
29                 if (str == box->text(i)) {
30                         box->setCurrentItem(i);
31                         return true;
32                 }
33         }
34         
35         return false;
36 }
37
38 #ifdef CXX_WORKING_NAMESPACES
39 }; /* namespace kde_helpers */
40 #endif