#include "GuiGraphics.h"
-#include "support/debug.h"
#include "LengthCombo.h"
#include "Length.h"
#include "LyXRC.h"
#include "Validator.h"
#include "FuncRequest.h"
-#include "support/gettext.h"
#include "graphics/GraphicsCache.h"
#include "graphics/GraphicsCacheItem.h"
#include "insets/InsetGraphicsParams.h"
#include "support/convert.h"
+#include "support/debug.h"
#include "support/FileFilterList.h"
#include "support/filetools.h"
+#include "support/gettext.h"
#include "support/lstrings.h"
#include "support/os.h"
#include "support/Package.h"
#include <boost/bind.hpp>
#include <QCheckBox>
-#include <QCloseEvent>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
GuiGraphics::GuiGraphics(GuiView & lv)
- : GuiDialog(lv, "graphics")
+ : GuiDialog(lv, "graphics", qt_("Graphics"))
{
setupUi(this);
- setViewTitle(_("Graphics"));
-
+
//main buttons
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
//graphics pane
connect(filename, SIGNAL(textChanged(const QString &)),
this, SLOT(change_adaptor()));
+ connect(embedCB, SIGNAL(toggled(bool)),
+ this, SLOT(change_adaptor()));
connect(WidthCB, SIGNAL( clicked()),
this, SLOT(change_adaptor()));
connect(HeightCB, SIGNAL( clicked()),
// setChecked(). Note, too, that clicked() would get called whenever it
// is clicked, even right clicked (I think), not just whenever it is
// toggled.
- connect(subfigure, SIGNAL(toggled(bool)),
- this, SLOT(change_adaptor()));
- connect(subcaption, SIGNAL(textChanged(const QString&)),
- this, SLOT(change_adaptor()));
connect(displayGB, SIGNAL(toggled(bool)),
this, SLOT(change_adaptor()));
connect(showCB, SIGNAL(currentIndexChanged(int)),
bc().setCancel(closePB);
bc().addReadOnly(latexoptions);
- bc().addReadOnly(subfigure);
bc().addReadOnly(filenameL);
bc().addReadOnly(filename);
bc().addReadOnly(browsePB);
}
-void GuiGraphics::closeEvent(QCloseEvent * e)
-{
- slotClose();
- GuiDialog::closeEvent(e);
-}
-
-
void GuiGraphics::on_browsePB_clicked()
{
docstring const str = browse(qstring_to_ucs4(filename->text()));
if (!str.empty()) {
filename->setText(toqstr(str));
- embedCB->setCheckState(Qt::Unchecked);
changed();
}
}
void GuiGraphics::on_filename_textChanged(const QString & filename)
{
editPB->setDisabled(filename.isEmpty());
+ EmbeddedFile file = EmbeddedFile(fromqstr(filename), bufferFilepath());
}
string const name =
igp.filename.outputFilename(bufferFilepath());
filename->setText(toqstr(name));
- embedCB->setCheckState(igp.filename.embedded() ? Qt::Checked : Qt::Unchecked);
+ embedCB->setCheckState(igp.filename.embedded() ? Qt::Checked : Qt::Unchecked);
// set the bounding box values
if (igp.bb.empty()) {
clip->setChecked(igp.clip);
unzipCB->setChecked(igp.noUnzip);
- // Update the subcaption check button and input field
- subfigure->setChecked(igp.subcaption);
- subcaption->setText(toqstr(igp.subcaptionText));
-
int item = 0;
switch (igp.display) {
case graphics::DefaultDisplay: item = 0; break;
igp.draft = draftCB->isChecked();
igp.clip = clip->isChecked();
- igp.subcaption = subfigure->isChecked();
- igp.subcaptionText = fromqstr(subcaption->text());
switch (showCB->currentIndex()) {
case 0: igp.display = graphics::DefaultDisplay; break;