Index of /c/qtcmd

Icon  Name                    Last modified      Size  Description
[PARENTDIR] Parent Directory - [   ] qtcmd_v0.1.zip 2016-12-29 15:35 3.9M [TXT] readme.txt 2016-12-29 15:35 8.3K
-- 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 <string pngPath>

  Allows to use a custom icon for the dialog window.

--title <string title>

  Allows to spefify a custom title for the dialog window.


Dialog Commands
===============

----------------------------------------
--critical <string text>
----------------------------------------

  Optional parameters:
  ====================

  --buttons <int standardButtons>
  --defaultButton <int standardButton>

  Exit code: DialogCode

----------------------------------------
--information <string text>
----------------------------------------

  Optional parameters:
  ====================

  --buttons <int standardButtons>
  --defaultButton <int standardButton>

  Exit code: DialogCode

----------------------------------------
--question <string text>
----------------------------------------

  Optional parameters:
  ====================

  --buttons <int standardButtons>
  --defaultButton  <int standardButton>

  Exit code: DialogCode

----------------------------------------
--warning <string text>
----------------------------------------

  Optional parameters:
  ====================

  --buttons <int standardButtons>
  --defaultButton  <int standardButton>

  Exit code: DialogCode

----------------------------------------
--getText
----------------------------------------

  Optional parameters:
  ====================

  --echoMode <int echoMode>
  --label <string label>
  --text <string text>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: text entered by user

----------------------------------------
--getItem <string itemList>
----------------------------------------

  Optional parameters:
  ====================

  --editable <bool editable>
  --initial <int itemIndex>
  --label <string label>
  --radio
  --sep <string sep>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: item text selected by user

----------------------------------------
--getItems <string itemList>
----------------------------------------

  Optional parameters:
  ====================

  --check
  --initial <string itemIndexes>
  --label <string label>
  --sep <string sep>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: list of numbers of selected items (or activated checkBoxes), separated by <sep> (default=";")

----------------------------------------
--getInt
----------------------------------------

  Optional parameters:
  ====================

  --initial <int inital>
  --label <string label>
  --max <int max>
  --min <int min>
  --step <string sep>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: integer entered by user

----------------------------------------
--getDouble
----------------------------------------

  Optional parameters:
  ====================

  --decimals <int decimals>
  --initial <float initial>
  --label <string label>
  --max <float max>
  --min <float min>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: float entered by user

----------------------------------------
--getFont
----------------------------------------

  Optional parameters:
  ====================

  --initial <string fontDescription>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: font (as font description string) selected by user

----------------------------------------
--getOpenFileName
----------------------------------------

  Optional parameters:
  ====================

  --dir <string dir>
  --filter <string filter>
  --options <int options>
  --selectedFilter <string selectedFilter>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: file selected by user

----------------------------------------
--getOpenFileNames
----------------------------------------

  Optional parameters:
  ====================

  --dir <string dir>
  --filter <string filter>
  --options <int options>
  --selectedFilter <string selectedFilter>
  --sep <string sep>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: files selected by user, separated by <sep> (default=";")

----------------------------------------
--getExistingDirectory
----------------------------------------

  Optional parameters:
  ====================

  --dir <string dir>
  --options <int options>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: directory selected by user

----------------------------------------
--getSaveFileName
----------------------------------------

  Optional parameters:
  ====================

  --dir <string dir>
  --filter <string filter>
  --options <int options>
  --selectedFilter <string selectedFilter>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: file selected by user

----------------------------------------
--getColor
----------------------------------------

  Optional parameters:
  ====================

  --initial <string hexColorString>
  --options <int 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 <string dateFormat>
  --initial <string date>

  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 <string dateTimeFormat>
  --initial <string dateTime>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: dateTime (as string in specified format) selected by user

----------------------------------------
--getTime
----------------------------------------

  Optional parameters:
  ====================

  --format <string timeFormat>
  --initial <string time>

  Exit code: 0 if user pressed OK-button, otherwise 1
  StdOut: time (as string in specified format) selected by user

----------------------------------------
--ui <string uiFile>
----------------------------------------

  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 <string objectName>

  If specified, only values of widgets with an objectName <objectName> are
  returned.

  --regex <string objectRegExp>

  If specified, only values of widgets with an objectName matching regular
  expression <objectRegExp> are returned.

  --sep <string sep>

  Exit code: DialogCode
  StdOut: list of widget values, separated by <sep> (default=";")


Utility Commands
================

----------------------------------------
--toClipboard <string>
----------------------------------------

----------------------------------------
--fromClipboard
----------------------------------------

  StdOut: current clipboard text