1 // Copyright (C) 2006-2012 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
20 #include "FormComponent.hxx"
23 #include "YacsTrace.hxx"
29 bool FormComponent::_checked = false;
31 ComboBox::ComboBox(QWidget *parent)
40 void ComboBox::mousePressEvent(QMouseEvent *event)
43 QComboBox::mousePressEvent(event);
47 FormComponent::FormComponent(QWidget *parent)
51 le_name->setReadOnly(true);
53 gridLayout3->removeWidget(cb_instance);
55 cb_instance = new ComboBox(fr_component);
56 gridLayout3->addWidget(cb_instance, 1, 1, 1, 1);
58 gridLayout3->removeWidget(cb_container);
60 cb_container = new ComboBox(fr_component);
61 gridLayout3->addWidget(cb_container, 2, 1, 1, 1);
64 icon.addFile("icons:icon_down.png");
65 icon.addFile("icons:icon_up.png",
66 QSize(), QIcon::Normal, QIcon::On);
67 tb_component->setIcon(icon);
68 on_tb_component_toggled(FormComponent::_checked);
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();