Skip to content

Commit

Permalink
uncrustify + normalize (include Global/Macros.h always at the same pl…
Browse files Browse the repository at this point in the history
…ace)
  • Loading branch information
devernay committed May 22, 2016
1 parent fd944a6 commit 4ab0b0b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion Engine/AbortableRenderInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ AbortableRenderInfo::AbortableRenderInfo(bool canAbort,

AbortableRenderInfo::~AbortableRenderInfo()
{

}

U64
Expand Down
9 changes: 3 additions & 6 deletions Gui/ColoredFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,27 @@
NATRON_NAMESPACE_ENTER;

ColoredFrame::ColoredFrame(QWidget* parent)
: QFrame(parent)
, _frameColor(Qt::black)
: QFrame(parent)
, _frameColor(Qt::black)
{
}

ColoredFrame::~ColoredFrame()
{

}


const QColor&
ColoredFrame::getFrameColor()
{
return _frameColor;
}


void
ColoredFrame::setFrameColor(const QColor& color)
{
_frameColor = color;

setStyleSheet(QString::fromUtf8("ColoredFrame { border:1px solid rgb(%1, %2, %3); border-radius: 2px; }").arg(color.red()).arg(color.green()).arg(color.blue()));
setStyleSheet( QString::fromUtf8("ColoredFrame { border:1px solid rgb(%1, %2, %3); border-radius: 2px; }").arg( color.red() ).arg( color.green() ).arg( color.blue() ) );
}

NATRON_NAMESPACE_EXIT;
Expand Down
13 changes: 7 additions & 6 deletions Gui/ColoredFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,21 @@
#include <Python.h>
// ***** END PYTHON BLOCK *****

#include "Global/Macros.h"

#include <QFrame>
#include <QColor>

#include "Gui/GuiFwd.h"
#include "Global/Macros.h"

NATRON_NAMESPACE_ENTER;

class ColoredFrame : public QFrame
class ColoredFrame
: public QFrame
{
GCC_DIAG_SUGGEST_OVERRIDE_OFF
GCC_DIAG_SUGGEST_OVERRIDE_OFF
Q_OBJECT
GCC_DIAG_SUGGEST_OVERRIDE_ON
GCC_DIAG_SUGGEST_OVERRIDE_ON

public:

Expand All @@ -50,9 +52,8 @@ class ColoredFrame : public QFrame
public Q_SLOTS:

void setFrameColor(const QColor& color);

private:

private:

QColor _frameColor;
};
Expand Down
1 change: 1 addition & 0 deletions Gui/NodeGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ NodeGui::onSettingsPanelColorChanged(const QColor & color)
_currentColor = color;
}
Q_EMIT colorChanged(color);

refreshCurrentBrush();
}

Expand Down
11 changes: 6 additions & 5 deletions Gui/NodeViewerContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,17 @@ NodeViewerContext::createGui()
_imp->mainContainerLayout = new QHBoxLayout(_imp->mainContainer);
_imp->mainContainerLayout->setContentsMargins(0, 0, 0, 0);
_imp->mainContainerLayout->setSpacing(0);
_imp->nodeLabel = new Label(QString::fromUtf8(node->getNode()->getLabel().c_str()), _imp->mainContainer);
QObject::connect(node->getNode().get(), SIGNAL(labelChanged(QString)), _imp->nodeLabel, SLOT(setText(QString)));
_imp->nodeLabel = new Label(QString::fromUtf8( node->getNode()->getLabel().c_str() ), _imp->mainContainer);
QObject::connect( node->getNode().get(), SIGNAL(labelChanged(QString)), _imp->nodeLabel, SLOT(setText(QString)) );
_imp->widgetsContainer = new QWidget(_imp->mainContainer);
_imp->widgetsContainerLayout = new QVBoxLayout(_imp->widgetsContainer);
_imp->widgetsContainerLayout->setContentsMargins(0, 0, 0, 0);
_imp->widgetsContainerLayout->setSpacing(0);
_imp->mainContainerLayout->addWidget(_imp->widgetsContainer);
_imp->mainContainerLayout->addWidget(_imp->nodeLabel);
_imp->mainContainerLayout->addStretch();
onNodeColorChanged(node->getCurrentColor());
QObject::connect(node.get(), SIGNAL(colorChanged(QColor)), this, SLOT(onNodeColorChanged(QColor)));
onNodeColorChanged( node->getCurrentColor() );
QObject::connect( node.get(), SIGNAL(colorChanged(QColor)), this, SLOT(onNodeColorChanged(QColor)) );
setContainerWidget(_imp->mainContainer);
_imp->createKnobs(knobsOrdered);
}
Expand Down Expand Up @@ -247,7 +247,8 @@ addSpacer(QBoxLayout* layout)
void
NodeViewerContext::onNodeColorChanged(const QColor& color)
{
QString labelStyle = QString::fromUtf8("Label { color: rgb(%1, %2, %3); }").arg(color.red()).arg(color.green()).arg(color.blue());
QString labelStyle = QString::fromUtf8("Label { color: rgb(%1, %2, %3); }").arg( color.red() ).arg( color.green() ).arg( color.blue() );

_imp->nodeLabel->setStyleSheet(labelStyle);
_imp->mainContainer->setFrameColor(color);
}
Expand Down

0 comments on commit 4ab0b0b

Please sign in to comment.