Apply clang format
This commit is contained in:
@@ -19,7 +19,7 @@ Interface::~Interface()
|
||||
bool Interface::routeTo(Interface *target_interface)
|
||||
{
|
||||
Q_ASSERT(target_interface);
|
||||
|
||||
|
||||
if (target_interface == this) {
|
||||
return false; // Failed: Cant route to itself
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ Label::Label(QObject *parent)
|
||||
QWidget *Label::paintWidget(VisualContainer *visual_container)
|
||||
{
|
||||
Q_ASSERT(visual_container);
|
||||
|
||||
|
||||
// Create a label in the panel for this node.
|
||||
m_label = new QLabel("<Label>", visual_container);
|
||||
m_label->setGeometry(10, 10, 180, 30);
|
||||
|
||||
@@ -12,7 +12,7 @@ LineEdit::LineEdit(QObject *parent)
|
||||
QWidget *LineEdit::paintWidget(VisualContainer *visual_container)
|
||||
{
|
||||
Q_ASSERT(visual_container);
|
||||
|
||||
|
||||
QLineEdit *line_edit = new QLineEdit(visual_container);
|
||||
line_edit->show();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ SerialSend::SerialSend(QObject *parent)
|
||||
QWidget *SerialSend::paintWidget(VisualContainer *visual_container)
|
||||
{
|
||||
Q_ASSERT(visual_container);
|
||||
|
||||
|
||||
m_combo_box = new QComboBox(visual_container);
|
||||
|
||||
for (QSerialPortInfo port_info : QSerialPortInfo::availablePorts()) {
|
||||
|
||||
@@ -10,7 +10,7 @@ Slider::Slider(QObject *parent)
|
||||
QWidget *Slider::paintWidget(VisualContainer *visual_container)
|
||||
{
|
||||
Q_ASSERT(visual_container);
|
||||
|
||||
|
||||
//Create a slider in the panel for this node.
|
||||
QSlider *slider = new QSlider(visual_container);
|
||||
slider->setOrientation(Qt::Horizontal);
|
||||
|
||||
@@ -7,7 +7,7 @@ Visual::Visual(QObject *parent)
|
||||
: Node(parent)
|
||||
{
|
||||
qDebug() << this->metaObject()->className();
|
||||
}
|
||||
}
|
||||
|
||||
void Visual::setWidget(QWidget *widget)
|
||||
{
|
||||
@@ -24,7 +24,7 @@ void Visual::setWidget(QWidget *widget)
|
||||
QWidget *Visual::paintWidget(VisualContainer *visual_container)
|
||||
{
|
||||
Q_ASSERT(visual_container);
|
||||
|
||||
|
||||
QWidget *widget = new QWidget(visual_container);
|
||||
widget->setGeometry(50, 50, 150, 100);
|
||||
widget->setAttribute(Qt::WA_StyledBackground, true);
|
||||
|
||||
@@ -187,7 +187,7 @@ Pad *Cable::getPadAtScenePos(const QPointF &scene_pos) const
|
||||
void Cable::initiateConnection(Pad *current_pad)
|
||||
{
|
||||
Q_ASSERT(current_pad);
|
||||
|
||||
|
||||
bool connected = m_start_pad->getInterface()->routeTo(current_pad->getInterface());
|
||||
if (connected) {
|
||||
m_end_pad = current_pad;
|
||||
|
||||
@@ -23,7 +23,7 @@ NodeEditor::NodeEditor(QWidget *parent)
|
||||
void NodeEditor::addNode(Node *node)
|
||||
{
|
||||
Q_ASSERT(node);
|
||||
|
||||
|
||||
QPoint relative_position_hint = mapFromGlobal(node->positionHint());
|
||||
m_scene->addNode(node, relative_position_hint);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ NodeEditorScene::NodeEditorScene(QObject *parent)
|
||||
|
||||
void NodeEditorScene::addNode(Node *node, QPoint relative_position_hint)
|
||||
{
|
||||
Q_ASSERT(node);
|
||||
|
||||
Q_ASSERT(node);
|
||||
|
||||
m_nodes.append(node);
|
||||
m_debug_x = m_debug_x + 200;
|
||||
NodeGraphicsItem *node_graphicitem = new NodeGraphicsItem(nullptr, node);
|
||||
|
||||
@@ -14,7 +14,7 @@ Panel::Panel(QWidget *parent)
|
||||
void Panel::addVisual(Visual *visual)
|
||||
{
|
||||
Q_ASSERT(visual);
|
||||
|
||||
|
||||
QPoint mapped_position_hint = mapFromGlobal(visual->positionHint());
|
||||
VisualContainer *container = new VisualContainer(this);
|
||||
container->setGeometry(QRect(mapped_position_hint, QSize(100, 100)));
|
||||
|
||||
@@ -23,7 +23,7 @@ void VisualContainer::childEvent(QChildEvent *event)
|
||||
void VisualContainer::setNode(Node *node)
|
||||
{
|
||||
Q_ASSERT(node);
|
||||
|
||||
|
||||
if (m_node == node) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user