没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > qrangewidget |
qrangewidget
|
0 | 0 | 7 |
贡献者 | 讨论 | 代码提交 |
My name is Yashwant and I have developed couple of useful classes for displaying range of various physical quantities such as WiFi strength, GSM strength, Bluetooth strength, Battery levels etc. The need of such classes came up while I was developing one application which needed to display range of Bluetooth in one handheld User Interface screen.
Normally, any such ranges are displayed using towers. I have used same concept. Each tower is assigned a level. Six differnt levels are defined starting from No range to Outstanding range. The range widget can have four orientations. Left to Right, Right to Left, Top to Bottom and Bottom to Top. In addition, user can specify back color, fore color and width of pen, a QPen object, used for drawing towers.
The main class in this design is class ORangeWidget, which is a pure virtual class. The classes deriving from this class need to provide implementation of drawTowers method. I have provided two derived classes. In one the ranges are displayed in the form of bars, the name of class is QRangeWidget_Bar. In another class, the ranges are drawn in arcs, the name of class is QRangeWidget_Arc.
The source code is accompained with documentation of QRangeWidget familiy of classes.
Along with this, source code of sample application is provided. Mainly in testwidget header and source file.
The source code can be freely used under GPLV3