kbLogger 2.0.b1
The automotive ready test and logging program.
UserInterface Class Reference

This class defines the API of the UserInterfaceObject (ui).

#include <classuserinterface.h>

Public Member Functions

void activateWindow ()
 Activates the UserInterface.
 
QObject findChild (QString name)
 Returns the Element with name "name".
 
void hide ()
 Hides the widget.
 
bool isEnabled ()
 Returns true if this widget would become enabled if ancestor is enabled; otherwise returns false.
 
bool isHidden ()
 Returns true if the widget is hidden, otherwise returns false.
 
bool isVisible ()
 Returns true if this widget would become visible if ancestor is shown; otherwise returns false.
 
void setDisabled (bool disable)
 Disables widget input events if disable is true; otherwise enables input events.
 
void setEnabled (bool enable)
 Enables widget input events if enable is true; otherwise disables input events.
 
void setHidden (bool hidden)
 Hides the widget if hidden is true; otherwise it is shown.
 
void setVisible (bool visible)
 Set the widget visible if visible is true; otherwise it is set invisible.
 
void show ()
 Shows the widget.
 

Member Function Documentation

◆ activateWindow()

void activateWindow ( )

Sets the top-level widget containing this widget to be the active window.
An active window is a visible top-level window that has the keyboard input focus.
This function performs the same operation as clicking the mouse on the title bar of a top-level window.

On X11, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call raise(). Note that the window must be visible, otherwise activateWindow() has no effect.

On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft does not allow an application to interrupt what the user is currently doing in another application.

◆ findChild()

QObject findChild ( QString name)

Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object.
Omitting the name argument causes all object names to be matched. The search is performed recursively.
If there is more than one child matching the search, the most direct ancestor is returned.
If there are several direct ancestors, it is undefined which one will be returned.

Parameters
nameThe name of the child to search for.
Returns
The child object

◆ hide()

void hide ( )

This function is equivalent to setVisible(false).

◆ isEnabled()

bool isEnabled ( )

Returns true if this widget would become enabled if ancestor is enabled; otherwise returns false.
This is the case if neither the widget itself nor every parent up to but excluding ancestor has been explicitly disabled.

Returns
The enabled state.

◆ isHidden()

bool isHidden ( )

Returns true if the widget is hidden, otherwise returns false.
A hidden widget will only become visible when show() is called on it. It will not be automatically shown when the parent is shown.
To check visibility, use !isVisible() instead (notice the exclamation mark).
isHidden() implies !isVisible(), but a widget can be not visible and not hidden at the same time. This is the case for widgets that are children of widgets that are not visible.

Returns
The hidden state.

◆ isVisible()

bool isVisible ( )

Returns true if this widget would become visible if ancestor is shown; otherwise returns false.
The true case occurs if neither the widget itself nor any parent up to but excluding ancestor has been explicitly hidden.
This function will still return true if the widget is obscured by other windows on the screen, but could be physically visible if it or they were to be moved.

Returns
The visible state.

◆ setDisabled()

void setDisabled ( bool disable)

Disables widget input events if disable is true; otherwise enables input events.

Parameters
disable

◆ setEnabled()

void setEnabled ( bool enable)

Enables widget input events if enable is true; otherwise disables input events.

Parameters
enable

◆ setHidden()

void setHidden ( bool hidden)

Hides the widget if hidden is true; otherwise it is shown.

Parameters
hidden

◆ setVisible()

void setVisible ( bool visible)

Set the widget visible if visible is true; otherwise it is set invisible.

Parameters
visible

◆ show()

void show ( )

Shows the widget and its child widgets. This function is equivalent to setVisible(true).