static string const autostr = N_("automatically");
-} // namespace anon
+} // namespace
namespace lyx {
: GuiDialog(lv, "graphics", qt_("Graphics")), bbChanged(false)
{
setupUi(this);
-
+
//main buttons
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
filename->setValidator(new PathValidator(true, filename));
setFocusProxy(filename);
- QDoubleValidator * scaleValidator =
+ QDoubleValidator * scaleValidator =
new DoubleAutoValidator(Scale, qt_(autostr));
scaleValidator->setBottom(0);
scaleValidator->setDecimals(256); //I guess that will do
//clipping pane
connect(clip, SIGNAL(stateChanged(int)),
this, SLOT(change_adaptor()));
- connect(lbY, SIGNAL(textChanged(const QString&)),
+ connect(lbY, SIGNAL(textChanged(const QString &)),
this, SLOT(changeBB()));
connect(lbYunit, SIGNAL(activated(int)),
this, SLOT(changeBB()));
- connect(rtY, SIGNAL(textChanged(const QString&)),
+ connect(rtY, SIGNAL(textChanged(const QString &)),
this, SLOT(changeBB()));
connect(rtYunit, SIGNAL(activated(int)),
this, SLOT(changeBB()));
- connect(lbX, SIGNAL(textChanged(const QString&)),
+ connect(lbX, SIGNAL(textChanged(const QString &)),
this, SLOT(changeBB()));
connect(lbXunit, SIGNAL(activated(int)),
this, SLOT(changeBB()));
- connect(rtX, SIGNAL(textChanged(const QString&)),
+ connect(rtX, SIGNAL(textChanged(const QString &)),
this, SLOT(changeBB()));
connect(rtXunit, SIGNAL(activated(int)),
this, SLOT(changeBB()));
rtY->setValidator(new QDoubleValidator(rtY));
//extra options pane
- connect(latexoptions, SIGNAL(textChanged(const QString&)),
+ connect(latexoptions, SIGNAL(textChanged(const QString &)),
this, SLOT(change_adaptor()));
connect(draftCB, SIGNAL(stateChanged(int)),
this, SLOT(change_adaptor()));
// is clicked, even right clicked (I think), not just whenever it is
// toggled.
connect(displayGB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
- connect(displayscale, SIGNAL(textChanged(const QString&)),
+ connect(displayscale, SIGNAL(textChanged(const QString &)),
this, SLOT(change_adaptor()));
connect(groupCO, SIGNAL(currentIndexChanged(int)),
this, SLOT(changeGroup(int)));
{
QString const new_group = groupCO->itemData(
groupCO->currentIndex()).toString();
-
+
// check if the old group consisted only of this member
if (current_group_ != fromqstr(new_group)
&& graphics::countGroupMembers(buffer(), current_group_) == 1) {
if (!new_group.isEmpty()) {
- if (Alert::prompt(_("Dissolve previous group?"),
+ if (Alert::prompt(_("Dissolve previous group?"),
bformat(_("If you assign this graphic to group '%2$s',\n"
"the previously assigned group '%1$s' will be dissolved,\n"
"because this graphic was its only member.\n"
return;
}
} else {
- if (Alert::prompt(_("Dissolve previous group?"),
+ if (Alert::prompt(_("Dissolve previous group?"),
bformat(_("If you sign off this graphic from group '%1$s',\n"
"the group will be dissolved,\n"
"because this graphic was its only member.\n"
return;
}
}
- }
+ }
if (new_group.isEmpty()) {
changed();
changed();
return;
}
-
+
// filename might have been changed
QString current_filename = filename->text();
InsetGraphics::string2params(grp, buffer(), params_);
paramsToDialog(params_);
groupCO->blockSignals(false);
-
+
// reset filename
filename->setText(current_filename);
if (newgroup.empty())
return;
if (groupCO->findData(toqstr(newgroup), Qt::MatchExactly) != -1) {
- Alert::warning(_("Group already defined!"),
+ Alert::warning(_("Group already defined!"),
bformat(_("A graphics group with the name '%1$s' already exists."),
newgroup));
return;
lbYunit->clear();
rtXunit->clear();
rtYunit->clear();
-
+
for (size_t i = 0; i < bb_size; i++) {
lbXunit->addItem(qt_(bb_units_gui[i]),
toqstr(bb_units[i]));
rtYunit->addItem(qt_(bb_units_gui[i]),
toqstr(bb_units[i]));
}
-
+
// set the right default unit
Length::UNIT const defaultUnit = Length::defaultUnit();
clipdir = addName(package().system_support().absFileName(), "clipart");
return browseRelToParent(in_name, bufferFilePath(),
- title, fileFilters(QString()), false,
+ title, fileFilters(QString()), false,
qt_("Clipart|#C#c"), toqstr(clipdir),
qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
}