diff options
Diffstat (limited to 'kcontrol/konqhtml')
26 files changed, 806 insertions, 806 deletions
diff --git a/kcontrol/konqhtml/advancedTabDialog.cpp b/kcontrol/konqhtml/advancedTabDialog.cpp index 93a576043..681863cb6 100644 --- a/kcontrol/konqhtml/advancedTabDialog.cpp +++ b/kcontrol/konqhtml/advancedTabDialog.cpp @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software */ -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qslider.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqslider.h> #include <kapplication.h> #include <dcopclient.h> @@ -34,7 +34,7 @@ #include "advancedTabOptions.h" #include "main.h" -advancedTabDialog::advancedTabDialog(QWidget* parent, KConfig* config, const char* name) +advancedTabDialog::advancedTabDialog(TQWidget* parent, KConfig* config, const char* name) : KDialogBase(KDialogBase::Plain, i18n("Advanced Options"), KDialogBase::Ok | @@ -46,25 +46,25 @@ advancedTabDialog::advancedTabDialog(QWidget* parent, KConfig* config, const cha true, true), m_pConfig(config) { - connect(this, SIGNAL(applyClicked()), - this, SLOT(save())); - connect(this, SIGNAL(okClicked()), - this, SLOT(save())); + connect(this, TQT_SIGNAL(applyClicked()), + this, TQT_SLOT(save())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(save())); actionButton(Apply)->setEnabled(false); - QFrame* page = plainPage(); - QVBoxLayout* layout = new QVBoxLayout(page); + TQFrame* page = plainPage(); + TQVBoxLayout* layout = new TQVBoxLayout(page); m_advancedWidget = new advancedTabOptions(page); layout->addWidget(m_advancedWidget); layout->addSpacing( 20 ); layout->addStretch(); - connect(m_advancedWidget->m_pNewTabsInBackground, SIGNAL(clicked()), this, SLOT(changed())); - connect(m_advancedWidget->m_pOpenAfterCurrentPage, SIGNAL(clicked()), this, SLOT(changed())); - connect(m_advancedWidget->m_pTabConfirm, SIGNAL(clicked()), this, SLOT(changed())); - connect(m_advancedWidget->m_pTabCloseActivatePrevious, SIGNAL(clicked()), this, SLOT(changed())); - connect(m_advancedWidget->m_pPermanentCloseButton, SIGNAL(clicked()), this, SLOT(changed())); - connect(m_advancedWidget->m_pKonquerorTabforExternalURL, SIGNAL(clicked()), this, SLOT(changed())); - connect(m_advancedWidget->m_pPopupsWithinTabs, SIGNAL(clicked()), this, SLOT(changed())); + connect(m_advancedWidget->m_pNewTabsInBackground, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(m_advancedWidget->m_pOpenAfterCurrentPage, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(m_advancedWidget->m_pTabConfirm, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(m_advancedWidget->m_pTabCloseActivatePrevious, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(m_advancedWidget->m_pPermanentCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(m_advancedWidget->m_pKonquerorTabforExternalURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(m_advancedWidget->m_pPopupsWithinTabs, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); load(); } @@ -105,7 +105,7 @@ void advancedTabDialog::save() if ( m_advancedWidget->m_pTabConfirm->isChecked() ) m_pConfig->deleteEntry( "MultipleTabConfirm" ); else m_pConfig->writeEntry( "MultipleTabConfirm", true ); - QByteArray data; + TQByteArray data; if ( !KApplication::kApplication()->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); KApplication::kApplication()->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); diff --git a/kcontrol/konqhtml/advancedTabDialog.h b/kcontrol/konqhtml/advancedTabDialog.h index 728e8928b..3e340b5b8 100644 --- a/kcontrol/konqhtml/advancedTabDialog.h +++ b/kcontrol/konqhtml/advancedTabDialog.h @@ -29,7 +29,7 @@ class advancedTabDialog : public KDialogBase Q_OBJECT public: - advancedTabDialog(QWidget* parent, KConfig *config, const char* name); + advancedTabDialog(TQWidget* parent, KConfig *config, const char* name); ~advancedTabDialog(); protected slots: 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 ); diff --git a/kcontrol/konqhtml/appearance.h b/kcontrol/konqhtml/appearance.h index dd16626bd..8b01f4055 100644 --- a/kcontrol/konqhtml/appearance.h +++ b/kcontrol/konqhtml/appearance.h @@ -11,8 +11,8 @@ #ifndef __APPEARANCE_H__ #define __APPEARANCE_H__ -#include <qwidget.h> -#include <qmap.h> +#include <tqwidget.h> +#include <tqmap.h> #include <kcmodule.h> @@ -23,7 +23,7 @@ class KAppearanceOptions : public KCModule { Q_OBJECT public: - KAppearanceOptions(KConfig *config, QString group, QWidget *parent=0, const char *name=0); + KAppearanceOptions(KConfig *config, TQString group, TQWidget *parent=0, const char *name=0); ~KAppearanceOptions(); virtual void load(); @@ -34,13 +34,13 @@ public: public slots: void slotFontSize( int ); void slotMinimumFontSize( int ); - void slotStandardFont(const QString& n); - void slotFixedFont(const QString& n); - void slotSerifFont( const QString& n ); - void slotSansSerifFont( const QString& n ); - void slotCursiveFont( const QString& n ); - void slotFantasyFont( const QString& n ); - void slotEncoding( const QString& n); + void slotStandardFont(const TQString& n); + void slotFixedFont(const TQString& n); + void slotSerifFont( const TQString& n ); + void slotSansSerifFont( const TQString& n ); + void slotCursiveFont( const TQString& n ); + void slotFantasyFont( const TQString& n ); + void slotEncoding( const TQString& n); void slotFontSizeAdjust( int value ); private: @@ -49,22 +49,22 @@ private: private: KConfig *m_pConfig; - QString m_groupname; - QStringList m_families; + TQString m_groupname; + TQStringList m_families; KIntNumInput* m_minSize; KIntNumInput* m_MedSize; KIntNumInput* m_pageDPI; KFontCombo* m_pFonts[6]; - QComboBox* m_pEncoding; - QSpinBox *m_pFontSizeAdjust; + TQComboBox* m_pEncoding; + TQSpinBox *m_pFontSizeAdjust; int fSize; int fMinSize; - QStringList encodings; - QStringList fonts; - QStringList defaultFonts; - QString encodingName; + TQStringList encodings; + TQStringList fonts; + TQStringList defaultFonts; + TQString encodingName; }; #endif // __APPEARANCE_H__ diff --git a/kcontrol/konqhtml/domainlistview.cpp b/kcontrol/konqhtml/domainlistview.cpp index a55221f43..29dccb14b 100644 --- a/kcontrol/konqhtml/domainlistview.cpp +++ b/kcontrol/konqhtml/domainlistview.cpp @@ -19,9 +19,9 @@ */ -#include <qlayout.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <kconfig.h> #include <klistview.h> @@ -32,13 +32,13 @@ #include "policies.h" #include "policydlg.h" -DomainListView::DomainListView(KConfig *config,const QString &title, - QWidget *parent,const char *name) : - QGroupBox(title, parent, name), config(config) { +DomainListView::DomainListView(KConfig *config,const TQString &title, + TQWidget *parent,const char *name) : + TQGroupBox(title, parent, name), config(config) { setColumnLayout(0, Qt::Vertical); layout()->setSpacing(0); layout()->setMargin(0); - QGridLayout* thisLayout = new QGridLayout(layout()); + TQGridLayout* thisLayout = new TQGridLayout(layout()); thisLayout->setAlignment(Qt::AlignTop); thisLayout->setSpacing(KDialog::spacingHint()); thisLayout->setMargin(KDialog::marginHint()); @@ -46,44 +46,44 @@ DomainListView::DomainListView(KConfig *config,const QString &title, domainSpecificLV = new KListView(this); domainSpecificLV->addColumn(i18n("Host/Domain")); domainSpecificLV->addColumn(i18n("Policy"), 100); - connect(domainSpecificLV,SIGNAL(doubleClicked(QListViewItem *)), SLOT(changePressed())); - connect(domainSpecificLV,SIGNAL(returnPressed(QListViewItem *)), SLOT(changePressed())); - connect(domainSpecificLV, SIGNAL( executed( QListViewItem *)), SLOT( updateButton())); - connect(domainSpecificLV, SIGNAL(selectionChanged()), SLOT(updateButton())); + connect(domainSpecificLV,TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(changePressed())); + connect(domainSpecificLV,TQT_SIGNAL(returnPressed(TQListViewItem *)), TQT_SLOT(changePressed())); + connect(domainSpecificLV, TQT_SIGNAL( executed( TQListViewItem *)), TQT_SLOT( updateButton())); + connect(domainSpecificLV, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateButton())); thisLayout->addMultiCellWidget(domainSpecificLV, 0, 5, 0, 0); - addDomainPB = new QPushButton(i18n("&New..."), this); + addDomainPB = new TQPushButton(i18n("&New..."), this); thisLayout->addWidget(addDomainPB, 0, 1); - connect(addDomainPB, SIGNAL(clicked()), SLOT(addPressed())); + connect(addDomainPB, TQT_SIGNAL(clicked()), TQT_SLOT(addPressed())); - changeDomainPB = new QPushButton( i18n("Chan&ge..."), this); + changeDomainPB = new TQPushButton( i18n("Chan&ge..."), this); thisLayout->addWidget(changeDomainPB, 1, 1); - connect(changeDomainPB, SIGNAL(clicked()), this, SLOT(changePressed())); + connect(changeDomainPB, TQT_SIGNAL(clicked()), this, TQT_SLOT(changePressed())); - deleteDomainPB = new QPushButton(i18n("De&lete"), this); + deleteDomainPB = new TQPushButton(i18n("De&lete"), this); thisLayout->addWidget(deleteDomainPB, 2, 1); - connect(deleteDomainPB, SIGNAL(clicked()), this, SLOT(deletePressed())); + connect(deleteDomainPB, TQT_SIGNAL(clicked()), this, TQT_SLOT(deletePressed())); - importDomainPB = new QPushButton(i18n("&Import..."), this); + importDomainPB = new TQPushButton(i18n("&Import..."), this); thisLayout->addWidget(importDomainPB, 3, 1); - connect(importDomainPB, SIGNAL(clicked()), this, SLOT(importPressed())); + connect(importDomainPB, TQT_SIGNAL(clicked()), this, TQT_SLOT(importPressed())); importDomainPB->setEnabled(false); importDomainPB->hide(); - exportDomainPB = new QPushButton(i18n("&Export..."), this); + exportDomainPB = new TQPushButton(i18n("&Export..."), this); thisLayout->addWidget(exportDomainPB, 4, 1); - connect(exportDomainPB, SIGNAL(clicked()), this, SLOT(exportPressed())); + connect(exportDomainPB, TQT_SIGNAL(clicked()), this, TQT_SLOT(exportPressed())); exportDomainPB->setEnabled(false); exportDomainPB->hide(); - QSpacerItem* spacer = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding); + TQSpacerItem* spacer = new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding); thisLayout->addItem(spacer, 5, 1); - QWhatsThis::add( addDomainPB, i18n("Click on this button to manually add a host or domain " + TQWhatsThis::add( addDomainPB, i18n("Click on this button to manually add a host or domain " "specific policy.") ); - QWhatsThis::add( changeDomainPB, i18n("Click on this button to change the policy for the " + TQWhatsThis::add( changeDomainPB, i18n("Click on this button to change the policy for the " "host or domain selected in the list box.") ); - QWhatsThis::add( deleteDomainPB, i18n("Click on this button to delete the policy for the " + TQWhatsThis::add( deleteDomainPB, i18n("Click on this button to delete the policy for the " "host or domain selected in the list box.") ); updateButton(); } @@ -98,7 +98,7 @@ DomainListView::~DomainListView() { void DomainListView::updateButton() { - QListViewItem *index = domainSpecificLV->currentItem(); + TQListViewItem *index = domainSpecificLV->currentItem(); bool enable = ( index != 0 ); changeDomainPB->setEnabled( enable ); deleteDomainPB->setEnabled( enable ); @@ -113,7 +113,7 @@ void DomainListView::addPressed() PolicyDialog pDlg(pol, this); setupPolicyDlg(AddButton,pDlg,pol); if( pDlg.exec() ) { - QListViewItem* index = new QListViewItem( domainSpecificLV, pDlg.domain(), + TQListViewItem* index = new TQListViewItem( domainSpecificLV, pDlg.domain(), pDlg.featureEnabledPolicyText() ); pol->setDomain(pDlg.domain()); domainPolicies.insert(index, pol); @@ -127,7 +127,7 @@ void DomainListView::addPressed() void DomainListView::changePressed() { - QListViewItem *index = domainSpecificLV->currentItem(); + TQListViewItem *index = domainSpecificLV->currentItem(); if ( index == 0 ) { KMessageBox::information( 0, i18n("You must first select a policy to be changed." ) ); @@ -156,7 +156,7 @@ void DomainListView::changePressed() void DomainListView::deletePressed() { - QListViewItem *index = domainSpecificLV->currentItem(); + TQListViewItem *index = domainSpecificLV->currentItem(); if ( index == 0 ) { KMessageBox::information( 0, i18n("You must first select a policy to delete." ) ); @@ -183,37 +183,37 @@ void DomainListView::exportPressed() // PENDING(kalle) Implement this. } -void DomainListView::initialize(const QStringList &domainList) +void DomainListView::initialize(const TQStringList &domainList) { domainSpecificLV->clear(); domainPolicies.clear(); // JavaPolicies pol(m_pConfig,m_groupname,false); - for (QStringList::ConstIterator it = domainList.begin(); + for (TQStringList::ConstIterator it = domainList.begin(); it != domainList.end(); ++it) { - QString domain = *it; + TQString domain = *it; Policies *pol = createPolicies(); pol->setDomain(domain); pol->load(); - QString policy; + TQString policy; if (pol->isFeatureEnabledPolicyInherited()) policy = i18n("Use Global"); else if (pol->isFeatureEnabled()) policy = i18n("Accept"); else policy = i18n("Reject"); - QListViewItem *index = - new QListViewItem( domainSpecificLV, domain, policy ); + TQListViewItem *index = + new TQListViewItem( domainSpecificLV, domain, policy ); domainPolicies[index] = pol; } } -void DomainListView::save(const QString &group, const QString &domainListKey) { - QStringList domainList; +void DomainListView::save(const TQString &group, const TQString &domainListKey) { + TQStringList domainList; DomainPolicyMap::Iterator it = domainPolicies.begin(); for (; it != domainPolicies.end(); ++it) { - QListViewItem *current = it.key(); + TQListViewItem *current = it.key(); Policies *pol = it.data(); pol->save(); domainList.append(current->text(0)); diff --git a/kcontrol/konqhtml/domainlistview.h b/kcontrol/konqhtml/domainlistview.h index 3fb3f102e..b0f5ab2fb 100644 --- a/kcontrol/konqhtml/domainlistview.h +++ b/kcontrol/konqhtml/domainlistview.h @@ -22,8 +22,8 @@ #ifndef __DOMAINLISTVIEW_H__ #define __DOMAINLISTVIEW_H__ -#include <qgroupbox.h> -#include <qmap.h> +#include <tqgroupbox.h> +#include <tqmap.h> class QListViewItem; class QPushButton; @@ -51,7 +51,7 @@ class PolicyDialog; * * @author Leo Savernik */ -class DomainListView : public QGroupBox { +class DomainListView : public TQGroupBox { Q_OBJECT public: /** Enumerates the available buttons. @@ -67,7 +67,7 @@ public: * @param parent parent widget * @param name internal name for debugging */ - DomainListView(KConfig *config,const QString &title,QWidget *parent, + DomainListView(KConfig *config,const TQString &title,TQWidget *parent, const char *name = 0); virtual ~DomainListView(); @@ -87,31 +87,31 @@ public: * * Note: The add button already contains a default "what's this" text. */ - QPushButton *addButton() const { return addDomainPB; } + TQPushButton *addButton() const { return addDomainPB; } /** * returns the change push-button. * * Note: The change button already contains a default "what's this" text. */ - QPushButton *changeButton() const { return changeDomainPB; } + TQPushButton *changeButton() const { return changeDomainPB; } /** * returns the delete push-button. * * Note: The delete button already contains a default "what's this" text. */ - QPushButton *deleteButton() const { return deleteDomainPB; } + TQPushButton *deleteButton() const { return deleteDomainPB; } /** * returns the import push-button. */ - QPushButton *importButton() const { return importDomainPB; } + TQPushButton *importButton() const { return importDomainPB; } /** * returns the export push-button. */ - QPushButton *exportButton() const { return exportDomainPB; } + TQPushButton *exportButton() const { return exportDomainPB; } /** * Initializes the list view with the given list of domains as well @@ -121,7 +121,7 @@ public: * * @param domainList given list of domains */ - void initialize(const QStringList &domainList); + void initialize(const TQStringList &domainList); /** * saves the current state of all domains to the configuration object. @@ -129,7 +129,7 @@ public: * @param domainListKey the name of the key which the list of domains * is stored under. */ - void save(const QString &group, const QString &domainListKey); + void save(const TQString &group, const TQString &domainListKey); signals: @@ -195,13 +195,13 @@ protected: KListView *domainSpecificLV; - QPushButton* addDomainPB; - QPushButton* changeDomainPB; - QPushButton* deleteDomainPB; - QPushButton* importDomainPB; - QPushButton* exportDomainPB; + TQPushButton* addDomainPB; + TQPushButton* changeDomainPB; + TQPushButton* deleteDomainPB; + TQPushButton* importDomainPB; + TQPushButton* exportDomainPB; - typedef QMap<QListViewItem*, Policies *> DomainPolicyMap; + typedef TQMap<TQListViewItem*, Policies *> DomainPolicyMap; DomainPolicyMap domainPolicies; }; diff --git a/kcontrol/konqhtml/filteropts.cpp b/kcontrol/konqhtml/filteropts.cpp index a1a68b63e..79ab4d45a 100644 --- a/kcontrol/konqhtml/filteropts.cpp +++ b/kcontrol/konqhtml/filteropts.cpp @@ -23,23 +23,23 @@ #include <kfiledialog.h> #include <dcopclient.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qregexp.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqregexp.h> #include "filteropts.h" #include "filteropts.moc" -KCMFilter::KCMFilter(KConfig *config, QString group, - QWidget *parent, const char * ) +KCMFilter::KCMFilter(KConfig *config, TQString group, + TQWidget *parent, const char * ) : KCModule( parent, "kcmkonqhtml" ), mConfig( config ), mGroupname( group ), @@ -47,53 +47,53 @@ KCMFilter::KCMFilter(KConfig *config, QString group, { setButtons(Default|Apply); - QVBoxLayout *topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint()); - mEnableCheck = new QCheckBox(i18n("Enable filters"), this); + mEnableCheck = new TQCheckBox(i18n("Enable filters"), this); topLayout->addWidget( mEnableCheck ); - mKillCheck = new QCheckBox(i18n("Hide filtered images"), this); + mKillCheck = new TQCheckBox(i18n("Hide filtered images"), this); topLayout->addWidget( mKillCheck ); - QGroupBox *topBox = new QGroupBox( 1, Horizontal, i18n("URL Expressions to Filter"), this ); + TQGroupBox *topBox = new TQGroupBox( 1, Horizontal, i18n("URL Expressions to Filter"), this ); topLayout->addWidget( topBox ); - mListBox = new QListBox( topBox ); - mListBox->setSelectionMode(QListBox::Extended); - new QLabel( i18n("Expression (e.g. http://www.site.com/ad/*):"), topBox); - mString = new QLineEdit( topBox ); + mListBox = new TQListBox( topBox ); + mListBox->setSelectionMode(TQListBox::Extended); + new TQLabel( i18n("Expression (e.g. http://www.site.com/ad/*):"), topBox); + mString = new TQLineEdit( topBox ); - QHBox *buttonBox = new QHBox( topBox ); + TQHBox *buttonBox = new TQHBox( topBox ); buttonBox->setSpacing( KDialog::spacingHint() ); - mInsertButton = new QPushButton( i18n("Insert"), buttonBox ); - connect( mInsertButton, SIGNAL( clicked() ), SLOT( insertFilter() ) ); - mUpdateButton = new QPushButton( i18n("Update"), buttonBox ); - connect( mUpdateButton, SIGNAL( clicked() ), SLOT( updateFilter() ) ); - mRemoveButton = new QPushButton( i18n("Remove"), buttonBox ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeFilter() ) ); + mInsertButton = new TQPushButton( i18n("Insert"), buttonBox ); + connect( mInsertButton, TQT_SIGNAL( clicked() ), TQT_SLOT( insertFilter() ) ); + mUpdateButton = new TQPushButton( i18n("Update"), buttonBox ); + connect( mUpdateButton, TQT_SIGNAL( clicked() ), TQT_SLOT( updateFilter() ) ); + mRemoveButton = new TQPushButton( i18n("Remove"), buttonBox ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeFilter() ) ); - mImportButton = new QPushButton(i18n("Import..."),buttonBox); - connect( mImportButton, SIGNAL( clicked() ), SLOT( importFilters() ) ); - mExportButton = new QPushButton(i18n("Export..."),buttonBox); - connect( mExportButton, SIGNAL( clicked() ), SLOT( exportFilters() ) ); + mImportButton = new TQPushButton(i18n("Import..."),buttonBox); + connect( mImportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( importFilters() ) ); + mExportButton = new TQPushButton(i18n("Export..."),buttonBox); + connect( mExportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( exportFilters() ) ); - connect( mEnableCheck, SIGNAL( clicked()), this, SLOT( slotEnableChecked())); - connect( mKillCheck, SIGNAL( clicked()), this, SLOT( slotKillChecked())); - connect( mListBox, SIGNAL( selectionChanged ()),this, SLOT( slotItemSelected())); + connect( mEnableCheck, TQT_SIGNAL( clicked()), this, TQT_SLOT( slotEnableChecked())); + connect( mKillCheck, TQT_SIGNAL( clicked()), this, TQT_SLOT( slotKillChecked())); + connect( mListBox, TQT_SIGNAL( selectionChanged ()),this, TQT_SLOT( slotItemSelected())); /* * Whats this items */ - QWhatsThis::add( mEnableCheck, i18n("Enable or disable AdBlocK filters. When enabled a set of expressions " + TQWhatsThis::add( mEnableCheck, i18n("Enable or disable AdBlocK filters. When enabled a set of expressions " "to be blocked should be defined in the filter list for blocking to " "take effect.")); - QWhatsThis::add( mKillCheck, i18n("When enabled blocked images will be removed from the page completely " + TQWhatsThis::add( mKillCheck, i18n("When enabled blocked images will be removed from the page completely " "otherwise a placeholder 'blocked' image will be used.")); - QWhatsThis::add( mListBox, i18n("This is the list of URL filters that will be applied to all linked " + TQWhatsThis::add( mListBox, i18n("This is the list of URL filters that will be applied to all linked " "images and frames. The filters are processed in order so place " "more generic filters towards the top of the list.")); - QWhatsThis::add( mString, i18n("Enter an expression to filter. Expressions can be defined as either " + TQWhatsThis::add( mString, i18n("Enter an expression to filter. Expressions can be defined as either " "a filename style wildcard e.g. http://www.site.com/ads* or as a full " "regular expression by surrounding the string with '/' e.g. " " //(ad|banner)\\./")); @@ -154,15 +154,15 @@ void KCMFilter::updateButton() void KCMFilter::importFilters() { - QString inFile = KFileDialog::getOpenFileName(); + TQString inFile = KFileDialog::getOpenFileName(); if (inFile.length() > 0) { - QFile f(inFile); + TQFile f(inFile); if ( f.open( IO_ReadOnly ) ) { - QTextStream ts( &f ); - QStringList paths; - QString line; + TQTextStream ts( &f ); + TQStringList paths; + TQString line; while (!ts.atEnd()) { line = ts.readLine(); @@ -175,14 +175,14 @@ void KCMFilter::importFilters() { if (line.length()>2 && line[0]=='/' && line[line.length()-1] == '/') { - QString inside = line.mid(1, line.length()-2); - QRegExp rx(inside); + TQString inside = line.mid(1, line.length()-2); + TQRegExp rx(inside); if (!rx.isValid()) continue; } else { - QRegExp rx(line); + TQRegExp rx(line); rx.setWildcard(true); if (!rx.isValid()) continue; @@ -202,14 +202,14 @@ void KCMFilter::importFilters() void KCMFilter::exportFilters() { - QString outFile = KFileDialog::getSaveFileName(); + TQString outFile = KFileDialog::getSaveFileName(); if (outFile.length() > 0) { - QFile f(outFile); + TQFile f(outFile); if ( f.open( IO_WriteOnly ) ) { - QTextStream ts( &f ); - ts.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream ts( &f ); + ts.setEncoding( TQTextStream::UnicodeUTF8 ); ts << "[AdBlock]" << endl; uint i; @@ -237,13 +237,13 @@ void KCMFilter::save() uint i; for( i = 0; i < mListBox->count(); ++i ) { - QString key = "Filter-" + QString::number(i); + TQString key = "Filter-" + TQString::number(i); mConfig->writeEntry(key, mListBox->text(i)); } mConfig->writeEntry("Count",mListBox->count()); mConfig->sync(); - DCOPClient::mainClient()->send("konqueror*","KonquerorIface","reparseConfiguration()",QByteArray()); + DCOPClient::mainClient()->send("konqueror*","KonquerorIface","reparseConfiguration()",TQByteArray()); } void KCMFilter::load() @@ -253,7 +253,7 @@ void KCMFilter::load() void KCMFilter::load( bool useDefaults ) { - QStringList paths; + TQStringList paths; mConfig->setReadDefaults( useDefaults ); @@ -261,12 +261,12 @@ void KCMFilter::load( bool useDefaults ) mEnableCheck->setChecked( mConfig->readBoolEntry("Enabled",false)); mKillCheck->setChecked( mConfig->readBoolEntry("Shrink",false)); - QMap<QString,QString> entryMap = mConfig->entryMap( mGroupname ); - QMap<QString,QString>::ConstIterator it; + TQMap<TQString,TQString> entryMap = mConfig->entryMap( mGroupname ); + TQMap<TQString,TQString>::ConstIterator it; int num = mConfig->readNumEntry("Count",0); for (int i=0; i<num; ++i) { - QString key = "Filter-" + QString::number(i); + TQString key = "Filter-" + TQString::number(i); it = entryMap.find(key); if (it != entryMap.end()) paths.append(it.data()); @@ -319,7 +319,7 @@ void KCMFilter::updateFilter() updateButton(); } -QString KCMFilter::quickHelp() const +TQString KCMFilter::quickHelp() const { return i18n("<h1>Konqueror AdBlocK</h1> Konqueror AdBlocK allows you to create a list of filters" " that are checked against linked images and frames. URL's that match are either discarded or" diff --git a/kcontrol/konqhtml/filteropts.h b/kcontrol/konqhtml/filteropts.h index 28fcaa652..6957bedc4 100644 --- a/kcontrol/konqhtml/filteropts.h +++ b/kcontrol/konqhtml/filteropts.h @@ -32,14 +32,14 @@ class KCMFilter : public KCModule { Q_OBJECT public: - KCMFilter( KConfig* config, QString group, QWidget* parent = 0, const char* name = 0 ); + KCMFilter( KConfig* config, TQString group, TQWidget* parent = 0, const char* name = 0 ); ~KCMFilter(); void load(); void load( bool useDefaults ); void save(); void defaults(); - QString quickHelp() const; + TQString quickHelp() const; public slots: @@ -56,18 +56,18 @@ protected slots: private: void updateButton(); - QListBox *mListBox; - QLineEdit *mString; - QCheckBox *mEnableCheck; - QCheckBox *mKillCheck; - QPushButton *mInsertButton; - QPushButton *mUpdateButton; - QPushButton *mRemoveButton; - QPushButton *mImportButton; - QPushButton *mExportButton; + TQListBox *mListBox; + TQLineEdit *mString; + TQCheckBox *mEnableCheck; + TQCheckBox *mKillCheck; + TQPushButton *mInsertButton; + TQPushButton *mUpdateButton; + TQPushButton *mRemoveButton; + TQPushButton *mImportButton; + TQPushButton *mExportButton; KConfig *mConfig; - QString mGroupname; + TQString mGroupname; int mSelCount; }; diff --git a/kcontrol/konqhtml/htmlopts.cpp b/kcontrol/konqhtml/htmlopts.cpp index 44738e293..3cca58732 100644 --- a/kcontrol/konqhtml/htmlopts.cpp +++ b/kcontrol/konqhtml/htmlopts.cpp @@ -5,11 +5,11 @@ // (c) David Faure 1998 // (c) 2001 Waldo Bastian <bastian@kde.org> -#include <qlayout.h>//CT - 12Nov1998 -#include <qwhatsthis.h> -#include <qvgroupbox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqlayout.h>//CT - 12Nov1998 +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include "htmlopts.h" #include "advancedTabDialog.h" @@ -31,11 +31,11 @@ enum UnderlineLinkType { UnderlineAlways=0, UnderlineNever=1, UnderlineHover=2 } enum AnimationsType { AnimationsAlways=0, AnimationsNever=1, AnimationsLoopOnce=2 }; //----------------------------------------------------------------------------- -KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, QString group, QWidget *parent, const char *) +KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, TQString group, TQWidget *parent, const char *) : KCModule( parent, "kcmkonqhtml" ), m_pConfig(config), m_groupname(group) { int row = 0; - QGridLayout *lay = new QGridLayout(this, 10, 2, 0, KDialog::spacingHint()); + TQGridLayout *lay = new TQGridLayout(this, 10, 2, 0, KDialog::spacingHint()); // Bookmarks setQuickHelp( i18n("<h1>Konqueror Browser</h1> Here you can configure Konqueror's browser " @@ -46,105 +46,105 @@ KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, QString group, QWidget *pare "the web pages it loads. It is usually not necessary to " "change anything here.")); - QVGroupBox *bgBookmarks = new QVGroupBox( i18n("Boo&kmarks"), this ); - m_pAdvancedAddBookmarkCheckBox = new QCheckBox(i18n( "Ask for name and folder when adding bookmarks" ), bgBookmarks); - QWhatsThis::add( m_pAdvancedAddBookmarkCheckBox, i18n( "If this box is checked, Konqueror will allow you to" + TQVGroupBox *bgBookmarks = new TQVGroupBox( i18n("Boo&kmarks"), this ); + m_pAdvancedAddBookmarkCheckBox = new TQCheckBox(i18n( "Ask for name and folder when adding bookmarks" ), bgBookmarks); + TQWhatsThis::add( m_pAdvancedAddBookmarkCheckBox, i18n( "If this box is checked, Konqueror will allow you to" " change the title of the bookmark and choose a folder in which to store it when you add a new bookmark." ) ); - connect(m_pAdvancedAddBookmarkCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_pAdvancedAddBookmarkCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); - m_pOnlyMarkedBookmarksCheckBox = new QCheckBox(i18n( "Show only marked bookmarks in bookmark toolbar" ), bgBookmarks); - QWhatsThis::add( m_pOnlyMarkedBookmarksCheckBox, i18n( "If this box is checked, Konqueror will show only those" + m_pOnlyMarkedBookmarksCheckBox = new TQCheckBox(i18n( "Show only marked bookmarks in bookmark toolbar" ), bgBookmarks); + TQWhatsThis::add( m_pOnlyMarkedBookmarksCheckBox, i18n( "If this box is checked, Konqueror will show only those" " bookmarks in the bookmark toolbar which you have marked to do so in the bookmark editor." ) ); - connect(m_pOnlyMarkedBookmarksCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_pOnlyMarkedBookmarksCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); lay->addMultiCellWidget( bgBookmarks, row, row, 0, 1 ); row++; // Form completion - QVGroupBox *bgForm = new QVGroupBox( i18n("Form Com&pletion"), this ); - m_pFormCompletionCheckBox = new QCheckBox(i18n( "Enable completion of &forms" ), bgForm); - QWhatsThis::add( m_pFormCompletionCheckBox, i18n( "If this box is checked, Konqueror will remember" + TQVGroupBox *bgForm = new TQVGroupBox( i18n("Form Com&pletion"), this ); + m_pFormCompletionCheckBox = new TQCheckBox(i18n( "Enable completion of &forms" ), bgForm); + TQWhatsThis::add( m_pFormCompletionCheckBox, i18n( "If this box is checked, Konqueror will remember" " the data you enter in web forms and suggest it in similar fields for all forms." ) ); - connect(m_pFormCompletionCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_pFormCompletionCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); m_pMaxFormCompletionItems = new KIntNumInput( bgForm ); m_pMaxFormCompletionItems->setLabel( i18n( "&Maximum completions:" ) ); m_pMaxFormCompletionItems->setRange( 0, 100 ); - QWhatsThis::add( m_pMaxFormCompletionItems, + TQWhatsThis::add( m_pMaxFormCompletionItems, i18n( "Here you can select how many values Konqueror will remember for a form field." ) ); - connect(m_pMaxFormCompletionItems, SIGNAL(valueChanged(int)), SLOT(slotChanged())); + connect(m_pMaxFormCompletionItems, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged())); lay->addMultiCellWidget( bgForm, row, row, 0, 1 ); row++; // Tabbed Browsing - QGroupBox *bgTabbedBrowsing = new QGroupBox( 0, Qt::Vertical, i18n("Tabbed Browsing"), this ); - QVBoxLayout *laygroup = new QVBoxLayout(bgTabbedBrowsing->layout(), KDialog::spacingHint() ); + TQGroupBox *bgTabbedBrowsing = new TQGroupBox( 0, Qt::Vertical, i18n("Tabbed Browsing"), this ); + TQVBoxLayout *laygroup = new TQVBoxLayout(bgTabbedBrowsing->layout(), KDialog::spacingHint() ); - m_pShowMMBInTabs = new QCheckBox( i18n( "Open &links in new tab instead of in new window" ), bgTabbedBrowsing ); - QWhatsThis::add( m_pShowMMBInTabs, i18n("This will open a new tab instead of a new window in various situations, " + m_pShowMMBInTabs = new TQCheckBox( i18n( "Open &links in new tab instead of in new window" ), bgTabbedBrowsing ); + TQWhatsThis::add( m_pShowMMBInTabs, i18n("This will open a new tab instead of a new window in various situations, " "such as choosing a link or a folder with the middle mouse button.") ); - connect(m_pShowMMBInTabs, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_pShowMMBInTabs, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); laygroup->addWidget(m_pShowMMBInTabs); - m_pDynamicTabbarHide = new QCheckBox( i18n( "Hide the tab bar when only one tab is open" ), bgTabbedBrowsing ); - QWhatsThis::add( m_pDynamicTabbarHide, i18n("This will display the tab bar only if there are two or more tabs. Otherwise it will always be displayed.") ); - connect(m_pDynamicTabbarHide, SIGNAL(clicked()), SLOT(slotChanged())); + m_pDynamicTabbarHide = new TQCheckBox( i18n( "Hide the tab bar when only one tab is open" ), bgTabbedBrowsing ); + TQWhatsThis::add( m_pDynamicTabbarHide, i18n("This will display the tab bar only if there are two or more tabs. Otherwise it will always be displayed.") ); + connect(m_pDynamicTabbarHide, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); laygroup->addWidget(m_pDynamicTabbarHide); - QHBoxLayout *laytab = new QHBoxLayout(laygroup, KDialog::spacingHint()); - QPushButton *advancedTabButton = new QPushButton( i18n( "Advanced Options"), bgTabbedBrowsing ); + TQHBoxLayout *laytab = new TQHBoxLayout(laygroup, KDialog::spacingHint()); + TQPushButton *advancedTabButton = new TQPushButton( i18n( "Advanced Options"), bgTabbedBrowsing ); laytab->addWidget(advancedTabButton); laytab->addStretch(); - connect(advancedTabButton, SIGNAL(clicked()), this, SLOT(launchAdvancedTabDialog())); + connect(advancedTabButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(launchAdvancedTabDialog())); lay->addMultiCellWidget( bgTabbedBrowsing, row, row, 0, 1 ); row++; // Mouse behavior - QVGroupBox *bgMouse = new QVGroupBox( i18n("Mouse Beha&vior"), this ); + TQVGroupBox *bgMouse = new TQVGroupBox( i18n("Mouse Beha&vior"), this ); - m_cbCursor = new QCheckBox(i18n("Chan&ge cursor over links"), bgMouse ); - QWhatsThis::add( m_cbCursor, i18n("If this option is set, the shape of the cursor will change " + m_cbCursor = new TQCheckBox(i18n("Chan&ge cursor over links"), bgMouse ); + TQWhatsThis::add( m_cbCursor, i18n("If this option is set, the shape of the cursor will change " "(usually to a hand) if it is moved over a hyperlink.") ); - connect(m_cbCursor, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_cbCursor, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); - m_pOpenMiddleClick = new QCheckBox( i18n ("M&iddle click opens URL in selection" ), bgMouse ); - QWhatsThis::add( m_pOpenMiddleClick, i18n ( + m_pOpenMiddleClick = new TQCheckBox( i18n ("M&iddle click opens URL in selection" ), bgMouse ); + TQWhatsThis::add( m_pOpenMiddleClick, i18n ( "If this box is checked, you can open the URL in the selection by middle clicking on a " "Konqueror view." ) ); - connect(m_pOpenMiddleClick, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_pOpenMiddleClick, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); - m_pBackRightClick = new QCheckBox( i18n( "Right click goes &back in history" ), bgMouse ); - QWhatsThis::add( m_pBackRightClick, i18n( + m_pBackRightClick = new TQCheckBox( i18n( "Right click goes &back in history" ), bgMouse ); + TQWhatsThis::add( m_pBackRightClick, i18n( "If this box is checked, you can go back in history by right clicking on a Konqueror view. " "To access the context menu, press the right mouse button and move." ) ); - connect(m_pBackRightClick, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_pBackRightClick, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); lay->addMultiCellWidget( bgMouse, row, row, 0, 1 ); row++; // Misc - m_pAutoLoadImagesCheckBox = new QCheckBox( i18n( "A&utomatically load images"), this ); - QWhatsThis::add( m_pAutoLoadImagesCheckBox, i18n( "If this box is checked, Konqueror will automatically load any images that are embedded in a web page. Otherwise, it will display placeholders for the images, and you can then manually load the images by clicking on the image button.<br>Unless you have a very slow network connection, you will probably want to check this box to enhance your browsing experience." ) ); - connect(m_pAutoLoadImagesCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); + m_pAutoLoadImagesCheckBox = new TQCheckBox( i18n( "A&utomatically load images"), this ); + TQWhatsThis::add( m_pAutoLoadImagesCheckBox, i18n( "If this box is checked, Konqueror will automatically load any images that are embedded in a web page. Otherwise, it will display placeholders for the images, and you can then manually load the images by clicking on the image button.<br>Unless you have a very slow network connection, you will probably want to check this box to enhance your browsing experience." ) ); + connect(m_pAutoLoadImagesCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); lay->addMultiCellWidget( m_pAutoLoadImagesCheckBox, row, row, 0, 1 ); row++; - m_pUnfinishedImageFrameCheckBox = new QCheckBox( i18n( "Dra&w frame around not completely loaded images"), this ); - QWhatsThis::add( m_pUnfinishedImageFrameCheckBox, i18n( "If this box is checked, Konqueror will draw a frame as placeholder around not yet fully loaded images that are embedded in a web page.<br>Especially if you have a slow network connection, you will probably want to check this box to enhance your browsing experience." ) ); - connect(m_pUnfinishedImageFrameCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); + m_pUnfinishedImageFrameCheckBox = new TQCheckBox( i18n( "Dra&w frame around not completely loaded images"), this ); + TQWhatsThis::add( m_pUnfinishedImageFrameCheckBox, i18n( "If this box is checked, Konqueror will draw a frame as placeholder around not yet fully loaded images that are embedded in a web page.<br>Especially if you have a slow network connection, you will probably want to check this box to enhance your browsing experience." ) ); + connect(m_pUnfinishedImageFrameCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); lay->addMultiCellWidget( m_pUnfinishedImageFrameCheckBox, row, row, 0, 1 ); row++; - m_pAutoRedirectCheckBox = new QCheckBox( i18n( "Allow automatic delayed &reloading/redirecting"), this ); - QWhatsThis::add( m_pAutoRedirectCheckBox, + m_pAutoRedirectCheckBox = new TQCheckBox( i18n( "Allow automatic delayed &reloading/redirecting"), this ); + TQWhatsThis::add( m_pAutoRedirectCheckBox, i18n( "Some web pages request an automatic reload or redirection after a certain period of time. By unchecking this box Konqueror will ignore these requests." ) ); - connect(m_pAutoRedirectCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); + connect(m_pAutoRedirectCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); lay->addMultiCellWidget( m_pAutoRedirectCheckBox, row, row, 0, 1 ); row++; @@ -155,8 +155,8 @@ KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, QString group, QWidget *pare lay->addMultiCellWidget(sep, row, row, 0, 1); row++; - QLabel *label = new QLabel( i18n("Und&erline links:"), this); - m_pUnderlineCombo = new QComboBox( false, this ); + TQLabel *label = new TQLabel( i18n("Und&erline links:"), this); + m_pUnderlineCombo = new TQComboBox( false, this ); label->setBuddy(m_pUnderlineCombo); m_pUnderlineCombo->insertItem(i18n("underline","Enabled"), UnderlineAlways); m_pUnderlineCombo->insertItem(i18n("underline","Disabled"), UnderlineNever); @@ -164,19 +164,19 @@ KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, QString group, QWidget *pare lay->addWidget(label, row, 0); lay->addWidget(m_pUnderlineCombo, row, 1); row++; - QString whatsThis = i18n("Controls how Konqueror handles underlining hyperlinks:<br>" + TQString whatsThis = i18n("Controls how Konqueror handles underlining hyperlinks:<br>" "<ul><li><b>Enabled</b>: Always underline links</li>" "<li><b>Disabled</b>: Never underline links</li>" "<li><b>Only on Hover</b>: Underline when the mouse is moved over the link</li>" "</ul><br><i>Note: The site's CSS definitions can override this value</i>"); - QWhatsThis::add( label, whatsThis); - QWhatsThis::add( m_pUnderlineCombo, whatsThis); - connect(m_pUnderlineCombo, SIGNAL(activated(int)), SLOT(slotChanged())); + TQWhatsThis::add( label, whatsThis); + TQWhatsThis::add( m_pUnderlineCombo, whatsThis); + connect(m_pUnderlineCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged())); - label = new QLabel( i18n("A&nimations:"), this); - m_pAnimationsCombo = new QComboBox( false, this ); + label = new TQLabel( i18n("A&nimations:"), this); + m_pAnimationsCombo = new TQComboBox( false, this ); label->setBuddy(m_pAnimationsCombo); m_pAnimationsCombo->insertItem(i18n("animations","Enabled"), AnimationsAlways); m_pAnimationsCombo->insertItem(i18n("animations","Disabled"), AnimationsNever); @@ -188,9 +188,9 @@ KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, QString group, QWidget *pare "<ul><li><b>Enabled</b>: Show all animations completely.</li>" "<li><b>Disabled</b>: Never show animations, show the start image only.</li>" "<li><b>Show only once</b>: Show all animations completely but do not repeat them.</li>"); - QWhatsThis::add( label, whatsThis); - QWhatsThis::add( m_pAnimationsCombo, whatsThis); - connect(m_pAnimationsCombo, SIGNAL(activated(int)), SLOT(slotChanged())); + TQWhatsThis::add( label, whatsThis); + TQWhatsThis::add( m_pAnimationsCombo, whatsThis); + connect(m_pAnimationsCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged())); lay->setRowStretch(row, 1); @@ -229,7 +229,7 @@ void KMiscHTMLOptions::load( bool useDefaults ) bool hoverLinks = READ_BOOL("HoverLinks", true); bool bAutoLoadImages = READ_BOOL( "AutoLoadImages", true ); bool bUnfinishedImageFrame = READ_BOOL( "UnfinishedImageFrame", true ); - QString strAnimations = READ_ENTRY( "ShowAnimations" ).lower(); + TQString strAnimations = READ_ENTRY( "ShowAnimations" ).lower(); bool bAutoRedirect = m_pConfig->readBoolEntry( "AutoDelayedActions", true ); @@ -340,7 +340,7 @@ void KMiscHTMLOptions::save() config.writeEntry("FilteredToolbar", m_pOnlyMarkedBookmarksCheckBox->isChecked()); config.sync(); - QByteArray data; + TQByteArray data; if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); diff --git a/kcontrol/konqhtml/htmlopts.h b/kcontrol/konqhtml/htmlopts.h index 15f5a2511..823e245c9 100644 --- a/kcontrol/konqhtml/htmlopts.h +++ b/kcontrol/konqhtml/htmlopts.h @@ -8,10 +8,10 @@ #ifndef __KMISCHTML_OPTIONS_H #define __KMISCHTML_OPTIONS_H -#include <qstrlist.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qcombobox.h> +#include <tqstrlist.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqcombobox.h> //----------------------------------------------------------------------------- @@ -23,7 +23,7 @@ // ... there is room for others :)) -#include <qstring.h> +#include <tqstring.h> #include <kconfig.h> #include <kcmodule.h> class QRadioButton; @@ -34,7 +34,7 @@ class KMiscHTMLOptions : public KCModule Q_OBJECT public: - KMiscHTMLOptions(KConfig *config, QString group, QWidget *parent = 0L, const char *name = 0L ); + KMiscHTMLOptions(KConfig *config, TQString group, TQWidget *parent = 0L, const char *name = 0L ); ~KMiscHTMLOptions(); virtual void load(); virtual void load( bool useDefaults ); @@ -47,21 +47,21 @@ private slots: private: KConfig* m_pConfig; - QString m_groupname; + TQString m_groupname; - QComboBox* m_pUnderlineCombo; - QComboBox* m_pAnimationsCombo; - QCheckBox* m_cbCursor; - QCheckBox* m_pAutoLoadImagesCheckBox; - QCheckBox* m_pUnfinishedImageFrameCheckBox; - QCheckBox* m_pAutoRedirectCheckBox; - QCheckBox* m_pOpenMiddleClick; - QCheckBox* m_pBackRightClick; - QCheckBox* m_pShowMMBInTabs; - QCheckBox* m_pFormCompletionCheckBox; - QCheckBox* m_pDynamicTabbarHide; - QCheckBox* m_pAdvancedAddBookmarkCheckBox; - QCheckBox* m_pOnlyMarkedBookmarksCheckBox; + TQComboBox* m_pUnderlineCombo; + TQComboBox* m_pAnimationsCombo; + TQCheckBox* m_cbCursor; + TQCheckBox* m_pAutoLoadImagesCheckBox; + TQCheckBox* m_pUnfinishedImageFrameCheckBox; + TQCheckBox* m_pAutoRedirectCheckBox; + TQCheckBox* m_pOpenMiddleClick; + TQCheckBox* m_pBackRightClick; + TQCheckBox* m_pShowMMBInTabs; + TQCheckBox* m_pFormCompletionCheckBox; + TQCheckBox* m_pDynamicTabbarHide; + TQCheckBox* m_pAdvancedAddBookmarkCheckBox; + TQCheckBox* m_pOnlyMarkedBookmarksCheckBox; KIntNumInput* m_pMaxFormCompletionItems; }; diff --git a/kcontrol/konqhtml/javaopts.cpp b/kcontrol/konqhtml/javaopts.cpp index 3cb538a9f..af168ed1f 100644 --- a/kcontrol/konqhtml/javaopts.cpp +++ b/kcontrol/konqhtml/javaopts.cpp @@ -20,10 +20,10 @@ #include <khtml_settings.h> #include <knuminput.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qvgroupbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> +#include <tqlabel.h> #include "htmlopts.h" #include "policydlg.h" @@ -31,13 +31,13 @@ // == class JavaPolicies ===== -JavaPolicies::JavaPolicies(KConfig* config, const QString &group, bool global, - const QString &domain) : +JavaPolicies::JavaPolicies(KConfig* config, const TQString &group, bool global, + const TQString &domain) : Policies(config,group,global,domain,"java.","EnableJava") { } -JavaPolicies::JavaPolicies() : Policies(0,QString::null,false, - QString::null,QString::null,QString::null) { +JavaPolicies::JavaPolicies() : Policies(0,TQString::null,false, + TQString::null,TQString::null,TQString::null) { } JavaPolicies::~JavaPolicies() { @@ -45,8 +45,8 @@ JavaPolicies::~JavaPolicies() { // == class KJavaOptions ===== -KJavaOptions::KJavaOptions( KConfig* config, QString group, - QWidget *parent, const char *name ) +KJavaOptions::KJavaOptions( KConfig* config, TQString group, + TQWidget *parent, const char *name ) : KCModule( parent, name ), _removeJavaScriptDomainAdvice(false), m_pConfig( config ), @@ -54,90 +54,90 @@ KJavaOptions::KJavaOptions( KConfig* config, QString group, java_global_policies(config,group,true), _removeJavaDomainSettings(false) { - QVBoxLayout* toplevel = new QVBoxLayout( this, 10, 5 ); + TQVBoxLayout* toplevel = new TQVBoxLayout( this, 10, 5 ); /*************************************************************************** ********************* Global Settings ************************************* **************************************************************************/ - QVGroupBox* globalGB = new QVGroupBox( i18n( "Global Settings" ), this ); + TQVGroupBox* globalGB = new TQVGroupBox( i18n( "Global Settings" ), this ); toplevel->addWidget( globalGB ); - enableJavaGloballyCB = new QCheckBox( i18n( "Enable Ja&va globally" ), globalGB ); - connect( enableJavaGloballyCB, SIGNAL( clicked() ), this, SLOT( slotChanged() ) ); - connect( enableJavaGloballyCB, SIGNAL( clicked() ), this, SLOT( toggleJavaControls() ) ); + enableJavaGloballyCB = new TQCheckBox( i18n( "Enable Ja&va globally" ), globalGB ); + connect( enableJavaGloballyCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChanged() ) ); + connect( enableJavaGloballyCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( toggleJavaControls() ) ); /*************************************************************************** ***************** Domain Specific Settings ******************************** **************************************************************************/ domainSpecific = new JavaDomainListView(m_pConfig,m_groupname,this,this); - connect(domainSpecific,SIGNAL(changed(bool)),SLOT(slotChanged())); + connect(domainSpecific,TQT_SIGNAL(changed(bool)),TQT_SLOT(slotChanged())); toplevel->addWidget( domainSpecific, 2 ); /*************************************************************************** ***************** Java Runtime Settings *********************************** **************************************************************************/ - QVGroupBox* javartGB = new QVGroupBox( i18n( "Java Runtime Settings" ), this ); + TQVGroupBox* javartGB = new TQVGroupBox( i18n( "Java Runtime Settings" ), this ); toplevel->addWidget( javartGB ); - QWidget* checkboxes = new QWidget( javartGB ); - QGridLayout* grid = new QGridLayout( checkboxes, 2, 2 ); + TQWidget* checkboxes = new TQWidget( javartGB ); + TQGridLayout* grid = new TQGridLayout( checkboxes, 2, 2 ); - javaSecurityManagerCB = new QCheckBox( i18n("&Use security manager" ), checkboxes ); + javaSecurityManagerCB = new TQCheckBox( i18n("&Use security manager" ), checkboxes ); grid->addWidget( javaSecurityManagerCB, 0, 0 ); - connect( javaSecurityManagerCB, SIGNAL(toggled( bool )), this, SLOT(slotChanged()) ); + connect( javaSecurityManagerCB, TQT_SIGNAL(toggled( bool )), this, TQT_SLOT(slotChanged()) ); - useKioCB = new QCheckBox( i18n("Use &KIO"), checkboxes ); + useKioCB = new TQCheckBox( i18n("Use &KIO"), checkboxes ); grid->addWidget( useKioCB, 0, 1 ); - connect( useKioCB, SIGNAL(toggled( bool )), this, SLOT(slotChanged()) ); + connect( useKioCB, TQT_SIGNAL(toggled( bool )), this, TQT_SLOT(slotChanged()) ); - enableShutdownCB = new QCheckBox( i18n("Shu&tdown applet server when inactive"), checkboxes ); + enableShutdownCB = new TQCheckBox( i18n("Shu&tdown applet server when inactive"), checkboxes ); grid->addWidget( enableShutdownCB, 1, 0 ); - connect( enableShutdownCB, SIGNAL(toggled( bool )), this, SLOT(slotChanged()) ); - connect( enableShutdownCB, SIGNAL(clicked()), this, SLOT(toggleJavaControls()) ); + connect( enableShutdownCB, TQT_SIGNAL(toggled( bool )), this, TQT_SLOT(slotChanged()) ); + connect( enableShutdownCB, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleJavaControls()) ); - QHBox* secondsHB = new QHBox( javartGB ); + TQHBox* secondsHB = new TQHBox( javartGB ); serverTimeoutSB = new KIntNumInput( secondsHB ); serverTimeoutSB->setRange( 0, 1000, 5 ); serverTimeoutSB->setLabel( i18n("App&let server timeout:"), AlignLeft ); serverTimeoutSB->setSuffix(i18n(" sec")); - connect(serverTimeoutSB, SIGNAL(valueChanged(int)),this,SLOT(slotChanged())); + connect(serverTimeoutSB, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(slotChanged())); - QHBox* pathHB = new QHBox( javartGB ); + TQHBox* pathHB = new TQHBox( javartGB ); pathHB->setSpacing( 10 ); - QLabel* pathLA = new QLabel( i18n( "&Path to Java executable, or 'java':" ), + TQLabel* pathLA = new TQLabel( i18n( "&Path to Java executable, or 'java':" ), pathHB ); pathED = new KURLRequester( pathHB ); - connect( pathED, SIGNAL(textChanged( const QString& )), this, SLOT(slotChanged()) ); + connect( pathED, TQT_SIGNAL(textChanged( const TQString& )), this, TQT_SLOT(slotChanged()) ); pathLA->setBuddy( pathED ); - QHBox* addArgHB = new QHBox( javartGB ); + TQHBox* addArgHB = new TQHBox( javartGB ); addArgHB->setSpacing( 10 ); - QLabel* addArgLA = new QLabel( i18n( "Additional Java a&rguments:" ), addArgHB ); - addArgED = new QLineEdit( addArgHB ); - connect( addArgED, SIGNAL(textChanged( const QString& )), this, SLOT(slotChanged()) ); + TQLabel* addArgLA = new TQLabel( i18n( "Additional Java a&rguments:" ), addArgHB ); + addArgED = new TQLineEdit( addArgHB ); + connect( addArgED, TQT_SIGNAL(textChanged( const TQString& )), this, TQT_SLOT(slotChanged()) ); addArgLA->setBuddy( addArgED ); /*************************************************************************** ********************** WhatsThis? items *********************************** **************************************************************************/ - QWhatsThis::add( enableJavaGloballyCB, i18n("Enables the execution of scripts written in Java " + TQWhatsThis::add( enableJavaGloballyCB, i18n("Enables the execution of scripts written in Java " "that can be contained in HTML pages. " "Note that, as with any browser, enabling active contents can be a security problem.") ); - QString wtstr = i18n("This box contains the domains and hosts you have set " + TQString wtstr = i18n("This box contains the domains and hosts you have set " "a specific Java policy for. This policy will be used " "instead of the default policy for enabling or disabling Java applets on pages sent by these " "domains or hosts. <p>Select a policy and use the controls on " "the right to modify it."); - QWhatsThis::add( domainSpecific->listView(), wtstr ); + TQWhatsThis::add( domainSpecific->listView(), wtstr ); #if 0 - QWhatsThis::add( domainSpecific->importButton(), i18n("Click this button to choose the file that contains " + TQWhatsThis::add( domainSpecific->importButton(), i18n("Click this button to choose the file that contains " "the Java policies. These policies will be merged " "with the existing ones. Duplicate entries are ignored.") ); - QWhatsThis::add( domainSpecific->exportButton(), i18n("Click this button to save the Java policy to a zipped " + TQWhatsThis::add( domainSpecific->exportButton(), i18n("Click this button to save the Java policy to a zipped " "file. The file, named <b>java_policy.tgz</b>, will be " "saved to a location of your choice." ) ); #endif - QWhatsThis::add( domainSpecific, i18n("Here you can set specific Java policies for any particular " + TQWhatsThis::add( domainSpecific, i18n("Here you can set specific Java policies for any particular " "host or domain. To add a new policy, simply click the <i>New...</i> " "button and supply the necessary information requested by the " "dialog box. To change an existing policy, click on the <i>Change...</i> " @@ -150,7 +150,7 @@ KJavaOptions::KJavaOptions( KConfig* config, QString group, "you to save and retrieve them from a zipped file.") ); #endif - QWhatsThis::add( javaSecurityManagerCB, i18n( "Enabling the security manager will cause the jvm to run with a Security " + TQWhatsThis::add( javaSecurityManagerCB, i18n( "Enabling the security manager will cause the jvm to run with a Security " "Manager in place. This will keep applets from being able to read and " "write to your file system, creating arbitrary sockets, and other actions " "which could be used to compromise your system. Disable this option at your " @@ -158,23 +158,23 @@ KJavaOptions::KJavaOptions( KConfig* config, QString group, "policytool utility to give code downloaded from certain sites more " "permissions." ) ); - QWhatsThis::add( useKioCB, i18n( "Enabling this will cause the jvm to use KIO for network transport ") ); + TQWhatsThis::add( useKioCB, i18n( "Enabling this will cause the jvm to use KIO for network transport ") ); - QWhatsThis::add( pathED, i18n("Enter the path to the java executable. If you want to use the jre in " + TQWhatsThis::add( pathED, i18n("Enter the path to the java executable. If you want to use the jre in " "your path, simply leave it as 'java'. If you need to use a different jre, " "enter the path to the java executable (e.g. /usr/lib/jdk/bin/java), " "or the path to the directory that contains 'bin/java' (e.g. /opt/IBMJava2-13).") ); - QWhatsThis::add( addArgED, i18n("If you want special arguments to be passed to the virtual machine, enter them here.") ); + TQWhatsThis::add( addArgED, i18n("If you want special arguments to be passed to the virtual machine, enter them here.") ); - QString shutdown = i18n("When all the applets have been destroyed, the applet server should shut down. " + TQString shutdown = i18n("When all the applets have been destroyed, the applet server should shut down. " "However, starting the jvm takes a lot of time. If you would like to " "keep the java process running while you are " "browsing, you can set the timeout value to whatever you like. To keep " "the java process running for the whole time that the konqueror process is, " "leave the Shutdown Applet Server checkbox unchecked."); - QWhatsThis::add( serverTimeoutSB, shutdown); - QWhatsThis::add( enableShutdownCB, shutdown); + TQWhatsThis::add( serverTimeoutSB, shutdown); + TQWhatsThis::add( enableShutdownCB, shutdown); // Finally do the loading load(); } @@ -196,9 +196,9 @@ void KJavaOptions::load(bool useDefaults) bool bServerShutdown = m_pConfig->readBoolEntry( "ShutdownAppletServer", true ); int serverTimeout = m_pConfig->readNumEntry( "AppletServerTimeout", 60 ); #if defined(PATH_JAVA) - QString sJavaPath = m_pConfig->readPathEntry( "JavaPath", PATH_JAVA ); + TQString sJavaPath = m_pConfig->readPathEntry( "JavaPath", PATH_JAVA ); #else - QString sJavaPath = m_pConfig->readPathEntry( "JavaPath", "/usr/bin/java" ); + TQString sJavaPath = m_pConfig->readPathEntry( "JavaPath", "/usr/bin/java" ); #endif if( sJavaPath == "/usr/lib/jdk" ) @@ -278,8 +278,8 @@ void KJavaOptions::toggleJavaControls() // == class JavaDomainListView ===== -JavaDomainListView::JavaDomainListView(KConfig *config,const QString &group, - KJavaOptions *options,QWidget *parent,const char *name) +JavaDomainListView::JavaDomainListView(KConfig *config,const TQString &group, + KJavaOptions *options,TQWidget *parent,const char *name) : DomainListView(config,i18n( "Doma&in-Specific" ), parent, name), group(group), options(options) { } @@ -287,20 +287,20 @@ JavaDomainListView::JavaDomainListView(KConfig *config,const QString &group, JavaDomainListView::~JavaDomainListView() { } -void JavaDomainListView::updateDomainListLegacy(const QStringList &domainConfig) +void JavaDomainListView::updateDomainListLegacy(const TQStringList &domainConfig) { domainSpecificLV->clear(); JavaPolicies pol(config,group,false); pol.defaults(); - for ( QStringList::ConstIterator it = domainConfig.begin(); + for ( TQStringList::ConstIterator it = domainConfig.begin(); it != domainConfig.end(); ++it) { - QString domain; + TQString domain; KHTMLSettings::KJavaScriptAdvice javaAdvice; KHTMLSettings::KJavaScriptAdvice javaScriptAdvice; KHTMLSettings::splitDomainAdvice(*it, domain, javaAdvice, javaScriptAdvice); if (javaAdvice != KHTMLSettings::KJavaScriptDunno) { - QListViewItem* index = new QListViewItem( domainSpecificLV, domain, + TQListViewItem* index = new TQListViewItem( domainSpecificLV, domain, i18n(KHTMLSettings::adviceToStr(javaAdvice)) ); pol.setDomain(domain); pol.setFeatureEnabled(javaAdvice != KHTMLSettings::KJavaScriptReject); @@ -311,7 +311,7 @@ void JavaDomainListView::updateDomainListLegacy(const QStringList &domainConfig) void JavaDomainListView::setupPolicyDlg(PushButton trigger,PolicyDialog &pDlg, Policies *pol) { - QString caption; + TQString caption; switch (trigger) { case AddButton: caption = i18n( "New Java Policy" ); pol->setFeatureEnabled(!options->enableJavaGloballyCB->isChecked()); diff --git a/kcontrol/konqhtml/javaopts.h b/kcontrol/konqhtml/javaopts.h index 638b3a921..7e1fd0899 100644 --- a/kcontrol/konqhtml/javaopts.h +++ b/kcontrol/konqhtml/javaopts.h @@ -48,10 +48,10 @@ public: * @param domain name of the domain this instance is used to configure the * policies for (case insensitive, ignored if global == true) */ - JavaPolicies(KConfig* config, const QString &group, bool global, - const QString &domain = QString::null); + JavaPolicies(KConfig* config, const TQString &group, bool global, + const TQString &domain = TQString::null); - /** empty constructur to make QMap happy + /** empty constructur to make TQMap happy * don't use for constructing a policies instance. * @internal */ @@ -65,13 +65,13 @@ public: class JavaDomainListView : public DomainListView { Q_OBJECT public: - JavaDomainListView(KConfig *config,const QString &group,KJavaOptions *opt, - QWidget *parent,const char *name = 0); + JavaDomainListView(KConfig *config,const TQString &group,KJavaOptions *opt, + TQWidget *parent,const char *name = 0); virtual ~JavaDomainListView(); /** remnant for importing pre KDE 3.2 settings */ - void updateDomainListLegacy(const QStringList &domainConfig); + void updateDomainListLegacy(const TQStringList &domainConfig); protected: virtual JavaPolicies *createPolicies(); @@ -80,7 +80,7 @@ protected: Policies *copy); private: - QString group; + TQString group; KJavaOptions *options; }; @@ -89,7 +89,7 @@ class KJavaOptions : public KCModule Q_OBJECT public: - KJavaOptions( KConfig* config, QString group, QWidget* parent = 0, const char* name = 0 ); + KJavaOptions( KConfig* config, TQString group, TQWidget* parent = 0, const char* name = 0 ); virtual void load(); virtual void load( bool useDefaults ); @@ -105,15 +105,15 @@ private slots: private: KConfig* m_pConfig; - QString m_groupname; + TQString m_groupname; JavaPolicies java_global_policies; - QCheckBox* enableJavaGloballyCB; - QCheckBox* javaSecurityManagerCB; - QCheckBox* useKioCB; - QCheckBox* enableShutdownCB; + TQCheckBox* enableJavaGloballyCB; + TQCheckBox* javaSecurityManagerCB; + TQCheckBox* useKioCB; + TQCheckBox* enableShutdownCB; KIntNumInput* serverTimeoutSB; - QLineEdit* addArgED; + TQLineEdit* addArgED; KURLRequester* pathED; bool _removeJavaDomainSettings; diff --git a/kcontrol/konqhtml/jsopts.cpp b/kcontrol/konqhtml/jsopts.cpp index b6522f767..ae73fc686 100644 --- a/kcontrol/konqhtml/jsopts.cpp +++ b/kcontrol/konqhtml/jsopts.cpp @@ -11,9 +11,9 @@ // Big changes to accommodate per-domain settings // (c) Leo Savernik 2002-2003 -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qvgroupbox.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> #include <kconfig.h> #include <klistview.h> #include <kdebug.h> @@ -34,42 +34,42 @@ // == class KJavaScriptOptions ===== -KJavaScriptOptions::KJavaScriptOptions( KConfig* config, QString group, QWidget *parent, +KJavaScriptOptions::KJavaScriptOptions( KConfig* config, TQString group, TQWidget *parent, const char *name ) : KCModule( parent, name ), _removeJavaScriptDomainAdvice(false), m_pConfig( config ), m_groupname( group ), - js_global_policies(config,group,true,QString::null), + js_global_policies(config,group,true,TQString::null), _removeECMADomainSettings(false) { - QVBoxLayout* toplevel = new QVBoxLayout( this, 10, 5 ); + TQVBoxLayout* toplevel = new TQVBoxLayout( this, 10, 5 ); // the global checkbox - QGroupBox* globalGB = new QGroupBox( 2, Vertical, i18n( "Global Settings" ), this ); + TQGroupBox* globalGB = new TQGroupBox( 2, Vertical, i18n( "Global Settings" ), this ); toplevel->addWidget( globalGB ); - enableJavaScriptGloballyCB = new QCheckBox( i18n( "Ena&ble JavaScript globally" ), globalGB ); - QWhatsThis::add( enableJavaScriptGloballyCB, i18n("Enables the execution of scripts written in ECMA-Script " + enableJavaScriptGloballyCB = new TQCheckBox( i18n( "Ena&ble JavaScript globally" ), globalGB ); + TQWhatsThis::add( enableJavaScriptGloballyCB, i18n("Enables the execution of scripts written in ECMA-Script " "(also known as JavaScript) that can be contained in HTML pages. " "Note that, as with any browser, enabling scripting languages can be a security problem.") ); - connect( enableJavaScriptGloballyCB, SIGNAL( clicked() ), SLOT( changed() ) ); - connect( enableJavaScriptGloballyCB, SIGNAL( clicked() ), this, SLOT( slotChangeJSEnabled() ) ); + connect( enableJavaScriptGloballyCB, TQT_SIGNAL( clicked() ), TQT_SLOT( changed() ) ); + connect( enableJavaScriptGloballyCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChangeJSEnabled() ) ); - reportErrorsCB = new QCheckBox( i18n( "Report &errors" ), globalGB ); - QWhatsThis::add( reportErrorsCB, i18n("Enables the reporting of errors that occur when JavaScript " + reportErrorsCB = new TQCheckBox( i18n( "Report &errors" ), globalGB ); + TQWhatsThis::add( reportErrorsCB, i18n("Enables the reporting of errors that occur when JavaScript " "code is executed.") ); - connect( reportErrorsCB, SIGNAL( clicked() ), SLOT( changed() ) ); + connect( reportErrorsCB, TQT_SIGNAL( clicked() ), TQT_SLOT( changed() ) ); - jsDebugWindow = new QCheckBox( i18n( "Enable debu&gger" ), globalGB ); - QWhatsThis::add( jsDebugWindow, i18n( "Enables builtin JavaScript debugger." ) ); - connect( jsDebugWindow, SIGNAL( clicked() ), SLOT( changed() ) ); + jsDebugWindow = new TQCheckBox( i18n( "Enable debu&gger" ), globalGB ); + TQWhatsThis::add( jsDebugWindow, i18n( "Enables builtin JavaScript debugger." ) ); + connect( jsDebugWindow, TQT_SIGNAL( clicked() ), TQT_SLOT( changed() ) ); // the domain-specific listview domainSpecific = new JSDomainListView(m_pConfig,m_groupname,this,this); - connect(domainSpecific,SIGNAL(changed(bool)),SLOT(changed())); + connect(domainSpecific,TQT_SIGNAL(changed(bool)),TQT_SLOT(changed())); toplevel->addWidget( domainSpecific, 2 ); - QWhatsThis::add( domainSpecific, i18n("Here you can set specific JavaScript policies for any particular " + TQWhatsThis::add( domainSpecific, i18n("Here you can set specific JavaScript policies for any particular " "host or domain. To add a new policy, simply click the <i>New...</i> " "button and supply the necessary information requested by the " "dialog box. To change an existing policy, click on the <i>Change...</i> " @@ -79,17 +79,17 @@ KJavaScriptOptions::KJavaScriptOptions( KConfig* config, QString group, QWidget "button allows you to easily share your policies with other people by allowing " "you to save and retrieve them from a zipped file.") ); - QString wtstr = i18n("This box contains the domains and hosts you have set " + TQString wtstr = i18n("This box contains the domains and hosts you have set " "a specific JavaScript policy for. This policy will be used " "instead of the default policy for enabling or disabling JavaScript on pages sent by these " "domains or hosts. <p>Select a policy and use the controls on " "the right to modify it."); - QWhatsThis::add( domainSpecific->listView(), wtstr ); + TQWhatsThis::add( domainSpecific->listView(), wtstr ); - QWhatsThis::add( domainSpecific->importButton(), i18n("Click this button to choose the file that contains " + TQWhatsThis::add( domainSpecific->importButton(), i18n("Click this button to choose the file that contains " "the JavaScript policies. These policies will be merged " "with the existing ones. Duplicate entries are ignored.") ); - QWhatsThis::add( domainSpecific->exportButton(), i18n("Click this button to save the JavaScript policy to a zipped " + TQWhatsThis::add( domainSpecific->exportButton(), i18n("Click this button to save the JavaScript policy to a zipped " "file. The file, named <b>javascript_policy.tgz</b>, will be " "saved to a location of your choice." ) ); @@ -97,7 +97,7 @@ KJavaScriptOptions::KJavaScriptOptions( KConfig* config, QString group, QWidget js_policies_frame = new JSPoliciesFrame(&js_global_policies, i18n("Global JavaScript Policies"),this); toplevel->addWidget(js_policies_frame); - connect(js_policies_frame, SIGNAL(changed()), SLOT(changed())); + connect(js_policies_frame, TQT_SIGNAL(changed()), TQT_SLOT(changed())); // Finally do the loading load(); @@ -165,8 +165,8 @@ void KJavaScriptOptions::slotChangeJSEnabled() { // == class JSDomainListView ===== -JSDomainListView::JSDomainListView(KConfig *config,const QString &group, - KJavaScriptOptions *options, QWidget *parent,const char *name) +JSDomainListView::JSDomainListView(KConfig *config,const TQString &group, + KJavaScriptOptions *options, TQWidget *parent,const char *name) : DomainListView(config,i18n( "Do&main-Specific" ), parent, name), group(group), options(options) { } @@ -174,20 +174,20 @@ JSDomainListView::JSDomainListView(KConfig *config,const QString &group, JSDomainListView::~JSDomainListView() { } -void JSDomainListView::updateDomainListLegacy(const QStringList &domainConfig) +void JSDomainListView::updateDomainListLegacy(const TQStringList &domainConfig) { domainSpecificLV->clear(); JSPolicies pol(config,group,false); pol.defaults(); - for (QStringList::ConstIterator it = domainConfig.begin(); + for (TQStringList::ConstIterator it = domainConfig.begin(); it != domainConfig.end(); ++it) { - QString domain; + TQString domain; KHTMLSettings::KJavaScriptAdvice javaAdvice; KHTMLSettings::KJavaScriptAdvice javaScriptAdvice; KHTMLSettings::splitDomainAdvice(*it, domain, javaAdvice, javaScriptAdvice); if (javaScriptAdvice != KHTMLSettings::KJavaScriptDunno) { - QListViewItem *index = - new QListViewItem( domainSpecificLV, domain, + TQListViewItem *index = + new TQListViewItem( domainSpecificLV, domain, i18n(KHTMLSettings::adviceToStr(javaScriptAdvice)) ); pol.setDomain(domain); @@ -200,7 +200,7 @@ void JSDomainListView::updateDomainListLegacy(const QStringList &domainConfig) void JSDomainListView::setupPolicyDlg(PushButton trigger,PolicyDialog &pDlg, Policies *pol) { JSPolicies *jspol = static_cast<JSPolicies *>(pol); - QString caption; + TQString caption; switch (trigger) { case AddButton: caption = i18n( "New JavaScript Policy" ); diff --git a/kcontrol/konqhtml/jsopts.h b/kcontrol/konqhtml/jsopts.h index 41f5c87fd..01db6508f 100644 --- a/kcontrol/konqhtml/jsopts.h +++ b/kcontrol/konqhtml/jsopts.h @@ -35,13 +35,13 @@ class KJavaScriptOptions; class JSDomainListView : public DomainListView { Q_OBJECT public: - JSDomainListView(KConfig *config,const QString &group,KJavaScriptOptions *opt, - QWidget *parent,const char *name = 0); + JSDomainListView(KConfig *config,const TQString &group,KJavaScriptOptions *opt, + TQWidget *parent,const char *name = 0); virtual ~JSDomainListView(); /** remnant for importing pre KDE 3.2 settings */ - void updateDomainListLegacy(const QStringList &domainConfig); + void updateDomainListLegacy(const TQStringList &domainConfig); protected: virtual JSPolicies *createPolicies(); @@ -50,7 +50,7 @@ protected: Policies *copy); private: - QString group; + TQString group; KJavaScriptOptions *options; }; @@ -58,7 +58,7 @@ class KJavaScriptOptions : public KCModule { Q_OBJECT public: - KJavaScriptOptions( KConfig* config, QString group, QWidget* parent = 0, const char* name = 0 ); + KJavaScriptOptions( KConfig* config, TQString group, TQWidget* parent = 0, const char* name = 0 ); virtual void load(); virtual void load( bool useDefaults ); @@ -73,11 +73,11 @@ private slots: private: KConfig *m_pConfig; - QString m_groupname; + TQString m_groupname; JSPolicies js_global_policies; - QCheckBox *enableJavaScriptGloballyCB; - QCheckBox *reportErrorsCB; - QCheckBox *jsDebugWindow; + TQCheckBox *enableJavaScriptGloballyCB; + TQCheckBox *reportErrorsCB; + TQCheckBox *jsDebugWindow; JSPoliciesFrame *js_policies_frame; bool _removeECMADomainSettings; diff --git a/kcontrol/konqhtml/jspolicies.cpp b/kcontrol/konqhtml/jspolicies.cpp index d4afbbd1d..5196af8dd 100644 --- a/kcontrol/konqhtml/jspolicies.cpp +++ b/kcontrol/konqhtml/jspolicies.cpp @@ -19,11 +19,11 @@ */ -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqwhatsthis.h> #include <kconfig.h> #include <kdebug.h> @@ -33,13 +33,13 @@ // == class JSPolicies == -JSPolicies::JSPolicies(KConfig* config,const QString &group, - bool global,const QString &domain) : +JSPolicies::JSPolicies(KConfig* config,const TQString &group, + bool global,const TQString &domain) : Policies(config,group,global,domain,"javascript.","EnableJavaScript") { } -JSPolicies::JSPolicies() : Policies(0,QString::null,false, - QString::null,QString::null,QString::null) { +JSPolicies::JSPolicies() : Policies(0,TQString::null,false, + TQString::null,TQString::null,TQString::null) { } JSPolicies::~JSPolicies() { @@ -48,7 +48,7 @@ JSPolicies::~JSPolicies() { void JSPolicies::load() { Policies::load(); - QString key; + TQString key; // enableJavaScriptDebugCB->setChecked( m_pConfig->readBoolEntry("EnableJavaScriptDebug",false)); // enableDebugOutputCB->setChecked( m_pConfig->readBoolEntry("EnableJSDebugOutput") ); @@ -89,7 +89,7 @@ void JSPolicies::defaults() { void JSPolicies::save() { Policies::save(); - QString key; + TQString key; key = prefix + "WindowOpenPolicy"; if (window_open != INHERIT_POLICY) config->writeEntry(key, window_open); @@ -125,9 +125,9 @@ void JSPolicies::save() { // == class JSPoliciesFrame == -JSPoliciesFrame::JSPoliciesFrame(JSPolicies *policies, const QString &title, - QWidget* parent) : - QGroupBox(title, parent, "jspoliciesframe"), +JSPoliciesFrame::JSPoliciesFrame(JSPolicies *policies, const TQString &title, + TQWidget* parent) : + TQGroupBox(title, parent, "jspoliciesframe"), policies(policies) { bool is_per_domain = !policies->isGlobal(); @@ -135,57 +135,57 @@ JSPoliciesFrame::JSPoliciesFrame(JSPolicies *policies, const QString &title, setColumnLayout(0, Qt::Vertical); layout()->setSpacing(0); layout()->setMargin(0); - QGridLayout *this_layout = new QGridLayout(layout(),5,10+is_per_domain*2); + TQGridLayout *this_layout = new TQGridLayout(layout(),5,10+is_per_domain*2); this_layout->setAlignment(Qt::AlignTop); this_layout->setSpacing(3); this_layout->setMargin(11); - QString wtstr; // what's this description + TQString wtstr; // what's this description int colIdx; // column index // === window.open ================================ colIdx = 0; - QLabel *label = new QLabel(i18n("Open new windows:"),this); + TQLabel *label = new TQLabel(i18n("Open new windows:"),this); this_layout->addWidget(label,0,colIdx++); - js_popup = new QButtonGroup(this); + js_popup = new TQButtonGroup(this); js_popup->setExclusive(true); js_popup->setHidden(true); - QRadioButton* policy_btn; + TQRadioButton* policy_btn; if (is_per_domain) { - policy_btn = new QRadioButton(i18n("Use global"), this); - QWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); + policy_btn = new TQRadioButton(i18n("Use global"), this); + TQWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); js_popup->insert(policy_btn,INHERIT_POLICY); this_layout->addWidget(policy_btn,0,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); }/*end if*/ - policy_btn = new QRadioButton(i18n("Allow"), this); - QWhatsThis::add(policy_btn,i18n("Accept all popup window requests.")); + policy_btn = new TQRadioButton(i18n("Allow"), this); + TQWhatsThis::add(policy_btn,i18n("Accept all popup window requests.")); js_popup->insert(policy_btn,KHTMLSettings::KJSWindowOpenAllow); this_layout->addWidget(policy_btn,0,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); - policy_btn = new QRadioButton(i18n("Ask"), this); - QWhatsThis::add(policy_btn,i18n("Prompt every time a popup window is requested.")); + policy_btn = new TQRadioButton(i18n("Ask"), this); + TQWhatsThis::add(policy_btn,i18n("Prompt every time a popup window is requested.")); js_popup->insert(policy_btn,KHTMLSettings::KJSWindowOpenAsk); this_layout->addWidget(policy_btn,0,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); - policy_btn = new QRadioButton(i18n("Deny"), this); - QWhatsThis::add(policy_btn,i18n("Reject all popup window requests.")); + policy_btn = new TQRadioButton(i18n("Deny"), this); + TQWhatsThis::add(policy_btn,i18n("Reject all popup window requests.")); js_popup->insert(policy_btn,KHTMLSettings::KJSWindowOpenDeny); this_layout->addWidget(policy_btn,0,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); - policy_btn = new QRadioButton(i18n("Smart"), this); - QWhatsThis::add(policy_btn, i18n("Accept popup window requests only when " + policy_btn = new TQRadioButton(i18n("Smart"), this); + TQWhatsThis::add(policy_btn, i18n("Accept popup window requests only when " "links are activated through an explicit " "mouse click or keyboard operation.")); js_popup->insert(policy_btn,KHTMLSettings::KJSWindowOpenSmart); this_layout->addWidget(policy_btn,0,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); wtstr = i18n("If you disable this, Konqueror will stop " "interpreting the <i>window.open()</i> " @@ -196,116 +196,116 @@ JSPoliciesFrame::JSPoliciesFrame(JSPolicies *policies, const QString &title, "also break certain sites that require <i>" "window.open()</i> for proper operation. Use " "this feature carefully."); - QWhatsThis::add(label, wtstr); - connect(js_popup, SIGNAL(clicked(int)), SLOT(setWindowOpenPolicy(int))); + TQWhatsThis::add(label, wtstr); + connect(js_popup, TQT_SIGNAL(clicked(int)), TQT_SLOT(setWindowOpenPolicy(int))); // === window.resizeBy/resizeTo ================================ colIdx = 0; - label = new QLabel(i18n("Resize window:"),this); + label = new TQLabel(i18n("Resize window:"),this); this_layout->addWidget(label,1,colIdx++); - js_resize = new QButtonGroup(this); + js_resize = new TQButtonGroup(this); js_resize->setExclusive(true); js_resize->setHidden(true); if (is_per_domain) { - policy_btn = new QRadioButton(i18n("Use global"), this); - QWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); + policy_btn = new TQRadioButton(i18n("Use global"), this); + TQWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); js_resize->insert(policy_btn,INHERIT_POLICY); this_layout->addWidget(policy_btn,1,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); }/*end if*/ - policy_btn = new QRadioButton(i18n("Allow"), this); - QWhatsThis::add(policy_btn,i18n("Allow scripts to change the window size.")); + policy_btn = new TQRadioButton(i18n("Allow"), this); + TQWhatsThis::add(policy_btn,i18n("Allow scripts to change the window size.")); js_resize->insert(policy_btn,KHTMLSettings::KJSWindowResizeAllow); this_layout->addWidget(policy_btn,1,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); - policy_btn = new QRadioButton(i18n("Ignore"), this); - QWhatsThis::add( policy_btn,i18n("Ignore attempts of scripts to change the window size. " + policy_btn = new TQRadioButton(i18n("Ignore"), this); + TQWhatsThis::add( policy_btn,i18n("Ignore attempts of scripts to change the window size. " "The web page will <i>think</i> it changed the " "size but the actual window is not affected.")); js_resize->insert(policy_btn,KHTMLSettings::KJSWindowResizeIgnore); this_layout->addWidget(policy_btn,1,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); wtstr = i18n("Some websites change the window size on their own by using " "<i>window.resizeBy()</i> or <i>window.resizeTo()</i>. " "This option specifies the treatment of such " "attempts."); - QWhatsThis::add(label, wtstr); - connect(js_resize, SIGNAL(clicked(int)), SLOT(setWindowResizePolicy(int))); + TQWhatsThis::add(label, wtstr); + connect(js_resize, TQT_SIGNAL(clicked(int)), TQT_SLOT(setWindowResizePolicy(int))); // === window.moveBy/moveTo ================================ colIdx = 0; - label = new QLabel(i18n("Move window:"),this); + label = new TQLabel(i18n("Move window:"),this); this_layout->addWidget(label,2,colIdx++); - js_move = new QButtonGroup(this); + js_move = new TQButtonGroup(this); js_move->setExclusive(true); js_move->setHidden(true); if (is_per_domain) { - policy_btn = new QRadioButton(i18n("Use global"), this); - QWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); + policy_btn = new TQRadioButton(i18n("Use global"), this); + TQWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); js_move->insert(policy_btn,INHERIT_POLICY); this_layout->addWidget(policy_btn,2,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); }/*end if*/ - policy_btn = new QRadioButton(i18n("Allow"), this); - QWhatsThis::add(policy_btn,i18n("Allow scripts to change the window position.")); + policy_btn = new TQRadioButton(i18n("Allow"), this); + TQWhatsThis::add(policy_btn,i18n("Allow scripts to change the window position.")); js_move->insert(policy_btn,KHTMLSettings::KJSWindowMoveAllow); this_layout->addWidget(policy_btn,2,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); - policy_btn = new QRadioButton(i18n("Ignore"), this); - QWhatsThis::add(policy_btn,i18n("Ignore attempts of scripts to change the window position. " + policy_btn = new TQRadioButton(i18n("Ignore"), this); + TQWhatsThis::add(policy_btn,i18n("Ignore attempts of scripts to change the window position. " "The web page will <i>think</i> it moved the " "window but the actual position is not affected.")); js_move->insert(policy_btn,KHTMLSettings::KJSWindowMoveIgnore); this_layout->addWidget(policy_btn,2,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); wtstr = i18n("Some websites change the window position on their own by using " "<i>window.moveBy()</i> or <i>window.moveTo()</i>. " "This option specifies the treatment of such " "attempts."); - QWhatsThis::add(label, wtstr); - connect(js_move, SIGNAL(clicked(int)), SLOT(setWindowMovePolicy(int))); + TQWhatsThis::add(label, wtstr); + connect(js_move, TQT_SIGNAL(clicked(int)), TQT_SLOT(setWindowMovePolicy(int))); // === window.focus ================================ colIdx = 0; - label = new QLabel(i18n("Focus window:"),this); + label = new TQLabel(i18n("Focus window:"),this); this_layout->addWidget(label,3,colIdx++); - js_focus = new QButtonGroup(this); + js_focus = new TQButtonGroup(this); js_focus->setExclusive(true); js_focus->setHidden(true); if (is_per_domain) { - policy_btn = new QRadioButton(i18n("Use global"), this); - QWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); + policy_btn = new TQRadioButton(i18n("Use global"), this); + TQWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); js_focus->insert(policy_btn,INHERIT_POLICY); this_layout->addWidget(policy_btn,3,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); }/*end if*/ - policy_btn = new QRadioButton(i18n("Allow"), this); - QWhatsThis::add( policy_btn,i18n("Allow scripts to focus the window.") ); + policy_btn = new TQRadioButton(i18n("Allow"), this); + TQWhatsThis::add( policy_btn,i18n("Allow scripts to focus the window.") ); js_focus->insert(policy_btn,KHTMLSettings::KJSWindowFocusAllow); this_layout->addWidget(policy_btn,3,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); - policy_btn = new QRadioButton(i18n("Ignore"), this); - QWhatsThis::add( policy_btn,i18n("Ignore attempts of scripts to focus the window. " + policy_btn = new TQRadioButton(i18n("Ignore"), this); + TQWhatsThis::add( policy_btn,i18n("Ignore attempts of scripts to focus the window. " "The web page will <i>think</i> it brought " "the focus to the window but the actual " "focus will remain unchanged.") ); js_focus->insert(policy_btn,KHTMLSettings::KJSWindowFocusIgnore); this_layout->addWidget(policy_btn,3,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); wtstr = i18n("Some websites set the focus to their browser window on their " "own by using <i>window.focus()</i>. This usually leads to " @@ -313,68 +313,68 @@ JSPoliciesFrame::JSPoliciesFrame(JSPolicies *policies, const QString &title, "action the user was dedicated to at that time. " "This option specifies the treatment of such " "attempts."); - QWhatsThis::add(label, wtstr); - connect(js_focus, SIGNAL(clicked(int)), SLOT(setWindowFocusPolicy(int))); + TQWhatsThis::add(label, wtstr); + connect(js_focus, TQT_SIGNAL(clicked(int)), TQT_SLOT(setWindowFocusPolicy(int))); // === window.status ================================ colIdx = 0; - label = new QLabel(i18n("Modify status bar text:"),this); + label = new TQLabel(i18n("Modify status bar text:"),this); this_layout->addWidget(label,4,colIdx++); - js_statusbar = new QButtonGroup(this); + js_statusbar = new TQButtonGroup(this); js_statusbar->setExclusive(true); js_statusbar->setHidden(true); if (is_per_domain) { - policy_btn = new QRadioButton(i18n("Use global"), this); - QWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); + policy_btn = new TQRadioButton(i18n("Use global"), this); + TQWhatsThis::add(policy_btn,i18n("Use setting from global policy.")); js_statusbar->insert(policy_btn,INHERIT_POLICY); this_layout->addWidget(policy_btn,4,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); }/*end if*/ - policy_btn = new QRadioButton(i18n("Allow"), this); - QWhatsThis::add(policy_btn,i18n("Allow scripts to change the text of the status bar.")); + policy_btn = new TQRadioButton(i18n("Allow"), this); + TQWhatsThis::add(policy_btn,i18n("Allow scripts to change the text of the status bar.")); js_statusbar->insert(policy_btn,KHTMLSettings::KJSWindowStatusAllow); this_layout->addWidget(policy_btn,4,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); - policy_btn = new QRadioButton(i18n("Ignore"), this); - QWhatsThis::add( policy_btn,i18n("Ignore attempts of scripts to change the status bar text. " + policy_btn = new TQRadioButton(i18n("Ignore"), this); + TQWhatsThis::add( policy_btn,i18n("Ignore attempts of scripts to change the status bar text. " "The web page will <i>think</i> it changed " "the text but the actual text will remain " "unchanged.") ); js_statusbar->insert(policy_btn,KHTMLSettings::KJSWindowStatusIgnore); this_layout->addWidget(policy_btn,4,colIdx++); - this_layout->addItem(new QSpacerItem(10,0),0,colIdx++); + this_layout->addItem(new TQSpacerItem(10,0),0,colIdx++); wtstr = i18n("Some websites change the status bar text by setting " "<i>window.status</i> or <i>window.defaultStatus</i>, " "thus sometimes preventing displaying the real URLs of hyperlinks. " "This option specifies the treatment of such " "attempts."); - QWhatsThis::add(label, wtstr); - connect(js_statusbar, SIGNAL(clicked(int)), SLOT(setWindowStatusPolicy(int))); + TQWhatsThis::add(label, wtstr); + connect(js_statusbar, TQT_SIGNAL(clicked(int)), TQT_SLOT(setWindowStatusPolicy(int))); } JSPoliciesFrame::~JSPoliciesFrame() { } void JSPoliciesFrame::refresh() { - QRadioButton *button; - button = static_cast<QRadioButton *>(js_popup->find( + TQRadioButton *button; + button = static_cast<TQRadioButton *>(js_popup->find( policies->window_open)); if (button != 0) button->setChecked(true); - button = static_cast<QRadioButton *>(js_resize->find( + button = static_cast<TQRadioButton *>(js_resize->find( policies->window_resize)); if (button != 0) button->setChecked(true); - button = static_cast<QRadioButton *>(js_move->find( + button = static_cast<TQRadioButton *>(js_move->find( policies->window_move)); if (button != 0) button->setChecked(true); - button = static_cast<QRadioButton *>(js_focus->find( + button = static_cast<TQRadioButton *>(js_focus->find( policies->window_focus)); if (button != 0) button->setChecked(true); - button = static_cast<QRadioButton *>(js_statusbar->find( + button = static_cast<TQRadioButton *>(js_statusbar->find( policies->window_status)); if (button != 0) button->setChecked(true); } diff --git a/kcontrol/konqhtml/jspolicies.h b/kcontrol/konqhtml/jspolicies.h index a955abc96..29f73c090 100644 --- a/kcontrol/konqhtml/jspolicies.h +++ b/kcontrol/konqhtml/jspolicies.h @@ -22,8 +22,8 @@ #ifndef __JSPOLICIES_H__ #define __JSPOLICIES_H__ -#include <qgroupbox.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqstring.h> #include <khtml_settings.h> @@ -63,11 +63,11 @@ public: * @param domain name of the domain this instance is used to configure the * policies for (case insensitive, ignored if global == true) */ - JSPolicies(KConfig* config, const QString &group, bool global, - const QString &domain = QString::null); + JSPolicies(KConfig* config, const TQString &group, bool global, + const TQString &domain = TQString::null); /** - * dummy constructor to make QMap happy. + * dummy constructor to make TQMap happy. * * Never construct an object by using this. * @internal @@ -201,7 +201,7 @@ private: * * @author Leo Savernik */ -class JSPoliciesFrame : public QGroupBox { +class JSPoliciesFrame : public TQGroupBox { Q_OBJECT public: /** @@ -211,8 +211,8 @@ public: * @param title title for group box * @param parent parent widget */ - JSPoliciesFrame(JSPolicies *policies, const QString &title, - QWidget* parent = 0); + JSPoliciesFrame(JSPolicies *policies, const TQString &title, + TQWidget* parent = 0); virtual ~JSPoliciesFrame(); @@ -258,11 +258,11 @@ private slots: private: JSPolicies *policies; - QButtonGroup *js_popup; - QButtonGroup *js_resize; - QButtonGroup *js_move; - QButtonGroup *js_focus; - QButtonGroup *js_statusbar; + TQButtonGroup *js_popup; + TQButtonGroup *js_resize; + TQButtonGroup *js_move; + TQButtonGroup *js_focus; + TQButtonGroup *js_statusbar; }; diff --git a/kcontrol/konqhtml/khttpoptdlg.cpp b/kcontrol/konqhtml/khttpoptdlg.cpp index e6c9a95ba..ca175e8e9 100644 --- a/kcontrol/konqhtml/khttpoptdlg.cpp +++ b/kcontrol/konqhtml/khttpoptdlg.cpp @@ -1,37 +1,37 @@ // File khttpoptdlg.cpp by Jacek Konieczny <jajcus@zeus.posl.gliwice.pl> // Port to KControl by David Faure <faure@kde.org> -#include <qlayout.h> //CT +#include <tqlayout.h> //CT #include <klocale.h> #include <kglobal.h> #include "khttpoptdlg.h" -KHTTPOptions::KHTTPOptions(KConfig *config, QString group, QWidget *parent, const char *name) +KHTTPOptions::KHTTPOptions(KConfig *config, TQString group, TQWidget *parent, const char *name) : KCModule( parent, name ), m_pConfig(config), m_groupname(group) { - QVBoxLayout *lay = new QVBoxLayout(this, 10, 5); + TQVBoxLayout *lay = new TQVBoxLayout(this, 10, 5); - lay->addWidget( new QLabel(i18n("Accept languages:"), this) ); + lay->addWidget( new TQLabel(i18n("Accept languages:"), this) ); - le_languages = new QLineEdit(this); + le_languages = new TQLineEdit(this); lay->addWidget( le_languages ); - connect(le_languages, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); + connect(le_languages, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); lay->addSpacing(10); - lay->addWidget( new QLabel(i18n("Accept character sets:"), this) ); + lay->addWidget( new TQLabel(i18n("Accept character sets:"), this) ); - le_charsets = new QLineEdit(this); + le_charsets = new TQLineEdit(this); lay->addWidget( le_charsets ); - connect(le_charsets, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); + connect(le_charsets, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); lay->addStretch(10); - // defaultCharsets = QString("utf-8 ")+klocale->charset()+" iso-8859-1"; - defaultCharsets = QString("utf-8 ")+" iso-8859-1"; // TODO + // defaultCharsets = TQString("utf-8 ")+klocale->charset()+" iso-8859-1"; + defaultCharsets = TQString("utf-8 ")+" iso-8859-1"; // TODO // finaly read the options load(); @@ -44,7 +44,7 @@ void KHTTPOptions::load() void KHTTPOptions::load( bool useDefaults ) { - QString tmp; + TQString tmp; m_pConfig->setReadDefaults( useDefaults ); diff --git a/kcontrol/konqhtml/khttpoptdlg.h b/kcontrol/konqhtml/khttpoptdlg.h index 36e3650b4..f758be15c 100644 --- a/kcontrol/konqhtml/khttpoptdlg.h +++ b/kcontrol/konqhtml/khttpoptdlg.h @@ -2,10 +2,10 @@ #ifndef __KHTTPOPTDLG_H #define __KHTTPOPTDLG_H -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qstring.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqstring.h> #include <kcmodule.h> #include <kconfig.h> @@ -19,7 +19,7 @@ class KHTTPOptions : public KCModule { Q_OBJECT public: - KHTTPOptions(KConfig *config, QString group, QWidget *parent = 0L, const char *name = 0L); + KHTTPOptions(KConfig *config, TQString group, TQWidget *parent = 0L, const char *name = 0L); virtual void load(); virtual void load( bool useDefaults ); @@ -29,17 +29,17 @@ Q_OBJECT private: KConfig *m_pConfig; - QString m_groupname; + TQString m_groupname; // Acceptable languages "LANG" - locale selected languages - QLabel *lb_languages; - QLineEdit *le_languages; + TQLabel *lb_languages; + TQLineEdit *le_languages; // Acceptable charsets "CHARSET" - locale selected charset - QLabel *lb_charsets; - QLineEdit *le_charsets; + TQLabel *lb_charsets; + TQLineEdit *le_charsets; - QString defaultCharsets; + TQString defaultCharsets; private slots: void slotChanged(); diff --git a/kcontrol/konqhtml/main.cpp b/kcontrol/konqhtml/main.cpp index b1d459b00..28654869e 100644 --- a/kcontrol/konqhtml/main.cpp +++ b/kcontrol/konqhtml/main.cpp @@ -27,8 +27,8 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qtabwidget.h> -#include <qlayout.h> +#include <tqtabwidget.h> +#include <tqlayout.h> #include "jsopts.h" #include "javaopts.h" @@ -43,31 +43,31 @@ extern "C" { - KDE_EXPORT KCModule *create_khtml_behavior(QWidget *parent, const char *name) + KDE_EXPORT KCModule *create_khtml_behavior(TQWidget *parent, const char *name) { KConfig *c = new KConfig( "konquerorrc", false, false ); return new KMiscHTMLOptions(c, "HTML Settings", parent, name); } - KDE_EXPORT KCModule *create_khtml_fonts(QWidget *parent, const char *name) + KDE_EXPORT KCModule *create_khtml_fonts(TQWidget *parent, const char *name) { KConfig *c = new KConfig( "konquerorrc", false, false ); return new KAppearanceOptions(c, "HTML Settings", parent, name); } - KDE_EXPORT KCModule *create_khtml_java_js(QWidget *parent, const char* /*name*/) + KDE_EXPORT KCModule *create_khtml_java_js(TQWidget *parent, const char* /*name*/) { KConfig *c = new KConfig( "konquerorrc", false, false ); return new KJSParts(c, parent, "kcmkonqhtml"); } - KDE_EXPORT KCModule *create_khtml_plugins(QWidget *parent, const char *name) + KDE_EXPORT KCModule *create_khtml_plugins(TQWidget *parent, const char *name) { KConfig *c = new KConfig( "konquerorrc", false, false ); return new KPluginOptions(c, "Java/JavaScript Settings", parent, name); } - KDE_EXPORT KCModule *create_khtml_filter(QWidget *parent, const char *name ) + KDE_EXPORT KCModule *create_khtml_filter(TQWidget *parent, const char *name ) { KConfig *c = new KConfig( "khtmlrc", false, false ); return new KCMFilter(c, "Filter Settings", parent, name); @@ -75,7 +75,7 @@ extern "C" } -KJSParts::KJSParts(KConfig *config, QWidget *parent, const char *name) +KJSParts::KJSParts(KConfig *config, TQWidget *parent, const char *name) : KCModule(parent, name), mConfig(config) { KAboutData *about = @@ -97,18 +97,18 @@ KJSParts::KJSParts(KConfig *config, QWidget *parent, const char *name) setAboutData( about ); - QVBoxLayout *layout = new QVBoxLayout(this); - tab = new QTabWidget(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); + tab = new TQTabWidget(this); layout->addWidget(tab); // ### the groupname is duplicated in KJSParts::save java = new KJavaOptions( config, "Java/JavaScript Settings", this, name ); tab->addTab( java, i18n( "&Java" ) ); - connect( java, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); + connect( java, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) ); javascript = new KJavaScriptOptions( config, "Java/JavaScript Settings", this, name ); tab->addTab( javascript, i18n( "Java&Script" ) ); - connect( javascript, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); + connect( javascript, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) ); } KJSParts::~KJSParts() @@ -141,7 +141,7 @@ void KJSParts::save() // Send signal to konqueror // Warning. In case something is added/changed here, keep kfmclient in sync - QByteArray data; + TQByteArray data; if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); @@ -154,7 +154,7 @@ void KJSParts::defaults() java->defaults(); } -QString KJSParts::quickHelp() const +TQString KJSParts::quickHelp() const { return i18n("<h2>JavaScript</h2>On this page, you can configure " "whether JavaScript programs embedded in web pages should " diff --git a/kcontrol/konqhtml/main.h b/kcontrol/konqhtml/main.h index 20f461fa2..db89be8ab 100644 --- a/kcontrol/konqhtml/main.h +++ b/kcontrol/konqhtml/main.h @@ -39,17 +39,17 @@ class KJSParts : public KCModule public: - KJSParts(KConfig *config,QWidget *parent, const char *name); + KJSParts(KConfig *config,TQWidget *parent, const char *name); virtual ~KJSParts(); void load(); void save(); void defaults(); - QString quickHelp() const; + TQString quickHelp() const; private: - QTabWidget *tab; + TQTabWidget *tab; KJavaScriptOptions *javascript; KJavaOptions *java; diff --git a/kcontrol/konqhtml/pluginopts.cpp b/kcontrol/konqhtml/pluginopts.cpp index f31af3c40..d5cd4cc2b 100644 --- a/kcontrol/konqhtml/pluginopts.cpp +++ b/kcontrol/konqhtml/pluginopts.cpp @@ -7,12 +7,12 @@ #include <stdlib.h> #include <unistd.h> -#include <qlayout.h> -#include <qprogressdialog.h> -#include <qregexp.h> -#include <qslider.h> -#include <qvgroupbox.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqprogressdialog.h> +#include <tqregexp.h> +#include <tqslider.h> +#include <tqvgroupbox.h> +#include <tqwhatsthis.h> #include <dcopclient.h> #include <kapplication.h> @@ -33,8 +33,8 @@ // == class PluginPolicies ===== -PluginPolicies::PluginPolicies(KConfig* config, const QString &group, bool global, - const QString &domain) : +PluginPolicies::PluginPolicies(KConfig* config, const TQString &group, bool global, + const TQString &domain) : Policies(config,group,global,domain,"plugins.","EnablePlugins") { } @@ -43,7 +43,7 @@ PluginPolicies::~PluginPolicies() { // == class KPluginOptions ===== -KPluginOptions::KPluginOptions( KConfig* config, QString group, QWidget *parent, +KPluginOptions::KPluginOptions( KConfig* config, TQString group, TQWidget *parent, const char *) : KCModule( parent, "kcmkonqhtml" ), m_pConfig( config ), @@ -51,36 +51,36 @@ KPluginOptions::KPluginOptions( KConfig* config, QString group, QWidget *parent, m_nspluginscan (0), global_policies(config,group,true) { - QVBoxLayout* toplevel = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout* toplevel = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); /************************************************************************** ******************** Global Settings ************************************* *************************************************************************/ - QVGroupBox* globalGB = new QVGroupBox( i18n( "Global Settings" ), this ); + TQVGroupBox* globalGB = new TQVGroupBox( i18n( "Global Settings" ), this ); toplevel->addWidget( globalGB ); - enablePluginsGloballyCB = new QCheckBox( i18n( "&Enable plugins globally" ), globalGB ); - enableHTTPOnly = new QCheckBox( i18n( "Only allow &HTTP and HTTPS URLs for plugins" ), globalGB ); - enableUserDemand = new QCheckBox( i18n( "&Load plugins on demand only" ), globalGB ); - priorityLabel = new QLabel(i18n("CPU priority for plugins: %1").arg(QString::null), globalGB); - priority = new QSlider(5, 100, 5, 100, Horizontal, globalGB); - connect( enablePluginsGloballyCB, SIGNAL( clicked() ), this, SLOT( slotChanged() ) ); - connect( enablePluginsGloballyCB, SIGNAL( clicked() ), this, SLOT( slotTogglePluginsEnabled() ) ); - connect( enableHTTPOnly, SIGNAL( clicked() ), this, SLOT( slotChanged() ) ); - connect( enableUserDemand, SIGNAL( clicked() ), this, SLOT( slotChanged() ) ); - connect( priority, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) ); - connect( priority, SIGNAL( valueChanged(int) ), this, SLOT( updatePLabel(int) ) ); - - QFrame *hrule = new QFrame(globalGB); - hrule->setFrameStyle(QFrame::HLine | QFrame::Sunken); - hrule->setSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed); + enablePluginsGloballyCB = new TQCheckBox( i18n( "&Enable plugins globally" ), globalGB ); + enableHTTPOnly = new TQCheckBox( i18n( "Only allow &HTTP and HTTPS URLs for plugins" ), globalGB ); + enableUserDemand = new TQCheckBox( i18n( "&Load plugins on demand only" ), globalGB ); + priorityLabel = new TQLabel(i18n("CPU priority for plugins: %1").arg(TQString::null), globalGB); + priority = new TQSlider(5, 100, 5, 100, Horizontal, globalGB); + connect( enablePluginsGloballyCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChanged() ) ); + connect( enablePluginsGloballyCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTogglePluginsEnabled() ) ); + connect( enableHTTPOnly, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChanged() ) ); + connect( enableUserDemand, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChanged() ) ); + connect( priority, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) ); + connect( priority, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( updatePLabel(int) ) ); + + TQFrame *hrule = new TQFrame(globalGB); + hrule->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); + hrule->setSizePolicy(TQSizePolicy::MinimumExpanding,TQSizePolicy::Fixed); /************************************************************************** ********************* Domain-specific Settings *************************** *************************************************************************/ - QPushButton *domainSpecPB = new QPushButton(i18n("Domain-Specific Settin&gs"), + TQPushButton *domainSpecPB = new TQPushButton(i18n("Domain-Specific Settin&gs"), globalGB); - domainSpecPB->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); - connect(domainSpecPB,SIGNAL(clicked()),SLOT(slotShowDomainDlg())); + domainSpecPB->setSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed); + connect(domainSpecPB,TQT_SIGNAL(clicked()),TQT_SLOT(slotShowDomainDlg())); domainSpecificDlg = new KDialogBase(KDialogBase::Swallow, i18n("Domain-Specific Policies"),KDialogBase::Close, @@ -88,30 +88,30 @@ KPluginOptions::KPluginOptions( KConfig* config, QString group, QWidget *parent, domainSpecific = new PluginDomainListView(config,group,this,domainSpecificDlg); domainSpecific->setMinimumSize(320,200); - connect(domainSpecific,SIGNAL(changed(bool)),SLOT(slotChanged())); + connect(domainSpecific,TQT_SIGNAL(changed(bool)),TQT_SLOT(slotChanged())); domainSpecificDlg->setMainWidget(domainSpecific); /************************************************************************** ********************** WhatsThis? items ********************************** *************************************************************************/ - QWhatsThis::add( enablePluginsGloballyCB, i18n("Enables the execution of plugins " + TQWhatsThis::add( enablePluginsGloballyCB, i18n("Enables the execution of plugins " "that can be contained in HTML pages, e.g. Macromedia Flash. " "Note that, as with any browser, enabling active contents can be a security problem.") ); - QString wtstr = i18n("This box contains the domains and hosts you have set " + TQString wtstr = i18n("This box contains the domains and hosts you have set " "a specific plugin policy for. This policy will be used " "instead of the default policy for enabling or disabling plugins on pages sent by these " "domains or hosts. <p>Select a policy and use the controls on " "the right to modify it."); - QWhatsThis::add( domainSpecific->listView(), wtstr ); - QWhatsThis::add( domainSpecific->importButton(), i18n("Click this button to choose the file that contains " + TQWhatsThis::add( domainSpecific->listView(), wtstr ); + TQWhatsThis::add( domainSpecific->importButton(), i18n("Click this button to choose the file that contains " "the plugin policies. These policies will be merged " "with the existing ones. Duplicate entries are ignored.") ); - QWhatsThis::add( domainSpecific->exportButton(), i18n("Click this button to save the plugin policy to a zipped " + TQWhatsThis::add( domainSpecific->exportButton(), i18n("Click this button to save the plugin policy to a zipped " "file. The file, named <b>plugin_policy.tgz</b>, will be " "saved to a location of your choice." ) ); - QWhatsThis::add( domainSpecific, i18n("Here you can set specific plugin policies for any particular " + TQWhatsThis::add( domainSpecific, i18n("Here you can set specific plugin policies for any particular " "host or domain. To add a new policy, simply click the <i>New...</i> " "button and supply the necessary information requested by the " "dialog box. To change an existing policy, click on the <i>Change...</i> " @@ -126,7 +126,7 @@ KPluginOptions::KPluginOptions( KConfig* config, QString group, QWidget *parent, /*****************************************************************************/ - QVGroupBox* netscapeGB = new QVGroupBox( i18n( "Netscape Plugins" ), this ); + TQVGroupBox* netscapeGB = new TQVGroupBox( i18n( "Netscape Plugins" ), this ); toplevel->addWidget( netscapeGB ); // create Designer made widget @@ -134,8 +134,8 @@ KPluginOptions::KPluginOptions( KConfig* config, QString group, QWidget *parent, m_widget->dirEdit->setMode(KFile::ExistingOnly | KFile::LocalOnly | KFile::Directory); // setup widgets - connect( m_widget->scanAtStartup, SIGNAL(clicked()), SLOT(change()) ); - connect( m_widget->scanButton, SIGNAL(clicked()), SLOT(scan()) ); + connect( m_widget->scanAtStartup, TQT_SIGNAL(clicked()), TQT_SLOT(change()) ); + connect( m_widget->scanButton, TQT_SIGNAL(clicked()), TQT_SLOT(scan()) ); m_changed = false; @@ -153,7 +153,7 @@ KPluginOptions::~KPluginOptions() void KPluginOptions::updatePLabel(int p) { - QString level; + TQString level; p = (100 - p)/5; if (p > 15) { level = i18n("lowest priority", "lowest"); @@ -229,7 +229,7 @@ void KPluginOptions::save() m_pConfig->sync(); // I need a sync here, otherwise "apply" won't work // instantly - QByteArray data; + TQByteArray data; if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); @@ -252,7 +252,7 @@ void KPluginOptions::save() change( false ); } -QString KPluginOptions::quickHelp() const +TQString KPluginOptions::quickHelp() const { return i18n("<h1>Konqueror Plugins</h1> The Konqueror web browser can use Netscape" " plugins to show special content, just like the Navigator does. Please note that" @@ -282,7 +282,7 @@ void KPluginOptions::scan() int ret = KMessageBox::warningYesNoCancel( this, i18n("Do you want to apply your changes " "before the scan? Otherwise the " - "changes will be lost."), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); + "changes will be lost."), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); if ( ret==KMessageBox::Cancel ) { m_widget->scanButton->setEnabled(true); return; @@ -292,7 +292,7 @@ void KPluginOptions::scan() } m_nspluginscan = new KProcIO; - QString scanExe = KGlobal::dirs()->findExe("nspluginscan"); + TQString scanExe = KGlobal::dirs()->findExe("nspluginscan"); if (!scanExe) { kdDebug() << "can't find nspluginviewer" << endl; delete m_nspluginscan; @@ -306,24 +306,24 @@ void KPluginOptions::scan() } // find nspluginscan executable - m_progress = new QProgressDialog( i18n("Scanning for plugins"), i18n("Cancel"), 100, this ); + m_progress = new TQProgressDialog( i18n("Scanning for plugins"), i18n("Cancel"), 100, this ); m_progress->setProgress( 5 ); // start nspluginscan *m_nspluginscan << scanExe << "--verbose"; kdDebug() << "Running nspluginscan" << endl; - connect(m_nspluginscan, SIGNAL(readReady(KProcIO*)), - this, SLOT(progress(KProcIO*))); - connect(m_nspluginscan, SIGNAL(processExited(KProcess *)), - this, SLOT(scanDone())); - connect(m_progress, SIGNAL(cancelled()), this, SLOT(scanDone())); + connect(m_nspluginscan, TQT_SIGNAL(readReady(KProcIO*)), + this, TQT_SLOT(progress(KProcIO*))); + connect(m_nspluginscan, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(scanDone())); + connect(m_progress, TQT_SIGNAL(cancelled()), this, TQT_SLOT(scanDone())); m_nspluginscan->start(); } void KPluginOptions::progress(KProcIO *proc) { - QString line; + TQString line; while(proc->readln(line) > 0) ; m_progress->setProgress(line.stripWhiteSpace().toInt()); @@ -345,28 +345,28 @@ void KPluginOptions::scanDone() void KPluginOptions::dirInit() { m_widget->dirEdit->setCaption(i18n("Select Plugin Scan Folder")); - connect( m_widget->dirNew, SIGNAL(clicked()), SLOT(dirNew())); - connect( m_widget->dirRemove, SIGNAL(clicked()), SLOT(dirRemove())); - connect( m_widget->dirUp, SIGNAL(clicked()), SLOT(dirUp())); - connect( m_widget->dirDown, SIGNAL(clicked()), SLOT(dirDown()) ); - connect( m_widget->useArtsdsp, SIGNAL(clicked()),SLOT(change())); + connect( m_widget->dirNew, TQT_SIGNAL(clicked()), TQT_SLOT(dirNew())); + connect( m_widget->dirRemove, TQT_SIGNAL(clicked()), TQT_SLOT(dirRemove())); + connect( m_widget->dirUp, TQT_SIGNAL(clicked()), TQT_SLOT(dirUp())); + connect( m_widget->dirDown, TQT_SIGNAL(clicked()), TQT_SLOT(dirDown()) ); + connect( m_widget->useArtsdsp, TQT_SIGNAL(clicked()),TQT_SLOT(change())); connect( m_widget->dirEdit, - SIGNAL(textChanged(const QString&)), - SLOT(dirEdited(const QString &)) ); + TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(dirEdited(const TQString &)) ); connect( m_widget->dirList, - SIGNAL(executed(QListBoxItem*)), - SLOT(dirSelect(QListBoxItem*)) ); + TQT_SIGNAL(executed(TQListBoxItem*)), + TQT_SLOT(dirSelect(TQListBoxItem*)) ); connect( m_widget->dirList, - SIGNAL(selectionChanged(QListBoxItem*)), - SLOT(dirSelect(QListBoxItem*)) ); + TQT_SIGNAL(selectionChanged(TQListBoxItem*)), + TQT_SLOT(dirSelect(TQListBoxItem*)) ); } void KPluginOptions::dirLoad( KConfig *config, bool useDefault ) { - QStringList paths; + TQStringList paths; // read search paths @@ -409,8 +409,8 @@ void KPluginOptions::dirLoad( KConfig *config, bool useDefault ) void KPluginOptions::dirSave( KConfig *config ) { // create stringlist - QStringList paths; - QListBoxItem *item = m_widget->dirList->firstItem(); + TQStringList paths; + TQListBoxItem *item = m_widget->dirList->firstItem(); for ( ; item!=0; item=item->next() ) if ( !item->text().isEmpty() ) paths << item->text(); @@ -422,7 +422,7 @@ void KPluginOptions::dirSave( KConfig *config ) } -void KPluginOptions::dirSelect( QListBoxItem *item ) +void KPluginOptions::dirSelect( TQListBoxItem *item ) { m_widget->dirEdit->setEnabled( item!=0 ); m_widget->dirRemove->setEnabled( item!=0 ); @@ -430,16 +430,16 @@ void KPluginOptions::dirSelect( QListBoxItem *item ) unsigned cur = m_widget->dirList->index(m_widget->dirList->selectedItem()); m_widget->dirDown->setEnabled( item!=0 && cur<m_widget->dirList->count()-1 ); m_widget->dirUp->setEnabled( item!=0 && cur>0 ); - m_widget->dirEdit->setURL( item!=0 ? item->text() : QString::null ); + m_widget->dirEdit->setURL( item!=0 ? item->text() : TQString::null ); } void KPluginOptions::dirNew() { - m_widget->dirList->insertItem( QString::null, 0 ); + m_widget->dirList->insertItem( TQString::null, 0 ); m_widget->dirList->setCurrentItem( 0 ); dirSelect( m_widget->dirList->selectedItem() ); - m_widget->dirEdit->setURL(QString::null); + m_widget->dirEdit->setURL(TQString::null); m_widget->dirEdit->setFocus(); change(); } @@ -447,7 +447,7 @@ void KPluginOptions::dirNew() void KPluginOptions::dirRemove() { - m_widget->dirEdit->setURL(QString::null); + m_widget->dirEdit->setURL(TQString::null); delete m_widget->dirList->selectedItem(); m_widget->dirRemove->setEnabled( false ); m_widget->dirUp->setEnabled( false ); @@ -461,7 +461,7 @@ void KPluginOptions::dirUp() { unsigned cur = m_widget->dirList->index(m_widget->dirList->selectedItem()); if ( cur>0 ) { - QString txt = m_widget->dirList->text(cur-1); + TQString txt = m_widget->dirList->text(cur-1); m_widget->dirList->removeItem( cur-1 ); m_widget->dirList->insertItem( txt, cur ); @@ -476,7 +476,7 @@ void KPluginOptions::dirDown() { unsigned cur = m_widget->dirList->index(m_widget->dirList->selectedItem()); if ( cur < m_widget->dirList->count()-1 ) { - QString txt = m_widget->dirList->text(cur+1); + TQString txt = m_widget->dirList->text(cur+1); m_widget->dirList->removeItem( cur+1 ); m_widget->dirList->insertItem( txt, cur ); @@ -487,7 +487,7 @@ void KPluginOptions::dirDown() } -void KPluginOptions::dirEdited(const QString &txt ) +void KPluginOptions::dirEdited(const TQString &txt ) { if ( m_widget->dirList->currentText() != txt ) { m_widget->dirList->blockSignals(true); @@ -510,28 +510,28 @@ void KPluginOptions::pluginLoad( KConfig* /*config*/ ) { kdDebug() << "-> KPluginOptions::fillPluginList" << endl; m_widget->pluginList->clear(); - QRegExp version(";version=[^:]*:"); + TQRegExp version(";version=[^:]*:"); // open the cache file - QFile cachef( locate("data", "nsplugins/cache") ); + TQFile cachef( locate("data", "nsplugins/cache") ); if ( !cachef.exists() || !cachef.open(IO_ReadOnly) ) { kdDebug() << "Could not load plugin cache file!" << endl; return; } - QTextStream cache(&cachef); + TQTextStream cache(&cachef); // root object - QListViewItem *root = new QListViewItem( m_widget->pluginList, i18n("Netscape Plugins") ); + TQListViewItem *root = new TQListViewItem( m_widget->pluginList, i18n("Netscape Plugins") ); root->setOpen( true ); root->setSelectable( false ); root->setExpandable( true ); root->setPixmap(0, SmallIcon("netscape")); // read in cache - QString line, plugin; - QListViewItem *next = 0; - QListViewItem *lastMIME = 0; + TQString line, plugin; + TQListViewItem *next = 0; + TQListViewItem *lastMIME = 0; while ( !cache.atEnd() ) { line = cache.readLine(); @@ -545,7 +545,7 @@ void KPluginOptions::pluginLoad( KConfig* /*config*/ ) //kdDebug() << "plugin=" << plugin << endl; // add plugin root item - next = new QListViewItem( root, i18n("Plugin"), plugin ); + next = new TQListViewItem( root, i18n("Plugin"), plugin ); next->setOpen( false ); next->setSelectable( false ); next->setExpandable( true ); @@ -555,24 +555,24 @@ void KPluginOptions::pluginLoad( KConfig* /*config*/ ) continue; } - QStringList desc = QStringList::split(':', line, TRUE); - QString mime = desc[0].stripWhiteSpace(); - QString name = desc[2]; - QString suffixes = desc[1]; + TQStringList desc = TQStringList::split(':', line, TRUE); + TQString mime = desc[0].stripWhiteSpace(); + TQString name = desc[2]; + TQString suffixes = desc[1]; if (!mime.isEmpty()) { //kdDebug() << "mime=" << mime << " desc=" << name << " suffix=" << suffixes << endl; - lastMIME = new QListViewItem( next, lastMIME, i18n("MIME type"), mime ); + lastMIME = new TQListViewItem( next, lastMIME, i18n("MIME type"), mime ); lastMIME->setOpen( false ); lastMIME->setSelectable( false ); lastMIME->setExpandable( true ); - QListViewItem *last = new QListViewItem( lastMIME, 0, i18n("Description"), name ); + TQListViewItem *last = new TQListViewItem( lastMIME, 0, i18n("Description"), name ); last->setOpen( false ); last->setSelectable( false ); last->setExpandable( false ); - last = new QListViewItem( lastMIME, last, i18n("Suffixes"), suffixes ); + last = new TQListViewItem( lastMIME, last, i18n("Suffixes"), suffixes ); last->setOpen( false ); last->setSelectable( false ); last->setExpandable( false ); @@ -590,22 +590,22 @@ void KPluginOptions::pluginSave( KConfig* /*config*/ ) // == class PluginDomainDialog ===== -PluginDomainDialog::PluginDomainDialog(QWidget *parent) : - QWidget(parent,"PluginDomainDialog") { +PluginDomainDialog::PluginDomainDialog(TQWidget *parent) : + TQWidget(parent,"PluginDomainDialog") { setCaption(i18n("Domain-Specific Policies")); - thisLayout = new QVBoxLayout(this); + thisLayout = new TQVBoxLayout(this); thisLayout->addSpacing(6); - QFrame *hrule = new QFrame(this); - hrule->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *hrule = new TQFrame(this); + hrule->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); thisLayout->addWidget(hrule); thisLayout->addSpacing(6); - QBoxLayout *hl = new QHBoxLayout(this,0,6); + TQBoxLayout *hl = new TQHBoxLayout(this,0,6); hl->addStretch(10); - QPushButton *closePB = new KPushButton(KStdGuiItem::close(),this); - connect(closePB,SIGNAL(clicked()),SLOT(slotClose())); + TQPushButton *closePB = new KPushButton(KStdGuiItem::close(),this); + connect(closePB,TQT_SIGNAL(clicked()),TQT_SLOT(slotClose())); hl->addWidget(closePB); thisLayout->addLayout(hl); } @@ -613,7 +613,7 @@ PluginDomainDialog::PluginDomainDialog(QWidget *parent) : PluginDomainDialog::~PluginDomainDialog() { } -void PluginDomainDialog::setMainWidget(QWidget *widget) { +void PluginDomainDialog::setMainWidget(TQWidget *widget) { thisLayout->insertWidget(0,widget); } @@ -623,8 +623,8 @@ void PluginDomainDialog::slotClose() { // == class PluginDomainListView ===== -PluginDomainListView::PluginDomainListView(KConfig *config,const QString &group, - KPluginOptions *options,QWidget *parent,const char *name) +PluginDomainListView::PluginDomainListView(KConfig *config,const TQString &group, + KPluginOptions *options,TQWidget *parent,const char *name) : DomainListView(config,i18n( "Doma&in-Specific" ), parent, name), group(group), options(options) { } @@ -634,7 +634,7 @@ PluginDomainListView::~PluginDomainListView() { void PluginDomainListView::setupPolicyDlg(PushButton trigger,PolicyDialog &pDlg, Policies *pol) { - QString caption; + TQString caption; switch (trigger) { case AddButton: caption = i18n( "New Plugin Policy" ); diff --git a/kcontrol/konqhtml/pluginopts.h b/kcontrol/konqhtml/pluginopts.h index 46142dcf7..60c89b57e 100644 --- a/kcontrol/konqhtml/pluginopts.h +++ b/kcontrol/konqhtml/pluginopts.h @@ -11,7 +11,7 @@ #ifndef __PLUGINOPTS_H__ #define __PLUGINOPTS_H__ -#include <qwidget.h> +#include <tqwidget.h> #include "domainlistview.h" #include "policies.h" @@ -44,8 +44,8 @@ public: * @param domain name of the domain this instance is used to configure the * policies for (case insensitive, ignored if global == true) */ - PluginPolicies(KConfig* config, const QString &group, bool global, - const QString &domain = QString::null); + PluginPolicies(KConfig* config, const TQString &group, bool global, + const TQString &domain = TQString::null); virtual ~PluginPolicies(); }; @@ -55,8 +55,8 @@ public: class PluginDomainListView : public DomainListView { Q_OBJECT public: - PluginDomainListView(KConfig *config,const QString &group,KPluginOptions *opt, - QWidget *parent,const char *name = 0); + PluginDomainListView(KConfig *config,const TQString &group,KPluginOptions *opt, + TQWidget *parent,const char *name = 0); virtual ~PluginDomainListView(); protected: @@ -66,28 +66,28 @@ protected: Policies *copy); private: - QString group; + TQString group; KPluginOptions *options; }; /** * dialog for embedding a PluginDomainListView widget */ -class PluginDomainDialog : public QWidget { +class PluginDomainDialog : public TQWidget { Q_OBJECT public: - PluginDomainDialog(QWidget *parent); + PluginDomainDialog(TQWidget *parent); virtual ~PluginDomainDialog(); - void setMainWidget(QWidget *widget); + void setMainWidget(TQWidget *widget); private slots: virtual void slotClose(); private: PluginDomainListView *domainSpecific; - QBoxLayout *thisLayout; + TQBoxLayout *thisLayout; }; class KPluginOptions : public KCModule @@ -95,14 +95,14 @@ class KPluginOptions : public KCModule Q_OBJECT public: - KPluginOptions( KConfig* config, QString group, QWidget* parent = 0, const char* name = 0 ); + KPluginOptions( KConfig* config, TQString group, TQWidget* parent = 0, const char* name = 0 ); ~KPluginOptions(); virtual void load(); virtual void load( bool useDefaults ); virtual void save(); virtual void defaults(); - QString quickHelp() const; + TQString quickHelp() const; private slots: void slotChanged(); @@ -112,9 +112,9 @@ private slots: private: KConfig* m_pConfig; - QString m_groupname; + TQString m_groupname; - QCheckBox *enablePluginsGloballyCB, *enableHTTPOnly, *enableUserDemand; + TQCheckBox *enablePluginsGloballyCB, *enableHTTPOnly, *enableUserDemand; protected slots: @@ -129,10 +129,10 @@ private: private: NSConfigWidget *m_widget; bool m_changed; - QProgressDialog *m_progress; + TQProgressDialog *m_progress; KProcIO* m_nspluginscan; - QSlider *priority; - QLabel *priorityLabel; + TQSlider *priority; + TQLabel *priorityLabel; PluginPolicies global_policies; PluginDomainListView *domainSpecific; KDialogBase *domainSpecificDlg; @@ -148,8 +148,8 @@ private: void dirRemove(); void dirUp(); void dirDown(); - void dirEdited(const QString &); - void dirSelect( QListBoxItem * ); + void dirEdited(const TQString &); + void dirSelect( TQListBoxItem * ); /******************************************************************************/ protected: diff --git a/kcontrol/konqhtml/policies.cpp b/kcontrol/konqhtml/policies.cpp index 153c80888..524bd4d15 100644 --- a/kcontrol/konqhtml/policies.cpp +++ b/kcontrol/konqhtml/policies.cpp @@ -26,14 +26,14 @@ // == class Policies == -Policies::Policies(KConfig* config,const QString &group, - bool global,const QString &domain, const QString &prefix, - const QString &feature_key) : +Policies::Policies(KConfig* config,const TQString &group, + bool global,const TQString &domain, const TQString &prefix, + const TQString &feature_key) : is_global(global), config(config), groupname(group), prefix(prefix), feature_key(feature_key) { if (is_global) { - this->prefix = QString::null; // global keys have no prefix + this->prefix = TQString::null; // global keys have no prefix }/*end if*/ setDomain(domain); } @@ -41,7 +41,7 @@ Policies::Policies(KConfig* config,const QString &group, Policies::~Policies() { } -void Policies::setDomain(const QString &domain) { +void Policies::setDomain(const TQString &domain) { if (is_global) return; this->domain = domain.lower(); groupname = this->domain; // group is domain in this case @@ -50,7 +50,7 @@ void Policies::setDomain(const QString &domain) { void Policies::load() { config->setGroup(groupname); - QString key = prefix + feature_key; + TQString key = prefix + feature_key; if (config->hasKey(key)) feature_enabled = config->readBoolEntry(key); else @@ -64,7 +64,7 @@ void Policies::defaults() { void Policies::save() { config->setGroup(groupname); - QString key = prefix + feature_key; + TQString key = prefix + feature_key; if (feature_enabled != INHERIT_POLICY) config->writeEntry(key, (bool)feature_enabled); else diff --git a/kcontrol/konqhtml/policies.h b/kcontrol/konqhtml/policies.h index b5643c0bd..a9814396a 100644 --- a/kcontrol/konqhtml/policies.h +++ b/kcontrol/konqhtml/policies.h @@ -22,7 +22,7 @@ #ifndef __POLICIES_H__ #define __POLICIES_H__ -#include <qstring.h> +#include <tqstring.h> class KConfig; @@ -54,9 +54,9 @@ public: * @param feature_key key of the "feature enabled" policy. The final * key the policy is stored under will be prefix + featureKey. */ - Policies(KConfig* config, const QString &group, bool global, - const QString &domain, const QString &prefix, - const QString &feature_key); + Policies(KConfig* config, const TQString &group, bool global, + const TQString &domain, const TQString &prefix, + const TQString &feature_key); virtual ~Policies(); @@ -70,7 +70,7 @@ public: /** sets a new domain for this policy * @param domain domain name, will be converted to lowercase */ - void setDomain(const QString &domain); + void setDomain(const TQString &domain); /** * Returns whether the "feature enabled" policy is inherited. @@ -124,10 +124,10 @@ protected: bool is_global; KConfig *config; - QString groupname; - QString domain; - QString prefix; - QString feature_key; + TQString groupname; + TQString domain; + TQString prefix; + TQString feature_key; }; #endif // __POLICIES_H__ diff --git a/kcontrol/konqhtml/policydlg.cpp b/kcontrol/konqhtml/policydlg.cpp index 801068d3a..4f1529ed8 100644 --- a/kcontrol/konqhtml/policydlg.cpp +++ b/kcontrol/konqhtml/policydlg.cpp @@ -2,48 +2,48 @@ // (C) 2002 Leo Savernik <l.savernik@aon.at> // Generalizing the policy dialog -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> #include <klocale.h> #include <kbuttonbox.h> #include <kmessagebox.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include "policydlg.h" #include "policies.h" -PolicyDialog::PolicyDialog( Policies *policies, QWidget *parent, const char *name ) - : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true), +PolicyDialog::PolicyDialog( Policies *policies, TQWidget *parent, const char *name ) + : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true), policies(policies) { - QFrame *main = makeMainWidget(); + TQFrame *main = makeMainWidget(); insertIdx = 1; // index where to insert additional panels - topl = new QVBoxLayout(main, 0, spacingHint()); + topl = new TQVBoxLayout(main, 0, spacingHint()); - QGridLayout *grid = new QGridLayout(topl, 2, 2); + TQGridLayout *grid = new TQGridLayout(topl, 2, 2); grid->setColStretch(1, 1); - QLabel *l = new QLabel(i18n("&Host or domain name:"), main); + TQLabel *l = new TQLabel(i18n("&Host or domain name:"), main); grid->addWidget(l, 0, 0); - le_domain = new QLineEdit(main); + le_domain = new TQLineEdit(main); l->setBuddy( le_domain ); grid->addWidget(le_domain, 0, 1); - connect( le_domain,SIGNAL(textChanged( const QString & )), - SLOT(slotTextChanged( const QString &))); + connect( le_domain,TQT_SIGNAL(textChanged( const TQString & )), + TQT_SLOT(slotTextChanged( const TQString &))); - QWhatsThis::add(le_domain, i18n("Enter the name of a host (like www.kde.org) " + TQWhatsThis::add(le_domain, i18n("Enter the name of a host (like www.kde.org) " "or a domain, starting with a dot (like .kde.org or .org)") ); - l_feature_policy = new QLabel(main); + l_feature_policy = new TQLabel(main); grid->addWidget(l_feature_policy, 1, 0); - cb_feature_policy = new QComboBox(main); + cb_feature_policy = new TQComboBox(main); l_feature_policy->setBuddy( cb_feature_policy ); policy_values << i18n("Use Global") << i18n("Accept") << i18n("Reject"); cb_feature_policy->insertStringList(policy_values); @@ -58,12 +58,12 @@ PolicyDialog::FeatureEnabledPolicy PolicyDialog::featureEnabledPolicy() const { return (FeatureEnabledPolicy)cb_feature_policy->currentItem(); } -void PolicyDialog::slotTextChanged( const QString &text) +void PolicyDialog::slotTextChanged( const TQString &text) { enableButtonOK(!text.isEmpty()); } -void PolicyDialog::setDisableEdit( bool state, const QString& text ) +void PolicyDialog::setDisableEdit( bool state, const TQString& text ) { le_domain->setText( text ); @@ -85,24 +85,24 @@ void PolicyDialog::refresh() { cb_feature_policy->setCurrentItem(pol); } -void PolicyDialog::setFeatureEnabledLabel(const QString &text) { +void PolicyDialog::setFeatureEnabledLabel(const TQString &text) { l_feature_policy->setText(text); } -void PolicyDialog::setFeatureEnabledWhatsThis(const QString &text) { - QWhatsThis::add(cb_feature_policy, text); +void PolicyDialog::setFeatureEnabledWhatsThis(const TQString &text) { + TQWhatsThis::add(cb_feature_policy, text); } -void PolicyDialog::addPolicyPanel(QWidget *panel) { +void PolicyDialog::addPolicyPanel(TQWidget *panel) { topl->insertWidget(insertIdx++,panel); } -QString PolicyDialog::featureEnabledPolicyText() const { +TQString PolicyDialog::featureEnabledPolicyText() const { int pol = cb_feature_policy->currentItem(); if (pol >= 0 && pol < 3) // Keep in sync with FeatureEnabledPolicy return policy_values[pol]; else - return QString::null; + return TQString::null; } void PolicyDialog::accept() @@ -122,7 +122,7 @@ void PolicyDialog::accept() } else { policies->setFeatureEnabled(true); } - QDialog::accept(); + TQDialog::accept(); } #include "policydlg.moc" diff --git a/kcontrol/konqhtml/policydlg.h b/kcontrol/konqhtml/policydlg.h index 6922aa736..bfb63e4f2 100644 --- a/kcontrol/konqhtml/policydlg.h +++ b/kcontrol/konqhtml/policydlg.h @@ -7,8 +7,8 @@ #include <kdialogbase.h> -#include <qlineedit.h> -#include <qstringlist.h> +#include <tqlineedit.h> +#include <tqstringlist.h> class QLabel; class QComboBox; @@ -47,7 +47,7 @@ public: * @param parent parent widget this belongs to * @param name internal name */ - PolicyDialog(Policies *policies, QWidget *parent = 0, const char *name = 0 ); + PolicyDialog(Policies *policies, TQWidget *parent = 0, const char *name = 0 ); virtual ~PolicyDialog() {}; @@ -61,12 +61,12 @@ public: * @return the textual representation of the current "feature enabled" * policy */ - QString featureEnabledPolicyText() const; + TQString featureEnabledPolicyText() const; /* * @return the hostname for which the policy is being set */ - QString domain() const { return le_domain->text(); } + TQString domain() const { return le_domain->text(); } /* * Sets the line-edit to be enabled/disabled. @@ -77,20 +77,20 @@ public: * @param state @p true to enable the line-edit, otherwise disabled. * @param text the text to be set in the line-edit. Default is NULL. */ - void setDisableEdit( bool /*state*/, const QString& text = QString::null ); + void setDisableEdit( bool /*state*/, const TQString& text = TQString::null ); /** * Sets the label for the "feature enabled" policy * @param text label text */ - void setFeatureEnabledLabel(const QString &text); + void setFeatureEnabledLabel(const TQString &text); /** * Sets the "What's This" text for the "feature enabled" policy * combo box. * @param text what's-this text */ - void setFeatureEnabledWhatsThis(const QString &text); + void setFeatureEnabledWhatsThis(const TQString &text); /** * Syncs the controls with the current content of the @@ -108,23 +108,23 @@ public: * @param panel pointer to widget to insert. The dialog takes ownership * of it, but does not reparent it. */ - void addPolicyPanel(QWidget *panel); + void addPolicyPanel(TQWidget *panel); protected slots: virtual void accept(); - void slotTextChanged( const QString &text); + void slotTextChanged( const TQString &text); private: Policies *policies; - QVBoxLayout *topl; + TQVBoxLayout *topl; int insertIdx; - QLineEdit *le_domain; - QLabel *l_feature_policy; - QComboBox *cb_feature_policy; - QWidget *panel; - QStringList policy_values; - QPushButton *okButton; + TQLineEdit *le_domain; + TQLabel *l_feature_policy; + TQComboBox *cb_feature_policy; + TQWidget *panel; + TQStringList policy_values; + TQPushButton *okButton; }; #endif |