ConstraintDialog::ConstraintDialog(ConstraintCanvas * c) : QDialog(0, "ConstraintVisibilityDialog", TRUE, 0), constraint(c) { setCaption(TR("Constraints visibility dialog")); Q3VBoxLayout * vbox = new Q3VBoxLayout(this); vbox->setMargin(5); table = new ConstraintTable(this, constraint); vbox->addWidget(table); vbox->addWidget(new QLabel(this)); Q3HBoxLayout * hbox; hbox = new Q3HBoxLayout(vbox); cb_visible = new QCheckBox(TR("Specify visible elements rather than hidden ones"), this); cb_visible->setChecked(constraint->indicate_visible); hbox->addWidget(cb_visible); QPushButton * showall = new QPushButton(TR("Show all"), this); QPushButton * hideall = new QPushButton(TR("Hide all"), this); QPushButton * hideinherited = new QPushButton(TR("Hide inherited"), this); QSize bs = hideinherited->sizeHint(); showall->setFixedSize(bs); hideall->setFixedSize(bs); hideinherited->setFixedSize(bs); hbox->addWidget(new QLabel(this)); hbox->addWidget(showall); hbox->addWidget(new QLabel(this)); hbox->addWidget(hideall); hbox->addWidget(new QLabel(this)); hbox->addWidget(hideinherited); hbox->addWidget(new QLabel(this)); connect(showall, SIGNAL(clicked()), this, SLOT(show_all())); connect(hideall, SIGNAL(clicked()), this, SLOT(hide_all())); connect(hideinherited, SIGNAL(clicked()), this, SLOT(hide_inherited())); vbox->addWidget(new QLabel(this)); hbox = new Q3HBoxLayout(vbox); hbox->setMargin(5); QPushButton * ok = new QPushButton(TR("&OK"), this); QPushButton * cancel = new QPushButton(TR("&Cancel"), this); ok->setDefault(TRUE); bs = cancel->sizeHint(); ok->setFixedSize(bs); cancel->setFixedSize(bs); hbox->addWidget(ok); hbox->addWidget(cancel); connect(ok, SIGNAL(clicked()), this, SLOT(accept())); connect(cancel, SIGNAL(clicked()), this, SLOT(reject())); }
void Visit(gcc_unused const BGAEnhancedOptionZone& oz) { hide_all(); WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZBGAEnhancedOption"))); if (wp) wp->show(); }
void Visit(gcc_unused const BGAFixedCourseZone& oz) { hide_all(); WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZBGAFixedCourse"))); if (wp) wp->show(); }
void Visit(gcc_unused const KeyholeZone& oz) { hide_all(); WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZKeyhole"))); if (wp) wp->show(); }
void Visit(gcc_unused const FAISectorZone& oz) { hide_all(); WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZFAISector"))); if (wp) wp->show(); }
void Visit(const CylinderZone& oz) { hide_all(); WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZCylinder"))); if (wp) wp->show(); LoadFormProperty(*wf, _T("prpOZCylinderRadius"), ugDistance, oz.getRadius()); }
void Visit(const LineSectorZone& oz) { hide_all(); WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZLine"))); if (wp) wp->show(); LoadFormProperty(*wf, _T("prpOZLineLength"), ugDistance, oz.getLength()); }
MatrixBox::~MatrixBox() { hide_all(); delete mScroll; delete mTable; for (unsigned int i = 0; i != mValue->rows(); ++i) { for (unsigned int j = 0; j != mValue->columns(); ++j) { delete (*mArray)[j][i].first; delete (*mArray)[j][i].second; } } delete mArray; }
void Visit(const SectorZone& oz) { hide_all(); WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZSector"))); if (wp) wp->show(); LoadFormProperty(*wf, _T("prpOZSectorRadius"), ugDistance, oz.getRadius()); LoadFormProperty(*wf, _T("prpOZSectorStartRadial"), oz.getStartRadial().value_degrees()); LoadFormProperty(*wf, _T("prpOZSectorFinishRadial"), oz.getEndRadial().value_degrees()); WndProperty* wap = (WndProperty*)wf->FindByName(_T("prpOZSectorInnerRadius")); if (wap) { wap->hide(); } }
InteractiveTypeBox::~InteractiveTypeBox() { hide_all(); delete mEntry; }
TupleBox::~TupleBox() { hide_all(); }
ValueBox::~ValueBox() { hide_all(); delete mTreeView; }
QPushButton * hi_priv = new SmallPushButton(TR("Hide private ones"), this); QPushButton * hi_priv_prot = new SmallPushButton(TR("Hide private and\nprotected ones"), this); QSize bs(hi_priv_prot->sizeHint()); sh_all->setFixedSize(bs); hi_all->setFixedSize(bs); hi_priv->setFixedSize(bs); hi_priv_prot->setFixedSize(bs); hbox->addWidget(sh_all); hbox->addWidget(hi_all); hbox->addWidget(hi_priv); hbox->addWidget(hi_priv_prot); connect(sh_all, SIGNAL(clicked()), this, SLOT(show_all())); connect(hi_all, SIGNAL(clicked()), this, SLOT(hide_all())); connect(hi_priv, SIGNAL(clicked()), this, SLOT(hide_private())); connect(hi_priv_prot, SIGNAL(clicked()), this, SLOT(hide_private_protected())); // hbox = new QHBoxLayout(); vbox->addLayout(hbox); hbox->setMargin(5); cb_visible = new QCheckBox(TR("Specify visible members rather than hidden ones"), this); cb_visible->setChecked(on_visible); hbox->addWidget(cb_visible); //
SimpleTypeBox::~SimpleTypeBox() { hide_all(); delete mEntry; }
XmlTypeBox::~XmlTypeBox() { hide_all(); delete mView; }
void DlgChConf::on_result(int r){ if (r == Gtk::RESPONSE_OK) signal_ok_.emit(); hide_all(); }