aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-02-14 10:40:59 +0100
committerRenaud G <renaud@rolisteam.org>2019-03-23 17:55:15 +0100
commitc46ad9d1ceb345f09590ad8ea9a98b33a2a0c31b (patch)
tree53a8fa2d88ef09397171f360e0fc04487e547529
parent607b8284672c75f134616a826e3475be4cf8e277 (diff)
downloadOneRoll-c46ad9d1ceb345f09590ad8ea9a98b33a2a0c31b.tar.gz
OneRoll-c46ad9d1ceb345f09590ad8ea9a98b33a2a0c31b.zip
first draft of occurence counter
-rw-r--r--CMakeLists.txt2
-rw-r--r--cli/CMakeLists.txt16
-rw-r--r--node/occurencecountnode.cpp6
-rw-r--r--node/occurencecountnode.h24
4 files changed, 41 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2899cb1..9460032 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
project(diceparser)
-add_subdirectory(irc)
+#add_subdirectory(irc)
add_subdirectory(cli)
#add_subdirectory(mobile)
#add_subdirectory(webserver)
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
index 3c14576..f3dd61d 100644
--- a/cli/CMakeLists.txt
+++ b/cli/CMakeLists.txt
@@ -52,12 +52,12 @@ ENDIF(UPDATE_TRANSLATIONS)
if(Qt5Core_FOUND)
- IF(UPDATE_TRANSLATIONS)
+ #IF(UPDATE_TRANSLATIONS)
MESSAGE(status "find" ${dice_TS} ${translate_SRCS} )
- QT5_CREATE_TRANSLATION(dice_QM ${translate_SRCS} ${dice_TS})
- ELSE()
- QT5_ADD_TRANSLATION(dice_QM ${dice_TS})
- ENDIF()
+ #QT5_CREATE_TRANSLATION(dice_QM ${translate_SRCS} ${dice_TS})
+ #ELSE()
+ #QT5_ADD_TRANSLATION(dice_QM ${dice_TS})
+ #ENDIF()
QT5_ADD_RESOURCES(dice_RESOURCES_RCC ${dice_RESOURCES})
@@ -93,6 +93,7 @@ SET( dice_sources
../node/listsetrollnode.cpp
../node/numbernode.cpp
../node/parenthesesnode.cpp
+ ../node/forloopnode.cpp
../node/paintnode.cpp
../node/rerolldicenode.cpp
../node/scalaroperatornode.cpp
@@ -104,13 +105,16 @@ SET( dice_sources
../node/splitnode.cpp
../node/groupnode.cpp
../node/bind.cpp
+ ../node/occurencecountnode.cpp
main.cpp
displaytoolbox.cpp
../highlightdice.cpp
../node/variablenode.cpp
)
-add_executable( dice ${dice_sources} ${dice_QM} )
+set(documentation_files ../HelpMe.md ../README.md)
+
+add_executable( dice ${dice_sources} ${dice_QM} ${documentation_files})
target_link_libraries(dice ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES})
INSTALL_TARGETS(/bin dice)
diff --git a/node/occurencecountnode.cpp b/node/occurencecountnode.cpp
new file mode 100644
index 0000000..6343e8e
--- /dev/null
+++ b/node/occurencecountnode.cpp
@@ -0,0 +1,6 @@
+#include "occurencecountnode.h"
+
+OccurenceCountNode::OccurenceCountNode()
+{
+
+}
diff --git a/node/occurencecountnode.h b/node/occurencecountnode.h
new file mode 100644
index 0000000..9c9aa13
--- /dev/null
+++ b/node/occurencecountnode.h
@@ -0,0 +1,24 @@
+#ifndef OCCURENCECOUNTNODE_H
+#define OCCURENCECOUNTNODE_H
+
+#include "executionnode.h"
+#include "validator.h"
+
+class OccurenceCountNode : public ExecutionNode
+{
+public:
+ OccurenceCountNode();
+
+ void run(ExecutionNode* previous = nullptr);
+ virtual QString toString(bool withLabel)const;
+
+ ExecutionNode* getCopy() const;
+ qint64 getPriority() const;
+
+private:
+ qint64 m_width=0;
+ qint64 m_height=0;
+ Validator* m_validator;
+};
+
+#endif // OCCURENCECOUNTNODE_H