summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/ui/cryptoconfigmodule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/lib/ui/cryptoconfigmodule.cpp')
-rw-r--r--certmanager/lib/ui/cryptoconfigmodule.cpp166
1 files changed, 83 insertions, 83 deletions
diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp
index dbc8edc57..70b0a0be4 100644
--- a/certmanager/lib/ui/cryptoconfigmodule.cpp
+++ b/certmanager/lib/ui/cryptoconfigmodule.cpp
@@ -45,21 +45,21 @@
#include <kglobal.h>
#include <kurlrequester.h>
-#include <qgrid.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
using namespace Kleo;
-static inline QPixmap loadIcon( QString s ) {
+static inline TQPixmap loadIcon( TQString s ) {
return KGlobal::instance()->iconLoader()
- ->loadIcon( s.replace( QRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium );
+ ->loadIcon( s.replace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium );
}
static const KJanusWidget::Face determineJanusFace( const Kleo::CryptoConfig * config ) {
@@ -68,31 +68,31 @@ static const KJanusWidget::Face determineJanusFace( const Kleo::CryptoConfig * c
: KJanusWidget::IconList ;
}
-Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidget * parent, const char * name )
+Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent, const char * name )
: KJanusWidget( parent, name, determineJanusFace( config ) ), mConfig( config )
{
- QWidget * vbox = 0;
+ TQWidget * vbox = 0;
if ( face() == Plain ) {
vbox = plainPage();
- QVBoxLayout * vlay = new QVBoxLayout( vbox, 0, KDialog::spacingHint() );
+ TQVBoxLayout * vlay = new TQVBoxLayout( vbox, 0, KDialog::spacingHint() );
vlay->setAutoAdd( true );
}
- const QStringList components = config->componentList();
- for ( QStringList::const_iterator it = components.begin(); it != components.end(); ++it ) {
+ const TQStringList components = config->componentList();
+ for ( TQStringList::const_iterator it = components.begin(); it != components.end(); ++it ) {
//kdDebug(5150) << "Component " << (*it).local8Bit() << ":" << endl;
Kleo::CryptoConfigComponent* comp = config->component( *it );
Q_ASSERT( comp );
if ( comp->groupList().empty() )
continue;
if ( face() != Plain ) {
- vbox = addVBoxPage( comp->description(), QString::null, loadIcon( comp->iconName() ) );
+ vbox = addVBoxPage( comp->description(), TQString::null, loadIcon( comp->iconName() ) );
}
- QScrollView * scrollView = new QScrollView( vbox );
- scrollView->setHScrollBarMode( QScrollView::AlwaysOff );
- scrollView->setResizePolicy( QScrollView::AutoOneFit );
- QVBox* boxInScrollView = new QVBox( scrollView->viewport() );
+ TQScrollView * scrollView = new TQScrollView( vbox );
+ scrollView->setHScrollBarMode( TQScrollView::AlwaysOff );
+ scrollView->setResizePolicy( TQScrollView::AutoOneFit );
+ TQVBox* boxInScrollView = new TQVBox( scrollView->viewport() );
boxInScrollView->setMargin( KDialog::marginHint() );
scrollView->addChild( boxInScrollView );
@@ -102,7 +102,7 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge
mComponentGUIs.append( compGUI );
// Set a nice startup size
- const int deskHeight = QApplication::desktop()->height();
+ const int deskHeight = TQApplication::desktop()->height();
int dialogHeight;
if (deskHeight > 1000) // very big desktop ?
dialogHeight = 800;
@@ -110,9 +110,9 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge
dialogHeight = 500;
else // small (800x600, 640x480) desktop
dialogHeight = 400;
- QSize sz = scrollView->sizeHint();
+ TQSize sz = scrollView->sizeHint();
scrollView->setMinimumSize( sz.width()
- + scrollView->style().pixelMetric(QStyle::PM_ScrollBarExtent),
+ + scrollView->style().pixelMetric(TQStyle::PM_ScrollBarExtent),
QMIN( compGUI->sizeHint().height(), dialogHeight ) );
}
}
@@ -120,7 +120,7 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge
void Kleo::CryptoConfigModule::save()
{
bool changed = false;
- QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
+ TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
for( ; it != mComponentGUIs.end(); ++it ) {
if ( (*it)->save() )
changed = true;
@@ -131,7 +131,7 @@ void Kleo::CryptoConfigModule::save()
void Kleo::CryptoConfigModule::reset()
{
- QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
+ TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
for( ; it != mComponentGUIs.end(); ++it ) {
(*it)->load();
}
@@ -139,7 +139,7 @@ void Kleo::CryptoConfigModule::reset()
void Kleo::CryptoConfigModule::defaults()
{
- QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
+ TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
for( ; it != mComponentGUIs.end(); ++it ) {
(*it)->defaults();
}
@@ -154,15 +154,15 @@ void Kleo::CryptoConfigModule::cancel()
Kleo::CryptoConfigComponentGUI::CryptoConfigComponentGUI(
CryptoConfigModule* module, Kleo::CryptoConfigComponent* component,
- QWidget* parent, const char* name )
- : QWidget( parent, name ),
+ TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
mComponent( component )
{
- QGridLayout * glay = new QGridLayout( this, 1, 3, 0, KDialog::spacingHint() );
- const QStringList groups = mComponent->groupList();
+ TQGridLayout * glay = new TQGridLayout( this, 1, 3, 0, KDialog::spacingHint() );
+ const TQStringList groups = mComponent->groupList();
if ( groups.size() > 1 ) {
glay->setColSpacing( 0, KDHorizontalLine::indentHint() );
- for ( QStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it ) {
+ for ( TQStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it ) {
Kleo::CryptoConfigGroup* group = mComponent->group( *it );
Q_ASSERT( group );
if ( !group )
@@ -182,7 +182,7 @@ Kleo::CryptoConfigComponentGUI::CryptoConfigComponentGUI(
bool Kleo::CryptoConfigComponentGUI::save()
{
bool changed = false;
- QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
+ TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
for( ; it != mGroupGUIs.end(); ++it ) {
if ( (*it)->save() )
changed = true;
@@ -192,14 +192,14 @@ bool Kleo::CryptoConfigComponentGUI::save()
void Kleo::CryptoConfigComponentGUI::load()
{
- QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
+ TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
for( ; it != mGroupGUIs.end(); ++it )
(*it)->load();
}
void Kleo::CryptoConfigComponentGUI::defaults()
{
- QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
+ TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
for( ; it != mGroupGUIs.end(); ++it )
(*it)->defaults();
}
@@ -208,12 +208,12 @@ void Kleo::CryptoConfigComponentGUI::defaults()
Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI(
CryptoConfigModule* module, Kleo::CryptoConfigGroup* group,
- QGridLayout * glay, QWidget* widget, const char* name )
- : QObject( module, name ), mGroup( group )
+ TQGridLayout * glay, TQWidget* widget, const char* name )
+ : TQObject( module, name ), mGroup( group )
{
const int startRow = glay->numRows();
- const QStringList entries = mGroup->entryList();
- for( QStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) {
+ const TQStringList entries = mGroup->entryList();
+ for( TQStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) {
Kleo::CryptoConfigEntry* entry = group->entry( *it );
Q_ASSERT( entry );
if ( entry->level() > CryptoConfigEntry::Level_Advanced ) continue;
@@ -228,11 +228,11 @@ Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI(
if ( endRow < startRow )
return;
- const QString iconName = group->iconName();
+ const TQString iconName = group->iconName();
if ( iconName.isEmpty() )
return;
- QLabel * l = new QLabel( widget );
+ TQLabel * l = new TQLabel( widget );
l->setPixmap( loadIcon( iconName ) );
glay->addMultiCellWidget( l, startRow, endRow, 0, 0, Qt::AlignTop );
}
@@ -240,7 +240,7 @@ Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI(
bool Kleo::CryptoConfigGroupGUI::save()
{
bool changed = false;
- QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
+ TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
for( ; it != mEntryGUIs.end(); ++it ) {
if ( (*it)->isChanged() ) {
(*it)->save();
@@ -252,21 +252,21 @@ bool Kleo::CryptoConfigGroupGUI::save()
void Kleo::CryptoConfigGroupGUI::load()
{
- QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
+ TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
for( ; it != mEntryGUIs.end(); ++it )
(*it)->load();
}
void Kleo::CryptoConfigGroupGUI::defaults()
{
- QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
+ TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
for( ; it != mEntryGUIs.end(); ++it )
(*it)->resetToDefault();
}
////
-CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, const QString& entryName, QGridLayout * glay, QWidget* widget, const char* name )
+CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, const TQString& entryName, TQGridLayout * glay, TQWidget* widget, const char* name )
{
if ( entry->isList() ) {
switch( entry->argType() ) {
@@ -317,18 +317,18 @@ CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoC
Kleo::CryptoConfigEntryGUI::CryptoConfigEntryGUI(
CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
+ const TQString& entryName,
const char* name )
- : QObject( module, name ), mEntry( entry ), mName( entryName ), mChanged( false )
+ : TQObject( module, name ), mEntry( entry ), mName( entryName ), mChanged( false )
{
- connect( this, SIGNAL( changed() ), module, SIGNAL( changed() ) );
+ connect( this, TQT_SIGNAL( changed() ), module, TQT_SIGNAL( changed() ) );
}
-QString Kleo::CryptoConfigEntryGUI::description() const
+TQString Kleo::CryptoConfigEntryGUI::description() const
{
- QString descr = mEntry->description();
+ TQString descr = mEntry->description();
if ( descr.isEmpty() ) // shouldn't happen
- descr = QString( "<%1>" ).arg( mName );
+ descr = TQString( "<%1>" ).arg( mName );
return descr;
}
@@ -342,20 +342,20 @@ void Kleo::CryptoConfigEntryGUI::resetToDefault()
Kleo::CryptoConfigEntryLineEdit::CryptoConfigEntryLineEdit(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mLineEdit = new KLineEdit( widget );
- QLabel* label = new QLabel( mLineEdit, description(), widget );
+ TQLabel* label = new TQLabel( mLineEdit, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mLineEdit, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mLineEdit->setEnabled( false );
} else {
- connect( mLineEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mLineEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -373,21 +373,21 @@ void Kleo::CryptoConfigEntryLineEdit::doLoad()
Kleo::CryptoConfigEntryPath::CryptoConfigEntryPath(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mUrlRequester = new KURLRequester( widget );
mUrlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly );
- QLabel* label = new QLabel( mUrlRequester, description(), widget );
+ TQLabel* label = new TQLabel( mUrlRequester, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mUrlRequester, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mUrlRequester->setEnabled( false );
} else {
- connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -407,21 +407,21 @@ void Kleo::CryptoConfigEntryPath::doLoad()
Kleo::CryptoConfigEntryDirPath::CryptoConfigEntryDirPath(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mUrlRequester = new KURLRequester( widget );
mUrlRequester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
- QLabel* label = new QLabel( mUrlRequester, description(), widget );
+ TQLabel* label = new TQLabel( mUrlRequester, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mUrlRequester, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mUrlRequester->setEnabled( false );
} else {
- connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -442,21 +442,21 @@ void Kleo::CryptoConfigEntryDirPath::doLoad()
Kleo::CryptoConfigEntryURL::CryptoConfigEntryURL(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mUrlRequester = new KURLRequester( widget );
mUrlRequester->setMode( KFile::File | KFile::ExistingOnly );
- QLabel* label = new QLabel( mUrlRequester, description(), widget );
+ TQLabel* label = new TQLabel( mUrlRequester, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mUrlRequester, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mUrlRequester->setEnabled( false );
} else {
- connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -474,8 +474,8 @@ void Kleo::CryptoConfigEntryURL::doLoad()
Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
@@ -490,7 +490,7 @@ Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox(
const int row = glay->numRows();
mNumInput = new KIntNumInput( widget );
- QLabel* label = new QLabel( mNumInput, description(), widget );
+ TQLabel* label = new TQLabel( mNumInput, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mNumInput, row, 2 );
@@ -500,7 +500,7 @@ Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox(
} else {
if ( mKind == UInt || mKind == ListOfNone )
mNumInput->setMinValue( 0 );
- connect( mNumInput, SIGNAL( valueChanged(int) ), SLOT( slotChanged() ) );
+ connect( mNumInput, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -541,18 +541,18 @@ void Kleo::CryptoConfigEntrySpinBox::doLoad()
Kleo::CryptoConfigEntryCheckBox::CryptoConfigEntryCheckBox(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
- mCheckBox = new QCheckBox( widget );
+ mCheckBox = new TQCheckBox( widget );
glay->addMultiCellWidget( mCheckBox, row, row, 1, 2 );
mCheckBox->setText( description() );
if ( entry->isReadOnly() ) {
mCheckBox->setEnabled( false );
} else {
- connect( mCheckBox, SIGNAL( toggled(bool) ), SLOT( slotChanged() ) );
+ connect( mCheckBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -569,16 +569,16 @@ void Kleo::CryptoConfigEntryCheckBox::doLoad()
Kleo::CryptoConfigEntryLDAPURL::CryptoConfigEntryLDAPURL(
CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
- mLabel = new QLabel( widget );
- mPushButton = new QPushButton( i18n( "Edit..." ), widget );
+ mLabel = new TQLabel( widget );
+ mPushButton = new TQPushButton( i18n( "Edit..." ), widget );
const int row = glay->numRows();
- glay->addWidget( new QLabel( mPushButton, description(), widget ), row, 1 );
- QHBoxLayout * hlay = new QHBoxLayout;
+ glay->addWidget( new TQLabel( mPushButton, description(), widget ), row, 1 );
+ TQHBoxLayout * hlay = new QHBoxLayout;
glay->addLayout( hlay, row, 2 );
hlay->addWidget( mLabel, 1 );
hlay->addWidget( mPushButton );
@@ -587,7 +587,7 @@ Kleo::CryptoConfigEntryLDAPURL::CryptoConfigEntryLDAPURL(
mLabel->setEnabled( false );
mPushButton->hide();
} else {
- connect( mPushButton, SIGNAL( clicked() ), SLOT( slotOpenDialog() ) );
+ connect( mPushButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenDialog() ) );
}
}
@@ -612,7 +612,7 @@ void Kleo::CryptoConfigEntryLDAPURL::slotOpenDialog()
DirectoryServicesWidget* dirserv = new DirectoryServicesWidget( mEntry, &dialog );
dirserv->load();
dialog.setMainWidget( dirserv );
- connect( &dialog, SIGNAL( defaultClicked() ), dirserv, SLOT( defaults() ) );
+ connect( &dialog, TQT_SIGNAL( defaultClicked() ), dirserv, TQT_SLOT( defaults() ) );
if ( dialog.exec() ) {
// Note that we just grab the urls from the dialog, we don't call its save method,
// since the user hasn't confirmed the big config dialog yet.