• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Signals | Public Member Functions | Properties | List of all members
KFontRequester Class Reference

#include <kfontrequester.h>

Inheritance diagram for KFontRequester:
Inheritance graph
[legend]

Signals

void fontSelected (const QFont &font)
 

Public Member Functions

 KFontRequester (QWidget *parent=0L, bool onlyFixed=false)
 
 ~KFontRequester ()
 
QPushButton * button () const
 
QFont font () const
 
bool isFixedOnly () const
 
QLabel * label () const
 
QString sampleText () const
 
virtual void setFont (const QFont &font, bool onlyFixed=false)
 
virtual void setSampleText (const QString &text)
 
virtual void setTitle (const QString &title)
 
QString title () const
 

Properties

QFont font
 
QString sampleText
 
QString title
 

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 nhasa.nosp@m.n@kd.nosp@m.e.org

Definition at line 44 of file kfontrequester.h.

Constructor & Destructor Documentation

KFontRequester::KFontRequester ( QWidget *  parent = 0L,
bool  onlyFixed = false 
)
explicit

Constructs a font requester widget.

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

Definition at line 101 of file kfontrequester.cpp.

KFontRequester::~KFontRequester ( )

Definition at line 124 of file kfontrequester.cpp.

Member Function Documentation

QPushButton * KFontRequester::button ( ) const
Returns
Pointer to the pushbutton in the widget.

Definition at line 154 of file kfontrequester.cpp.

QFont KFontRequester::font ( ) const
Returns
The currently selected font in the requester.
void KFontRequester::fontSelected ( const QFont &  font)
signal

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

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

Definition at line 134 of file kfontrequester.cpp.

QLabel * KFontRequester::label ( ) const
Returns
Pointer to the label used for preview.

Definition at line 149 of file kfontrequester.cpp.

QString KFontRequester::sampleText ( ) const
Returns
The current text in the sample text input area.
void KFontRequester::setFont ( const QFont &  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 159 of file kfontrequester.cpp.

void KFontRequester::setSampleText ( const QString &  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 QString() will restore the default.

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

Definition at line 168 of file kfontrequester.cpp.

void KFontRequester::setTitle ( const QString &  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 174 of file kfontrequester.cpp.

QString KFontRequester::title ( ) const
Returns
The current title of the widget.

Property Documentation

QFont KFontRequester::font
readwrite

Definition at line 50 of file kfontrequester.h.

QString KFontRequester::sampleText
readwrite

Definition at line 49 of file kfontrequester.h.

QString KFontRequester::title
readwrite

Definition at line 48 of file kfontrequester.h.


The documentation for this class was generated from the following files:
  • kfontrequester.h
  • kfontrequester.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal