reformatted to Mozilla code style

This commit is contained in:
Jeremy Borgman
2020-09-04 20:16:33 -05:00
committed by borgmanJeremy
parent c0e2e48db4
commit c8d15205be
176 changed files with 12695 additions and 11269 deletions

View File

@@ -24,51 +24,71 @@ namespace {
}
LineTool::LineTool(QObject *parent) : AbstractTwoPointTool(parent) {
m_supportsOrthogonalAdj = true;
m_supportsDiagonalAdj = true;
LineTool::LineTool(QObject* parent)
: AbstractTwoPointTool(parent)
{
m_supportsOrthogonalAdj = true;
m_supportsDiagonalAdj = true;
}
QIcon LineTool::icon(const QColor &background, bool inEditor) const {
Q_UNUSED(inEditor);
return QIcon(iconPath(background) + "line.svg");
QIcon
LineTool::icon(const QColor& background, bool inEditor) const
{
Q_UNUSED(inEditor);
return QIcon(iconPath(background) + "line.svg");
}
QString LineTool::name() const {
return tr("Line");
QString
LineTool::name() const
{
return tr("Line");
}
QString LineTool::nameID() {
return QLatin1String("");
QString
LineTool::nameID()
{
return QLatin1String("");
}
QString LineTool::description() const {
return tr("Set the Line as the paint tool");
QString
LineTool::description() const
{
return tr("Set the Line as the paint tool");
}
CaptureTool* LineTool::copy(QObject *parent) {
return new LineTool(parent);
CaptureTool*
LineTool::copy(QObject* parent)
{
return new LineTool(parent);
}
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);
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);
}
void LineTool::paintMousePreview(QPainter &painter, const CaptureContext &context) {
painter.setPen(QPen(context.color, PADDING_VALUE + context.thickness));
painter.drawLine(context.mousePos, context.mousePos);
void
LineTool::paintMousePreview(QPainter& painter, const CaptureContext& context)
{
painter.setPen(QPen(context.color, PADDING_VALUE + context.thickness));
painter.drawLine(context.mousePos, context.mousePos);
}
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;
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;
}
void LineTool::pressed(const CaptureContext &context) {
Q_UNUSED(context);
void
LineTool::pressed(const CaptureContext& context)
{
Q_UNUSED(context);
}