Updated deprecated functions.

This commit is contained in:
Leonardo Zide 2021-01-14 14:51:43 -08:00
parent dce4aa0644
commit a85bbec789
3 changed files with 7 additions and 13 deletions

View file

@ -36,7 +36,7 @@ lcMainWindow* gMainWindow;
void lcTabBar::mousePressEvent(QMouseEvent* Event)
{
if (Event->button() == Qt::MidButton)
if (Event->button() == Qt::MiddleButton)
mMousePressTab = tabAt(Event->pos());
else
QTabBar::mousePressEvent(Event);
@ -44,7 +44,7 @@ void lcTabBar::mousePressEvent(QMouseEvent* Event)
void lcTabBar::mouseReleaseEvent(QMouseEvent* Event)
{
if (Event->button() == Qt::MidButton && tabAt(Event->pos()) == mMousePressTab)
if (Event->button() == Qt::MiddleButton && tabAt(Event->pos()) == mMousePressTab)
tabCloseRequested(mMousePressTab);
else
QTabBar::mouseReleaseEvent(Event);
@ -461,7 +461,7 @@ void lcMainWindow::CreateMenus()
ExportMenu->addAction(mActions[LC_FILE_EXPORT_WAVEFRONT]);
FileMenu->addSeparator();
FileMenu->addAction(mActions[LC_FILE_RENDER]);
// FileMenu->addAction(mActions[LC_FILE_INSTRUCTIONS]);
FileMenu->addAction(mActions[LC_FILE_INSTRUCTIONS]);
FileMenu->addAction(mActions[LC_FILE_PRINT]);
FileMenu->addAction(mActions[LC_FILE_PRINT_PREVIEW]);
FileMenu->addSeparator();
@ -1165,7 +1165,7 @@ void lcMainWindow::Print(QPrinter* Printer)
Ascending = false;
}
QRect PageRect = Printer->pageRect();
QRect PageRect = Printer->pageLayout().paintRectPixels(Printer->resolution());
const int Resolution = Printer->resolution();
const int Margin = Resolution / 2; // todo: user setting
QRect MarginRect = QRect(PageRect.left() + Margin, PageRect.top() + Margin, PageRect.width() - Margin * 2, PageRect.height() - Margin * 2);

View file

@ -900,13 +900,7 @@ bool lcModel::LoadBinary(lcFile* file)
else
file->ReadU16(&sh, 1);
if (sh < LC_MAXPATH)
{
char Background[LC_MAXPATH];
file->ReadBuffer(Background, sh);
}
else
file->Seek(sh, SEEK_CUR);
file->Seek(sh, SEEK_CUR); // Background
}
if (fv >= 0.8f)

View file

@ -132,7 +132,7 @@ void lcViewWidget::mousePressEvent(QMouseEvent* MouseEvent)
mView->OnLeftButtonDown();
break;
case Qt::MidButton:
case Qt::MiddleButton:
mView->OnMiddleButtonDown();
break;
@ -166,7 +166,7 @@ void lcViewWidget::mouseReleaseEvent(QMouseEvent* MouseEvent)
mView->OnLeftButtonUp();
break;
case Qt::MidButton:
case Qt::MiddleButton:
mView->OnMiddleButtonUp();
break;