static string const autostr = N_("automatically");
-} // namespace anon
+} // namespace
namespace lyx {
setupUi(this);
//main buttons
- connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
- connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
- connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
- connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
+ connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+ this, SLOT(slotButtonBox(QAbstractButton *)));
//graphics pane
connect(filename, SIGNAL(textChanged(const QString &)),
displayscale->setValidator(new QIntValidator(displayscale));
bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
- bc().setOK(okPB);
- bc().setApply(applyPB);
- bc().setRestore(restorePB);
- bc().setCancel(closePB);
+ bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+ bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+ bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
+ bc().setRestore(buttonBox->button(QDialogButtonBox::Reset));
bc().addReadOnly(latexoptions);
bc().addReadOnly(filenameL);
}
-void GuiGraphics::on_aspectratio_toggled(bool aspectratio)
+void GuiGraphics::on_aspectratio_toggled(bool aspect_ratio)
{
- if (aspectratio) {
+ if (aspect_ratio) {
WidthCB->setText(qt_("Set max. &width:"));
HeightCB->setText(qt_("Set max. &height:"));
Width->setToolTip(qt_("Maximal width of image in output"));
}
-void GuiGraphics::on_angle_textChanged(const QString & filename)
+void GuiGraphics::on_angle_textChanged(const QString & file_name)
{
rotateOrderCB->setEnabled((WidthCB->isChecked() ||
HeightCB->isChecked() ||
scaleCB->isChecked()) &&
- (filename != "0"));
+ (file_name != "0"));
}
}
-bool GuiGraphics::initialiseParams(string const & data)
+bool GuiGraphics::initialiseParams(string const & sdata)
{
- InsetGraphics::string2params(data, buffer(), params_);
+ InsetGraphics::string2params(sdata, buffer(), params_);
paramsToDialog(params_);
current_group_ = params_.groupId;
return true;
// Does user clipart directory exist?
string clipdir = addName(package().user_support().absFileName(), "clipart");
- FileName clip(clipdir);
+ FileName fclip(clipdir);
// bail out to system clipart directory
- if (!clip.isDirectory())
+ if (!fclip.isDirectory())
clipdir = addName(package().system_support().absFileName(), "clipart");
return browseRelToParent(in_name, bufferFilePath(),
title, fileFilters(QString()), false,
- qt_("Clipart|#C#c"), toqstr(clipdir),
- qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+ qt_("&Clipart"), toqstr(clipdir),
+ qt_("D&ocuments"), toqstr(lyxrc.document_path));
}