| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kfontcombo.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (c) 2001 Malte Starostik <malte@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    00017 */
    00018
    00019 // $Id: kfontcombo.h,v 1.8.4.1 2003/07/14 02:48:17 bmeyer Exp $
    00020
    00021 #ifndef _KFONTCOMBO_H_
    00022 #define _KFONTCOMBO_H_
    00023
    00024 #include <kcombobox.h>
    00025
    00037 class KFontCombo : public KComboBox
    00038 {
    00039     Q_OBJECT
    00040     Q_PROPERTY(QString family READ currentFont WRITE setCurrentFont)
    00041     Q_PROPERTY(bool bold READ bold WRITE setBold DESIGNABLE true)
    00042     Q_PROPERTY(bool italic READ italic WRITE setItalic DESIGNABLE true)
    00043     Q_PROPERTY(bool underline READ underline WRITE setUnderline DESIGNABLE true)
    00044     Q_PROPERTY(bool strikeOut READ strikeOut WRITE setStrikeOut DESIGNABLE true)
    00045     Q_PROPERTY(int fontSize READ size WRITE setSize DESIGNABLE true)
    00046 public:
    00053     KFontCombo(QWidget *parent, const char *name = 0);
    00061     KFontCombo(const QStringList &fonts, QWidget *parent, const char *name = 0);
    00065     virtual ~KFontCombo();
    00066
    00072     void setFonts(const QStringList &fonts);
    00078     void setCurrentFont(const QString &family);
    00082     QString currentFont() const;
    00083
    00089     void setBold(bool bold);
    00095     bool bold() const;
    00101     void setItalic(bool bold);
    00107     bool italic() const;
    00113     void setUnderline(bool bold);
    00119     bool underline() const;
    00125     void setStrikeOut(bool bold);
    00131     bool strikeOut() const;
    00137     void setSize(int size);
    00143     int size() const;
    00144
    00151     static bool displayFonts();
    00152
    00153     virtual void setCurrentItem(int i);
    00154
    00155 protected:
    00160     void updateFonts();
    00161
    00162 private:
    00163     void init();
    00164
    00165 private:
    00166     friend class KFontListItem;
    00167 protected:
    00168     virtual void virtual_hook( int id, void* data );
    00169 private:
    00170     struct KFontComboPrivate *d;
    00171 };
    00172
    00173 #endif
    00174

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:56:48 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001