-- qtcmd v0.1 -- (c) 2016 Valentin Schmidt "qtcmd" is a Qt-based command-line tool that allows to create interactive dialogs from shell scripts, and return the result as exitCode and/or stdout string. It's inspired by Zenity (https://en.wikipedia.org/wiki/Zenity), but uses Qt 4.8.6 instead of GTK+. It's currently win-only - i.e. meant for Windows batch scripts - but could easily be ported to macOS or Linux, just let me know if there is any interest. It comes in 2 flavors, a small (77 Kb) version that implements all basic dialog types, and an extended version (573 Kb) that in addition also allows to create dialogs of arbitrary complexity, loaded from a UI file created by Qt Designer. This version e.g. also allows to create Wizard-based installation dialogs etc. For details on usage, check out the enclosed Windows batch files. General optional parameters =========================== --cleanlooks If specified, dialogs use clearlooks style instead of native platform style. --icon Allows to use a custom icon for the dialog window. --title Allows to spefify a custom title for the dialog window. Dialog Commands =============== ---------------------------------------- --critical ---------------------------------------- Optional parameters: ==================== --buttons --defaultButton Exit code: DialogCode ---------------------------------------- --information ---------------------------------------- Optional parameters: ==================== --buttons --defaultButton Exit code: DialogCode ---------------------------------------- --question ---------------------------------------- Optional parameters: ==================== --buttons --defaultButton Exit code: DialogCode ---------------------------------------- --warning ---------------------------------------- Optional parameters: ==================== --buttons --defaultButton Exit code: DialogCode ---------------------------------------- --getText ---------------------------------------- Optional parameters: ==================== --echoMode --label --text Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: text entered by user ---------------------------------------- --getItem ---------------------------------------- Optional parameters: ==================== --editable --initial --label --radio --sep Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: item text selected by user ---------------------------------------- --getItems ---------------------------------------- Optional parameters: ==================== --check --initial --label --sep Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: list of numbers of selected items (or activated checkBoxes), separated by (default=";") ---------------------------------------- --getInt ---------------------------------------- Optional parameters: ==================== --initial --label --max --min --step Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: integer entered by user ---------------------------------------- --getDouble ---------------------------------------- Optional parameters: ==================== --decimals --initial --label --max --min Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: float entered by user ---------------------------------------- --getFont ---------------------------------------- Optional parameters: ==================== --initial Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: font (as font description string) selected by user ---------------------------------------- --getOpenFileName ---------------------------------------- Optional parameters: ==================== --dir --filter --options --selectedFilter Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: file selected by user ---------------------------------------- --getOpenFileNames ---------------------------------------- Optional parameters: ==================== --dir --filter --options --selectedFilter --sep Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: files selected by user, separated by (default=";") ---------------------------------------- --getExistingDirectory ---------------------------------------- Optional parameters: ==================== --dir --options Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: directory selected by user ---------------------------------------- --getSaveFileName ---------------------------------------- Optional parameters: ==================== --dir --filter --options --selectedFilter Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: file selected by user ---------------------------------------- --getColor ---------------------------------------- Optional parameters: ==================== --initial --options Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: color (as hex color string like e.g. #ff00ff) selected by user ---------------------------------------- --getDate ---------------------------------------- Optional parameters: ==================== --calendar --format --initial Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: date (as string in specified format) selected by user ---------------------------------------- --getDateTime ---------------------------------------- Optional parameters: ==================== --calendar --format --initial Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: dateTime (as string in specified format) selected by user ---------------------------------------- --getTime ---------------------------------------- Optional parameters: ==================== --format --initial Exit code: 0 if user pressed OK-button, otherwise 1 StdOut: time (as string in specified format) selected by user ---------------------------------------- --ui ---------------------------------------- Shows a (complex) dialog loaded from a *.ui file. The dialog can contain arbitrary Qt widget types, but only the values of the following interactive widget types are returned as result: - QCheckBox - QComboBox - QDateEdit - QDateTimeEdit - QDoubleSpinBox - QLineEdit - QRadioButton - QSlider - QSpinBox - QTimeEdit - QTextEdit Optional parameters: ==================== --name If specified, only values of widgets with an objectName are returned. --regex If specified, only values of widgets with an objectName matching regular expression are returned. --sep Exit code: DialogCode StdOut: list of widget values, separated by (default=";") Utility Commands ================ ---------------------------------------- --toClipboard ---------------------------------------- ---------------------------------------- --fromClipboard ---------------------------------------- StdOut: current clipboard text