Skip to content

Commit

Permalink
Major structure overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
rvinktue committed Aug 5, 2022
1 parent 9977d2b commit e1f8731
Show file tree
Hide file tree
Showing 85 changed files with 1,536 additions and 503 deletions.
Binary file modified examples/academic/abp/abp.lps
Binary file not shown.
Binary file added examples/academic/abp/abp.lts
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/industrial/1394/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
os.system('lps2pbes -v -f nodeadlock.mcf 1394-fin.lps 1394-fin.nodeadlock.pbes')
os.system('pbes2bool -v 1394-fin.nodeadlock.pbes')

os.system('lps2lts -v --cached 1394-fin.lps 1394-fin.aut')
os.system('lps2lts -v --cached 1394-fin.lps 1394-fin.lts')

5 changes: 0 additions & 5 deletions tools/release/ltsgraph/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,4 @@ class ArcballCameraView
QRect m_viewport;
};

class ArcballCameraController
{

};

#endif // MCRL2_LTSGRAPH_CAMERA_H
50 changes: 15 additions & 35 deletions tools/release/ltsview/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,21 @@
# This file was autogenerated with genCMakeLists.py for LTSView

# Make sure AUTOUIC knows where to find the .ui files.
set(CMAKE_AUTOUIC_SEARCH_PATHS "./include/ui/ui_files/")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")
add_mcrl2_tool(ltsview
MENUNAME "LTSView"
DESCRIPTION "Visualisation tool for large state spaces (mCRL2 toolset)"
ICON "mcrl2-green"
SOURCES
infodock.ui
mainwindow.ui
markdock.ui
markstateruledialog.ui
savepicturedialog.ui
settingsdialog.ui
settingsdock.ui
simdock.ui
ltsview.qrc
cluster.cpp
conedb.cpp
fsm_state_positioner.cpp
infodock.cpp
lts.cpp
ltscanvas.cpp
ltsmanager.cpp
main.cpp
mainwindow.cpp
markdock.cpp
markmanager.cpp
markstateruledialog.cpp
primitivefactory.cpp
primitives.cpp
rtree.cpp
savepicturedialog.cpp
settingsdialog.cpp
settingsdock.cpp
simdock.cpp
simulation.cpp
sp_state_positioner.cpp
state.cpp
transition.cpp
vectors.cpp
visobjectfactory.cpp
visualizer.cpp
./source/visualizer/
./source/visualizer/generic_visualizer/
./source/visualizer/generic_visualizer/cameras/
./source/visualizer/ltsview_visualizer/
./source/
./source/ui/
# Qt wants .ui files in the sources variable; include by directory.
./include/ui/ui_files/
DEPENDS
mcrl2_lts
mcrl2_gui
Expand All @@ -51,4 +29,6 @@ add_mcrl2_tool(ltsview
INCLUDE
${OPENGL_INCLUDE_DIR}
${TR_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
"./include/visualizer/generic_visualizer/;./include/visualizer/;./include/visualizer/ltsview_visualizer/;./include/visualizer/generic_visualizer/cameras/;./include/ui/;./include/"
)
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ class Cluster
void addBranchVisObject(int vo);
void clearBranchVisObjects();

std::vector< Cluster* > descendants;
private:
std::map< int, int > actionLabelCounts;
Cluster* ancestor;
float baseRadius;
int numDeadlocks;
std::vector< Cluster* > descendants;
std::vector<std::vector<bool> > severedDescendants;
unsigned int severedDescendantsC;
int numMarkedStatesAll;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class LtsManagerHelper : public QObject
Q_OBJECT

public:
LtsManagerHelper(Settings *settings): m_settings(settings) {}
LtsManagerHelper() {}
LTS *lts() { return m_lts; }

public slots:
Expand All @@ -41,7 +41,6 @@ class LtsManagerHelper : public QObject
void finished();

private:
Settings *m_settings;
LTS *m_lts;
};

Expand All @@ -50,7 +49,7 @@ class LtsManager : public QObject
Q_OBJECT

public:
LtsManager(QObject *parent, Settings *settings, QThread *atermThread);
LtsManager(QObject *parent, QThread *atermThread);
LTS *lts() const { return m_lts; }

State *selectedState() const { return m_selectedState; }
Expand Down Expand Up @@ -111,8 +110,6 @@ class LtsManager : public QObject

public:
LtsManagerHelper m_helper;

Settings *m_settings;
LTS *m_lts;
std::unique_ptr<Simulation> m_simulation;
State *m_selectedState;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

#include "mcrl2/gui/setting.h"

struct Settings
class Settings
{
public:
typedef mcrl2::gui::qt::SettingInt SettingInt;
typedef mcrl2::gui::qt::SettingFloat SettingFloat;
typedef mcrl2::gui::qt::SettingBool SettingBool;
Expand All @@ -30,11 +31,17 @@ struct Settings
SettingColor backgroundColor;
SettingColor stateColor;
SettingColor downEdgeColor;
SettingColor upEdgeColor;

SettingColor upEdgeColorFrom;
SettingColor upEdgeColorTo;
SettingBool longInterpolationUpEdge;

SettingColor markedColor;

SettingColor clusterColorTop;
SettingColor clusterColorBottom;
SettingBool longInterpolation;
SettingBool longInterpolationCluster;

SettingColor simPrevColor;
SettingColor simCurrColor;
SettingColor simSelColor;
Expand All @@ -53,7 +60,8 @@ struct Settings
SettingBool displayTransitions;
SettingBool displayBackpointers;
SettingBool displayWireframe;


private:
Settings():
stateSize(0.1f),
clusterHeight(0.0f),
Expand All @@ -64,11 +72,13 @@ struct Settings
backgroundColor(QColor(150, 150, 150)),
stateColor(QColor(255, 255, 255)),
downEdgeColor(QColor(255, 255, 255)),
upEdgeColor(QColor(0, 0, 255)),
upEdgeColorFrom(QColor(0, 0, 0)),
upEdgeColorTo(QColor(0, 0, 255)),
longInterpolationUpEdge(false),
markedColor(QColor(255, 0, 0)),
clusterColorTop(QColor(255, 255, 255)),
clusterColorBottom(QColor(0, 0, 255)),
longInterpolation(false),
longInterpolationCluster(false),
simPrevColor(QColor(255, 0, 255)),
simCurrColor(QColor(0, 255, 0)),
simSelColor(QColor(255, 255, 0)),
Expand All @@ -88,6 +98,13 @@ struct Settings
displayBackpointers(false),
displayWireframe(false)
{}

public:
// singleton pattern
static Settings& instance(){
static Settings INSTANCE;
return INSTANCE;
}
};

#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions tools/release/ltsview/include/ui/graphicsinfodialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Author(s): Ruben Vink
// Copyright: see the accompanying file COPYING or copy at
// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef GRAPHICSINFODIALOG_H
#define GRAPHICSINFODIALOG_H

#include "ui_graphicsinfodialog.h"

#include <QDialog>
#include <QLabel>
#include <QTextEdit>


class GraphicsInfoDialog : public QDialog
{
Q_OBJECT

public:
GraphicsInfoDialog(QWidget *parent);

QLabel *lbl_info;
QTextEdit *txt_info;
private:
Ui::graphicsDebugInfoDialog m_ui;
};

#endif
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#include "settingsdialog.h"
#include "settingsdock.h"
#include "simdock.h"
#include "graphicsinfodialog.h"

#include <iostream>

class MainWindow : public QMainWindow
{
Expand All @@ -43,6 +46,8 @@ class MainWindow : public QMainWindow
void setStatusBar(QString message) { m_ui.statusbar->showMessage(message); }
void clearStatusBar() { m_ui.statusbar->clearMessage(); }

void updateGraphicsInfo();

void startRendering() { setStatusBar("Rendering..."); }
void loadingLts() { setProgress(0, "Loading file"); }
void rankingStates() { setProgress(1, "Ranking states"); }
Expand Down Expand Up @@ -76,7 +81,6 @@ class MainWindow : public QMainWindow

private:
Ui::MainWindow m_ui;
Settings m_settings;
LtsManager *m_ltsManager;
MarkManager *m_markManager;
InfoDock *m_infoDock;
Expand All @@ -86,6 +90,8 @@ class MainWindow : public QMainWindow
SettingsDialog *m_settingsDialog;
LtsCanvas *m_ltsCanvas;
QProgressDialog *m_progressDialog;
GraphicsInfoDialog *m_graphics_info_dialog;

mcrl2::gui::qt::LogRelay m_logRelay;

mcrl2::gui::qt::PersistentFileDialog m_fileDialog;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ class SettingsDialog : public QDialog
Q_OBJECT

public:
SettingsDialog(QWidget *parent, Settings *settings);
SettingsDialog(QWidget *parent);

private:
void setupSpinbox(QSpinBox *spinbox, Settings::SettingInt &setting);
void setupCheckbox(QCheckBox *checkbox, Settings::SettingBool &setting);

private:
Ui::SettingsDialog m_ui;
Settings *m_settings;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SettingsDock : public QWidget
Q_OBJECT

public:
SettingsDock(QWidget *parent, Settings *settings);
SettingsDock(QWidget *parent);

private slots:
void stateSizeChanged(int value);
Expand All @@ -50,7 +50,6 @@ class SettingsDock : public QWidget

private:
Ui::SettingsDock m_ui;
Settings *m_settings;
};

#endif
File renamed without changes.
69 changes: 69 additions & 0 deletions tools/release/ltsview/include/ui/ui_files/graphicsinfodialog.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>graphicsDebugInfoDialog</class>
<widget class="QDialog" name="graphicsDebugInfoDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>550</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Graphics Info</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>551</width>
<height>301</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lbl_info">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="text">
<string>Graphics information will show here...</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="txt_info">
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>
File renamed without changes.
Loading

0 comments on commit e1f8731

Please sign in to comment.