#include <kfontcombo.h>

Public Member Functions | |
KFontCombo (TQWidget *parent, const char *name=0) | |
KFontCombo (const TQStringList &fonts, TQWidget *parent, const char *name=0) | |
virtual | ~KFontCombo () |
void | setFonts (const TQStringList &fonts) |
void | setCurrentFont (const TQString &family) |
TQString | currentFont () const |
void | setBold (bool bold) |
bool | bold () const |
void | setItalic (bool italic) |
bool | italic () const |
void | setUnderline (bool underline) |
bool | underline () const |
void | setStrikeOut (bool strikeOut) |
bool | strikeOut () const |
void | setSize (int size) |
int | size () const |
virtual void | setCurrentItem (int i) |
![]() | |
KComboBox (TQWidget *parent=0, const char *name=0) | |
KComboBox (bool rw, TQWidget *parent=0, const char *name=0) | |
virtual | ~KComboBox () |
void | setEditURL (const KURL &url) |
void | insertURL (const KURL &url, int index=-1) |
void | insertURL (const TQPixmap &pixmap, const KURL &url, int index=-1) |
void | changeURL (const KURL &url, int index) |
void | changeURL (const TQPixmap &pixmap, const KURL &url, int index) |
int | cursorPosition () const |
virtual void | setAutoCompletion (bool autocomplete) |
bool | autoCompletion () const |
virtual void | setContextMenuEnabled (bool showMenu) |
bool | isContextMenuEnabled () const |
void | setURLDropsEnabled (bool enable) |
bool | isURLDropsEnabled () const |
bool | contains (const TQString &text) const |
void | setTrapReturnKey (bool trap) |
bool | trapReturnKey () const |
virtual bool | eventFilter (TQObject *, TQEvent *) |
KCompletionBox * | completionBox (bool create=true) |
virtual void | setLineEdit (TQLineEdit *) |
![]() | |
KCompletion * | completionObject (bool hsig=true) |
virtual void | setCompletionObject (KCompletion *compObj, bool hsig=true) |
virtual void | setHandleSignals (bool handle) |
bool | isCompletionObjectAutoDeleted () const |
void | setAutoDeleteCompletionObject (bool autoDelete) |
void | setEnableSignals (bool enable) |
bool | handleSignals () const |
bool | emitSignals () const |
virtual void | setCompletionMode (KGlobalSettings::Completion mode) |
KGlobalSettings::Completion | completionMode () const |
bool | setKeyBinding (KeyBindingType item, const KShortcut &key) |
const KShortcut & | getKeyBinding (KeyBindingType item) const |
void | useGlobalKeyBindings () |
virtual void | setCompletedText (const TQString &text)=0 |
virtual void | setCompletedItems (const TQStringList &items)=0 |
KCompletion * | compObj () const |
Static Public Member Functions | |
static bool | displayFonts () |
Protected Slots | |
void | slotModified (int i) |
![]() | |
virtual void | itemSelected (TQListBoxItem *) |
virtual void | makeCompletion (const TQString &) |
Protected Member Functions | |
void | updateFonts () |
virtual void | virtual_hook (int id, void *data) |
![]() | |
virtual void | setCompletedText (const TQString &, bool) |
virtual void | create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true) |
virtual void | wheelEvent (TQWheelEvent *ev) |
![]() | |
KeyBindingMap | getKeyBindings () const |
void | setDelegate (KCompletionBase *delegate) |
KCompletionBase * | delegate () const |
Properties | |
TQString | family |
bool | bold |
bool | italic |
bool | underline |
bool | strikeOut |
int | fontSize |
![]() | |
bool | autoCompletion |
bool | contextMenuEnabled |
bool | urlDropsEnabled |
bool | trapReturnKey |
Friends | |
class | KFontListItem |
Additional Inherited Members | |
![]() | |
enum | KeyBindingType |
typedef TQMap< KeyBindingType, KShortcut > | KeyBindingMap |
![]() | |
void | rotateText (KCompletionBase::KeyBindingType type) |
virtual void | setCompletedText (const TQString &) |
void | setCompletedItems (const TQStringList &items) |
void | setCurrentItem (const TQString &item, bool insert=false, int index=-1) |
![]() | |
void | returnPressed () |
void | returnPressed (const TQString &) |
void | completion (const TQString &) |
void | substringCompletion (const TQString &) |
void | textRotation (KCompletionBase::KeyBindingType) |
void | completionModeChanged (KGlobalSettings::Completion) |
void | aboutToShowContextMenu (TQPopupMenu *p) |
![]() | |
TextCompletion | |
PrevCompletionMatch | |
NextCompletionMatch | |
SubstringCompletion |
Detailed Description
A combobox that lists the available fonts.
The items are painted using the respective font itself, so the user can easily choose a font based on its look. This can be turned off globally if the user wishes so.
Definition at line 35 of file kfontcombo.h.
Constructor & Destructor Documentation
KFontCombo::KFontCombo | ( | TQWidget * | parent, |
const char * | name = 0 |
||
) |
Constructor.
- Parameters
-
parent The parent widget name The object name for the widget
Definition at line 175 of file kfontcombo.cpp.
KFontCombo::KFontCombo | ( | const TQStringList & | fonts, |
TQWidget * | parent, | ||
const char * | name = 0 |
||
) |
Constructor that takes an already initialzed font list.
- Parameters
-
fonts A list of fonts to show parent The parent widget name The object name for the widget
Definition at line 184 of file kfontcombo.cpp.
|
virtual |
Destructor.
Definition at line 289 of file kfontcombo.cpp.
Member Function Documentation
bool KFontCombo::bold | ( | ) | const |
Returns the current bold status.
- Returns
- true if fonts are bold
TQString KFontCombo::currentFont | ( | ) | const |
- Returns
- the currently selected font.
Definition at line 266 of file kfontcombo.cpp.
|
static |
Returns the user's setting of whether the items should be painted in the respective fonts or not.
- Returns
- True if the respective fonts are used for painting
Definition at line 375 of file kfontcombo.cpp.
bool KFontCombo::italic | ( | ) | const |
Returns the current italic status.
- Returns
- True if fonts are italic
void KFontCombo::setBold | ( | bool | bold | ) |
Sets the listed fonts to bold or normal.
- Parameters
-
bold Set to true to display fonts in bold
Definition at line 294 of file kfontcombo.cpp.
void KFontCombo::setCurrentFont | ( | const TQString & | family | ) |
Sets the currently selected font.
- Parameters
-
family Font to select.
Definition at line 201 of file kfontcombo.cpp.
|
virtual |
Simply calls QComboBox' implementation.
Only here to not become shadowed.
Reimplemented from KComboBox.
Definition at line 273 of file kfontcombo.cpp.
void KFontCombo::setFonts | ( | const TQStringList & | fonts | ) |
Sets the font list.
- Parameters
-
fonts Font list to show
Definition at line 191 of file kfontcombo.cpp.
void KFontCombo::setItalic | ( | bool | italic | ) |
Sets the listed fonts to italic or regular.
- Parameters
-
italic Set to true to display fonts italic
Definition at line 307 of file kfontcombo.cpp.
void KFontCombo::setSize | ( | int | size | ) |
Sets the listed fonts' size.
- Parameters
-
size Set to the point size to display the fonts in
Definition at line 346 of file kfontcombo.cpp.
void KFontCombo::setStrikeOut | ( | bool | strikeOut | ) |
Sets the listed fonts to striked out or not.
- Parameters
-
strikeOut Set to true to display fonts striked out
Definition at line 333 of file kfontcombo.cpp.
void KFontCombo::setUnderline | ( | bool | underline | ) |
Sets the listed fonts to underlined or not underlined.
- Parameters
-
underline Set to true to display fonts underlined
Definition at line 320 of file kfontcombo.cpp.
int KFontCombo::size | ( | ) | const |
Returns the current font size.
- Returns
- The point size of the fonts
Definition at line 358 of file kfontcombo.cpp.
|
protectedslot |
Listens to highlighted(int)
Definition at line 261 of file kfontcombo.cpp.
bool KFontCombo::strikeOut | ( | ) | const |
Returns the current strike out status.
- Returns
- True if fonts are striked out
bool KFontCombo::underline | ( | ) | const |
Returns the current underline status.
- Returns
- True if fonts are underlined
|
protected |
Updated the combo's listBox() to reflect changes made to the fonts' attributed.
Definition at line 363 of file kfontcombo.cpp.
The documentation for this class was generated from the following files: