by Marvin Geiger and Marlon Oberberger
This project creates a flow chart visualization using Python and the Tkinter GUI toolkit. It allows users to create and manage tasks represented as oval shapes on a canvas. Tasks can be connected to each other, participate in mutexes, and display relevant information such as task name, activity name, and current cycle.
- Create draggable task ovals on a canvas
- Display task name, activity name, and current cycle
- Connect tasks using connectors
- Manage task dependencies and relationships
- Implement mutex locks for task synchronization
- Customize task and connector appearance
- Support for light and dark themes using CustomTkinter
- Priority Ceiling
- Priority Inversion
- Ticket Lock
- First Come First Serve
- Python 3.x
- Tkinter
- CustomTkinter
- CTkMenuBar
-
Clone the repository:
git clone https://github.com/your-username/draggable-task-visualization.git
-
Install the required dependencies:
pip install customtkinter pip install CTkMenuBar pip install tkextrafont
-
Run the main script:
python main.py
-
The application window will open, displaying the task visualization canvas.
-
Use the GUI controls to create tasks, establish connections, and manage mutexes.
-
Drag tasks around the canvas to rearrange their positions.
-
Customize task and connector appearance using the provided options.
To create a template for creating your own diagram, you need to execute the following steps:
- Run the software
- In the menu-bar click on
file
- Click on
Save as xslx
- Save the template at your desired path and give it a name
- Click on the
Save
button to store the template
We have provided some demo files for exploring our Flowchart editor and visualizer. To load a file from disk, you need to:
- Run the software
- In the menu-bar locate and click on
file
- Click on
Load from xslx
- A system prompt will open and you can locate a file you want to open. To open the examples, you need to locate this project's root (or download the above provided xslx-files seperately). All example files are located there:
- ring.xslx
- ring2.xslx
- test.xslx
- data2.xslx
- data3.xslx
- ... (see repository root)
- Click on
Load
To start the simulation it is REQUIRED to load a file beforehand. (see section above)
Also ensure that you are not in EDIT mode (disabled by default after each restart of the software).
On the menu-bar locate and click on Run
. You can now either choose manual mode by clicking Next step
, which simulates a single clock input and thus advances the system by one cycle OR you can use the "Simulation Feature":
- Click on
Hide/Show Simulation Sidebar
. - Now the simulation menu should show up at the right side of the window.
- Drag the slider with your mouse cursor to a desired delay value between cycles (left click).
- Press the
Start
button to begin the simulation - To Halt the simulation press the
Stop
button - To resume the simulation, just press
Start
again
You can reload the file at any time by locating File
in the menu bar and clicking on Reload file
.
To edit a file, be sure to hide the simulation bar from the left side of the window. If it is still present, locate Run
in the menu bar and click on Hide/Show Simulation Sidebar
. Otherwise the edit mode is not available.
- Locate
Edit
on the menu-bar and click on it. - Click on ONE task, it is now highlighted in dark blue. You can now adjust the following parameters:
- Task Name
- Activity Name
- Amount of cycles the task needs for completion
- If you click on MORE THAN ONE task, you can either set a connection (including semaphore) or a mutex. YOu can select multiple tasks by clicking on them. To reverse the direction of aconnection you need to select the sourcefirst and then the destination task.
To add a new task, you need to click on Edit
> Add new task
. By dragging the task with your mouse, you can move the task to a preferred place. If this doesn't work and the task just gets highlighted dark-blue, be sure to deselect Edit
> Edit mode
in the menu-bar.
!Caution!: Remember to save your new flowchart that you just created/edited:
- In the menu-bar click on
File
- Click on
Save as xslx
- Save the file at your desired path and give it a meaningful name :)
- Click on the
Save
button to store the file
The Configuration
class in Configuration.py
contains various settings and references used throughout the project. You can modify these settings to customize the behavior and appearance of the application.
Try installing all required libraries if any are missing. If none of this helps, ensure that your OS is supported. Currently only Windows 10/11 is supported.
We used PyCharm by Jetbrains for developing this software. Also Visual Studio Code with the required plugins will work certainly.
This project is licensed under the MIT License.