summaryrefslogtreecommitdiff
path: root/libopie/ofontselector.cpp
Side-by-side diff
Diffstat (limited to 'libopie/ofontselector.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofontselector.cpp60
1 files changed, 55 insertions, 5 deletions
diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp
index b905474..c8471cc 100644
--- a/libopie/ofontselector.cpp
+++ b/libopie/ofontselector.cpp
@@ -46,3 +46,3 @@ public:
- bool m_pointbug;
+ bool m_pointbug : 1;
@@ -51,2 +51,3 @@ public:
+namespace {
@@ -96,3 +97,4 @@ static int findItemCB ( QComboBox *box, const QString &str )
-
+}
+/* static same as anon. namespace */
static int qt_version ( )
@@ -104,3 +106,9 @@ static int qt_version ( )
-
+/**
+ * Constructs the Selector object
+ * @param withpreview If a font preview should be given
+ * @param parent The parent of the Font Selector
+ * @param name The name of the object
+ * @param fl WidgetFlags
+ */
OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl )
@@ -154,2 +162,7 @@ OFontSelector::~OFontSelector ( )
+/**
+ * This methods tries to set the font
+ * @param f The wishes font
+ * @return success or failure
+ */
bool OFontSelector::setSelectedFont ( const QFont &f )
@@ -159,3 +172,11 @@ bool OFontSelector::setSelectedFont ( const QFont &f )
-bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ )
+
+/**
+ * This is an overloaded method @see setSelectedFont
+ * @param familyStr The family of the font
+ * @param styleStr The style of the font
+ * @param sizeVal The size of font
+ * @param charset The charset to be used. Will be deprecated by QT3
+ */
+bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset )
{
@@ -190,2 +211,10 @@ bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &s
+/**
+ * This method returns the name, style and size of the currently selected
+ * font or false if no font is selected
+ * @param family The font family will be written there
+ * @param style The style will be written there
+ * @param size The size will be written there
+ * @return success or failure
+ */
bool OFontSelector::selectedFont ( QString &family, QString &style, int &size )
@@ -197,2 +226,7 @@ bool OFontSelector::selectedFont ( QString &family, QString &style, int &size )
+/**
+ * This method does return the font family or QString::null if there is
+ * no font item selected
+ * @return the font family
+ */
QString OFontSelector::fontFamily ( ) const
@@ -204,2 +238,6 @@ QString OFontSelector::fontFamily ( ) const
+/**
+ * This method will return the style of the font or QString::null
+ * @return the style of the font
+ */
QString OFontSelector::fontStyle ( ) const
@@ -212,2 +250,5 @@ QString OFontSelector::fontStyle ( ) const
+/**
+ * This method will return the font size or 10 if no font size is available
+ */
int OFontSelector::fontSize ( ) const
@@ -220,2 +261,5 @@ int OFontSelector::fontSize ( ) const
+/**
+ * returns the charset of the font or QString::null
+ */
QString OFontSelector::fontCharSet ( ) const
@@ -227,2 +271,6 @@ QString OFontSelector::fontCharSet ( ) const
+/**
+ * Overloaded member function see above
+ * @see selectedFont
+ */
bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset )
@@ -329,3 +377,5 @@ void OFontSelector::changeFont ( )
-
+/**
+ * Return the selected font
+ */
QFont OFontSelector::selectedFont ( )