• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeui
 

kdeui

Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties
KFontRequester Class Reference

#include <kfontrequester.h>

Inherits TQWidget.

List of all members.

Signals

void fontSelected (const TQFont &font)

Public Member Functions

 KFontRequester (TQWidget *parent=0L, const char *name=0L, bool onlyFixed=false)
TQFont font () const
bool isFixedOnly () const
TQString sampleText () const
TQString title () const
TQLabel * label () const
TQPushButton * button () const
virtual void setFont (const TQFont &font, bool onlyFixed=false)
virtual void setSampleText (const TQString &text)
virtual void setTitle (const TQString &title)

Protected Slots

virtual void buttonClicked ()

Protected Member Functions

void displaySampleText ()
void setToolTip ()

Protected Attributes

bool m_onlyFixed
TQString m_sampleText
TQString m_title
TQLabel * m_sampleLabel
TQPushButton * m_button
TQFont m_selFont

Properties

TQString title
TQString sampleText
TQFont font

Detailed Description

This class provides a widget with a lineedit and a button, which invokes a font dialog (KFontDialog).

The lineedit provides a preview of the selected font. The preview text can be customized. You can also have the font dialog show only the fixed fonts.

kfontrequester.png
KDE Font Requester
Author:
Nadeem Hasan <nhasan@kde.org>

Definition at line 44 of file kfontrequester.h.


Constructor & Destructor Documentation

KFontRequester::KFontRequester ( TQWidget *  parent = 0L,
const char *  name = 0L,
bool  onlyFixed = false 
)

Constructs a font requester widget.

Parameters:
parentThe parent widget.
nameThe widget name.
onlyFixedOnly display fonts which have fixed-width character sizes.

Definition at line 31 of file kfontrequester.cpp.


Member Function Documentation

TQPushButton* KFontRequester::button ( ) const [inline]
Returns:
Pointer to the pushbutton in the widget.

Definition at line 93 of file kfontrequester.h.

TQFont KFontRequester::font ( ) const [inline]
Returns:
The currently selected font in the requester.

Definition at line 68 of file kfontrequester.h.

void KFontRequester::fontSelected ( const TQFont &  font) [signal]

Emitted when a new font has been selected in the underlying dialog.

bool KFontRequester::isFixedOnly ( ) const [inline]
Returns:
Returns true if only fixed fonts are displayed.

Definition at line 73 of file kfontrequester.h.

TQLabel* KFontRequester::label ( ) const [inline]
Returns:
Pointer to the label used for preview.

Definition at line 88 of file kfontrequester.h.

TQString KFontRequester::sampleText ( ) const [inline]
Returns:
The current text in the sample text input area.

Definition at line 78 of file kfontrequester.h.

void KFontRequester::setFont ( const TQFont &  font,
bool  onlyFixed = false 
) [virtual]

Sets the currently selected font in the requester.

Parameters:
fontThe font to select.
onlyFixedDisplay only fixed-width fonts in the font dialog if true, or vice-versa.

Definition at line 52 of file kfontrequester.cpp.

void KFontRequester::setSampleText ( const TQString &  text) [virtual]

Sets the sample text.

Normally you should not change this text, but it can be better to do this if the default text is too large for the edit area when using the default font of your application. Default text is current font name and size. Setting the text to TQString::null will restore the default.

Parameters:
textThe new sample text. The current will be removed.

Definition at line 61 of file kfontrequester.cpp.

void KFontRequester::setTitle ( const TQString &  title) [virtual]

Set the title for the widget that will be used in the tooltip and what's this text.

Parameters:
titleThe title to be set.

Definition at line 67 of file kfontrequester.cpp.

TQString KFontRequester::title ( ) const [inline]
Returns:
The current title of the widget.

Definition at line 83 of file kfontrequester.h.


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

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |