Skip to content

Commit

Permalink
Add more documentation for GUI part
Browse files Browse the repository at this point in the history
  • Loading branch information
nkh-lab committed May 26, 2023
1 parent 28dc181 commit dd175ff
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Intro
Project to control USB relay modules based on HID technology.
Cross-platform project for controlling USB relay modules based on HID technology.

![](doc/pictures/intro.png)

Expand Down
38 changes: 38 additions & 0 deletions doc/GUI.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## Intro
The GUI part of the project is based on the wxWidgets cross-platform library and now supports Linux and Windows platforms.

Examples of an application view

Linux (Ubuntu):

![](screenshots/relaybox-ubuntu.png)

Windows 10:

![](screenshots/relaybox-windows.png)

## How to build GUI application
Run `cmake` with `-Dusbrelaymodule_BUILD_GUI=on` option.

Expand Down Expand Up @@ -39,5 +52,30 @@ Run the appropriate script according to your OS from the [tools](../tools) folde
./tools/build-portable-linux.sh gui
```

## GUI view customizing

After launching the GUI application `relaybox` and when the application is closed, you can find its configuration file `relaybox-cfg.json` in the same folder, which can be modified to suit the user's needs.

Below is an example of how the configuration file can be modified:
![](screenshots/relaybox-cfg_json.png)

1) `aliasColor` - section for defining colors in RGB format for button (channel) states aliasing
2) `aliasPages` - set of pages for grouping channels and aliasing them names, state names and colors

Channel aliasing format:

`"<channel>" : [ "<channel_name>", "<state0_name>", "<state0_color>", "<state1_name>", "<state1_color>" ]`

3) Customizing general parameters. The following can be modified:

`hideAllChannelsPage` - hide/show page with all channels of all detected USB relays

**Notes:**
* The configuration file is only applied during application startup.
* You can also pass the configuration file to the application from another location using the `-c` input argument:
```
relaybox -c=<Path to configuration file>
```

---
Go to [Contents](Contents.md)
Binary file added doc/screenshots/relaybox-cfg_json.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dd175ff

Please sign in to comment.