• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames

KGameLCD Class Reference

#include <kgamelcd.h>

Inheritance diagram for KGameLCD:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class is a visually enhanced QLCDNumber :.

  • It can show an additional string before the integer being displayed.
  • Its foreground and background colors can easily be modified.
  • It can be highlighted for a short time.

Definition at line 40 of file kgamelcd.h.


Public Slots

void highlight ()
void displayInt (int value)

Public Member Functions

 KGameLCD (uint nbDigits, QWidget *parent=0)
 ~KGameLCD ()
void setDefaultBackgroundColor (const QColor &color)
void setDefaultColor (const QColor &color)
void setHighlightColor (const QColor &color)
void setLeadingString (const QString &s)
void setHighlightTime (uint time)
void resetColor ()
void setColor (const QColor &color)

Constructor & Destructor Documentation

KGameLCD::KGameLCD ( uint  nbDigits,
QWidget *  parent = 0 
) [explicit]

Definition at line 31 of file kgamelcd.cpp.

KGameLCD::~KGameLCD (  ) 

Definition at line 47 of file kgamelcd.cpp.


Member Function Documentation

void KGameLCD::setDefaultBackgroundColor ( const QColor &  color  ) 

Set the default background color.

Definition at line 50 of file kgamelcd.cpp.

void KGameLCD::setDefaultColor ( const QColor &  color  ) 

Set the default foreground color.

Definition at line 57 of file kgamelcd.cpp.

void KGameLCD::setHighlightColor ( const QColor &  color  ) 

Set highlight color.

Definition at line 65 of file kgamelcd.cpp.

void KGameLCD::setLeadingString ( const QString &  s  ) 

Set the string that will be displayed before the integer number to be displayed.

By default this string is null.

Definition at line 70 of file kgamelcd.cpp.

void KGameLCD::setHighlightTime ( uint  time  ) 

Set the highlight duration in milliseconds.

The default value is 800 milliseconds.

Definition at line 76 of file kgamelcd.cpp.

void KGameLCD::resetColor (  ) 

Reset the foreground color to the default one.

Definition at line 81 of file kgamelcd.cpp.

void KGameLCD::setColor ( const QColor &  color  ) 

Set the foreground color.

Definition at line 86 of file kgamelcd.cpp.

void KGameLCD::highlight (  )  [slot]

Highlight the LCD with the QColorGourp::HighlightedText color for a small time (setHighlightTime).

Definition at line 100 of file kgamelcd.cpp.

void KGameLCD::displayInt ( int  value  )  [slot]

Display the given integer with the (optional) leading string.

Note: we cannot use display(int) since QLCDNumber::display is not virtual... And you cannot use QLCDNumber::intValue() to retrieve the given value.

Definition at line 94 of file kgamelcd.cpp.


The documentation for this class was generated from the following files:
  • kgamelcd.h
  • kgamelcd.cpp

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal