本文整理汇总了C++中KDialog::enableButtonOk方法的典型用法代码示例。如果您正苦于以下问题:C++ KDialog::enableButtonOk方法的具体用法?C++ KDialog::enableButtonOk怎么用?C++ KDialog::enableButtonOk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KDialog
的用法示例。
在下文中一共展示了KDialog::enableButtonOk方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QLabel
void RKCaughtX11Window::copyDeviceToRObject () {
RK_TRACE (MISC);
// TODO: not very pretty, yet
KDialog *dialog = new KDialog (this);
dialog->setButtons (KDialog::Ok|KDialog::Cancel);
dialog->setCaption (i18n ("Specify R object"));
dialog->setModal (true);
KVBox *page = new KVBox (dialog);
dialog->setMainWidget (page);
new QLabel (i18n ("Specify the R object name, you want to save the graph to"), page);
RKSaveObjectChooser *chooser = new RKSaveObjectChooser (page, "my.plot");
connect (chooser, SIGNAL (changed(bool)), dialog, SLOT (enableButtonOk(bool)));
if (!chooser->isOk ()) dialog->enableButtonOk (false);
dialog->exec ();
if (dialog->result () == QDialog::Accepted) {
RK_ASSERT (chooser->isOk ());
QString name = chooser->currentFullName ();
RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\n" + name + " <- recordPlot ()", RCommand::App | RCommand::ObjectListUpdate, i18n ("Save contents of graphics device number %1 to object '%2'", device_number, name), error_dialog);
}
delete dialog;
}