Skip to main content

Posts

Showing posts from April, 2017

Calendar QControl

The Calendar QControl Code can be found here: Calendar QControl.zip The QControl Toolkit is required to use this and can be found here: The QControl Toolkit on LabVIEW Tools Network Overview Here is another QControl that I had programmed earlier as an XControl.  I decided I wanted to try reprogramming it as a QControl.  I call it the Calendar QControl. View of the Calendar Facade. The Calendar QControl is a cluster with multiple controls inside of it.  The Calendar Facade Control should be used on the Front Panel of the VI that uses this QControl.  The references of the elements of the cluster are handled by editing the Load Reference Method.  The Event Handler Method uses the references to control all of the behavior. When in use in the main application, the Calendar: Value Change Event (on all elements of the cluster) will fire whenever the date has changed.  See the Test Calendar.vi that is part of the class for an example. Front Panel of the Te

ColorSelector QControl

The  ColorSelector QControl code  can be found here: ColorSelector QControl.zip The  QControl Toolkit  is required to use this and can be found  here : The QControl Toolkit on LabVIEW Tools Network Overview This QControl allows the user to select a color either by using the Grey and Color Selectors or by setting the RGB Values.  It is a cluster of controls that can be used on any front panel VI user interface.  This QControl uses several controls bundled into a cluster.  The cluster is saved as a Strict Typed Def in the Facade Folder in the ColorSelector Qcontrol Class.  The main selectors work using mouse events and drawing the cross-hairs accordingly.   The code is completely open for viewing. A Tester VI is also included to show an example of how to implement the ColorSelector QControl.  As you can see from the picture of the Tester and the list from the Class itself, I have included a handful of other useful methods for converting color scales, findin

AnimationRing QControl

The AnimationRing QControl code can be found here: AnimationRing QControl.zip The QControl Toolkit is required to use this and can be found  here : The QControl Toolkit on LabVIEW Tools Network The AnimationRing QControl is based on a picture ring control.  The elements in the picture ring represent frames of the animation.  The frame rate is settable via property node.  The animation only occurs when the ring is visible.  Setting the ring control to not visible effectively pauses the animation. This is a screenshot of the example VI showing one of the ring controls. Here is another one given with the QControl. And this is "The One Ring" control.  (I animated this to spin around.) Any ring control can be swapped out and used. Here is a snippet of the example VI given in the zip file.

What is a QControl?

A QControl is an object-oriented alternative to using an XControl.  It allows a developer to create useful, highly customized User Interface (UI) components in LabVIEW of which the behavior is extensible and reusable. It is: A LabVIEW Object-Oriented Class with a Control Reference as part of its Private Data where all manipulation of the Control should be done through Properties and Methods of its Class A class that can be reused to recreate the UI Logic wherever required Could have an asynchronously called Event Hander that handles UI Logic Part of the QControl Class Hierarchy which mimics the VI Server Class Hierarchy Tradeoffs of a QControl vs an XControl There are tradeoffs to using a QControl versus using a regular XControl. A QControl has the same benefits of an XControl by: Encapsulating UI Logic Code Maintaining the same functionality when used in multiple instances Allowing for complicated UI code to be abstracted from other developers Allowing for