summaryrefslogtreecommitdiffstats
path: root/kitchensync/src/configguisunbird.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kitchensync/src/configguisunbird.cpp')
-rw-r--r--kitchensync/src/configguisunbird.cpp216
1 files changed, 108 insertions, 108 deletions
diff --git a/kitchensync/src/configguisunbird.cpp b/kitchensync/src/configguisunbird.cpp
index 7b09cd50c..99e86f3c7 100644
--- a/kitchensync/src/configguisunbird.cpp
+++ b/kitchensync/src/configguisunbird.cpp
@@ -22,16 +22,16 @@
#include "configguisunbird.h"
-#include <qdom.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qsizepolicy.h>
-#include <qptrlist.h>
-#include <qspinbox.h>
-#include <qwidget.h>
+#include <tqdom.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqsizepolicy.h>
+#include <tqptrlist.h>
+#include <tqspinbox.h>
+#include <tqwidget.h>
#include <kurlrequester.h>
#include <klineedit.h>
@@ -40,131 +40,131 @@
#include <klocale.h>
#include <kfile.h>
-ConfigGuiSunbird::ConfigGuiSunbird( const QSync::Member &member, QWidget *parent )
+ConfigGuiSunbird::ConfigGuiSunbird( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QTabWidget *tabWidget = new QTabWidget( this );
+ TQTabWidget *tabWidget = new TQTabWidget( this );
topLayout()->addWidget( tabWidget );
- mLocalWidget = new QWidget( tabWidget );
- mLocalLayout = new QVBoxLayout( mLocalWidget, KDialog::spacingHint() );
+ mLocalWidget = new TQWidget( tabWidget );
+ mLocalLayout = new TQVBoxLayout( mLocalWidget, KDialog::spacingHint() );
- mWebdavWidget = new QWidget( tabWidget );
- mWebdavLayout = new QVBoxLayout( mWebdavWidget, KDialog::spacingHint() );
+ mWebdavWidget = new TQWidget( tabWidget );
+ mWebdavLayout = new TQVBoxLayout( mWebdavWidget, KDialog::spacingHint() );
tabWidget->addTab( mLocalWidget, i18n( "Local Calendars" ) );
tabWidget->addTab( mWebdavWidget, i18n( "WebDAV Calendars" ) );
KPushButton *mLocalAddButton = new KPushButton( mLocalWidget );
mLocalAddButton->setText( i18n( "Add new calendar" ) );
- mLocalAddButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mLocalAddButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
mLocalLayout->addWidget( mLocalAddButton );
- connect( mLocalAddButton, SIGNAL( clicked() ),
- this, SLOT( addLocalCalendar() ) );
+ connect( mLocalAddButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addLocalCalendar() ) );
KPushButton *mWebdavAddButton = new KPushButton( mWebdavWidget );
mWebdavAddButton->setText( i18n( "Add new calendar" ) );
- mWebdavAddButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mWebdavAddButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
mWebdavLayout->addWidget( mWebdavAddButton );
- connect( mWebdavAddButton, SIGNAL( clicked() ),
- this, SLOT( addWebdavCalendar() ) );
+ connect( mWebdavAddButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addWebdavCalendar() ) );
- mLocalSpacer = new QSpacerItem( 20, 40, QSizePolicy::Expanding );
+ mLocalSpacer = new TQSpacerItem( 20, 40, TQSizePolicy::Expanding );
mLocalLayout->addItem( mLocalSpacer );
- mWebdavSpacer = new QSpacerItem( 20, 40, QSizePolicy::Expanding );
+ mWebdavSpacer = new TQSpacerItem( 20, 40, TQSizePolicy::Expanding );
mWebdavLayout->addItem( mWebdavSpacer );
}
-void ConfigGuiSunbird::load( const QString &xml )
+void ConfigGuiSunbird::load( const TQString &xml )
{
- QString path;
- QString url;
- QString username;
- QString password;
- QString defaultcal;
- QString days;
-
- QDomDocument doc;
+ TQString path;
+ TQString url;
+ TQString username;
+ TQString password;
+ TQString defaultcal;
+ TQString days;
+
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "file" ) {
- QDomAttr pathAttr = element.attributeNode( "path" );
+ TQDomAttr pathAttr = element.attributeNode( "path" );
path = pathAttr.value();
- QDomAttr defaultAttr = element.attributeNode( "default" );
+ TQDomAttr defaultAttr = element.attributeNode( "default" );
defaultcal = defaultAttr.value();
- QDomAttr daysAttr = element.attributeNode( "deletedaysold" );
+ TQDomAttr daysAttr = element.attributeNode( "deletedaysold" );
days = daysAttr.value();
LocalCalendar *cal = new LocalCalendar( path, defaultcal, days, mLocalWidget );
mLocalLayout->removeItem( mLocalSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mLocalLayout->addWidget( cal );
mLocalLayout->addItem( mLocalSpacer );
mLocalList.append( cal );
- connect( cal, SIGNAL( deleteRequest( LocalCalendar* ) ), SLOT( delLocalCalendar( LocalCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( LocalCalendar* ) ), TQT_SLOT( delLocalCalendar( LocalCalendar* ) ) );
cal->show();
} else if ( element.tagName() == "webdav" ) {
- QDomAttr urlAttr = element.attributeNode( "url" );
+ TQDomAttr urlAttr = element.attributeNode( "url" );
url = urlAttr.value();
- QDomAttr unameAttr = element.attributeNode( "username" );
+ TQDomAttr unameAttr = element.attributeNode( "username" );
username = unameAttr.value();
- QDomAttr pwordAttr = element.attributeNode( "password" );
+ TQDomAttr pwordAttr = element.attributeNode( "password" );
password = pwordAttr.value();
- QDomAttr defaultAttr = element.attributeNode( "default" );
+ TQDomAttr defaultAttr = element.attributeNode( "default" );
defaultcal = defaultAttr.value();
- QDomAttr daysAttr = element.attributeNode( "deletedaysold" );
+ TQDomAttr daysAttr = element.attributeNode( "deletedaysold" );
days = daysAttr.value();
WebdavCalendar *cal = new WebdavCalendar( username, password,
url, defaultcal, days, mWebdavWidget );
mWebdavLayout->removeItem( mWebdavSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mWebdavLayout->addWidget( cal );
mWebdavLayout->addItem( mWebdavSpacer );
mWebdavList.append( cal );
- connect( cal, SIGNAL( deleteRequest( WebdavCalendar* ) ), SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( WebdavCalendar* ) ), TQT_SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
cal->show();
}
}
}
-QString ConfigGuiSunbird::save() const
+TQString ConfigGuiSunbird::save() const
{
- QString config = "<config>\n";
+ TQString config = "<config>\n";
for ( uint i = 0; i < mLocalList.count(); ++i ) {
LocalCalendar *lcal = mLocalList[ i ];
- config += QString( "<file " );
- config += QString( "path=\"%1\" " ).arg( lcal->mPathRequester->url() );
+ config += TQString( "<file " );
+ config += TQString( "path=\"%1\" " ).arg( lcal->mPathRequester->url() );
if ( lcal->mDaysCheckBox->isChecked() ) {
- config += QString( "deletedaysold=\"%1\" " ).arg( lcal->mDaysSpinBox->value() );
+ config += TQString( "deletedaysold=\"%1\" " ).arg( lcal->mDaysSpinBox->value() );
}
if ( lcal->mDefaultCheckBox->isChecked() ) {
- config += QString( "default=\"1\" " );
+ config += TQString( "default=\"1\" " );
}
- config += QString( "/>\n" );
+ config += TQString( "/>\n" );
}
for ( uint i = 0; i < mWebdavList.count(); ++i ) {
WebdavCalendar *wcal = mWebdavList[ i ];
- config += QString( "<webdav " );
- config += QString( "username=\"%1\" " ).arg( wcal->mUsername->text() );
- config += QString( "password=\"%1\" " ).arg( wcal->mPassword->text() );
- config += QString( "url=\"%1\" " ).arg( wcal->mUrl->text() );
+ config += TQString( "<webdav " );
+ config += TQString( "username=\"%1\" " ).arg( wcal->mUsername->text() );
+ config += TQString( "password=\"%1\" " ).arg( wcal->mPassword->text() );
+ config += TQString( "url=\"%1\" " ).arg( wcal->mUrl->text() );
if ( wcal->mDaysCheckBox->isChecked() ) {
- config += QString( "deletedaysold=\"%1\" " ).arg( wcal->mDaysSpinBox->value() );
+ config += TQString( "deletedaysold=\"%1\" " ).arg( wcal->mDaysSpinBox->value() );
}
if ( wcal->mDefaultCheckBox->isChecked() ) {
- config += QString( "default=\"1\" " );
+ config += TQString( "default=\"1\" " );
}
- config += QString( "/>\n" );
+ config += TQString( "/>\n" );
}
config += "</config>";
@@ -175,12 +175,12 @@ void ConfigGuiSunbird::addLocalCalendar()
{
LocalCalendar *cal = new LocalCalendar( mLocalWidget );
mLocalLayout->removeItem( mLocalSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mLocalLayout->addWidget( cal );
mLocalLayout->addItem( mLocalSpacer );
mLocalList.append( cal );
- connect( cal, SIGNAL( deleteRequest( LocalCalendar* ) ), SLOT( delLocalCalendar( LocalCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( LocalCalendar* ) ), TQT_SLOT( delLocalCalendar( LocalCalendar* ) ) );
cal->show();
}
@@ -194,12 +194,12 @@ void ConfigGuiSunbird::addWebdavCalendar()
{
WebdavCalendar *cal = new WebdavCalendar( mWebdavWidget );
mWebdavLayout->removeItem( mWebdavSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mWebdavLayout->addWidget( cal );
mWebdavLayout->addItem( mWebdavSpacer );
mWebdavList.append( cal );
- connect( cal, SIGNAL( deleteRequest( WebdavCalendar* ) ), SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( WebdavCalendar* ) ), TQT_SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
cal->show();
}
@@ -209,14 +209,14 @@ void ConfigGuiSunbird::delWebdavCalendar( WebdavCalendar *calendar )
calendar->deleteLater();
}
-LocalCalendar::LocalCalendar( QWidget *parent )
- : QWidget( parent )
+LocalCalendar::LocalCalendar( TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
}
-LocalCalendar::LocalCalendar( const QString &path, const QString &defaultcal, const QString &days, QWidget *parent )
- : QWidget( parent )
+LocalCalendar::LocalCalendar( const TQString &path, const TQString &defaultcal, const TQString &days, TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
@@ -232,39 +232,39 @@ LocalCalendar::LocalCalendar( const QString &path, const QString &defaultcal, co
void LocalCalendar::initGui()
{
- QBoxLayout *bottomLayout = new QHBoxLayout();
+ TQBoxLayout *bottomLayout = new TQHBoxLayout();
- mDaysCheckBox = new QCheckBox( this );
+ mDaysCheckBox = new TQCheckBox( this );
mDaysCheckBox->setText( i18n( "Sync only events newer than" ) );
- mDaysSpinBox = new QSpinBox( this );
+ mDaysSpinBox = new TQSpinBox( this );
mDaysSpinBox->setDisabled( true );
- mDaysSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mDaysSpinBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
- connect( mDaysCheckBox, SIGNAL( toggled( bool ) ),
- this, SLOT( toggleDays( bool ) ) );
+ connect( mDaysCheckBox, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( toggleDays( bool ) ) );
bottomLayout->addWidget( mDaysCheckBox );
bottomLayout->addWidget( mDaysSpinBox );
- bottomLayout->addWidget( new QLabel( i18n( "day(s)" ), this ) );
+ bottomLayout->addWidget( new TQLabel( i18n( "day(s)" ), this ) );
- QGridLayout *localLayout = new QGridLayout( this );
+ TQGridLayout *localLayout = new TQGridLayout( this );
mPathRequester = new KURLRequester( this );
KPushButton *removeButton = new KPushButton( this );
- removeButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ removeButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
removeButton->setText( i18n( "Remove" ) );
- connect( removeButton, SIGNAL( clicked() ),
- this, SLOT( deleteWidget() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteWidget() ) );
- mDefaultCheckBox = new QCheckBox( this );
+ mDefaultCheckBox = new TQCheckBox( this );
mDefaultCheckBox->setText( i18n( "Set as Default" ) );
- localLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Expanding ), 0, 0 );
- localLayout->addWidget( new QLabel( i18n( "Location:" ), this ), 1, 0 );
+ localLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Expanding ), 0, 0 );
+ localLayout->addWidget( new TQLabel( i18n( "Location:" ), this ), 1, 0 );
localLayout->addWidget( mPathRequester, 1, 1 );
- localLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 1, 2 );
+ localLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 1, 2 );
localLayout->addWidget( removeButton, 1, 3 );
localLayout->addMultiCellLayout( bottomLayout, 2, 2, 0, 2 );
localLayout->addWidget( mDefaultCheckBox, 2, 3 );
@@ -275,15 +275,15 @@ void LocalCalendar::deleteWidget()
emit deleteRequest( this );
}
-WebdavCalendar::WebdavCalendar( QWidget *parent )
- : QWidget( parent )
+WebdavCalendar::WebdavCalendar( TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
};
-WebdavCalendar::WebdavCalendar( const QString &username, const QString &password, const QString &url,
- const QString &defaultcal, const QString &days, QWidget *parent )
- : QWidget( parent )
+WebdavCalendar::WebdavCalendar( const TQString &username, const TQString &password, const TQString &url,
+ const TQString &defaultcal, const TQString &days, TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
@@ -301,23 +301,23 @@ WebdavCalendar::WebdavCalendar( const QString &username, const QString &password
void WebdavCalendar::initGui()
{
- QBoxLayout *bottomLayout = new QHBoxLayout();
+ TQBoxLayout *bottomLayout = new TQHBoxLayout();
- mDaysCheckBox = new QCheckBox( this );
+ mDaysCheckBox = new TQCheckBox( this );
mDaysCheckBox->setText( i18n( "Sync only events newer than" ) );
- mDaysSpinBox = new QSpinBox( this );
+ mDaysSpinBox = new TQSpinBox( this );
mDaysSpinBox->setDisabled( true );
- mDaysSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mDaysSpinBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
- connect( mDaysCheckBox, SIGNAL( toggled( bool ) ),
- this, SLOT( toggleDays( bool ) ) );
+ connect( mDaysCheckBox, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( toggleDays( bool ) ) );
bottomLayout->addWidget( mDaysCheckBox );
bottomLayout->addWidget( mDaysSpinBox );
- bottomLayout->addWidget( new QLabel( i18n( "day(s)" ), this ) );
+ bottomLayout->addWidget( new TQLabel( i18n( "day(s)" ), this ) );
- QGridLayout *webdavLayout = new QGridLayout();
+ TQGridLayout *webdavLayout = new TQGridLayout();
mUrl = new KLineEdit( this );
mUsername = new KLineEdit( this );
@@ -326,26 +326,26 @@ void WebdavCalendar::initGui()
KPushButton *removeButton = new KPushButton( this );
removeButton->setText( i18n( "Remove" ) );
- connect( removeButton, SIGNAL( clicked() ),
- this, SLOT( deleteWidget() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteWidget() ) );
- mDefaultCheckBox = new QCheckBox( this );
+ mDefaultCheckBox = new TQCheckBox( this );
mDefaultCheckBox->setText( i18n( "Set as Default" ) );
- webdavLayout->addWidget( new QLabel( i18n( "Location:" ), this ), 0, 0 );
+ webdavLayout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 );
webdavLayout->addWidget( mUrl, 0, 1 );
- webdavLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 0, 2 );
+ webdavLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 0, 2 );
webdavLayout->addWidget( removeButton, 0, 3 );
webdavLayout->addMultiCellLayout( bottomLayout, 1, 1, 0, 1 );
webdavLayout->addWidget( mDefaultCheckBox, 1, 3 );
- QGridLayout *mainLayout = new QGridLayout( this );
- mainLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 0, 0 );
+ TQGridLayout *mainLayout = new TQGridLayout( this );
+ mainLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 0, 0 );
mainLayout->addMultiCellLayout( webdavLayout, 1, 1, 0, 4 );
- mainLayout->addWidget( new QLabel( i18n( "Username:" ), this ), 2, 0 );
+ mainLayout->addWidget( new TQLabel( i18n( "Username:" ), this ), 2, 0 );
mainLayout->addWidget( mUsername, 2, 1 );
- mainLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 2, 2 );
- mainLayout->addWidget( new QLabel( i18n( "Password:" ), this ), 2, 3 );
+ mainLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 2, 2 );
+ mainLayout->addWidget( new TQLabel( i18n( "Password:" ), this ), 2, 3 );
mainLayout->addWidget( mPassword, 2, 4 );
}