3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
5
* Copyright 1999-2011 by the BibleTime developers.
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
10
#ifndef CFONTCHOOSER_H
11
#define CFONTCHOOSER_H
20
class QListWidgetItem;
25
class CFontChooser : public QFrame {
29
CFontChooser(QWidget *parent = 0);
31
void setFont(const QFont& font);
32
void setSampleText(const QString& text);
33
QSize sizeHint() const;
36
void createFontAreaLayout();
38
void createTextAreaLayout();
39
void connectListWidgets();
40
QString formatAsHtml(const QString& text);
42
void loadSizes(const QString& font, const QString& style);
43
void loadStyles(const QString& font);
44
void outputHtmlText();
45
void restoreListWidgetValue(QListWidget* listWidget, const QString& value);
46
QString saveListWidgetValue(QListWidget* listWidget);
50
CListWidget* m_fontListWidget;
51
CListWidget* m_styleListWidget;
52
CListWidget* m_sizeListWidget;
55
QVBoxLayout* m_vBoxLayout;
56
QString m_choosenStyle;
59
void fontChanged(QListWidgetItem* current, QListWidgetItem* previous);
60
void setFontStyle(const QString& styleString, QFont* font);
61
void sizeChanged(QListWidgetItem* current, QListWidgetItem* previous);
62
void styleChanged(QListWidgetItem* current, QListWidgetItem* previous);
65
void fontSelected(const QFont&);