mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +00:00
Changed some boolean operators to bit-wise operators
This commit is contained in:
parent
2a28d1cb0f
commit
b6cfa1583c
@ -2566,7 +2566,7 @@ void gGraphView::mousePressEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
|
|
||||||
m_button_down = true;
|
m_button_down = true;
|
||||||
m_metaselect = event->modifiers() && Qt::AltModifier;
|
m_metaselect = event->modifiers() & Qt::AltModifier;
|
||||||
m_horiz_travel = 0;
|
m_horiz_travel = 0;
|
||||||
m_graph_index = i;
|
m_graph_index = i;
|
||||||
m_selected_graph = g;
|
m_selected_graph = g;
|
||||||
@ -2640,7 +2640,7 @@ void gGraphView::mousePressEvent(QMouseEvent *event)
|
|||||||
m_point_clicked = QPoint(event->x(), event->y());
|
m_point_clicked = QPoint(event->x(), event->y());
|
||||||
//QMouseEvent e(event->type(),m_point_clicked,event->button(),event->buttons(),event->modifiers());
|
//QMouseEvent e(event->type(),m_point_clicked,event->button(),event->buttons(),event->modifiers());
|
||||||
m_button_down = true;
|
m_button_down = true;
|
||||||
m_metaselect = event->modifiers() && Qt::AltModifier;
|
m_metaselect = event->modifiers() & Qt::AltModifier;
|
||||||
|
|
||||||
m_horiz_travel = 0;
|
m_horiz_travel = 0;
|
||||||
m_graph_index = i;
|
m_graph_index = i;
|
||||||
|
@ -234,7 +234,7 @@ void gDailySummary::paint(QPainter &painter, gGraph &w, const QRegion ®ion)
|
|||||||
rect1 = QRectF(xpos, ypos, 0, 0);
|
rect1 = QRectF(xpos, ypos, 0, 0);
|
||||||
QString txt = info.at(i);
|
QString txt = info.at(i);
|
||||||
|
|
||||||
rect1 = painter.boundingRect(rect1, Qt::AlignTop || Qt::AlignLeft, txt);
|
rect1 = painter.boundingRect(rect1, Qt::AlignTop | Qt::AlignLeft, txt);
|
||||||
rect1.setHeight(rect1.height() * 1.25);
|
rect1.setHeight(rect1.height() * 1.25);
|
||||||
|
|
||||||
maxwidth = qMax(rect1.width(), maxwidth);
|
maxwidth = qMax(rect1.width(), maxwidth);
|
||||||
@ -246,7 +246,7 @@ void gDailySummary::paint(QPainter &painter, gGraph &w, const QRegion ®ion)
|
|||||||
rect1 = QRectF(xpos, tpos, 0, 0);
|
rect1 = QRectF(xpos, tpos, 0, 0);
|
||||||
QString txt = settings.at(i);
|
QString txt = settings.at(i);
|
||||||
|
|
||||||
rect1 = painter.boundingRect(rect1, Qt::AlignTop || Qt::AlignLeft, txt);
|
rect1 = painter.boundingRect(rect1, Qt::AlignTop | Qt::AlignLeft, txt);
|
||||||
rect1.setHeight(rect1.height() * 1.25);
|
rect1.setHeight(rect1.height() * 1.25);
|
||||||
|
|
||||||
maxwidth = qMax(rect1.width(), maxwidth);
|
maxwidth = qMax(rect1.width(), maxwidth);
|
||||||
@ -258,7 +258,7 @@ void gDailySummary::paint(QPainter &painter, gGraph &w, const QRegion ®ion)
|
|||||||
QRectF rect3 = QRectF(xpos, tpos, 0, 0);
|
QRectF rect3 = QRectF(xpos, tpos, 0, 0);
|
||||||
QString machinfo = QObject::tr("Machine Information");
|
QString machinfo = QObject::tr("Machine Information");
|
||||||
|
|
||||||
rect3 = painter.boundingRect(rect1, Qt::AlignTop || Qt::AlignLeft, machinfo);
|
rect3 = painter.boundingRect(rect1, Qt::AlignTop | Qt::AlignLeft, machinfo);
|
||||||
maxwidth = qMax(rect1.width(), maxwidth);
|
maxwidth = qMax(rect1.width(), maxwidth);
|
||||||
|
|
||||||
painter.drawRect(QRect(xpos, ypos + rect3.height()+4, maxwidth, tpos-ypos));
|
painter.drawRect(QRect(xpos, ypos + rect3.height()+4, maxwidth, tpos-ypos));
|
||||||
@ -269,7 +269,7 @@ void gDailySummary::paint(QPainter &painter, gGraph &w, const QRegion ®ion)
|
|||||||
rect1 = QRectF(xpos, ypos, 0, 0);
|
rect1 = QRectF(xpos, ypos, 0, 0);
|
||||||
QString txt = info.at(i);
|
QString txt = info.at(i);
|
||||||
|
|
||||||
rect1 = painter.boundingRect(rect1, Qt::AlignTop || Qt::AlignLeft, txt);
|
rect1 = painter.boundingRect(rect1, Qt::AlignTop | Qt::AlignLeft, txt);
|
||||||
rect1.setWidth(maxwidth);
|
rect1.setWidth(maxwidth);
|
||||||
rect1.setHeight(rect1.height() * 1.25);
|
rect1.setHeight(rect1.height() * 1.25);
|
||||||
painter.fillRect(rect1, QColor(info_background.at(i)));
|
painter.fillRect(rect1, QColor(info_background.at(i)));
|
||||||
@ -295,7 +295,7 @@ void gDailySummary::paint(QPainter &painter, gGraph &w, const QRegion ®ion)
|
|||||||
rect1 = QRectF(xpos, ypos, 0, 0);
|
rect1 = QRectF(xpos, ypos, 0, 0);
|
||||||
QString txt = settings.at(i);
|
QString txt = settings.at(i);
|
||||||
|
|
||||||
rect1 = painter.boundingRect(rect1, Qt::AlignTop || Qt::AlignLeft, txt);
|
rect1 = painter.boundingRect(rect1, Qt::AlignTop | Qt::AlignLeft, txt);
|
||||||
rect1.setWidth(maxwidth);
|
rect1.setWidth(maxwidth);
|
||||||
rect1.setHeight(rect1.height() * 1.25);
|
rect1.setHeight(rect1.height() * 1.25);
|
||||||
// painter.fillRect(rect1, QColor("orange"));
|
// painter.fillRect(rect1, QColor("orange"));
|
||||||
|
Loading…
Reference in New Issue
Block a user