//=======================================================================
void SMESHGUI_FilterDlg::updateMainButtons()
{
+ myButtons[ BTN_Close ]->show();
if (myTypes.count() == 1)
{
- myButtons[ BTN_Cancel ]->show();
myButtons[ BTN_Apply ]->hide();
- myButtons[ BTN_Close ]->hide();
}
else
{
- myButtons[ BTN_Cancel ]->hide();
myButtons[ BTN_Apply ]->show();
- myButtons[ BTN_Close ]->show();
}
-
// updateGeometry();
}
myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp);
myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp);
- myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp);
myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp);
myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp);
aLay->addWidget(myButtons[ BTN_Apply ]);
aLay->addSpacing(10);
aLay->addStretch();
- aLay->addWidget(myButtons[ BTN_Cancel ]);
aLay->addWidget(myButtons[ BTN_Close ]);
aLay->addWidget(myButtons[ BTN_Help ]);
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
- connect(myButtons[ BTN_Cancel ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
enum { Mesh, Selection, Dialog, None };
// Buttons
- enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help };
+ enum { BTN_OK, BTN_Apply, BTN_Close, BTN_Help };
public:
SMESHGUI_FilterDlg( SMESHGUI*, const QList<int>& );
myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp);
myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp);
- myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp);
myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp);
myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp);
aLay->addWidget(myButtons[ BTN_Apply ]);
aLay->addSpacing(10);
aLay->addStretch();
- aLay->addWidget(myButtons[ BTN_Cancel ]);
aLay->addWidget(myButtons[ BTN_Close ]);
aLay->addWidget(myButtons[ BTN_Help ]);
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
- connect(myButtons[ BTN_Cancel ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
//=======================================================================
void SMESHGUI_FilterLibraryDlg::updateMainButtons()
{
+ myButtons[ BTN_Close ]->show();
if (myTypes.count() == 1) {
- myButtons[ BTN_Cancel ]->show();
myButtons[ BTN_Apply ]->hide();
- myButtons[ BTN_Close ]->hide();
} else {
- myButtons[ BTN_Cancel ]->hide();
myButtons[ BTN_Apply ]->show();
- myButtons[ BTN_Close ]->show();
}
}
Q_OBJECT
// Buttons
- enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help };
+ enum { BTN_OK, BTN_Apply, BTN_Close, BTN_Help };
class Dialog;
<source>SMESH_BUT_APPLY</source>
<translation>&Apply</translation>
</message>
- <message>
- <source>SMESH_BUT_CANCEL</source>
- <translation>&Cancel</translation>
- </message>
<message>
<source>SMESH_BUT_CLOSE</source>
<translation>&Close</translation>