kfontrequester.h
/*
Copyright (C) 2003 Nadeem Hasan <nhasan@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KFONTREQUESTER_H
#define KFONTREQUESTER_H
#include <qwidget.h>
#include <qfont.h>
#include <qstring.h>
#include <kdelibs_export.h>
class QLabel;
class QPushButton;
class KDEUI_EXPORT KFontRequester : public QWidget
{
Q_OBJECT
Q_PROPERTY( QString title READ title WRITE setTitle )
Q_PROPERTY( QString sampleText READ sampleText WRITE setSampleText )
Q_PROPERTY( QFont font READ font WRITE setFont )
public:
KFontRequester( QWidget *parent=0L, const char *name=0L,
bool onlyFixed=false );
QFont font() const { return m_selFont; }
bool isFixedOnly() const { return m_onlyFixed; }
QString sampleText() const { return m_sampleText; }
QString title() const { return m_title; }
QLabel *label() const { return m_sampleLabel; }
QPushButton *button() const { return m_button; }
virtual void setFont( const QFont &font, bool onlyFixed=false );
virtual void setSampleText( const QString &text );
virtual void setTitle( const QString & title );
signals:
void fontSelected( const QFont &font );
protected:
void displaySampleText();
void setToolTip();
protected slots:
virtual void buttonClicked();
protected:
bool m_onlyFixed;
QString m_sampleText, m_title;
QLabel *m_sampleLabel;
QPushButton *m_button;
QFont m_selFont;
private:
class KFontRequesterPrivate;
KFontRequesterPrivate *d;
};
#endif // KFONTREQUESTER_H
/* vim: et sw=2 ts=2
*/
KFontRequester
This class provides a widget with a lineedit and a button, which invokes a font dialog (KFontDialog)...
Definition: kfontrequester.h:44
KFontRequester::title
QString title() const
Definition: kfontrequester.h:83
KFontRequester::font
QFont font() const
Definition: kfontrequester.h:68
KFontRequester::isFixedOnly
bool isFixedOnly() const
Definition: kfontrequester.h:73
KFontRequester::button
QPushButton * button() const
Definition: kfontrequester.h:93
KFontRequester::sampleText
QString sampleText() const
Definition: kfontrequester.h:78
KFontRequester::label
QLabel * label() const
Definition: kfontrequester.h:88

KDE Home | KDE Accessibility Home | Description of Access Keys