mirror of
https://github.com/markdavidlong/AppleSAWS.git
synced 2024-11-22 00:31:04 +00:00
Code cleanup
This commit is contained in:
parent
6b7ed70a8e
commit
5debe5549b
@ -22,7 +22,6 @@ HiresViewWidget::HiresViewWidget(QWidget *parent) :
|
||||
resize(561,384);
|
||||
}
|
||||
|
||||
|
||||
void HiresViewWidget::setFile(BinaryFile *file) {
|
||||
m_file = file;
|
||||
|
||||
@ -32,7 +31,6 @@ void HiresViewWidget::setFile(BinaryFile *file) {
|
||||
hrsw->setData(file->data());
|
||||
}
|
||||
|
||||
|
||||
bool HiresViewWidget::optionsMenuItems(QMenu *menu)
|
||||
{
|
||||
menu->addAction(hrsw->monochromeAction());
|
||||
@ -51,6 +49,7 @@ void HiresViewWidget::setFile(GenericFile *file)
|
||||
setFile(af);
|
||||
}
|
||||
}
|
||||
|
||||
bool HiresViewWidget::canPrint() const { return true; }
|
||||
|
||||
void HiresViewWidget::doPrint()
|
||||
@ -58,12 +57,10 @@ void HiresViewWidget::doPrint()
|
||||
QPrinter printer;
|
||||
|
||||
QPrintDialog dialog(&printer, this);
|
||||
|
||||
dialog.setWindowTitle(tr("Print HiRes Image"));
|
||||
|
||||
if (dialog.exec() != QDialog::Accepted) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dialog.exec() != QDialog::Accepted) { return; }
|
||||
|
||||
QPainter painter(&printer);
|
||||
QPixmap pm = hrsw->getPixmap();
|
||||
@ -100,6 +97,5 @@ void HiresViewWidget::doExport()
|
||||
|
||||
QPixmap pm = hrsw->getPixmap();
|
||||
pm.save(savename.path());
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user