Skip to content
Snippets Groups Projects
Commit ff738998 authored by Václav Mareš's avatar Václav Mareš Committed by Jan Trávníček
Browse files

Generating automaton in inputDialog

- connection to ALIB
- changes in inputDialog
parent fcfb0807
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,9 @@ else:unix: LIBS += -L$$PWD/$${ALIB_PATH}/bin-debug/ -lalib2data ...@@ -79,6 +79,9 @@ else:unix: LIBS += -L$$PWD/$${ALIB_PATH}/bin-debug/ -lalib2data
INCLUDEPATH += $$PWD/$${ALIB_PATH}/bin-debug INCLUDEPATH += $$PWD/$${ALIB_PATH}/bin-debug
DEPENDPATH += $$PWD/$${ALIB_PATH}/bin-debug DEPENDPATH += $$PWD/$${ALIB_PATH}/bin-debug
   
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/$${ALIB_PATH}/bin-debug/release/ -lalib2algo
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/$${ALIB_PATH}/bin-debug/debug/ -lalib2algo
else:unix: LIBS += -L$$PWD/$${ALIB_PATH}/bin-debug/ -lalib2algo
   
INCLUDEPATH += $$PWD/$${ALIB_PATH}/alib2common/src/ INCLUDEPATH += $$PWD/$${ALIB_PATH}/alib2common/src/
INCLUDEPATH += $$PWD/$${ALIB_PATH}/alib2str/src/ INCLUDEPATH += $$PWD/$${ALIB_PATH}/alib2str/src/
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "ui_inputdialog.h" #include "ui_inputdialog.h"
   
#include <factory/XmlDataFactory.hpp> #include <factory/XmlDataFactory.hpp>
#include <automaton/Automaton.h>
#include <automaton/generate/RandomAutomatonFactory.h> #include <automaton/generate/RandomAutomatonFactory.h>
   
InputDialog::InputDialog(QWidget *parent) : InputDialog::InputDialog(QWidget *parent) :
...@@ -17,12 +16,8 @@ InputDialog::~InputDialog() ...@@ -17,12 +16,8 @@ InputDialog::~InputDialog()
delete ui; delete ui;
} }
   
void InputDialog::on_plainTextEdit_5_textChanged()
{
}
void InputDialog::on_pushButton_clicked() void InputDialog::on_pushButton_clicked()
{ {
automaton::NFA < > res = automaton::generate::RandomAutomatonFactory::generateNFA ( 5, 3, false, 10.0 ); automaton::NFA < > res = automaton::generate::RandomAutomatonFactory::generateNFA ( 5, 3, false, 10.0 );
ui->plainTextEdit_5->document()->setPlainText( QString::fromStdString(alib::XmlDataFactory::toString( res ) ) );
} }
...@@ -16,8 +16,6 @@ public: ...@@ -16,8 +16,6 @@ public:
~InputDialog(); ~InputDialog();
   
private slots: private slots:
void on_plainTextEdit_5_textChanged();
void on_pushButton_clicked(); void on_pushButton_clicked();
   
private: private:
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<item> <item>
<widget class="QLineEdit" name="lineEdit_5"> <widget class="QLineEdit" name="lineEdit_5">
<property name="text"> <property name="text">
<string>/home/venca/automata/NFA1.xml</string> <string/>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -48,9 +48,7 @@ ...@@ -48,9 +48,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="plainText"> <property name="plainText">
<string>&lt;?xml version=&quot;1.0&quot;?&gt; <string/>
&lt;NFA&gt;&lt;states&gt;&lt;Integer ref=&quot;0&quot;&gt;0&lt;/Integer&gt;&lt;Integer ref=&quot;1&quot;&gt;1&lt;/Integer&gt;&lt;Integer ref=&quot;2&quot;&gt;2&lt;/Integer&gt;&lt;Integer ref=&quot;3&quot;&gt;3&lt;/Integer&gt;&lt;Integer ref=&quot;4&quot;&gt;4&lt;/Integer&gt;&lt;/states&gt;&lt;inputAlphabet&gt;&lt;Character ref=&quot;5&quot;&gt;a&lt;/Character&gt;&lt;Character ref=&quot;6&quot;&gt;b&lt;/Character&gt;&lt;Character ref=&quot;7&quot;&gt;c&lt;/Character&gt;&lt;/inputAlphabet&gt;&lt;initialState&gt;&lt;Integer ref=&quot;8&quot;&gt;0&lt;/Integer&gt;&lt;/initialState&gt;&lt;finalStates&gt;&lt;Ref id=&quot;2&quot;/&gt;&lt;Ref id=&quot;3&quot;/&gt;&lt;/finalStates&gt;&lt;transitions&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;0&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;6&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;1&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;1&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;5&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;4&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;1&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;6&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;0&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;1&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;7&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;1&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;2&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;5&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;2&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;3&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;5&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;2&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;4&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;6&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;2&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;transition&gt;&lt;from&gt;&lt;Ref id=&quot;4&quot;/&gt;&lt;/from&gt;&lt;input&gt;&lt;Ref id=&quot;6&quot;/&gt;&lt;/input&gt;&lt;to&gt;&lt;Ref id=&quot;3&quot;/&gt;&lt;/to&gt;&lt;/transition&gt;&lt;/transitions&gt;&lt;/NFA&gt;
</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -68,6 +66,9 @@ ...@@ -68,6 +66,9 @@
<property name="text"> <property name="text">
<string>XML</string> <string>XML</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment