aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node
diff options
context:
space:
mode:
Diffstat (limited to 'node')
-rw-r--r--node/helpnode.cpp20
-rw-r--r--node/helpnode.h19
-rw-r--r--node/keepdiceexecnode.cpp4
-rw-r--r--node/listaliasnode.cpp1
-rw-r--r--node/parenthesesnode.cpp1
-rw-r--r--node/scalaroperatornode.cpp2
-rw-r--r--node/sortresult.cpp7
-rw-r--r--node/startingnode.cpp21
-rw-r--r--node/startingnode.h20
9 files changed, 83 insertions, 12 deletions
diff --git a/node/helpnode.cpp b/node/helpnode.cpp
index 6108e4d..dd5f087 100644
--- a/node/helpnode.cpp
+++ b/node/helpnode.cpp
@@ -1,3 +1,22 @@
+/***************************************************************************
+ * Copyright (C) 2015 by Renaud Guezennec *
+ * http://renaudguezennec.homelinux.org/accueil,3.html *
+ * *
+ * rolisteam is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
#include "helpnode.h"
HelpNode::HelpNode()
@@ -9,6 +28,7 @@ void HelpNode::run(ExecutionNode* previous)
{
m_previousNode = previous;
StringResult* txtResult = dynamic_cast<StringResult*>(m_result);
+ txtResult->setHighLight(false);
if(NULL != previous)
{
diff --git a/node/helpnode.h b/node/helpnode.h
index 88a0842..be21b67 100644
--- a/node/helpnode.h
+++ b/node/helpnode.h
@@ -1,3 +1,22 @@
+/***************************************************************************
+ * Copyright (C) 2015 by Renaud Guezennec *
+ * http://renaudguezennec.homelinux.org/accueil,3.html *
+ * *
+ * rolisteam is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
#ifndef HELPNODE_H
#define HELPNODE_H
#include "executionnode.h"
diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp
index a225ac4..a230107 100644
--- a/node/keepdiceexecnode.cpp
+++ b/node/keepdiceexecnode.cpp
@@ -42,10 +42,8 @@ m_previousNode = previous;
if(NULL!=previousDiceResult)
{
QList<Die*> diceList=previousDiceResult->getResultList();
- QList<Die*> diceList2=m_diceResult->getResultList();
+ QList<Die*> diceList2 = diceList.mid(0,m_numberOfDice);
-
- diceList2 = diceList.mid(0,m_numberOfDice);
foreach(Die* tmp,diceList.mid(m_numberOfDice,-1))
{
tmp->setHighlighted(false);
diff --git a/node/listaliasnode.cpp b/node/listaliasnode.cpp
index ddb8ac9..1809eac 100644
--- a/node/listaliasnode.cpp
+++ b/node/listaliasnode.cpp
@@ -29,6 +29,7 @@ void ListAliasNode::run(ExecutionNode* previous )
{
m_previousNode = previous;
StringResult* txtResult = dynamic_cast<StringResult*>(m_result);
+ txtResult->setHighLight(false);
if(NULL != previous)
{
diff --git a/node/parenthesesnode.cpp b/node/parenthesesnode.cpp
index 2876147..f81fc1c 100644
--- a/node/parenthesesnode.cpp
+++ b/node/parenthesesnode.cpp
@@ -22,6 +22,7 @@
#include "parenthesesnode.h"
ParenthesesNode::ParenthesesNode()
+ : m_internalNode(NULL)
{
}
diff --git a/node/scalaroperatornode.cpp b/node/scalaroperatornode.cpp
index c5f91f9..d532df0 100644
--- a/node/scalaroperatornode.cpp
+++ b/node/scalaroperatornode.cpp
@@ -26,7 +26,7 @@
ScalarOperatorNode::ScalarOperatorNode()
- : m_internalNode(NULL),m_scalarResult(new ScalarResult())
+ : m_internalNode(NULL),m_scalarResult(new ScalarResult()),m_operator(PLUS)
{
m_scalarOperationList.insert('+',PLUS);
m_scalarOperationList.insert('-',MINUS);
diff --git a/node/sortresult.cpp b/node/sortresult.cpp
index 44a25f0..421beb3 100644
--- a/node/sortresult.cpp
+++ b/node/sortresult.cpp
@@ -54,14 +54,11 @@ void SortResultNode::run(ExecutionNode* node)
bool found = false;
int start = 0;
int end = diceList2.size();
- int distance = 0;
Die* tmp2 = NULL;
while(!found)
{
- distance = end-start;
+ int distance = end-start;
j = (start+end)/2;
-
-
if(distance == 0)
{
j=end;
@@ -78,9 +75,7 @@ void SortResultNode::run(ExecutionNode* node)
{
start=j+1;
}
-
}
-
}
diceList2.insert(j,tmp1);
}
diff --git a/node/startingnode.cpp b/node/startingnode.cpp
index b15101b..7e13f5d 100644
--- a/node/startingnode.cpp
+++ b/node/startingnode.cpp
@@ -1,3 +1,22 @@
+/***************************************************************************
+ * Copyright (C) 2015 by Renaud Guezennec *
+ * http://renaudguezennec.homelinux.org/accueil,3.html *
+ * *
+ * rolisteam is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
#include "startingnode.h"
#include <QDebug>
@@ -24,7 +43,5 @@ qint64 StartingNode::getPriority() const
{
priority = m_nextNode->getPriority();
}
-
-
return priority;
}
diff --git a/node/startingnode.h b/node/startingnode.h
index ebe28c0..1edebc9 100644
--- a/node/startingnode.h
+++ b/node/startingnode.h
@@ -1,3 +1,22 @@
+/***************************************************************************
+ * Copyright (C) 2015 by Renaud Guezennec *
+ * http://renaudguezennec.homelinux.org/accueil,3.html *
+ * *
+ * rolisteam is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
#ifndef STARTINGNODE_H
#define STARTINGNODE_H
@@ -31,3 +50,4 @@ public:
};
#endif // STARTINGNODE_H
+