summaryrefslogtreecommitdiffstats
path: root/libkdepim/kprefsdialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkdepim/kprefsdialog.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/kprefsdialog.cpp')
-rw-r--r--libkdepim/kprefsdialog.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 93b3feaae..547c712c5 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -50,18 +50,18 @@
namespace KPrefsWidFactory {
-KPrefsWid *create( KConfigSkeletonItem *item, TQWidget *parent )
+KPrefsWid *create( KConfigSkeletonItem *item, TQWidget *tqparent )
{
KConfigSkeleton::ItemBool *boolItem =
dynamic_cast<KConfigSkeleton::ItemBool *>( item );
if ( boolItem ) {
- return new KPrefsWidBool( boolItem, parent );
+ return new KPrefsWidBool( boolItem, tqparent );
}
KConfigSkeleton::ItemString *stringItem =
dynamic_cast<KConfigSkeleton::ItemString *>( item );
if ( stringItem ) {
- return new KPrefsWidString( stringItem, parent );
+ return new KPrefsWidString( stringItem, tqparent );
}
KConfigSkeleton::ItemEnum *enumItem =
@@ -72,7 +72,7 @@ KPrefsWid *create( KConfigSkeletonItem *item, TQWidget *parent )
kdError() << "KPrefsWidFactory::create(): Enum has no choices." << endl;
return 0;
} else {
- KPrefsWidRadios *radios = new KPrefsWidRadios( enumItem, parent );
+ KPrefsWidRadios *radios = new KPrefsWidRadios( enumItem, tqparent );
TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
radios->addRadio( (*it).label );
@@ -84,7 +84,7 @@ KPrefsWid *create( KConfigSkeletonItem *item, TQWidget *parent )
KConfigSkeleton::ItemInt *intItem =
dynamic_cast<KConfigSkeleton::ItemInt *>( item );
if ( intItem ) {
- return new KPrefsWidInt( intItem, parent );
+ return new KPrefsWidInt( intItem, tqparent );
}
return 0;
@@ -99,10 +99,10 @@ TQValueList<TQWidget *> KPrefsWid::widgets() const
}
-KPrefsWidBool::KPrefsWidBool( KConfigSkeleton::ItemBool *item, TQWidget *parent )
+KPrefsWidBool::KPrefsWidBool( KConfigSkeleton::ItemBool *item, TQWidget *tqparent )
: mItem( item )
{
- mCheck = new TQCheckBox( item->label(), parent);
+ mCheck = new TQCheckBox( item->label(), tqparent);
connect( mCheck, TQT_SIGNAL( clicked() ), TQT_SIGNAL( changed() ) );
if ( !item->whatsThis().isNull() ) {
TQWhatsThis::add( mCheck, item->whatsThis() );
@@ -133,11 +133,11 @@ TQValueList<TQWidget *> KPrefsWidBool::widgets() const
KPrefsWidInt::KPrefsWidInt( KConfigSkeleton::ItemInt *item,
- TQWidget *parent )
+ TQWidget *tqparent )
: mItem( item )
{
- mLabel = new TQLabel( mItem->label()+':', parent );
- mSpin = new TQSpinBox( parent );
+ mLabel = new TQLabel( mItem->label()+':', tqparent );
+ mSpin = new TQSpinBox( tqparent );
if ( !item->minValue().isNull() ) {
mSpin->setMinValue( item->minValue().toInt() );
}
@@ -183,12 +183,12 @@ TQValueList<TQWidget *> KPrefsWidInt::widgets() const
KPrefsWidColor::KPrefsWidColor( KConfigSkeleton::ItemColor *item,
- TQWidget *parent )
+ TQWidget *tqparent )
: mItem( item )
{
- mButton = new KColorButton( parent );
+ mButton = new KColorButton( tqparent );
connect( mButton, TQT_SIGNAL( changed( const TQColor & ) ), TQT_SIGNAL( changed() ) );
- mLabel = new TQLabel( mButton, mItem->label()+':', parent );
+ mLabel = new TQLabel( mButton, mItem->label()+':', tqparent );
mLabel->setBuddy( mButton );
TQString whatsThis = mItem->whatsThis();
if (!whatsThis.isNull()) {
@@ -223,15 +223,15 @@ KColorButton *KPrefsWidColor::button()
KPrefsWidFont::KPrefsWidFont( KConfigSkeleton::ItemFont *item,
- TQWidget *parent, const TQString &sampleText )
+ TQWidget *tqparent, const TQString &sampleText )
: mItem( item )
{
- mLabel = new TQLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', tqparent );
- mPreview = new TQLabel( sampleText, parent );
+ mPreview = new TQLabel( sampleText, tqparent );
mPreview->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- mButton = new TQPushButton( i18n("Choose..."), parent );
+ mButton = new TQPushButton( i18n("Choose..."), tqparent );
connect( mButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectFont() ) );
TQString whatsThis = mItem->whatsThis();
if (!whatsThis.isNull()) {
@@ -281,11 +281,11 @@ void KPrefsWidFont::selectFont()
KPrefsWidTime::KPrefsWidTime( KConfigSkeleton::ItemDateTime *item,
- TQWidget *parent )
+ TQWidget *tqparent )
: mItem( item )
{
- mLabel = new TQLabel( mItem->label()+':', parent );
- mTimeEdit = new KTimeEdit( parent );
+ mLabel = new TQLabel( mItem->label()+':', tqparent );
+ mTimeEdit = new KTimeEdit( tqparent );
mLabel->setBuddy( mTimeEdit );
connect( mTimeEdit, TQT_SIGNAL( timeChanged( TQTime ) ), TQT_SIGNAL( changed() ) );
TQString whatsThis = mItem->whatsThis();
@@ -320,14 +320,14 @@ KTimeEdit *KPrefsWidTime::timeEdit()
KPrefsWidDuration::KPrefsWidDuration( KConfigSkeleton::ItemDateTime *item,
- TQWidget *parent )
+ TQWidget *tqparent )
: mItem( item )
{
- mLabel = new TQLabel( mItem->label()+':', parent );
- mTimeEdit = new QTimeEdit( parent );
+ mLabel = new TQLabel( mItem->label()+':', tqparent );
+ mTimeEdit = new TQTimeEdit( tqparent );
mLabel->setBuddy( mTimeEdit );
mTimeEdit->setAutoAdvance( true );
- mTimeEdit->setDisplay( QTimeEdit::Hours | QTimeEdit::Minutes );
+ mTimeEdit->setDisplay( TQTimeEdit::Hours | TQTimeEdit::Minutes );
mTimeEdit->setRange( TQTime( 0, 1 ), TQTime( 24, 0 ) ); // [1min, 24hr]
connect( mTimeEdit,
TQT_SIGNAL( valueChanged( const TQTime & ) ), TQT_SIGNAL( changed() ) );
@@ -354,18 +354,18 @@ TQLabel *KPrefsWidDuration::label()
return mLabel;
}
-QTimeEdit *KPrefsWidDuration::timeEdit()
+TQTimeEdit *KPrefsWidDuration::timeEdit()
{
return mTimeEdit;
}
KPrefsWidDate::KPrefsWidDate( KConfigSkeleton::ItemDateTime *item,
- TQWidget *parent )
+ TQWidget *tqparent )
: mItem( item )
{
- mLabel = new TQLabel( mItem->label()+':', parent );
- mDateEdit = new KDateEdit( parent );
+ mLabel = new TQLabel( mItem->label()+':', tqparent );
+ mDateEdit = new KDateEdit( tqparent );
mLabel->setBuddy( mDateEdit );
connect( mDateEdit, TQT_SIGNAL( dateChanged( const TQDate& ) ), TQT_SIGNAL( changed() ) );
TQString whatsThis = mItem->whatsThis();
@@ -398,10 +398,10 @@ KDateEdit *KPrefsWidDate::dateEdit()
KPrefsWidRadios::KPrefsWidRadios( KConfigSkeleton::ItemEnum *item,
- TQWidget *parent )
+ TQWidget *tqparent )
: mItem( item )
{
- mBox = new TQButtonGroup( 1, Qt::Horizontal, mItem->label(), parent );
+ mBox = new TQButtonGroup( 1, TQt::Horizontal, mItem->label(), tqparent );
connect( mBox, TQT_SIGNAL( clicked( int ) ), TQT_SIGNAL( changed() ) );
}
@@ -440,10 +440,10 @@ TQValueList<TQWidget *> KPrefsWidRadios::widgets() const
}
KPrefsWidCombo::KPrefsWidCombo( KConfigSkeleton::ItemEnum *item,
- TQWidget *parent )
+ TQWidget *tqparent )
: mItem( item )
{
- TQHBox *hbox = new TQHBox(parent);
+ TQHBox *hbox = new TQHBox(tqparent);
new TQLabel( mItem->label(), hbox );
mCombo = new TQComboBox( hbox );
connect( mCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
@@ -476,12 +476,12 @@ TQComboBox* KPrefsWidCombo::comboBox()
}
KPrefsWidString::KPrefsWidString( KConfigSkeleton::ItemString *item,
- TQWidget *parent,
+ TQWidget *tqparent,
TQLineEdit::EchoMode echomode )
: mItem( item )
{
- mLabel = new TQLabel( mItem->label()+':', parent );
- mEdit = new TQLineEdit( parent );
+ mLabel = new TQLabel( mItem->label()+':', tqparent );
+ mEdit = new TQLineEdit( tqparent );
mLabel->setBuddy( mEdit );
connect( mEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
TQT_SIGNAL( changed() ) );
@@ -525,12 +525,12 @@ TQValueList<TQWidget *> KPrefsWidString::widgets() const
}
-KPrefsWidPath::KPrefsWidPath( KConfigSkeleton::ItemPath *item, TQWidget *parent,
+KPrefsWidPath::KPrefsWidPath( KConfigSkeleton::ItemPath *item, TQWidget *tqparent,
const TQString &filter, uint mode )
: mItem( item )
{
- mLabel = new TQLabel( mItem->label()+':', parent );
- mURLRequester = new KURLRequester( parent );
+ mLabel = new TQLabel( mItem->label()+':', tqparent );
+ mURLRequester = new KURLRequester( tqparent );
mLabel->setBuddy( mURLRequester );
mURLRequester->setMode( mode );
mURLRequester->setFilter( filter );
@@ -590,49 +590,49 @@ void KPrefsWidManager::addWid( KPrefsWid *wid )
}
KPrefsWidBool *KPrefsWidManager::addWidBool( KConfigSkeleton::ItemBool *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidBool *w = new KPrefsWidBool( item, parent );
+ KPrefsWidBool *w = new KPrefsWidBool( item, tqparent );
addWid( w );
return w;
}
KPrefsWidTime *KPrefsWidManager::addWidTime( KConfigSkeleton::ItemDateTime *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidTime *w = new KPrefsWidTime( item, parent );
+ KPrefsWidTime *w = new KPrefsWidTime( item, tqparent );
addWid( w );
return w;
}
KPrefsWidDuration *KPrefsWidManager::addWidDuration( KConfigSkeleton::ItemDateTime *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidDuration *w = new KPrefsWidDuration( item, parent );
+ KPrefsWidDuration *w = new KPrefsWidDuration( item, tqparent );
addWid( w );
return w;
}
KPrefsWidDate *KPrefsWidManager::addWidDate( KConfigSkeleton::ItemDateTime *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidDate *w = new KPrefsWidDate( item, parent );
+ KPrefsWidDate *w = new KPrefsWidDate( item, tqparent );
addWid( w );
return w;
}
KPrefsWidColor *KPrefsWidManager::addWidColor( KConfigSkeleton::ItemColor *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidColor *w = new KPrefsWidColor( item, parent );
+ KPrefsWidColor *w = new KPrefsWidColor( item, tqparent );
addWid( w );
return w;
}
KPrefsWidRadios *KPrefsWidManager::addWidRadios( KConfigSkeleton::ItemEnum *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidRadios *w = new KPrefsWidRadios( item, parent );
+ KPrefsWidRadios *w = new KPrefsWidRadios( item, tqparent );
TQValueList<KConfigSkeleton::ItemEnum::Choice> choices;
choices = item->choices();
TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
@@ -644,9 +644,9 @@ KPrefsWidRadios *KPrefsWidManager::addWidRadios( KConfigSkeleton::ItemEnum *item
}
KPrefsWidCombo *KPrefsWidManager::addWidCombo( KConfigSkeleton::ItemEnum *item,
- TQWidget* parent )
+ TQWidget* tqparent )
{
- KPrefsWidCombo *w = new KPrefsWidCombo( item, parent );
+ KPrefsWidCombo *w = new KPrefsWidCombo( item, tqparent );
TQValueList<KConfigSkeleton::ItemEnum::Choice> choices;
choices = item->choices();
TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
@@ -658,43 +658,43 @@ KPrefsWidCombo *KPrefsWidManager::addWidCombo( KConfigSkeleton::ItemEnum *item,
}
KPrefsWidString *KPrefsWidManager::addWidString( KConfigSkeleton::ItemString *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidString *w = new KPrefsWidString( item, parent,
+ KPrefsWidString *w = new KPrefsWidString( item, tqparent,
TQLineEdit::Normal );
addWid( w );
return w;
}
KPrefsWidPath *KPrefsWidManager::addWidPath( KConfigSkeleton::ItemPath *item,
- TQWidget *parent, const TQString &filter, uint mode )
+ TQWidget *tqparent, const TQString &filter, uint mode )
{
- KPrefsWidPath *w = new KPrefsWidPath( item, parent, filter, mode );
+ KPrefsWidPath *w = new KPrefsWidPath( item, tqparent, filter, mode );
addWid( w );
return w;
}
KPrefsWidString *KPrefsWidManager::addWidPassword( KConfigSkeleton::ItemString *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidString *w = new KPrefsWidString( item, parent, TQLineEdit::Password );
+ KPrefsWidString *w = new KPrefsWidString( item, tqparent, TQLineEdit::Password );
addWid( w );
return w;
}
KPrefsWidFont *KPrefsWidManager::addWidFont( KConfigSkeleton::ItemFont *item,
- TQWidget *parent,
+ TQWidget *tqparent,
const TQString &sampleText )
{
- KPrefsWidFont *w = new KPrefsWidFont( item, parent, sampleText );
+ KPrefsWidFont *w = new KPrefsWidFont( item, tqparent, sampleText );
addWid( w );
return w;
}
KPrefsWidInt *KPrefsWidManager::addWidInt( KConfigSkeleton::ItemInt *item,
- TQWidget *parent )
+ TQWidget *tqparent )
{
- KPrefsWidInt *w = new KPrefsWidInt( item, parent );
+ KPrefsWidInt *w = new KPrefsWidInt( item, tqparent );
addWid( w );
return w;
}
@@ -733,9 +733,9 @@ void KPrefsWidManager::writeWidConfig()
}
-KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, TQWidget *parent, char *name,
+KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, TQWidget *tqparent, char *name,
bool modal )
- : KDialogBase(IconList,i18n("Preferences"),Ok|Apply|Cancel|Default,Ok,parent,
+ : KDialogBase(IconList,i18n("Preferences"),Ok|Apply|Cancel|Default,Ok,tqparent,
name,modal,true),
KPrefsWidManager( prefs )
{
@@ -857,9 +857,9 @@ void KPrefsDialog::slotDefault()
}
-KPrefsModule::KPrefsModule( KConfigSkeleton *prefs, TQWidget *parent,
+KPrefsModule::KPrefsModule( KConfigSkeleton *prefs, TQWidget *tqparent,
const char *name )
- : KCModule( parent, name ),
+ : KCModule( tqparent, name ),
KPrefsWidManager( prefs )
{
emit changed( false );