-rw-r--r-- | libopie/ofontselector.cpp | 60 |
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: | |||
46 | 46 | ||
47 | bool m_pointbug; | 47 | bool m_pointbug : 1; |
48 | 48 | ||
@@ -51,2 +51,3 @@ public: | |||
51 | 51 | ||
52 | namespace { | ||
52 | 53 | ||
@@ -96,3 +97,4 @@ static int findItemCB ( QComboBox *box, const QString &str ) | |||
96 | 97 | ||
97 | 98 | } | |
99 | /* static same as anon. namespace */ | ||
98 | static int qt_version ( ) | 100 | static int qt_version ( ) |
@@ -104,3 +106,9 @@ static int qt_version ( ) | |||
104 | 106 | ||
105 | 107 | /** | |
108 | * Constructs the Selector object | ||
109 | * @param withpreview If a font preview should be given | ||
110 | * @param parent The parent of the Font Selector | ||
111 | * @param name The name of the object | ||
112 | * @param fl WidgetFlags | ||
113 | */ | ||
106 | OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) | 114 | OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) |
@@ -154,2 +162,7 @@ OFontSelector::~OFontSelector ( ) | |||
154 | 162 | ||
163 | /** | ||
164 | * This methods tries to set the font | ||
165 | * @param f The wishes font | ||
166 | * @return success or failure | ||
167 | */ | ||
155 | bool OFontSelector::setSelectedFont ( const QFont &f ) | 168 | bool OFontSelector::setSelectedFont ( const QFont &f ) |
@@ -159,3 +172,11 @@ bool OFontSelector::setSelectedFont ( const QFont &f ) | |||
159 | 172 | ||
160 | bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ ) | 173 | |
174 | /** | ||
175 | * This is an overloaded method @see setSelectedFont | ||
176 | * @param familyStr The family of the font | ||
177 | * @param styleStr The style of the font | ||
178 | * @param sizeVal The size of font | ||
179 | * @param charset The charset to be used. Will be deprecated by QT3 | ||
180 | */ | ||
181 | bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset ) | ||
161 | { | 182 | { |
@@ -190,2 +211,10 @@ bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &s | |||
190 | 211 | ||
212 | /** | ||
213 | * This method returns the name, style and size of the currently selected | ||
214 | * font or false if no font is selected | ||
215 | * @param family The font family will be written there | ||
216 | * @param style The style will be written there | ||
217 | * @param size The size will be written there | ||
218 | * @return success or failure | ||
219 | */ | ||
191 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size ) | 220 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size ) |
@@ -197,2 +226,7 @@ bool OFontSelector::selectedFont ( QString &family, QString &style, int &size ) | |||
197 | 226 | ||
227 | /** | ||
228 | * This method does return the font family or QString::null if there is | ||
229 | * no font item selected | ||
230 | * @return the font family | ||
231 | */ | ||
198 | QString OFontSelector::fontFamily ( ) const | 232 | QString OFontSelector::fontFamily ( ) const |
@@ -204,2 +238,6 @@ QString OFontSelector::fontFamily ( ) const | |||
204 | 238 | ||
239 | /** | ||
240 | * This method will return the style of the font or QString::null | ||
241 | * @return the style of the font | ||
242 | */ | ||
205 | QString OFontSelector::fontStyle ( ) const | 243 | QString OFontSelector::fontStyle ( ) const |
@@ -212,2 +250,5 @@ QString OFontSelector::fontStyle ( ) const | |||
212 | 250 | ||
251 | /** | ||
252 | * This method will return the font size or 10 if no font size is available | ||
253 | */ | ||
213 | int OFontSelector::fontSize ( ) const | 254 | int OFontSelector::fontSize ( ) const |
@@ -220,2 +261,5 @@ int OFontSelector::fontSize ( ) const | |||
220 | 261 | ||
262 | /** | ||
263 | * returns the charset of the font or QString::null | ||
264 | */ | ||
221 | QString OFontSelector::fontCharSet ( ) const | 265 | QString OFontSelector::fontCharSet ( ) const |
@@ -227,2 +271,6 @@ QString OFontSelector::fontCharSet ( ) const | |||
227 | 271 | ||
272 | /** | ||
273 | * Overloaded member function see above | ||
274 | * @see selectedFont | ||
275 | */ | ||
228 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset ) | 276 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset ) |
@@ -329,3 +377,5 @@ void OFontSelector::changeFont ( ) | |||
329 | 377 | ||
330 | 378 | /** | |
379 | * Return the selected font | ||
380 | */ | ||
331 | QFont OFontSelector::selectedFont ( ) | 381 | QFont OFontSelector::selectedFont ( ) |