These are the productivity tools that Qt forgot. KD Tools aims to ease the daily work of Qt programmers by providing a number of well-designed, easy-to-use widgets and non-gui classes.
KD Tools are lifted directly from experience gathered in our daily work as consultants and from working on our own products. Components range from small convenience classes that are designed to make recurring tasks easier and/or safer to sophisticated view systems, such as KDPropertyView and KDTimeLineWidget, that can save you man weeks of development.
Most components included were not specifically developed for KD Tools but have repeatedly shown up in our own projects, proving their usefulness and undergoing several iterations before being included in a release. KD Tools gives you access to the toolbox the Qt professionals at KDAB use every day.
KDTools contains a set of minimalist classes that act as exception-safe and convenient wrappers around pairs of functions for blocking signals, saving and restoring painter states, or override cursors.
KDSignalSpy is clearly inspired by QSignalSpy but can monitor multiple signals on multiple QObjects using a single KDSignalSpy instance. It, therefore, records the relative order of signal emissions and can answer questions like “Is signal A always emitted before signal B?”
This class lets you send logging output from your application to a number of so-called logging devices. Currently supported is logging at four different levels (information, debugging, warning, error) to standard error files, Qt signals, the system log, and any combination of these. You can add your own logging device as well. It is also possible to register a KDLogger object as the message handler for qDebug(), qWarning(), and qFatal() output.
KDRect is a class that you can use instead of QRect in most situations. It’s designed around the idea that you can’t have enough convenience methods on such a class and that all of the member functions are const. It also features useful ways to construct rectangles that go beyond the simple two-point and point-and-size forms offered by QRect.
KDColorButton is a simple widget that allows the user to choose a color and, optionally, an alpha (transparency) value. The widget supports drag and drop of color values, as well as copy and paste to the system clipboard. It also has pick-color-from-screen functionality.
KDLogTextWidget provides very fast display of large amounts of line-oriented text, as commonly found in application log viewers. The feature set and implementation are optimized for frequent appends. This
widget can maintain a limited history size. Text formatting is currently limited to per-line text color, but is expected to be enhanced on client request in upcoming versions.
KDPropertyView is an model/view based viewer/ editor for key/value properties. The basic type of a property is QVariant. Additional display/edit information like minimum- and maximum-values, lists of options, and input masks can be communicated to the view via the model. Composite properties are supported (for example a ”Size” property might be composed of a height and width). A number of editors are included in KDTools, but the system can easily be extended via delegates and custom editors that plug into KDPropertyView.
This widget provides a vertical list of buttons, one for each shortcut, and an area that displays a widget for each shortcut. A splitter separates the list of buttons and the widget. The list of buttons can be contracted and expanded by the user to display more or fewer buttons. Functionally, it is similar to QToolBox but more advanced in several ways. This type of widget was popularized by Microsoft Outlook, which is also responsible for the name “ShortcutBar.”
KDTimeLineWidget is a widget that shows a timeline. The unit of time is auto scaled to the zoom level and major and minor tick marks are displayed. KDTimeLineWidget supports user placeable and movable time markers on the timeline and scrolling/ zooming is done with the specialized zoom-/scroll-bar, KDTimeScrollBar.
Additions in KD Tools 2.1
- KDUpdater: Application upgrader
- KDUnitTest: Unit testing and invariance checking framework
- pimpl_ptr (Core): Pointer-to-implementation smart pointer
- KDAutoPointer (Core): Owning version of QPointer
- KDSharedMemoryLocker (Core): Exception-safe and convenient wrapper around QSharedMemory::lock()
- KDLockedSharedMemoryPointer (Core): Locking pointer for Qt shared memory segments
- KDHorizontalLine (Gui): QFrame::HLine with a title
Changes to Existing Classes
- KDRect (Core): KDRect-QLine intersection
- KDTimeLineWidget (Gui): Enhanced look & feel of KDTimeScrollBar
Click here to view the KD Tools Reference Documentation.
KD Tools licenses include:
- The full source code.
- A Reference Manual.
- Tutorial programs illustrating the techniques explained in the Reference Manual.
- A 12-month support subscription which contains:
- Access to our email-based support (run by the KD Tools developers)
- All new releases of the product, including minor releases and all new major releases.
- Evaluation versions of KD Tools and KDAB’s other software products can be downloaded from https://customers.kdab.com.