diff options
Diffstat (limited to 'kaddressbook/views/configurecardviewdialog.cpp')
-rw-r--r-- | kaddressbook/views/configurecardviewdialog.cpp | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp index 8843d3c68..ed7cfda1f 100644 --- a/kaddressbook/views/configurecardviewdialog.cpp +++ b/kaddressbook/views/configurecardviewdialog.cpp @@ -21,15 +21,15 @@ without including the source code for Qt in the source distribution. */ -#include <qstring.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qvbox.h> -#include <qgroupbox.h> -#include <qspinbox.h> -#include <qtabwidget.h> -#include <qwhatsthis.h> +#include <tqstring.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqvbox.h> +#include <tqgroupbox.h> +#include <tqspinbox.h> +#include <tqtabwidget.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <kglobal.h> @@ -47,11 +47,11 @@ ///////////////////////////////// // ConfigureCardViewDialog -ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent, +ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : ViewConfigureWidget( ab, parent, name ) { - QWidget *page = addPage( i18n( "Look & Feel" ), QString::null, + TQWidget *page = addPage( i18n( "Look & Feel" ), TQString::null, DesktopIcon( "looknfeel" ) ); mAdvancedPage = new CardViewLookNFeelPage( page ); } @@ -76,8 +76,8 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config ) //////////////////////// // CardViewLookNFeelPage -CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) - : QVBox( parent, name ) +CardViewLookNFeelPage::CardViewLookNFeelPage( TQWidget *parent, const char *name ) + : TQVBox( parent, name ) { initGUI(); } @@ -90,7 +90,7 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config ) { // colors cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) ); - QColor c; + TQColor c; c = KGlobalSettings::baseColor(); lbColors->insertItem( new ColorListItem( i18n("Background Color"), config->readColorEntry( "BackgroundColor", &c ) ) ); @@ -113,10 +113,10 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config ) enableColors(); // fonts - QFont fnt = font(); - updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (QLabel*)lTextFont ); + TQFont fnt = font(); + updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (TQLabel*)lTextFont ); fnt.setBold( true ); - updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (QLabel*)lHeaderFont ); + updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (TQLabel*)lHeaderFont ); cbEnableCustomFonts->setChecked( config->readBoolEntry( "EnableCustomFonts", false ) ); enableFonts(); @@ -166,15 +166,15 @@ void CardViewLookNFeelPage::saveSettings( KConfig *config ) void CardViewLookNFeelPage::setTextFont() { - QFont f( lTextFont->font() ); - if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted ) + TQFont f( lTextFont->font() ); + if ( KFontDialog::getFont( f, false, this ) == TQDialog::Accepted ) updateFontLabel( f, lTextFont ); } void CardViewLookNFeelPage::setHeaderFont() { - QFont f( lHeaderFont->font() ); - if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted ) + TQFont f( lHeaderFont->font() ); + if ( KFontDialog::getFont( f,false, this ) == TQDialog::Accepted ) updateFontLabel( f, lHeaderFont ); } @@ -193,102 +193,102 @@ void CardViewLookNFeelPage::initGUI() int spacing = KDialog::spacingHint(); int margin = KDialog::marginHint(); - QTabWidget *tabs = new QTabWidget( this ); + TQTabWidget *tabs = new TQTabWidget( this ); // Layout - QVBox *loTab = new QVBox( this, "layouttab" ); + TQVBox *loTab = new TQVBox( this, "layouttab" ); loTab->setSpacing( spacing ); loTab->setMargin( margin ); - QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); + TQGroupBox *gbGeneral = new TQGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); - cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); + cbDrawSeps = new TQCheckBox( i18n("Draw &separators"), gbGeneral ); - QHBox *hbSW = new QHBox( gbGeneral ); - QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); - sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); + TQHBox *hbSW = new TQHBox( gbGeneral ); + TQLabel *lSW = new TQLabel( i18n("Separator &width:"), hbSW ); + sbSepWidth = new TQSpinBox( 1, 50, 1, hbSW ); lSW->setBuddy( sbSepWidth); - QHBox *hbPadding = new QHBox( gbGeneral ); - QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); - sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); + TQHBox *hbPadding = new TQHBox( gbGeneral ); + TQLabel *lSpacing = new TQLabel( i18n("&Padding:"), hbPadding ); + sbSpacing = new TQSpinBox( 0, 100, 1, hbPadding ); lSpacing->setBuddy( sbSpacing ); - QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); + TQGroupBox *gbCards = new TQGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); - QHBox *hbMargin = new QHBox( gbCards ); - QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); - sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); + TQHBox *hbMargin = new TQHBox( gbCards ); + TQLabel *lMargin = new TQLabel( i18n("&Margin:"), hbMargin ); + sbMargin = new TQSpinBox( 0, 100, 1, hbMargin ); lMargin->setBuddy( sbMargin ); - cbDrawBorders = new QCheckBox( i18n("Draw &borders"), gbCards ); + cbDrawBorders = new TQCheckBox( i18n("Draw &borders"), gbCards ); - loTab->setStretchFactor( new QWidget( loTab ), 1 ); + loTab->setStretchFactor( new TQWidget( loTab ), 1 ); - QWhatsThis::add( sbMargin, i18n( + TQWhatsThis::add( sbMargin, i18n( "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " "incrementing the item margin will add space between the focus rectangle and the item data." ) ); - QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) ); - QWhatsThis::add( sbSpacing, i18n( + TQWhatsThis::add( lMargin, TQWhatsThis::textFor( sbMargin ) ); + TQWhatsThis::add( sbSpacing, i18n( "The item spacing decides the distance (in pixels) between the items and anything else: the view " "borders, other items or column separators." ) ); - QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) ); - QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); - QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) ); + TQWhatsThis::add( lSpacing, TQWhatsThis::textFor( sbSpacing ) ); + TQWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); + TQWhatsThis::add( lSW, TQWhatsThis::textFor( sbSepWidth ) ); tabs->addTab( loTab, i18n("&Layout") ); // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + TQVBox *colorTab = new TQVBox( this, "colortab" ); colorTab->setSpacing( spacing ); colorTab->setMargin( spacing ); - cbEnableCustomColors = new QCheckBox( i18n("&Enable custom colors"), colorTab ); - connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); + cbEnableCustomColors = new TQCheckBox( i18n("&Enable custom colors"), colorTab ); + connect( cbEnableCustomColors, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableColors()) ); lbColors = new ColorListBox( colorTab ); tabs->addTab( colorTab, i18n("&Colors") ); - QWhatsThis::add( cbEnableCustomColors, i18n( + TQWhatsThis::add( cbEnableCustomColors, i18n( "If custom colors is enabled, you may choose the colors for the view below. " "Otherwise colors from your current KDE color scheme are used." ) ); - QWhatsThis::add( lbColors, i18n( + TQWhatsThis::add( lbColors, i18n( "Double click or press RETURN on a item to select a color for the related strings in the view." ) ); // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + TQVBox *fntTab = new TQVBox( this, "fonttab" ); fntTab->setSpacing( spacing ); fntTab->setMargin( spacing ); - cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab ); - connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); + cbEnableCustomFonts = new TQCheckBox( i18n("&Enable custom fonts"), fntTab ); + connect( cbEnableCustomFonts, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableFonts()) ); - vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + vbFonts = new TQWidget( fntTab ); + TQGridLayout *gFnts = new TQGridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); gFnts->setAutoAdd( true ); gFnts->setColStretch( 1, 1 ); - QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); - lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + TQLabel *lTFnt = new TQLabel( i18n("&Text font:"), vbFonts ); + lTextFont = new TQLabel( vbFonts ); + lTextFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); btnFont = new KPushButton( i18n("Choose..."), vbFonts ); lTFnt->setBuddy( btnFont ); - connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) ); + connect( btnFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTextFont()) ); - QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); - lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + TQLabel *lHFnt = new TQLabel( i18n("&Header font:"), vbFonts ); + lHeaderFont = new TQLabel( vbFonts ); + lHeaderFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); lHFnt->setBuddy( btnHeaderFont ); - connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) ); + connect( btnHeaderFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setHeaderFont()) ); - fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); + fntTab->setStretchFactor( new TQWidget( fntTab ), 1 ); - QWhatsThis::add( cbEnableCustomFonts, i18n( + TQWhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " "Otherwise the default KDE font will be used, in bold style for the header and " "normal style for the data." @@ -297,23 +297,23 @@ void CardViewLookNFeelPage::initGUI() tabs->addTab( fntTab, i18n("&Fonts") ); // Behaviour - QVBox *behaviourTab = new QVBox( this ); + TQVBox *behaviourTab = new TQVBox( this ); behaviourTab->setMargin( margin ); behaviourTab->setSpacing( spacing ); - cbShowEmptyFields = new QCheckBox( i18n("Show &empty fields"), behaviourTab ); - cbShowFieldLabels = new QCheckBox( i18n("Show field &labels"), behaviourTab ); + cbShowEmptyFields = new TQCheckBox( i18n("Show &empty fields"), behaviourTab ); + cbShowFieldLabels = new TQCheckBox( i18n("Show field &labels"), behaviourTab ); - behaviourTab->setStretchFactor( new QWidget( behaviourTab ), 1 ); + behaviourTab->setStretchFactor( new TQWidget( behaviourTab ), 1 ); tabs->addTab( behaviourTab, i18n("Be&havior") ); } -void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l ) +void CardViewLookNFeelPage::updateFontLabel( TQFont fnt, TQLabel *l ) { l->setFont( fnt ); - l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); + l->setText( TQString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); } #include "configurecardviewdialog.moc" |