AbstractPropertyManager.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/qt/widgets/AbstractPropertyManager.cpp
22 
23  \brief A singleton for holding the property browser
24  items factories.
25 */
26 
27 // TerraLib
29 
31 {
32  pb->setFactoryForManager(m_intSliderManager, m_sliderFactory);
33  pb->setFactoryForManager(m_intManager, m_spinBoxFactory);
34  pb->setFactoryForManager(m_doubleManager, m_doubleSpinBoxFactory);
35  pb->setFactoryForManager(m_stringManager, m_lineEditFactory);
36  pb->setFactoryForManager(m_strDlgManager, m_dlgFactory);
37  pb->setFactoryForManager(m_colorManager, m_colorFactory);
38  pb->setFactoryForManager(m_colorManager->subIntPropertyManager(), m_spinBoxFactory);
39  pb->setFactoryForManager(m_fontManager, m_fontFactory);
40  pb->setFactoryForManager(m_fontManager->subIntPropertyManager(), m_spinBoxFactory);
41  pb->setFactoryForManager(m_fontManager->subBoolPropertyManager(), m_checkBoxFactory);
42  pb->setFactoryForManager(m_fontManager->subEnumPropertyManager(), m_comboBoxFactory);
43  pb->setFactoryForManager(m_sizeManager->subIntPropertyManager(), m_spinBoxFactory);
44  pb->setFactoryForManager(m_sizeFManager->subDoublePropertyManager(), m_spinFBoxFactory);
45  pb->setFactoryForManager(m_enumManager, m_comboBoxFactory);
46  pb->setFactoryForManager(m_pointFManager->subDoublePropertyManager(), m_doubleSpinBoxFactory);
47  pb->setFactoryForManager(m_boolManager, m_checkBoxFactory);
48 }
49 
51 {
52  m_groupManager = new QtGroupPropertyManager(this);
53  m_intManager = new QtIntPropertyManager(this);
54  m_intSliderManager = new QtIntPropertyManager(this);
55  m_doubleManager = new QtDoublePropertyManager(this);
56  m_stringManager = new QtStringPropertyManager(this);
57  m_strDlgManager = new QtStringPropertyManager(this);
58  m_colorManager = new QtColorPropertyManager(this);
59  m_fontManager = new QtFontPropertyManager(this);
60  m_sizeManager = new QtSizePropertyManager(this);
61  m_sizeFManager = new QtSizeFPropertyManager(this);
62  m_enumManager = new QtEnumPropertyManager(this);
63  m_pointFManager = new QtPointFPropertyManager(this);
64  m_boolManager = new QtBoolPropertyManager(this);
65 
66  m_doubleSpinBoxFactory = new QtDoubleSpinBoxFactory(this);
67  m_checkBoxFactory = new QtCheckBoxFactory(this);
68  m_spinBoxFactory = new QtSpinBoxFactory(this);
69  m_spinFBoxFactory = new QtDoubleSpinBoxFactory(this);
70  m_lineEditFactory = new QtLineEditFactory(this);
71  m_comboBoxFactory = new QtEnumEditorFactory(this);
72  m_sliderFactory = new QtSliderFactory(this);
73  m_colorFactory = new QtColorEditorFactory(this);
74  m_fontFactory = new QtFontEditorFactory(this);
75  m_charFactory = new QtCharEditorFactory(this);
76  m_dlgFactory = new QtDlgEditorFactory(this);
77 }
78 
void setFactories(QtTreePropertyBrowser *pb)
AbstractPropertyManager()
It initializes the singleton.