summaryrefslogtreecommitdiffstats
path: root/ksirc/KSPrefs/page_font.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/KSPrefs/page_font.cpp
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/KSPrefs/page_font.cpp')
-rw-r--r--ksirc/KSPrefs/page_font.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/ksirc/KSPrefs/page_font.cpp b/ksirc/KSPrefs/page_font.cpp
new file mode 100644
index 00000000..e9f9e0e6
--- /dev/null
+++ b/ksirc/KSPrefs/page_font.cpp
@@ -0,0 +1,38 @@
+#include "page_font.h"
+#include "qapplication.h"
+PageFont::PageFont( QWidget *parent, const char *name ) :
+ QWidget( parent, name)
+{
+ layout = new QHBoxLayout(this);
+ fontchooser = new KFontChooser(this);
+ layout->addWidget(fontchooser);
+ connect(fontchooser,SIGNAL(fontSelected ( const QFont&)), this, SLOT(update()));
+}
+
+PageFont::~PageFont( )
+{
+
+}
+
+void PageFont::update( void ){
+ emit modified();
+}
+
+void PageFont::saveConfig( void )
+{
+ ksopts->defaultFont = fontchooser->font();
+ QApplication::setFont(fontchooser->font(), true, "KSirc::TextView" );
+}
+
+void PageFont::readConfig( const KSOColors * opts )
+{
+ /* Just set the font from the preferences */
+ fontchooser->setFont( opts->defaultFont );
+}
+
+void PageFont::defaultConfig( void )
+{
+ fontchooser->setFont( ksopts->defaultFont );
+}
+
+#include "page_font.moc"