KLATEXFORMULA
Home
About
Downloads
Screen Shots
Wiki (Manuals)
News

Devel Manual:KLFTools Library

From KLFWiki

Jump to: navigation, search

The KLFTools Library is a collection of tools that were written in order to be used in KLatexFormula. However they do not assume a klatexformula context, and could be used in any Qt4 application. This is the reason they were collected in a separate library, libklftools. An effort to document the classes (with doxygen) has also been made.

Summary

List of the main features of the libklftools library:

  • A full-featured color selection widget, respectively color selection dialog
  • A "please wait" popup widget, more splash-screen oriented than progress-dialog oriented, inviting the user to be patient (KLFPleaseWaitPopup)
  • A grid flow layout (KLFGridFlowLayout): a widget layout that displays widgets in a grid; unlike QGridLayout (where you have to specify explicit coordinates) widgets are just inserted left to right, breaking into new lines after a certain number of columns
  • A path chooser widget (KLFPathChooser): lets the user input a location with a line edit and a "browse" button
  • A pixmap button (KLFPixmapButton): displays a pixmap instead of a label on a QPushButton without having to hack with setIcon() and setIconSize()...
  • KLFProgressReporter and KLFProgressDialog: allows to send progress information for whoever is interested, and display that progress information in a QProgressDialog-subclass
  • KLFPropertizedObject: implements a properties engine for common objects. This works like QObject properties, but with some fundamental differences, see the documentation for this class in the APIs
  • KLFFactory{Base|Manager}: common functions for class instance factories
  • klfMatch(), klfDataToEscaped(), klfVariantToText(), klf{Load|Save}Variant{Map|List}ToXML(), klfUrlCompare(), klfVariantListToList(), ...: all functions that you would wish to feature in Qt itself but which you have not found in Qt ;)
    • klfMatch(): perform general string or value matching, supporting exact match, contains, regexp, wildcard, etc. in the same idea as QAbstractItemModel::match()
    • klfDataToEscaped(): just \-escapes binary data into ascii-compatible data
    • klfVariantToText()/klfVariantFromText(): saves/loads QVariant's as (human-read/writable) text (but does not save type information, which is assumed to be known when reading back the variant)
    • klfSaveVariantMapToXML(), klfSaveVariantListToXML(), read/write XML with QVariantMap's and QVariantList's in XML, each variant item is written with klfVariantToText()
    • klfUrlCompare(): compares URLs (especially query items)
    • klfVariantListToList<Type>() converts a QVariantList into a QList<Type>.

API Docs are available at Devel Manual:APIs.