Changed clang format to new agreement
This commit is contained in:
committed by
borgmanJeremy
parent
2cbccc3d0a
commit
0d5386edd4
@@ -27,68 +27,62 @@ namespace {
|
||||
LineTool::LineTool(QObject* parent)
|
||||
: AbstractTwoPointTool(parent)
|
||||
{
|
||||
m_supportsOrthogonalAdj = true;
|
||||
m_supportsDiagonalAdj = true;
|
||||
m_supportsOrthogonalAdj = true;
|
||||
m_supportsDiagonalAdj = true;
|
||||
}
|
||||
|
||||
QIcon
|
||||
LineTool::icon(const QColor& background, bool inEditor) const
|
||||
QIcon LineTool::icon(const QColor& background, bool inEditor) const
|
||||
{
|
||||
Q_UNUSED(inEditor);
|
||||
return QIcon(iconPath(background) + "line.svg");
|
||||
Q_UNUSED(inEditor);
|
||||
return QIcon(iconPath(background) + "line.svg");
|
||||
}
|
||||
QString
|
||||
LineTool::name() const
|
||||
QString LineTool::name() const
|
||||
{
|
||||
return tr("Line");
|
||||
return tr("Line");
|
||||
}
|
||||
|
||||
ToolType
|
||||
LineTool::nameID() const
|
||||
ToolType LineTool::nameID() const
|
||||
{
|
||||
return ToolType::LINE;
|
||||
return ToolType::LINE;
|
||||
}
|
||||
|
||||
QString
|
||||
LineTool::description() const
|
||||
QString LineTool::description() const
|
||||
{
|
||||
return tr("Set the Line as the paint tool");
|
||||
return tr("Set the Line as the paint tool");
|
||||
}
|
||||
|
||||
CaptureTool*
|
||||
LineTool::copy(QObject* parent)
|
||||
CaptureTool* LineTool::copy(QObject* parent)
|
||||
{
|
||||
return new LineTool(parent);
|
||||
return new LineTool(parent);
|
||||
}
|
||||
|
||||
void
|
||||
LineTool::process(QPainter& painter, const QPixmap& pixmap, bool recordUndo)
|
||||
void LineTool::process(QPainter& painter,
|
||||
const QPixmap& pixmap,
|
||||
bool recordUndo)
|
||||
{
|
||||
if (recordUndo) {
|
||||
updateBackup(pixmap);
|
||||
}
|
||||
painter.setPen(QPen(m_color, m_thickness));
|
||||
painter.drawLine(m_points.first, m_points.second);
|
||||
if (recordUndo) {
|
||||
updateBackup(pixmap);
|
||||
}
|
||||
painter.setPen(QPen(m_color, m_thickness));
|
||||
painter.drawLine(m_points.first, m_points.second);
|
||||
}
|
||||
|
||||
void
|
||||
LineTool::paintMousePreview(QPainter& painter, const CaptureContext& context)
|
||||
void LineTool::paintMousePreview(QPainter& painter,
|
||||
const CaptureContext& context)
|
||||
{
|
||||
painter.setPen(QPen(context.color, PADDING_VALUE + context.thickness));
|
||||
painter.drawLine(context.mousePos, context.mousePos);
|
||||
painter.setPen(QPen(context.color, PADDING_VALUE + context.thickness));
|
||||
painter.drawLine(context.mousePos, context.mousePos);
|
||||
}
|
||||
|
||||
void
|
||||
LineTool::drawStart(const CaptureContext& context)
|
||||
void LineTool::drawStart(const CaptureContext& context)
|
||||
{
|
||||
m_color = context.color;
|
||||
m_thickness = context.thickness + PADDING_VALUE;
|
||||
m_points.first = context.mousePos;
|
||||
m_points.second = context.mousePos;
|
||||
m_color = context.color;
|
||||
m_thickness = context.thickness + PADDING_VALUE;
|
||||
m_points.first = context.mousePos;
|
||||
m_points.second = context.mousePos;
|
||||
}
|
||||
|
||||
void
|
||||
LineTool::pressed(const CaptureContext& context)
|
||||
void LineTool::pressed(const CaptureContext& context)
|
||||
{
|
||||
Q_UNUSED(context);
|
||||
Q_UNUSED(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user