summaryrefslogtreecommitdiffstats
path: root/ksirc/KSPrefs/page_font.cpp
blob: 627c6ce4373c12d50dc19e0b475b02601cc04ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "page_font.h"
#include "tqapplication.h"
PageFont::PageFont( TQWidget *parent, const char *name ) : 
  TQWidget( parent, name)
{
  tqlayout = new TQHBoxLayout(this);
  fontchooser = new KFontChooser(this);
  tqlayout->addWidget(fontchooser);
  connect(fontchooser,TQT_SIGNAL(fontSelected ( const TQFont&)), this, TQT_SLOT(update())); 
}

PageFont::~PageFont( )
{
  
}

void PageFont::update( void ){
  emit modified();
}

void PageFont::saveConfig( void )
{
  ksopts->defaultFont = fontchooser->font();
  TQApplication::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"