Code cleanup

This commit is contained in:
Mark Long 2016-10-24 13:52:43 -05:00
parent 6b7ed70a8e
commit 5debe5549b

View File

@ -22,7 +22,6 @@ HiresViewWidget::HiresViewWidget(QWidget *parent) :
resize(561,384); resize(561,384);
} }
void HiresViewWidget::setFile(BinaryFile *file) { void HiresViewWidget::setFile(BinaryFile *file) {
m_file = file; m_file = file;
@ -32,7 +31,6 @@ void HiresViewWidget::setFile(BinaryFile *file) {
hrsw->setData(file->data()); hrsw->setData(file->data());
} }
bool HiresViewWidget::optionsMenuItems(QMenu *menu) bool HiresViewWidget::optionsMenuItems(QMenu *menu)
{ {
menu->addAction(hrsw->monochromeAction()); menu->addAction(hrsw->monochromeAction());
@ -51,6 +49,7 @@ void HiresViewWidget::setFile(GenericFile *file)
setFile(af); setFile(af);
} }
} }
bool HiresViewWidget::canPrint() const { return true; } bool HiresViewWidget::canPrint() const { return true; }
void HiresViewWidget::doPrint() void HiresViewWidget::doPrint()
@ -58,12 +57,10 @@ void HiresViewWidget::doPrint()
QPrinter printer; QPrinter printer;
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
dialog.setWindowTitle(tr("Print HiRes Image")); dialog.setWindowTitle(tr("Print HiRes Image"));
if (dialog.exec() != QDialog::Accepted) { if (dialog.exec() != QDialog::Accepted) { return; }
return;
}
QPainter painter(&printer); QPainter painter(&printer);
QPixmap pm = hrsw->getPixmap(); QPixmap pm = hrsw->getPixmap();
@ -100,6 +97,5 @@ void HiresViewWidget::doExport()
QPixmap pm = hrsw->getPixmap(); QPixmap pm = hrsw->getPixmap();
pm.save(savename.path()); pm.save(savename.path());
} }