Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

dcdillon/dqtx

Repository files navigation

dqtx build status

A library of Qt extensions I have found useful

Installation

Basic Install

For a basic install, run the following:

qmake PREFIX=/usr/local
make
make install

Debian Package

There is a helper script that will generate a debian package that can be used for installation. To generate debian packages for dqtx, run the following:

scripts/generate_deb [debian|vivid|trusty|precise]

This will create two .deb files in the deb.DIST directory. These can then be installed using dpkg.

Note: generate_deb uses debuild which is provided by the devscripts package.

Usage

dqtx is currently comprised of two libraries. libdqtx.so and libdqtxAppIndicator.so. Both are installed with pkg-config files so you can get the appropriate link commands by running pkg-config --libs dqtx or pkg-config --libs dqtxAppIndicator. To do this easily in a qmake .pro file, add the following:

CONFIG += link_pkgconfig
PKGCONFIG += dqtx
PKGCONFIG += dqtxAppIndicator

Widgets

QSparkLineWidget SparkLine

QSparkLineWidget is a widget that draws a spark line (small graph) of a time series. It is useful in QTableWidgets as an easy way of visualizing trends in data.

QSparkLineAndBarsWidget SparkLineAndBars

QSparkLineAndBarsWidget is a widget that displays a spark line on top and a bar chart on the bottom. It tracks two coincident time series. It makes the most sense when the line tracks a value over time and the bars track an event count of some sort over time (think price and volume for a stock).

QDensityWidget Density

QDensityWidget is a widget that displays a density plot for a data set. It is useful for easily visualizing a distribution.

Other Useful Classes

QTextIconFactory TextIcon

QTextIconFactory has static functions for creating QIcons from arbitrary text. It fits the text into the specified size and creates a QIcon.

QAppIndicator AppIndicator

QAppIndicator is a wrapper for libappindicator that allows you to easily (and using Qt paradigms) create AppIndicators for Unity.

QIconTheme

QIconTheme creates a temporary icon theme with the icons and names that you give it. These can then be accessed by classes that require icons from a theme (e.g. QAppIndicator).

Examples

cpumonitor

cpumonitor is a small demo application that uses QSparklineWidget and QSparkLineAndBarsWidget to display CPU load on a system. Each individual CPU is represented by a QSparkLineWidget. The composite of all CPUs is represented by QSparkLineAndBarsWidget where the line represents the current CPU utilization and the bars represent currently running processes.

ubuntu screenshot kubuntu screenshot

distribution

distribution is a small demo application that uses QDensityWidget and C++11 random number generators to display some density plots.

ubuntu screenshot kubuntu screenshot

appindicator

appindicator is a small demo application that uses QAppIndicator, QIconTheme, and QTextIconFactory to display and hide a Unity AppIndicator. The icon of the AppIndicator is generated by QTextIconFactory and is an ever increasing integer followed by the letter k. It also has a label that is the same number as is displayed in the icon (this will only be visible in Unity). The AppIndicator shows and hides itself every 5 seconds. It has a menu with one item, Quit, that you can use to exit the example.

ubuntu screenshot