arb's qt utilities

My contributions to the Qt world.


XCDR

screenshot Possibly the most basic (and thus easiest to use) utility for burning CDs ever written! Read the XCDR manual. If you want the source code then let me know.



"satqt" library - collection of useful classes

A collection of classes I have created and think will be useful to others:

commanddialog
Run a system command and display the output (stdout, stderr) in a window. Has a cancel and OK button; OK is only enabled when the command has terminated.
fileeditdialog
Display a simple window for editing plain text files or shell script files. Use with the shellsyntax class to highlight (actually to dim) comments.
floatspinbox
A QSpinBox replacement for editing floating point numbers.
headerwhatsthis
A QWhatsThis class for QListView column headers. This is very useful as Tool Tips are essential but are missing from QListView columns by default. The Qt example on the Trolltech website does not work; this one does!
helpdialog
A simple HTML viewer for displaying context-sensitive manuals and help documents stored as separate files in $HHELPDIR.
listviewitem
A QListViewItem which allows numerical sorting (the default sorts by string compare which puts numbers in the wrong order).
logdialog
A simple window for displaying "log" output; useful because it keeps to a maximum size.
processdialog
A simple window for running processes.
shellsyntax
Use with the fileeditdialog class to highlight (actually dim) comments in a text editor. A simple example of a syntax highlighter.

Download

Please send me any comments.


CommandDialog

Opens up a window showing the stdout and stderr of the given command which is run in the background. Either create a new dialogue and use exec() to run then result() to get the exit code, or use the simpler run() method which does that for you. The cancel button will stop the task (unless it is sleeping using sleep()) and the OK button is disabled until the task completes at which point it is enabled. cmd is executed by the popen, ie. the bourne shell, so any suitable command line may be given.

As popen(3S) is available on Windows the code should be portable. However I have not tested it; there may be other things like fcntl and WIFEXITED which are not available on Windows.

Please send me any comments.


onlyInstance

This code does two things:

  1. Ensure only one instance of a program is running on the same computer and display (although you can have other instances on the same display but a different computer or vice-versa)
  2. De-iconify (un-minimize) the main window when a signal USR1 is received

They can be combined so that if a program detects another instance is already running it can de-iconify the other instance.

Please send me any comments. I am working on a different mechanism, contact me for details.


Other Qt Widgets and links

Qt Development

Other C++ class libraries

Other libraries


Back to arb's home page