mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Updated deprecated functions.
This commit is contained in:
parent
dce4aa0644
commit
a85bbec789
3 changed files with 7 additions and 13 deletions
|
@ -36,7 +36,7 @@ lcMainWindow* gMainWindow;
|
||||||
|
|
||||||
void lcTabBar::mousePressEvent(QMouseEvent* Event)
|
void lcTabBar::mousePressEvent(QMouseEvent* Event)
|
||||||
{
|
{
|
||||||
if (Event->button() == Qt::MidButton)
|
if (Event->button() == Qt::MiddleButton)
|
||||||
mMousePressTab = tabAt(Event->pos());
|
mMousePressTab = tabAt(Event->pos());
|
||||||
else
|
else
|
||||||
QTabBar::mousePressEvent(Event);
|
QTabBar::mousePressEvent(Event);
|
||||||
|
@ -44,7 +44,7 @@ void lcTabBar::mousePressEvent(QMouseEvent* Event)
|
||||||
|
|
||||||
void lcTabBar::mouseReleaseEvent(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);
|
tabCloseRequested(mMousePressTab);
|
||||||
else
|
else
|
||||||
QTabBar::mouseReleaseEvent(Event);
|
QTabBar::mouseReleaseEvent(Event);
|
||||||
|
@ -461,7 +461,7 @@ void lcMainWindow::CreateMenus()
|
||||||
ExportMenu->addAction(mActions[LC_FILE_EXPORT_WAVEFRONT]);
|
ExportMenu->addAction(mActions[LC_FILE_EXPORT_WAVEFRONT]);
|
||||||
FileMenu->addSeparator();
|
FileMenu->addSeparator();
|
||||||
FileMenu->addAction(mActions[LC_FILE_RENDER]);
|
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]);
|
||||||
FileMenu->addAction(mActions[LC_FILE_PRINT_PREVIEW]);
|
FileMenu->addAction(mActions[LC_FILE_PRINT_PREVIEW]);
|
||||||
FileMenu->addSeparator();
|
FileMenu->addSeparator();
|
||||||
|
@ -1165,7 +1165,7 @@ void lcMainWindow::Print(QPrinter* Printer)
|
||||||
Ascending = false;
|
Ascending = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect PageRect = Printer->pageRect();
|
QRect PageRect = Printer->pageLayout().paintRectPixels(Printer->resolution());
|
||||||
const int Resolution = Printer->resolution();
|
const int Resolution = Printer->resolution();
|
||||||
const int Margin = Resolution / 2; // todo: user setting
|
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);
|
QRect MarginRect = QRect(PageRect.left() + Margin, PageRect.top() + Margin, PageRect.width() - Margin * 2, PageRect.height() - Margin * 2);
|
||||||
|
|
|
@ -900,13 +900,7 @@ bool lcModel::LoadBinary(lcFile* file)
|
||||||
else
|
else
|
||||||
file->ReadU16(&sh, 1);
|
file->ReadU16(&sh, 1);
|
||||||
|
|
||||||
if (sh < LC_MAXPATH)
|
file->Seek(sh, SEEK_CUR); // Background
|
||||||
{
|
|
||||||
char Background[LC_MAXPATH];
|
|
||||||
file->ReadBuffer(Background, sh);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
file->Seek(sh, SEEK_CUR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fv >= 0.8f)
|
if (fv >= 0.8f)
|
||||||
|
|
|
@ -132,7 +132,7 @@ void lcViewWidget::mousePressEvent(QMouseEvent* MouseEvent)
|
||||||
mView->OnLeftButtonDown();
|
mView->OnLeftButtonDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::MidButton:
|
case Qt::MiddleButton:
|
||||||
mView->OnMiddleButtonDown();
|
mView->OnMiddleButtonDown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ void lcViewWidget::mouseReleaseEvent(QMouseEvent* MouseEvent)
|
||||||
mView->OnLeftButtonUp();
|
mView->OnLeftButtonUp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::MidButton:
|
case Qt::MiddleButton:
|
||||||
mView->OnMiddleButtonUp();
|
mView->OnMiddleButtonUp();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue