#include <QTextBrowser>
#include <QPushButton>
-#include <QCloseEvent>
using namespace std;
using namespace lyx::support;
{
setupUi(this);
- connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+ connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+ this, SLOT(slotButtonBox(QAbstractButton *)));
bc().setPolicy(ButtonPolicy::OkCancelPolicy);
- bc().setCancel(closePB);
-}
-
-
-void GuiShowFile::closeEvent(QCloseEvent * e)
-{
- slotClose();
- e->accept();
+ bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
}
void GuiShowFile::updateContents()
{
- setWindowTitle(toqstr(onlyFilename(filename_.absFilename())));
+ setWindowTitle(onlyFileName(toqstr(filename_.absFileName())));
QString contents = toqstr(filename_.fileContents("UTF-8"));
if (contents.isEmpty())
}
-bool GuiShowFile::initialiseParams(string const & data)
+bool GuiShowFile::initialiseParams(string const & sdata)
{
- filename_ = FileName(data);
+ filename_ = FileName(sdata);
return true;
}
} // namespace frontend
} // namespace lyx
-#include "GuiShowFile_moc.cpp"
+#include "moc_GuiShowFile.cpp"