You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Build fully-functional configuration dialogs using simple JSON
Copyright (c) Grady O'Connell, 2019
Here's how it looks in action:
Getting Started
After you've cloned the repo, get the dependencies:
git submodule update --init --recursive
Build with Qt qmake and then run make:
qmakemake
Fig looks for the schema file in the program's directory. The default filename is "settings.schema.json".
You can load a different schema by passing it in:
./fig schema.json
The default save path is settings.json in the program's directory.SeeSchema / Application Info on how to change where it saves.
How it Works
Fig is a program that you can bundle with your application, meaning all you need to do is modifysettings.schema.json, and from there, your application can run fig as a configuration dialog,and the generated settings file called settings.json with your user'ssettings will be available to your application to make sense of (it's just json).
You may prefer your users to run fig separately from your main program, orhave it act as a launcher, calling your main program when theuser hits Ok and saves the settings (ReadSchema / Application Info in the readme).The other option is to call fig from within your application, and when the process closes,have your application read settings.json to get the new information.
Features
Supports text fields, comboboxes, checkboxes, and sliders
Supports string, int, double, and bool types
Type-checking
Restore defaults
App logos
Headers and footer text and links
Launch an application upon saving
Schema
Categories
In the upper level of the settings.schema.json, put your categories, like this:
{ "video":{ }, "audio":{ }}
Names
Add the printable name of the category using ".name"