summaryrefslogtreecommitdiffstats
path: root/kcontrol/konqhtml/appearance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/konqhtml/appearance.cpp')
-rw-r--r--kcontrol/konqhtml/appearance.cpp238
1 files changed, 119 insertions, 119 deletions
diff --git a/kcontrol/konqhtml/appearance.cpp b/kcontrol/konqhtml/appearance.cpp
index 15cbd036a..0c15acebe 100644
--- a/kcontrol/konqhtml/appearance.cpp
+++ b/kcontrol/konqhtml/appearance.cpp
@@ -1,9 +1,9 @@
-#include <qfontdatabase.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
+#include <tqfontdatabase.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
#include <dcopclient.h>
@@ -25,7 +25,7 @@
#include "appearance.moc"
-KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *parent, const char *)
+KAppearanceOptions::KAppearanceOptions(KConfig *config, TQString group, TQWidget *parent, const char *)
: KCModule( parent, "kcmkonqhtml" ), m_pConfig(config), m_groupname(group),
fSize( 10 ), fMinSize( HTML_DEFAULT_MIN_FONT_SIZE )
@@ -34,37 +34,37 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
"which fonts Konqueror should use to display the web "
"pages you view."));
- QString wtstr;
+ TQString wtstr;
- QGridLayout *lay = new QGridLayout(this, 1 ,1 , 0, KDialog::spacingHint());
+ TQGridLayout *lay = new TQGridLayout(this, 1 ,1 , 0, KDialog::spacingHint());
int r = 0;
int E = 0, M = 1, W = 3; //CT 3 (instead 2) allows smaller color buttons
- QGroupBox* gb = new QGroupBox( 1, QGroupBox::Horizontal, i18n("Font Si&ze"), this );
+ TQGroupBox* gb = new TQGroupBox( 1, TQGroupBox::Horizontal, i18n("Font Si&ze"), this );
lay->addMultiCellWidget(gb, r, r, E, W);
- QWhatsThis::add( gb, i18n("This is the relative font size Konqueror uses to display web sites.") );
+ TQWhatsThis::add( gb, i18n("This is the relative font size Konqueror uses to display web sites.") );
m_minSize = new KIntNumInput( fMinSize, gb );
m_minSize->setLabel( i18n( "M&inimum font size:" ) );
m_minSize->setRange( 2, 30 );
- connect( m_minSize, SIGNAL( valueChanged( int ) ), this, SLOT( slotMinimumFontSize( int ) ) );
- connect( m_minSize, SIGNAL( valueChanged( int ) ), this, SLOT( changed() ) );
- QWhatsThis::add( m_minSize, i18n( "Konqueror will never display text smaller than "
+ connect( m_minSize, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotMinimumFontSize( int ) ) );
+ connect( m_minSize, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( changed() ) );
+ TQWhatsThis::add( m_minSize, i18n( "Konqueror will never display text smaller than "
"this size,<br>overriding any other settings" ) );
m_MedSize = new KIntNumInput( m_minSize, fSize, gb );
m_MedSize->setLabel( i18n( "&Medium font size:" ) );
m_MedSize->setRange( 2, 30 );
- connect( m_MedSize, SIGNAL( valueChanged( int ) ), this, SLOT( slotFontSize( int ) ) );
- connect( m_MedSize, SIGNAL( valueChanged( int ) ), this, SLOT( changed() ) );
- QWhatsThis::add( m_MedSize,
+ connect( m_MedSize, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotFontSize( int ) ) );
+ connect( m_MedSize, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( changed() ) );
+ TQWhatsThis::add( m_MedSize,
i18n("This is the relative font size Konqueror uses "
"to display web sites.") );
- QStringList emptyList;
+ TQStringList emptyList;
- QLabel* label = new QLabel( i18n("S&tandard font:"), this );
+ TQLabel* label = new TQLabel( i18n("S&tandard font:"), this );
lay->addWidget( label , ++r, E);
m_pFonts[0] = new KFontCombo( emptyList, this );
@@ -73,19 +73,19 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
lay->addMultiCellWidget(m_pFonts[0], r, r, M, W);
wtstr = i18n("This is the font used to display normal text in a web page.");
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( m_pFonts[0], wtstr );
-
- connect( m_pFonts[0], SIGNAL( activated(const QString&) ),
- SLOT( slotStandardFont(const QString&) ) );
- connect( m_pFonts[0], SIGNAL( activated(const QString&) ),
- SLOT(changed() ) );
- connect( m_pFonts[0]->lineEdit(), SIGNAL( textChanged(const QString&) ),
- SLOT( slotStandardFont(const QString&) ) );
- connect( m_pFonts[0], SIGNAL( textChanged(const QString&) ),
- SLOT(changed() ) );
-
- label = new QLabel( i18n( "&Fixed font:"), this );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( m_pFonts[0], wtstr );
+
+ connect( m_pFonts[0], TQT_SIGNAL( activated(const TQString&) ),
+ TQT_SLOT( slotStandardFont(const TQString&) ) );
+ connect( m_pFonts[0], TQT_SIGNAL( activated(const TQString&) ),
+ TQT_SLOT(changed() ) );
+ connect( m_pFonts[0]->lineEdit(), TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( slotStandardFont(const TQString&) ) );
+ connect( m_pFonts[0], TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT(changed() ) );
+
+ label = new TQLabel( i18n( "&Fixed font:"), this );
lay->addWidget( label, ++r, E );
m_pFonts[1] = new KFontCombo( emptyList, this );
@@ -94,19 +94,19 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
lay->addMultiCellWidget(m_pFonts[1], r, r, M, W);
wtstr = i18n("This is the font used to display fixed-width (i.e. non-proportional) text.");
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( m_pFonts[1], wtstr );
-
- connect( m_pFonts[1], SIGNAL( activated(const QString&) ),
- SLOT( slotFixedFont(const QString&) ) );
- connect( m_pFonts[1], SIGNAL( activated(const QString&) ),
- SLOT(changed() ) );
- connect( m_pFonts[1]->lineEdit(), SIGNAL( textChanged(const QString&) ),
- SLOT( slotFixedFont(const QString&) ) );
- connect( m_pFonts[1], SIGNAL( textChanged(const QString&) ),
- SLOT(changed() ) );
-
- label = new QLabel( i18n( "S&erif font:" ), this );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( m_pFonts[1], wtstr );
+
+ connect( m_pFonts[1], TQT_SIGNAL( activated(const TQString&) ),
+ TQT_SLOT( slotFixedFont(const TQString&) ) );
+ connect( m_pFonts[1], TQT_SIGNAL( activated(const TQString&) ),
+ TQT_SLOT(changed() ) );
+ connect( m_pFonts[1]->lineEdit(), TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( slotFixedFont(const TQString&) ) );
+ connect( m_pFonts[1], TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT(changed() ) );
+
+ label = new TQLabel( i18n( "S&erif font:" ), this );
lay->addWidget( label, ++r, E );
m_pFonts[2] = new KFontCombo( emptyList, this );
@@ -115,19 +115,19 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
lay->addMultiCellWidget( m_pFonts[2], r, r, M, W );
wtstr= i18n( "This is the font used to display text that is marked up as serif." );
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( m_pFonts[2], wtstr );
-
- connect( m_pFonts[2], SIGNAL( activated( const QString& ) ),
- SLOT( slotSerifFont( const QString& ) ) );
- connect( m_pFonts[2], SIGNAL( activated( const QString& ) ),
- SLOT( changed() ) );
- connect( m_pFonts[2]->lineEdit(), SIGNAL( textChanged(const QString&) ),
- SLOT( slotSerifFont(const QString&) ) );
- connect( m_pFonts[2], SIGNAL( textChanged(const QString&) ),
- SLOT(changed() ) );
-
- label = new QLabel( i18n( "Sa&ns serif font:" ), this );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( m_pFonts[2], wtstr );
+
+ connect( m_pFonts[2], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotSerifFont( const TQString& ) ) );
+ connect( m_pFonts[2], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( changed() ) );
+ connect( m_pFonts[2]->lineEdit(), TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( slotSerifFont(const TQString&) ) );
+ connect( m_pFonts[2], TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT(changed() ) );
+
+ label = new TQLabel( i18n( "Sa&ns serif font:" ), this );
lay->addWidget( label, ++r, E );
m_pFonts[3] = new KFontCombo( emptyList, this );
@@ -136,20 +136,20 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
lay->addMultiCellWidget( m_pFonts[3], r, r, M, W );
wtstr= i18n( "This is the font used to display text that is marked up as sans-serif." );
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( m_pFonts[3], wtstr );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( m_pFonts[3], wtstr );
- connect( m_pFonts[3], SIGNAL( activated( const QString& ) ),
- SLOT( slotSansSerifFont( const QString& ) ) );
- connect( m_pFonts[3], SIGNAL( activated( const QString& ) ),
- SLOT( changed() ) );
- connect( m_pFonts[3]->lineEdit(), SIGNAL( textChanged(const QString&) ),
- SLOT( slotSansSerifFont(const QString&) ) );
- connect( m_pFonts[3], SIGNAL( textChanged(const QString&) ),
- SLOT(changed() ) );
+ connect( m_pFonts[3], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotSansSerifFont( const TQString& ) ) );
+ connect( m_pFonts[3], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( changed() ) );
+ connect( m_pFonts[3]->lineEdit(), TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( slotSansSerifFont(const TQString&) ) );
+ connect( m_pFonts[3], TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT(changed() ) );
- label = new QLabel( i18n( "C&ursive font:" ), this );
+ label = new TQLabel( i18n( "C&ursive font:" ), this );
lay->addWidget( label, ++r, E );
m_pFonts[4] = new KFontCombo( emptyList, this );
@@ -158,20 +158,20 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
lay->addMultiCellWidget( m_pFonts[4], r, r, M, W );
wtstr= i18n( "This is the font used to display text that is marked up as italic." );
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( m_pFonts[4], wtstr );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( m_pFonts[4], wtstr );
- connect( m_pFonts[4], SIGNAL( activated( const QString& ) ),
- SLOT( slotCursiveFont( const QString& ) ) );
- connect( m_pFonts[4], SIGNAL( activated( const QString& ) ),
- SLOT( changed() ) );
- connect( m_pFonts[4]->lineEdit(), SIGNAL( textChanged(const QString&) ),
- SLOT( slotCursiveFont(const QString&) ) );
- connect( m_pFonts[4], SIGNAL( textChanged(const QString&) ),
- SLOT(changed() ) );
+ connect( m_pFonts[4], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotCursiveFont( const TQString& ) ) );
+ connect( m_pFonts[4], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( changed() ) );
+ connect( m_pFonts[4]->lineEdit(), TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( slotCursiveFont(const TQString&) ) );
+ connect( m_pFonts[4], TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT(changed() ) );
- label = new QLabel( i18n( "Fantas&y font:" ), this );
+ label = new TQLabel( i18n( "Fantas&y font:" ), this );
lay->addWidget( label, ++r, E );
m_pFonts[5] = new KFontCombo( emptyList, this );
@@ -180,37 +180,37 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
lay->addMultiCellWidget( m_pFonts[5], r, r, M, W );
wtstr= i18n( "This is the font used to display text that is marked up as a fantasy font." );
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( m_pFonts[5], wtstr );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( m_pFonts[5], wtstr );
- connect( m_pFonts[5], SIGNAL( activated( const QString& ) ),
- SLOT( slotFantasyFont( const QString& ) ) );
- connect( m_pFonts[5], SIGNAL( activated( const QString& ) ),
- SLOT( changed() ) );
- connect( m_pFonts[5]->lineEdit(), SIGNAL( textChanged(const QString&) ),
- SLOT( slotFantasyFont(const QString&) ) );
- connect( m_pFonts[5], SIGNAL( textChanged(const QString&) ),
- SLOT(changed() ) );
+ connect( m_pFonts[5], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotFantasyFont( const TQString& ) ) );
+ connect( m_pFonts[5], TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( changed() ) );
+ connect( m_pFonts[5]->lineEdit(), TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( slotFantasyFont(const TQString&) ) );
+ connect( m_pFonts[5], TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT(changed() ) );
- label = new QLabel( i18n( "Font &size adjustment for this encoding:" ), this );
+ label = new TQLabel( i18n( "Font &size adjustment for this encoding:" ), this );
lay->addWidget( label, ++r, M );
- m_pFontSizeAdjust = new QSpinBox( -5, 5, 1, this );
+ m_pFontSizeAdjust = new TQSpinBox( -5, 5, 1, this );
label->setBuddy( m_pFontSizeAdjust );
lay->addMultiCellWidget( m_pFontSizeAdjust, r, r, M+1, W );
- connect( m_pFontSizeAdjust, SIGNAL( valueChanged( int ) ),
- SLOT( slotFontSizeAdjust( int ) ) );
- connect( m_pFontSizeAdjust, SIGNAL( valueChanged( int ) ),
- SLOT( changed() ) );
+ connect( m_pFontSizeAdjust, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( slotFontSizeAdjust( int ) ) );
+ connect( m_pFontSizeAdjust, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( changed() ) );
- label = new QLabel( i18n( "Default encoding:"), this );
+ label = new TQLabel( i18n( "Default encoding:"), this );
//++r;
//lay->addMultiCellWidget( label, r, r, E, E+1);
lay->addWidget( label, ++r, E);
- m_pEncoding = new QComboBox( false, this );
+ m_pEncoding = new TQComboBox( false, this );
label->setBuddy( m_pEncoding );
encodings = KGlobal::charsets()->availableEncodingNames();
encodings.prepend(i18n("Use Language Encoding"));
@@ -219,17 +219,17 @@ KAppearanceOptions::KAppearanceOptions(KConfig *config, QString group, QWidget *
wtstr = i18n( "Select the default encoding to be used; normally, you will be fine with 'Use language encoding' "
"and should not have to change this.");
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( m_pEncoding, wtstr );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( m_pEncoding, wtstr );
- connect( m_pEncoding, SIGNAL( activated(const QString& ) ),
- SLOT( slotEncoding(const QString&) ) );
- connect( m_pEncoding, SIGNAL( activated(const QString& ) ),
- SLOT( changed() ) );
+ connect( m_pEncoding, TQT_SIGNAL( activated(const TQString& ) ),
+ TQT_SLOT( slotEncoding(const TQString&) ) );
+ connect( m_pEncoding, TQT_SIGNAL( activated(const TQString& ) ),
+ TQT_SLOT( changed() ) );
++r; lay->setRowStretch(r, 8);
- QFontDatabase db;
+ TQFontDatabase db;
m_families = db.families();
@@ -268,47 +268,47 @@ void KAppearanceOptions::slotMinimumFontSize( int i )
}
-void KAppearanceOptions::slotStandardFont(const QString& n )
+void KAppearanceOptions::slotStandardFont(const TQString& n )
{
fonts[0] = n;
}
-void KAppearanceOptions::slotFixedFont(const QString& n )
+void KAppearanceOptions::slotFixedFont(const TQString& n )
{
fonts[1] = n;
}
-void KAppearanceOptions::slotSerifFont( const QString& n )
+void KAppearanceOptions::slotSerifFont( const TQString& n )
{
fonts[2] = n;
}
-void KAppearanceOptions::slotSansSerifFont( const QString& n )
+void KAppearanceOptions::slotSansSerifFont( const TQString& n )
{
fonts[3] = n;
}
-void KAppearanceOptions::slotCursiveFont( const QString& n )
+void KAppearanceOptions::slotCursiveFont( const TQString& n )
{
fonts[4] = n;
}
-void KAppearanceOptions::slotFantasyFont( const QString& n )
+void KAppearanceOptions::slotFantasyFont( const TQString& n )
{
fonts[5] = n;
}
void KAppearanceOptions::slotFontSizeAdjust( int value )
{
- fonts[6] = QString::number( value );
+ fonts[6] = TQString::number( value );
}
-void KAppearanceOptions::slotEncoding(const QString& n)
+void KAppearanceOptions::slotEncoding(const TQString& n)
{
encodingName = n;
}
@@ -336,23 +336,23 @@ void KAppearanceOptions::load( bool useDefaults )
if (fSize < fMinSize)
fSize = fMinSize;
- defaultFonts = QStringList();
+ defaultFonts = TQStringList();
defaultFonts.append( READ_ENTRY( "StandardFont", KGlobalSettings::generalFont().family() ) );
defaultFonts.append( READ_ENTRY( "FixedFont", KGlobalSettings::fixedFont().family() ) );
defaultFonts.append( READ_ENTRY( "SerifFont", HTML_DEFAULT_VIEW_SERIF_FONT ) );
defaultFonts.append( READ_ENTRY( "SansSerifFont", HTML_DEFAULT_VIEW_SANSSERIF_FONT ) );
defaultFonts.append( READ_ENTRY( "CursiveFont", HTML_DEFAULT_VIEW_CURSIVE_FONT ) );
defaultFonts.append( READ_ENTRY( "FantasyFont", HTML_DEFAULT_VIEW_FANTASY_FONT ) );
- defaultFonts.append( QString("0") ); // default font size adjustment
+ defaultFonts.append( TQString("0") ); // default font size adjustment
if (m_pConfig->hasKey("Fonts"))
fonts = m_pConfig->readListEntry( "Fonts" );
else
fonts = khtmlrc.readListEntry( "Fonts" );
while (fonts.count() < 7)
- fonts.append(QString::null);
+ fonts.append(TQString::null);
- encodingName = READ_ENTRY( "DefaultEncoding", QString::null );
+ encodingName = READ_ENTRY( "DefaultEncoding", TQString::null );
//kdDebug(0) << "encoding = " << encodingName << endl;
updateGUI();
@@ -373,14 +373,14 @@ void KAppearanceOptions::updateGUI()
{
//kdDebug() << "KAppearanceOptions::updateGUI " << charset << endl;
for ( int f = 0; f < 6; f++ ) {
- QString ff = fonts[f];
+ TQString ff = fonts[f];
if (ff.isEmpty())
ff = defaultFonts[f];
m_pFonts[f]->setCurrentFont(ff);
}
int i = 0;
- for ( QStringList::Iterator it = encodings.begin(); it != encodings.end(); ++it, ++i )
+ for ( TQStringList::Iterator it = encodings.begin(); it != encodings.end(); ++it, ++i )
if ( encodingName == *it )
m_pEncoding->setCurrentItem( i );
if(encodingName.isEmpty())
@@ -407,7 +407,7 @@ void KAppearanceOptions::save()
m_pConfig->writeEntry( "DefaultEncoding", encodingName );
m_pConfig->sync();
- QByteArray data;
+ TQByteArray data;
if ( !kapp->dcopClient()->isAttached() )
kapp->dcopClient()->attach();
kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );