summaryrefslogtreecommitdiff
path: root/libopie/ofontselector.cpp
authorsandman <sandman>2002-09-27 00:54:58 (UTC)
committer sandman <sandman>2002-09-27 00:54:58 (UTC)
commitdcd5eb6949787321c278b10772bd75a27ec6d508 (patch) (side-by-side diff)
tree12525523ac676e6b43419f742afb6b1d007d61da /libopie/ofontselector.cpp
parentaec4806d28c0422e9d0572e9601d6dc41a9cdd61 (diff)
downloadopie-dcd5eb6949787321c278b10772bd75a27ec6d508.zip
opie-dcd5eb6949787321c278b10772bd75a27ec6d508.tar.gz
opie-dcd5eb6949787321c278b10772bd75a27ec6d508.tar.bz2
- size tweak for OColorButton
- new convenience methods in OFontSelector
Diffstat (limited to 'libopie/ofontselector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofontselector.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp
index d32aeb4..39440af 100644
--- a/libopie/ofontselector.cpp
+++ b/libopie/ofontselector.cpp
@@ -109,12 +109,17 @@ OFontSelector::OFontSelector ( QWidget *parent, const char *name, WFlags fl ) :
}
OFontSelector::~OFontSelector ( )
{
}
+bool OFontSelector::setSelectedFont ( const QFont &f )
+{
+ return setSelectedFont ( f. family ( ), m_fdb. styleString ( f ), f. pointSize ( ), QFont::encodingName ( f. charSet ( )));
+}
+
bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ )
{
QString sizeStr = QString::number ( sizeVal );
QListBoxItem *family = m_font_family_list-> findItem ( familyStr );
if ( !family )