1 // Copyright (C) 2006-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #include "FormComponent.hxx"
22 #include "YacsTrace.hxx"
28 ComboBox::ComboBox(QWidget *parent)
37 void ComboBox::mousePressEvent(QMouseEvent *event)
40 QComboBox::mousePressEvent(event);
44 FormComponent::FormComponent(QWidget *parent)
48 le_name->setReadOnly(true);
50 gridLayout3->removeWidget(cb_instance);
52 cb_instance = new ComboBox(fr_component);
53 gridLayout3->addWidget(cb_instance, 1, 1, 1, 1);
55 gridLayout3->removeWidget(cb_container);
57 cb_container = new ComboBox(fr_component);
58 gridLayout3->addWidget(cb_container, 2, 1, 1, 1);
62 icon.addFile("icons:icon_down.png");
63 icon.addFile("icons:icon_up.png",
64 QSize(), QIcon::Normal, QIcon::On);
65 tb_component->setIcon(icon);
66 on_tb_component_toggled(false);
67 // connect(tb_component, SIGNAL(toggled(bool)),
68 // this, SLOT(on_tb_component_toggled(bool)));
71 FormComponent::~FormComponent()
75 void FormComponent::on_tb_component_toggled(bool checked)
77 //DEBTRACE("FormComponent::on_tb_component_toggled " << checked);
79 if (_checked) fr_component->show();
80 else fr_component->hide();