]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/dlg/helpers.C
remove CXX_WORKING_NAMESPACES
[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 namespace kde_helpers {
23
24 bool setComboFromStr(QComboBox *box, const string & str)
25 {
26         for (int i = 0; i < box->count(); i++) {
27                 if (str == box->text(i)) {
28                         box->setCurrentItem(i);
29                         return true;
30                 }
31         }
32         
33         return false;
34 }
35
36 } // namespace kde_helpers