diff options
Diffstat (limited to 'kcontrol/kdm')
-rw-r--r-- | kcontrol/kdm/background.cpp | 22 | ||||
-rw-r--r-- | kcontrol/kdm/background.h | 10 | ||||
-rw-r--r-- | kcontrol/kdm/kbackedcombobox.cpp | 6 | ||||
-rw-r--r-- | kcontrol/kdm/kbackedcombobox.h | 10 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-appear.cpp | 216 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-appear.h | 36 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-conv.cpp | 164 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-conv.h | 26 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-font.cpp | 52 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-font.h | 4 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-shut.cpp | 80 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-shut.h | 8 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-users.cpp | 240 | ||||
-rw-r--r-- | kcontrol/kdm/kdm-users.h | 34 | ||||
-rw-r--r-- | kcontrol/kdm/main.cpp | 82 | ||||
-rw-r--r-- | kcontrol/kdm/main.h | 14 |
16 files changed, 502 insertions, 502 deletions
diff --git a/kcontrol/kdm/background.cpp b/kcontrol/kdm/background.cpp index 19c962a1d..b5ce18ff5 100644 --- a/kcontrol/kdm/background.cpp +++ b/kcontrol/kdm/background.cpp @@ -23,9 +23,9 @@ #include <unistd.h> #include <sys/types.h> -#include <qgroupbox.h> -#include <qlayout.h> -#include <qwhatsthis.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <klocale.h> @@ -33,19 +33,19 @@ #include "../background/bgsettings.h" #include "../background/bgdialog.h" #include "background.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <ksimpleconfig.h> #include <kdialog.h> extern KSimpleConfig *config; -KBackground::KBackground(QWidget *parent, const char *name) - : QWidget(parent, name) +KBackground::KBackground(TQWidget *parent, const char *name) + : TQWidget(parent, name) { // Enabling checkbox - m_pCBEnable = new QCheckBox( i18n("E&nable background"), this ); - QWhatsThis::add( m_pCBEnable, + m_pCBEnable = new TQCheckBox( i18n("E&nable background"), this ); + TQWhatsThis::add( m_pCBEnable, i18n("If this is checked, KDM will use the settings below for the background." " If it is disabled, you have to look after the background yourself." " This is done by running some program (possibly xsetroot) in the script" @@ -54,14 +54,14 @@ KBackground::KBackground(QWidget *parent, const char *name) m_simpleConf=new KSimpleConfig(config->readEntry( "BackgroundCfg",KDE_CONFDIR "/kdm/backgroundrc" ) ); m_background = new BGDialog( this, m_simpleConf, false ); - connect(m_background, SIGNAL(changed(bool)), SIGNAL(changed(bool))); + connect(m_background, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); // Top layout - QVBoxLayout *top = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint() ); + TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint() ); top->addWidget(m_pCBEnable); top->addWidget(m_background); top->addStretch(); - connect( m_pCBEnable, SIGNAL(toggled( bool )), SLOT(slotEnableChanged()) ); + connect( m_pCBEnable, TQT_SIGNAL(toggled( bool )), TQT_SLOT(slotEnableChanged()) ); } KBackground::~KBackground() diff --git a/kcontrol/kdm/background.h b/kcontrol/kdm/background.h index bc1e48213..7de6a82dc 100644 --- a/kcontrol/kdm/background.h +++ b/kcontrol/kdm/background.h @@ -10,8 +10,8 @@ #ifndef __Bgnd_h_Included__ #define __Bgnd_h_Included__ -#include <qobject.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqwidget.h> class KSimpleConfig; @@ -24,7 +24,7 @@ class KBackground: public QWidget { Q_OBJECT public: - KBackground(QWidget *parent=0, const char *name=0); + KBackground(TQWidget *parent=0, const char *name=0); ~KBackground(); void load(); @@ -40,8 +40,8 @@ private: void init(); void apply(); - QCheckBox *m_pCBEnable; - QLabel *m_pMLabel; + TQCheckBox *m_pCBEnable; + TQLabel *m_pMLabel; KSimpleConfig *m_simpleConf; BGDialog *m_background; }; diff --git a/kcontrol/kdm/kbackedcombobox.cpp b/kcontrol/kdm/kbackedcombobox.cpp index 97759db5a..1ba598e49 100644 --- a/kcontrol/kdm/kbackedcombobox.cpp +++ b/kcontrol/kdm/kbackedcombobox.cpp @@ -19,14 +19,14 @@ #include "kbackedcombobox.h" -void KBackedComboBox::insertItem( const QString &id, const QString &name ) +void KBackedComboBox::insertItem( const TQString &id, const TQString &name ) { id2name[id] = name; name2id[name] = id; KComboBox::insertItem( name ); } -void KBackedComboBox::setCurrentId( const QString &id ) +void KBackedComboBox::setCurrentId( const TQString &id ) { if (id2name.contains( id )) setCurrentItem( id2name[id] ); @@ -34,7 +34,7 @@ void KBackedComboBox::setCurrentId( const QString &id ) setCurrentItem( 0 ); } -const QString &KBackedComboBox::currentId() const +const TQString &KBackedComboBox::currentId() const { return name2id[currentText()]; } diff --git a/kcontrol/kdm/kbackedcombobox.h b/kcontrol/kdm/kbackedcombobox.h index 3b006f23f..1ec1d2a72 100644 --- a/kcontrol/kdm/kbackedcombobox.h +++ b/kcontrol/kdm/kbackedcombobox.h @@ -25,13 +25,13 @@ class KBackedComboBox : public KComboBox { public: - KBackedComboBox( QWidget *parent ) : KComboBox( false, parent ) {} - void insertItem( const QString &id, const QString &name ); - void setCurrentId( const QString &id ); - const QString ¤tId() const; + KBackedComboBox( TQWidget *parent ) : KComboBox( false, parent ) {} + void insertItem( const TQString &id, const TQString &name ); + void setCurrentId( const TQString &id ); + const TQString ¤tId() const; private: - QMap<QString,QString> id2name, name2id; + TQMap<TQString,TQString> id2name, name2id; }; diff --git a/kcontrol/kdm/kdm-appear.cpp b/kcontrol/kdm/kdm-appear.cpp index 7d1d034ca..58696902b 100644 --- a/kcontrol/kdm/kdm-appear.cpp +++ b/kcontrol/kdm/kdm-appear.cpp @@ -23,14 +23,14 @@ #include <sys/types.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qstylefactory.h> -#include <qstyle.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqstylefactory.h> +#include <tqstyle.h> #include <klocale.h> #include <klineedit.h> @@ -49,29 +49,29 @@ extern KSimpleConfig *config; -KDMAppearanceWidget::KDMAppearanceWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KDMAppearanceWidget::KDMAppearanceWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QString wtstr; + TQString wtstr; - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); - QGroupBox *group = new QGroupBox(i18n("Appearance"), this); + TQGroupBox *group = new TQGroupBox(i18n("Appearance"), this); vbox->addWidget(group); - QGridLayout *grid = new QGridLayout( group, 5, 2, KDialog::marginHint(), + TQGridLayout *grid = new TQGridLayout( group, 5, 2, KDialog::marginHint(), KDialog::spacingHint(), "grid"); grid->addRowSpacing(0, group->fontMetrics().height()); grid->setColStretch(0, 1); grid->setColStretch(1, 1); - QHBoxLayout *hlay = new QHBoxLayout( KDialog::spacingHint() ); + TQHBoxLayout *hlay = new TQHBoxLayout( KDialog::spacingHint() ); grid->addMultiCellLayout(hlay, 1,1, 0,1); greetstr_lined = new KLineEdit(group); - QLabel *label = new QLabel(greetstr_lined, i18n("&Greeting:"), group); + TQLabel *label = new TQLabel(greetstr_lined, i18n("&Greeting:"), group); hlay->addWidget(label); - connect(greetstr_lined, SIGNAL(textChanged(const QString&)), - SLOT(changed())); + connect(greetstr_lined, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(changed())); hlay->addWidget(greetstr_lined); wtstr = i18n("This is the \"headline\" for KDM's login window. You may want to " "put some nice greeting or information about the operating system here.<p>" @@ -85,24 +85,24 @@ KDMAppearanceWidget::KDMAppearanceWidget(QWidget *parent, const char *name) "<li>%m -> the machine (hardware) type</li>" "<li>%% -> a single %</li>" "</ul>" ); - QWhatsThis::add( label, wtstr ); - QWhatsThis::add( greetstr_lined, wtstr ); + TQWhatsThis::add( label, wtstr ); + TQWhatsThis::add( greetstr_lined, wtstr ); - QGridLayout *hglay = new QGridLayout( 3, 4, KDialog::spacingHint() ); + TQGridLayout *hglay = new TQGridLayout( 3, 4, KDialog::spacingHint() ); grid->addMultiCellLayout(hglay, 2,4, 0,0); - label = new QLabel(i18n("Logo area:"), group); + label = new TQLabel(i18n("Logo area:"), group); hglay->addWidget(label, 0, 0); - QVBoxLayout *vlay = new QVBoxLayout( KDialog::spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( KDialog::spacingHint() ); hglay->addMultiCellLayout(vlay, 0,0, 1,2); - noneRadio = new QRadioButton( i18n("logo area", "&None"), group ); - clockRadio = new QRadioButton( i18n("Show cloc&k"), group ); - logoRadio = new QRadioButton( i18n("Sho&w logo"), group ); - QButtonGroup *buttonGroup = new QButtonGroup( group ); + noneRadio = new TQRadioButton( i18n("logo area", "&None"), group ); + clockRadio = new TQRadioButton( i18n("Show cloc&k"), group ); + logoRadio = new TQRadioButton( i18n("Sho&w logo"), group ); + TQButtonGroup *buttonGroup = new TQButtonGroup( group ); label->setBuddy( buttonGroup ); - connect( buttonGroup, SIGNAL(clicked(int)), SLOT(slotAreaRadioClicked(int)) ); - connect( buttonGroup, SIGNAL(clicked(int)), SLOT(changed()) ); + connect( buttonGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotAreaRadioClicked(int)) ); + connect( buttonGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed()) ); buttonGroup->hide(); buttonGroup->insert(noneRadio, KdmNone); buttonGroup->insert(clockRadio, KdmClock); @@ -111,61 +111,61 @@ KDMAppearanceWidget::KDMAppearanceWidget(QWidget *parent, const char *name) vlay->addWidget(clockRadio); vlay->addWidget(logoRadio); wtstr = i18n("You can choose to display a custom logo (see below), a clock or no logo at all."); - QWhatsThis::add( label, wtstr ); - QWhatsThis::add( noneRadio, wtstr ); - QWhatsThis::add( logoRadio, wtstr ); - QWhatsThis::add( clockRadio, wtstr ); + TQWhatsThis::add( label, wtstr ); + TQWhatsThis::add( noneRadio, wtstr ); + TQWhatsThis::add( logoRadio, wtstr ); + TQWhatsThis::add( clockRadio, wtstr ); - logoLabel = new QLabel(i18n("&Logo:"), group); - logobutton = new QPushButton(group); + logoLabel = new TQLabel(i18n("&Logo:"), group); + logobutton = new TQPushButton(group); logoLabel->setBuddy( logobutton ); logobutton->setAutoDefault(false); logobutton->setAcceptDrops(true); logobutton->installEventFilter(this); // for drag and drop - connect(logobutton, SIGNAL(clicked()), SLOT(slotLogoButtonClicked())); + connect(logobutton, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogoButtonClicked())); hglay->addWidget(logoLabel, 1, 0); hglay->addWidget(logobutton, 1, 1, AlignCenter); hglay->addRowSpacing(1, 110); wtstr = i18n("Click here to choose an image that KDM will display. " "You can also drag and drop an image onto this button " "(e.g. from Konqueror)."); - QWhatsThis::add( logoLabel, wtstr ); - QWhatsThis::add( logobutton, wtstr ); + TQWhatsThis::add( logoLabel, wtstr ); + TQWhatsThis::add( logobutton, wtstr ); hglay->addRowSpacing( 2, KDialog::spacingHint()); hglay->setColStretch( 3, 1); - hglay = new QGridLayout( 2, 3, KDialog::spacingHint() ); + hglay = new TQGridLayout( 2, 3, KDialog::spacingHint() ); grid->addLayout(hglay, 2, 1); - label = new QLabel(i18n("Position:"), group); + label = new TQLabel(i18n("Position:"), group); hglay->addMultiCellWidget(label, 0,1, 0,0, AlignVCenter); - QValidator *posValidator = new QIntValidator(0, 100, group); - QLabel *xLineLabel = new QLabel(i18n("&X:"), group); + TQValidator *posValidator = new TQIntValidator(0, 100, group); + TQLabel *xLineLabel = new TQLabel(i18n("&X:"), group); hglay->addWidget(xLineLabel, 0, 1); - xLineEdit = new QLineEdit (group); - connect( xLineEdit, SIGNAL( textChanged(const QString&) ), SLOT( changed() )); + xLineEdit = new TQLineEdit (group); + connect( xLineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( changed() )); hglay->addWidget(xLineEdit, 0, 2); xLineLabel->setBuddy(xLineEdit); xLineEdit->setValidator(posValidator); - QLabel *yLineLabel = new QLabel(i18n("&Y:"), group); + TQLabel *yLineLabel = new TQLabel(i18n("&Y:"), group); hglay->addWidget(yLineLabel, 1, 1); - yLineEdit = new QLineEdit (group); - connect( yLineEdit, SIGNAL( textChanged(const QString&) ), SLOT( changed() )); + yLineEdit = new TQLineEdit (group); + connect( yLineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( changed() )); hglay->addWidget(yLineEdit, 1, 2); yLineLabel->setBuddy(yLineEdit); yLineEdit->setValidator(posValidator); wtstr = i18n("Here you specify the relative coordinates (in percent) of the login dialog's <em>center</em>."); - QWhatsThis::add( label, wtstr ); - QWhatsThis::add( xLineLabel, wtstr ); - QWhatsThis::add( xLineEdit, wtstr ); - QWhatsThis::add( yLineLabel, wtstr ); - QWhatsThis::add( yLineEdit, wtstr ); + TQWhatsThis::add( label, wtstr ); + TQWhatsThis::add( xLineLabel, wtstr ); + TQWhatsThis::add( xLineEdit, wtstr ); + TQWhatsThis::add( yLineLabel, wtstr ); + TQWhatsThis::add( yLineEdit, wtstr ); hglay->setColStretch( 3, 1); hglay->setRowStretch( 2, 1); - hglay = new QGridLayout( 2, 3, KDialog::spacingHint() ); + hglay = new TQGridLayout( 2, 3, KDialog::spacingHint() ); grid->addLayout(hglay, 3, 1); hglay->setColStretch(3, 1); @@ -173,57 +173,57 @@ KDMAppearanceWidget::KDMAppearanceWidget(QWidget *parent, const char *name) guicombo->insertItem( "", i18n("<default>") ); loadGuiStyles(guicombo); guicombo->listBox()->sort(); - label = new QLabel(guicombo, i18n("GUI s&tyle:"), group); - connect(guicombo, SIGNAL(activated(int)), SLOT(changed())); + label = new TQLabel(guicombo, i18n("GUI s&tyle:"), group); + connect(guicombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); hglay->addWidget(label, 0, 0); hglay->addWidget(guicombo, 0, 1); wtstr = i18n("You can choose a basic GUI style here that will be " "used by KDM only."); - QWhatsThis::add( label, wtstr ); - QWhatsThis::add( guicombo, wtstr ); + TQWhatsThis::add( label, wtstr ); + TQWhatsThis::add( guicombo, wtstr ); colcombo = new KBackedComboBox(group); colcombo->insertItem( "", i18n("<default>") ); loadColorSchemes(colcombo); colcombo->listBox()->sort(); - label = new QLabel(colcombo, i18n("&Color scheme:"), group); - connect(colcombo, SIGNAL(activated(int)), SLOT(changed())); + label = new TQLabel(colcombo, i18n("&Color scheme:"), group); + connect(colcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); hglay->addWidget(label, 1, 0); hglay->addWidget(colcombo, 1, 1); wtstr = i18n("You can choose a basic Color Scheme here that will be " "used by KDM only."); - QWhatsThis::add( label, wtstr ); - QWhatsThis::add( colcombo, wtstr ); + TQWhatsThis::add( label, wtstr ); + TQWhatsThis::add( colcombo, wtstr ); echocombo = new KBackedComboBox(group); echocombo->insertItem("NoEcho", i18n("No Echo")); echocombo->insertItem("OneStar", i18n("One Star")); echocombo->insertItem("ThreeStars", i18n("Three Stars")); - label = new QLabel(echocombo, i18n("Echo &mode:"), group); - connect(echocombo, SIGNAL(activated(int)), SLOT(changed())); + label = new TQLabel(echocombo, i18n("Echo &mode:"), group); + connect(echocombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); hglay->addWidget(label, 2, 0); hglay->addWidget(echocombo, 2, 1); wtstr = i18n("You can choose whether and how KDM shows your password when you type it."); - QWhatsThis::add( label, wtstr ); - QWhatsThis::add( echocombo, wtstr ); + TQWhatsThis::add( label, wtstr ); + TQWhatsThis::add( echocombo, wtstr ); // The Language group box - group = new QGroupBox(0, Vertical, i18n("Locale"), this); + group = new TQGroupBox(0, Vertical, i18n("Locale"), this); vbox->addWidget(group); langcombo = new KLanguageButton(group); loadLanguageList(langcombo); - connect(langcombo, SIGNAL(activated(const QString &)), SLOT(changed())); - label = new QLabel(langcombo, i18n("Languag&e:"), group); - QGridLayout *hbox = new QGridLayout( group->layout(), 2, 2, KDialog::spacingHint() ); + connect(langcombo, TQT_SIGNAL(activated(const TQString &)), TQT_SLOT(changed())); + label = new TQLabel(langcombo, i18n("Languag&e:"), group); + TQGridLayout *hbox = new TQGridLayout( group->layout(), 2, 2, KDialog::spacingHint() ); hbox->setColStretch(1, 1); hbox->addWidget(label, 1, 0); hbox->addWidget(langcombo, 1, 1); wtstr = i18n("Here you can choose the language used by KDM. This setting does not affect" " a user's personal settings; that will take effect after login."); - QWhatsThis::add( label, wtstr ); - QWhatsThis::add( langcombo, wtstr ); + TQWhatsThis::add( label, wtstr ); + TQWhatsThis::add( langcombo, wtstr ); vbox->addStretch(1); @@ -232,8 +232,8 @@ KDMAppearanceWidget::KDMAppearanceWidget(QWidget *parent, const char *name) void KDMAppearanceWidget::makeReadOnly() { - disconnect( logobutton, SIGNAL(clicked()), - this, SLOT(slotLogoButtonClicked()) ); + disconnect( logobutton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLogoButtonClicked()) ); logobutton->setAcceptDrops(false); greetstr_lined->setReadOnly(true); noneRadio->setEnabled(false); @@ -249,38 +249,38 @@ void KDMAppearanceWidget::makeReadOnly() void KDMAppearanceWidget::loadLanguageList(KLanguageButton *combo) { - QStringList langlist = KGlobal::dirs()->findAllResources("locale", - QString::fromLatin1("*/entry.desktop")); + TQStringList langlist = KGlobal::dirs()->findAllResources("locale", + TQString::fromLatin1("*/entry.desktop")); langlist.sort(); - for ( QStringList::ConstIterator it = langlist.begin(); + for ( TQStringList::ConstIterator it = langlist.begin(); it != langlist.end(); ++it ) { - QString fpath = (*it).left((*it).length() - 14); + TQString fpath = (*it).left((*it).length() - 14); int index = fpath.findRev('/'); - QString nid = fpath.mid(index + 1); + TQString nid = fpath.mid(index + 1); KSimpleConfig entry(*it); - entry.setGroup(QString::fromLatin1("KCM Locale")); - QString name = entry.readEntry(QString::fromLatin1("Name"), i18n("without name")); - combo->insertLanguage(nid, name, QString::fromLatin1("l10n/"), QString::null); + entry.setGroup(TQString::fromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name")); + combo->insertLanguage(nid, name, TQString::fromLatin1("l10n/"), TQString::null); } } void KDMAppearanceWidget::loadColorSchemes(KBackedComboBox *combo) { // XXX: Global + local schemes - QStringList list = KGlobal::dirs()-> + TQStringList list = KGlobal::dirs()-> findAllResources("data", "kdisplay/color-schemes/*.kcsrc", false, true); - for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { KSimpleConfig config(*it, true); config.setGroup("Color Scheme"); - QString str; + TQString str; if (!(str = config.readEntry("Name")).isEmpty() || !(str = config.readEntry("name")).isEmpty()) { - QString str2 = (*it).mid( (*it).findRev( '/' ) + 1 ); // strip off path + TQString str2 = (*it).mid( (*it).findRev( '/' ) + 1 ); // strip off path str2.setLength( str2.length() - 6 ); // strip off ".kcsrc combo->insertItem( str2, str ); } @@ -290,9 +290,9 @@ void KDMAppearanceWidget::loadColorSchemes(KBackedComboBox *combo) void KDMAppearanceWidget::loadGuiStyles(KBackedComboBox *combo) { // XXX: Global + local schemes - QStringList list = KGlobal::dirs()-> + TQStringList list = KGlobal::dirs()-> findAllResources("data", "kstyle/themes/*.themerc", false, true); - for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { KSimpleConfig config(*it, true); @@ -304,7 +304,7 @@ void KDMAppearanceWidget::loadGuiStyles(KBackedComboBox *combo) continue; config.setGroup("KDE"); - QString str2 = config.readEntry("WidgetStyle"); + TQString str2 = config.readEntry("WidgetStyle"); if (str2.isNull()) continue; @@ -313,18 +313,18 @@ void KDMAppearanceWidget::loadGuiStyles(KBackedComboBox *combo) } } -bool KDMAppearanceWidget::setLogo(QString logo) +bool KDMAppearanceWidget::setLogo(TQString logo) { - QString flogo = logo.isEmpty() ? - locate("data", QString::fromLatin1("kdm/pics/kdelogo.png") ) : + TQString flogo = logo.isEmpty() ? + locate("data", TQString::fromLatin1("kdm/pics/kdelogo.png") ) : logo; - QImage p(flogo); + TQImage p(flogo); if (p.isNull()) return false; if (p.width() > 100 || p.height() > 100) - p = p.smoothScale(100, 100, QImage::ScaleMin); + p = p.smoothScale(100, 100, TQImage::ScaleMin); logobutton->setPixmap(p); - uint bd = style().pixelMetric( QStyle::PM_ButtonMargin ) * 2; + uint bd = style().pixelMetric( TQStyle::PM_ButtonMargin ) * 2; logobutton->setFixedSize(p.width() + bd, p.height() + bd); logopath = logo; return true; @@ -334,7 +334,7 @@ bool KDMAppearanceWidget::setLogo(QString logo) void KDMAppearanceWidget::slotLogoButtonClicked() { KImageIO::registerFormats(); - KFileDialog dialogue(locate("data", QString::fromLatin1("kdm/pics/")), + KFileDialog dialogue(locate("data", TQString::fromLatin1("kdm/pics/")), KImageIO::pattern( KImageIO::Reading ), this, 0, true); dialogue.setOperationMode( KFileDialog::Opening ); @@ -342,7 +342,7 @@ void KDMAppearanceWidget::slotLogoButtonClicked() KImageFilePreview* imagePreview = new KImageFilePreview( &dialogue ); dialogue.setPreviewWidget( imagePreview ); - if (dialogue.exec() == QDialog::Accepted) { + if (dialogue.exec() == TQDialog::Accepted) { if ( setLogo(dialogue.selectedFile()) ) { changed(); } @@ -357,30 +357,30 @@ void KDMAppearanceWidget::slotAreaRadioClicked(int id) } -bool KDMAppearanceWidget::eventFilter(QObject *, QEvent *e) +bool KDMAppearanceWidget::eventFilter(TQObject *, TQEvent *e) { - if (e->type() == QEvent::DragEnter) { - iconLoaderDragEnterEvent((QDragEnterEvent *) e); + if (e->type() == TQEvent::DragEnter) { + iconLoaderDragEnterEvent((TQDragEnterEvent *) e); return true; } - if (e->type() == QEvent::Drop) { - iconLoaderDropEvent((QDropEvent *) e); + if (e->type() == TQEvent::Drop) { + iconLoaderDropEvent((TQDropEvent *) e); return true; } return false; } -void KDMAppearanceWidget::iconLoaderDragEnterEvent(QDragEnterEvent *e) +void KDMAppearanceWidget::iconLoaderDragEnterEvent(TQDragEnterEvent *e) { e->accept(KURLDrag::canDecode(e)); } -KURL *decodeImgDrop(QDropEvent *e, QWidget *wdg); +KURL *decodeImgDrop(TQDropEvent *e, TQWidget *wdg); -void KDMAppearanceWidget::iconLoaderDropEvent(QDropEvent *e) +void KDMAppearanceWidget::iconLoaderDropEvent(TQDropEvent *e) { KURL pixurl; bool istmp; @@ -402,7 +402,7 @@ void KDMAppearanceWidget::iconLoaderDropEvent(QDropEvent *e) // By now url should be "file:/..." if (!setLogo(pixurl.path())) { KIO::NetAccess::del(pixurl, parentWidget()); - QString msg = i18n("There was an error loading the image:\n" + TQString msg = i18n("There was an error loading the image:\n" "%1\n" "It will not be saved.") .arg(pixurl.path()); @@ -445,7 +445,7 @@ void KDMAppearanceWidget::load() greetstr_lined->setText(config->readEntry("GreetString", i18n("Welcome to Kubuntu at %n"))); // Regular logo or clock - QString logoArea = config->readEntry("LogoArea", "Logo" ); + TQString logoArea = config->readEntry("LogoArea", "Logo" ); if (logoArea == "Clock") { clockRadio->setChecked(true); slotAreaRadioClicked(KdmClock); @@ -469,7 +469,7 @@ void KDMAppearanceWidget::load() // Check the echo mode echocombo->setCurrentId(config->readEntry("EchoMode", "OneStar")); - QStringList sl = config->readListEntry( "GreeterPos" ); + TQStringList sl = config->readListEntry( "GreeterPos" ); if (sl.count() != 2) { xLineEdit->setText( "50" ); yLineEdit->setText( "50" ); @@ -499,7 +499,7 @@ void KDMAppearanceWidget::defaults() langcombo->setCurrentItem( "en_US" ); } -QString KDMAppearanceWidget::quickHelp() const +TQString KDMAppearanceWidget::quickHelp() const { return i18n("<h1>KDM - Appearance</h1> Here you can configure the basic appearance" " of the KDM login manager, i.e. a greeting string, an icon etc.<p>" diff --git a/kcontrol/kdm/kdm-appear.h b/kcontrol/kdm/kdm-appear.h index 991b6e4e0..dba6af36d 100644 --- a/kcontrol/kdm/kdm-appear.h +++ b/kcontrol/kdm/kdm-appear.h @@ -22,10 +22,10 @@ #define __KDMAPPEAR_H__ -#include <qdir.h> -#include <qimage.h> -#include <qfileinfo.h> -#include <qpushbutton.h> +#include <tqdir.h> +#include <tqimage.h> +#include <tqfileinfo.h> +#include <tqpushbutton.h> #include <kcolorbutton.h> #include <kurl.h> @@ -47,27 +47,27 @@ class KDMAppearanceWidget : public QWidget Q_OBJECT public: - KDMAppearanceWidget(QWidget *parent, const char *name=0); + KDMAppearanceWidget(TQWidget *parent, const char *name=0); void load(); void save(); void defaults(); void makeReadOnly(); - QString quickHelp() const; + TQString quickHelp() const; void loadColorSchemes(KBackedComboBox *combo); void loadGuiStyles(KBackedComboBox *combo); void loadLanguageList(KLanguageButton *combo); - bool eventFilter(QObject *, QEvent *); + bool eventFilter(TQObject *, TQEvent *); signals: void changed( bool state ); protected: - void iconLoaderDragEnterEvent(QDragEnterEvent *event); - void iconLoaderDropEvent(QDropEvent *event); - bool setLogo(QString logo); + void iconLoaderDragEnterEvent(TQDragEnterEvent *event); + void iconLoaderDropEvent(TQDropEvent *event); + bool setLogo(TQString logo); private slots: void slotAreaRadioClicked(int id); @@ -76,15 +76,15 @@ private slots: private: enum { KdmNone, KdmClock, KdmLogo }; - QLabel *logoLabel; - QPushButton *logobutton; + TQLabel *logoLabel; + TQPushButton *logobutton; KLineEdit *greetstr_lined; - QString logopath; - QRadioButton *noneRadio; - QRadioButton *clockRadio; - QRadioButton *logoRadio; - QLineEdit *xLineEdit; - QLineEdit *yLineEdit; + TQString logopath; + TQRadioButton *noneRadio; + TQRadioButton *clockRadio; + TQRadioButton *logoRadio; + TQLineEdit *xLineEdit; + TQLineEdit *yLineEdit; KBackedComboBox *guicombo; KBackedComboBox *colcombo; KBackedComboBox *echocombo; diff --git a/kcontrol/kdm/kdm-conv.cpp b/kcontrol/kdm/kdm-conv.cpp index 71d292c5f..155d5b380 100644 --- a/kcontrol/kdm/kdm-conv.cpp +++ b/kcontrol/kdm/kdm-conv.cpp @@ -23,13 +23,13 @@ #include <sys/types.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qhgroupbox.h> -#include <qvgroupbox.h> -#include <qvbuttongroup.h> -#include <qwhatsthis.h> -#include <qheader.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqhgroupbox.h> +#include <tqvgroupbox.h> +#include <tqvbuttongroup.h> +#include <tqwhatsthis.h> +#include <tqheader.h> #include <kdialog.h> #include <ksimpleconfig.h> @@ -39,122 +39,122 @@ extern KSimpleConfig *config; -KDMConvenienceWidget::KDMConvenienceWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KDMConvenienceWidget::KDMConvenienceWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QString wtstr; + TQString wtstr; - QLabel *paranoia = new QLabel( i18n("<qt><center><font color=red><big><b>Attention!<br>Read help!</b></big></font></center></qt>"), this ); + TQLabel *paranoia = new TQLabel( i18n("<qt><center><font color=red><big><b>Attention!<br>Read help!</b></big></font></center></qt>"), this ); - QSizePolicy vpref( QSizePolicy::Minimum, QSizePolicy::Fixed ); + TQSizePolicy vpref( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); - alGroup = new QVGroupBox( i18n("Enable Au&to-Login"), this ); + alGroup = new TQVGroupBox( i18n("Enable Au&to-Login"), this ); alGroup->setCheckable( true ); alGroup->setSizePolicy( vpref ); - QWhatsThis::add( alGroup, i18n("Turn on the auto-login feature." + TQWhatsThis::add( alGroup, i18n("Turn on the auto-login feature." " This applies only to KDM's graphical login." " Think twice before enabling this!") ); - connect(alGroup, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(alGroup, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - QWidget *hlpw1 = new QWidget( alGroup ); + TQWidget *hlpw1 = new TQWidget( alGroup ); userlb = new KComboBox( hlpw1 ); - u_label = new QLabel( userlb, i18n("Use&r:"), hlpw1 ); - QGridLayout *hlpl1 = new QGridLayout(hlpw1, 2, 2, 0, KDialog::spacingHint()); + u_label = new TQLabel( userlb, i18n("Use&r:"), hlpw1 ); + TQGridLayout *hlpl1 = new TQGridLayout(hlpw1, 2, 2, 0, KDialog::spacingHint()); hlpl1->setColStretch(2, 1); hlpl1->addWidget(u_label, 0, 0); hlpl1->addWidget(userlb, 0, 1); - connect(userlb, SIGNAL(highlighted(int)), SLOT(slotChanged())); + connect(userlb, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotChanged())); wtstr = i18n("Select the user to be logged in automatically."); - QWhatsThis::add( u_label, wtstr ); - QWhatsThis::add( userlb, wtstr ); - delaysb = new QSpinBox( 0, 3600, 5, hlpw1 ); + TQWhatsThis::add( u_label, wtstr ); + TQWhatsThis::add( userlb, wtstr ); + delaysb = new TQSpinBox( 0, 3600, 5, hlpw1 ); delaysb->setSpecialValueText( i18n("delay", "none") ); delaysb->setSuffix( i18n("seconds", " s") ); - d_label = new QLabel( delaysb, i18n("D&elay:"), hlpw1 ); + d_label = new TQLabel( delaysb, i18n("D&elay:"), hlpw1 ); hlpl1->addWidget(d_label, 1, 0); hlpl1->addWidget(delaysb, 1, 1); - connect(delaysb, SIGNAL(valueChanged(int)), SLOT(slotChanged())); + connect(delaysb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged())); wtstr = i18n("The delay (in seconds) before the automatic login kicks in. " "This feature is also known as \"timed login\"."); - QWhatsThis::add( d_label, wtstr ); - QWhatsThis::add( delaysb, wtstr ); - againcb = new QCheckBox( i18n("P&ersistent"), alGroup ); - connect( againcb, SIGNAL(toggled(bool)), SLOT(slotChanged()) ); - QWhatsThis::add( againcb, i18n("Normally, automatic login is performed only " + TQWhatsThis::add( d_label, wtstr ); + TQWhatsThis::add( delaysb, wtstr ); + againcb = new TQCheckBox( i18n("P&ersistent"), alGroup ); + connect( againcb, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()) ); + TQWhatsThis::add( againcb, i18n("Normally, automatic login is performed only " "when KDM starts up. If this is checked, automatic login will kick in " "after finishing a session as well.") ); - autoLockCheck = new QCheckBox( i18n("Loc&k session"), alGroup ); - connect( autoLockCheck, SIGNAL(toggled(bool)), SLOT(slotChanged()) ); - QWhatsThis::add( autoLockCheck, i18n("If checked, the automatically started session " + autoLockCheck = new TQCheckBox( i18n("Loc&k session"), alGroup ); + connect( autoLockCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()) ); + TQWhatsThis::add( autoLockCheck, i18n("If checked, the automatically started session " "will be locked immediately (provided it is a KDE session). This can " "be used to obtain a super-fast login restricted to one user.") ); - puGroup = new QVButtonGroup(i18n("Preselect User"), this ); + puGroup = new TQVButtonGroup(i18n("Preselect User"), this ); puGroup->setSizePolicy( vpref ); - connect(puGroup, SIGNAL(clicked(int)), SLOT(slotPresChanged())); - connect(puGroup, SIGNAL(clicked(int)), SLOT(slotChanged())); - npRadio = new QRadioButton(i18n("preselected user", "&None"), puGroup); - ppRadio = new QRadioButton(i18n("Prev&ious"), puGroup); - QWhatsThis::add( ppRadio, i18n("Preselect the user that logged in previously. " + connect(puGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPresChanged())); + connect(puGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotChanged())); + npRadio = new TQRadioButton(i18n("preselected user", "&None"), puGroup); + ppRadio = new TQRadioButton(i18n("Prev&ious"), puGroup); + TQWhatsThis::add( ppRadio, i18n("Preselect the user that logged in previously. " "Use this if this computer is usually used several consecutive times by one user.") ); - spRadio = new QRadioButton(i18n("Specif&y"), puGroup); - QWhatsThis::add( spRadio, i18n("Preselect the user specified in the combo box below. " + spRadio = new TQRadioButton(i18n("Specif&y"), puGroup); + TQWhatsThis::add( spRadio, i18n("Preselect the user specified in the combo box below. " "Use this if this computer is predominantly used by a certain user.") ); - QWidget *hlpw = new QWidget(puGroup); + TQWidget *hlpw = new TQWidget(puGroup); puserlb = new KComboBox(true, hlpw); - pu_label = new QLabel(puserlb, i18n("Us&er:"), hlpw); - connect(puserlb, SIGNAL(textChanged(const QString &)), SLOT(slotChanged())); + pu_label = new TQLabel(puserlb, i18n("Us&er:"), hlpw); + connect(puserlb, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotChanged())); wtstr = i18n("Select the user to be preselected for login. " "This box is editable, so you can specify an arbitrary non-existent " "user to mislead possible attackers."); - QWhatsThis::add( pu_label, wtstr ); - QWhatsThis::add( puserlb, wtstr ); - QBoxLayout *hlpl = new QHBoxLayout(hlpw, 0, KDialog::spacingHint()); + TQWhatsThis::add( pu_label, wtstr ); + TQWhatsThis::add( puserlb, wtstr ); + TQBoxLayout *hlpl = new TQHBoxLayout(hlpw, 0, KDialog::spacingHint()); hlpl->addWidget(pu_label); hlpl->addWidget(puserlb); hlpl->addStretch( 1 ); - cbjumppw = new QCheckBox(i18n("Focus pass&word"), puGroup); - QWhatsThis::add( cbjumppw, i18n("When this option is on, KDM will place the cursor " + cbjumppw = new TQCheckBox(i18n("Focus pass&word"), puGroup); + TQWhatsThis::add( cbjumppw, i18n("When this option is on, KDM will place the cursor " "in the password field instead of the user field after preselecting a user. " "Use this to save one key press per login, if the preselection usually does not need to " "be changed.") ); - connect(cbjumppw, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(cbjumppw, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - npGroup = new QVGroupBox(i18n("Enable Password-&Less Logins"), this ); + npGroup = new TQVGroupBox(i18n("Enable Password-&Less Logins"), this ); npGroup->setCheckable( true ); - QWhatsThis::add( npGroup, i18n("When this option is checked, the checked users from" + TQWhatsThis::add( npGroup, i18n("When this option is checked, the checked users from" " the list below will be allowed to log in without entering their" " password. This applies only to KDM's graphical login." " Think twice before enabling this!") ); - connect(npGroup, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(npGroup, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - pl_label = new QLabel(i18n("No password re&quired for:"), npGroup); + pl_label = new TQLabel(i18n("No password re&quired for:"), npGroup); npuserlv = new KListView(npGroup); pl_label->setBuddy(npuserlv); - npuserlv->addColumn(QString::null); + npuserlv->addColumn(TQString::null); npuserlv->header()->hide(); - npuserlv->setResizeMode(QListView::LastColumn); - QWhatsThis::add(npuserlv, i18n("Check all users you want to allow a password-less login for." + npuserlv->setResizeMode(TQListView::LastColumn); + TQWhatsThis::add(npuserlv, i18n("Check all users you want to allow a password-less login for." " Entries denoted with '@' are user groups. Checking a group is like checking all users in that group.")); - connect( npuserlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotChanged()) ); + connect( npuserlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotChanged()) ); - btGroup = new QVGroupBox( i18n("Miscellaneous"), this ); + btGroup = new TQVGroupBox( i18n("Miscellaneous"), this ); - cbarlen = new QCheckBox(i18n("Automatically log in again after &X server crash"), btGroup); - QWhatsThis::add( cbarlen, i18n("When this option is on, a user will be" + cbarlen = new TQCheckBox(i18n("Automatically log in again after &X server crash"), btGroup); + TQWhatsThis::add( cbarlen, i18n("When this option is on, a user will be" " logged in again automatically when their session is interrupted by an" " X server crash; note that this can open a security hole: if you use" " a screen locker than KDE's integrated one, this will make" " circumventing a password-secured screen lock possible.") ); - connect(cbarlen, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(cbarlen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - QGridLayout *main = new QGridLayout(this, 5, 2, 10); + TQGridLayout *main = new TQGridLayout(this, 5, 2, 10); main->addWidget(paranoia, 0, 0); main->addWidget(alGroup, 1, 0); main->addWidget(puGroup, 2, 0); @@ -164,23 +164,23 @@ KDMConvenienceWidget::KDMConvenienceWidget(QWidget *parent, const char *name) main->setColStretch(1, 2); main->setRowStretch(3, 1); - connect( userlb, SIGNAL(activated( const QString & )), - SLOT(slotSetAutoUser( const QString & )) ); - connect( puserlb, SIGNAL(textChanged( const QString & )), - SLOT(slotSetPreselUser( const QString & )) ); - connect( npuserlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotUpdateNoPassUser( QListViewItem * )) ); + connect( userlb, TQT_SIGNAL(activated( const TQString & )), + TQT_SLOT(slotSetAutoUser( const TQString & )) ); + connect( puserlb, TQT_SIGNAL(textChanged( const TQString & )), + TQT_SLOT(slotSetPreselUser( const TQString & )) ); + connect( npuserlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotUpdateNoPassUser( TQListViewItem * )) ); } void KDMConvenienceWidget::makeReadOnly() { - ((QWidget*)alGroup->child("qt_groupbox_checkbox"))->setEnabled(false); + ((TQWidget*)alGroup->child("qt_groupbox_checkbox"))->setEnabled(false); userlb->setEnabled(false); delaysb->setEnabled(false); againcb->setEnabled(false); autoLockCheck->setEnabled(false); - ((QWidget*)npGroup->child("qt_groupbox_checkbox"))->setEnabled(false); + ((TQWidget*)npGroup->child("qt_groupbox_checkbox"))->setEnabled(false); npuserlv->setEnabled(false); cbarlen->setEnabled(false); npRadio->setEnabled(false); @@ -243,7 +243,7 @@ void KDMConvenienceWidget::load() cbarlen->setChecked(config->readBoolEntry( "AutoReLogin", false) ); config->setGroup("X-:*-Greeter"); - QString presstr = config->readEntry( "PreselectUser", "None" ); + TQString presstr = config->readEntry( "PreselectUser", "None" ); if (presstr == "Previous") ppRadio->setChecked(true); else if (presstr == "Default") @@ -280,22 +280,22 @@ void KDMConvenienceWidget::slotChanged() emit changed(true); } -void KDMConvenienceWidget::slotSetAutoUser( const QString &user ) +void KDMConvenienceWidget::slotSetAutoUser( const TQString &user ) { autoUser = user; } -void KDMConvenienceWidget::slotSetPreselUser( const QString &user ) +void KDMConvenienceWidget::slotSetPreselUser( const TQString &user ) { preselUser = user; } -void KDMConvenienceWidget::slotUpdateNoPassUser( QListViewItem *item ) +void KDMConvenienceWidget::slotUpdateNoPassUser( TQListViewItem *item ) { if ( !item ) return; - QCheckListItem *itm = (QCheckListItem *)item; - QStringList::iterator it = noPassUsers.find( itm->text() ); + TQCheckListItem *itm = (TQCheckListItem *)item; + TQStringList::iterator it = noPassUsers.find( itm->text() ); if (itm->isOn()) { if (it == noPassUsers.end()) noPassUsers.append( itm->text() ); @@ -316,9 +316,9 @@ void KDMConvenienceWidget::slotClearUsers() puserlb->insertItem(preselUser); } -void KDMConvenienceWidget::slotAddUsers(const QMap<QString,int> &users) +void KDMConvenienceWidget::slotAddUsers(const TQMap<TQString,int> &users) { - QMapConstIterator<QString,int> it; + TQMapConstIterator<TQString,int> it; for (it = users.begin(); it != users.end(); ++it) { if (it.data() > 0) { if (it.key() != autoUser) @@ -327,7 +327,7 @@ void KDMConvenienceWidget::slotAddUsers(const QMap<QString,int> &users) puserlb->insertItem(it.key()); } if (it.data() != 0) - (new QCheckListItem(npuserlv, it.key(), QCheckListItem::CheckBox))-> + (new TQCheckListItem(npuserlv, it.key(), TQCheckListItem::CheckBox))-> setOn(noPassUsers.find(it.key()) != noPassUsers.end()); } @@ -342,9 +342,9 @@ void KDMConvenienceWidget::slotAddUsers(const QMap<QString,int> &users) puserlb->setCurrentItem(preselUser); } -void KDMConvenienceWidget::slotDelUsers(const QMap<QString,int> &users) +void KDMConvenienceWidget::slotDelUsers(const TQMap<TQString,int> &users) { - QMapConstIterator<QString,int> it; + TQMapConstIterator<TQString,int> it; for (it = users.begin(); it != users.end(); ++it) { if (it.data() > 0) { if (it.key() != autoUser && userlb->listBox()) diff --git a/kcontrol/kdm/kdm-conv.h b/kcontrol/kdm/kdm-conv.h index c00128629..611ab9797 100644 --- a/kcontrol/kdm/kdm-conv.h +++ b/kcontrol/kdm/kdm-conv.h @@ -22,13 +22,13 @@ #ifndef __KDMCONV_H__ #define __KDMCONV_H__ -#include <qptrlist.h> -#include <qstring.h> -#include <qimage.h> -#include <qgroupbox.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qspinbox.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqgroupbox.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> #include <klistbox.h> #include <kcombobox.h> @@ -44,7 +44,7 @@ class KDMConvenienceWidget : public QWidget Q_OBJECT public: - KDMConvenienceWidget(QWidget *parent=0, const char *name=0); + KDMConvenienceWidget(TQWidget *parent=0, const char *name=0); void load(); void save(); @@ -53,8 +53,8 @@ public: public slots: void slotClearUsers(); - void slotAddUsers(const QMap<QString,int> &); - void slotDelUsers(const QMap<QString,int> &); + void slotAddUsers(const TQMap<TQString,int> &); + void slotDelUsers(const TQMap<TQString,int> &); signals: @@ -63,9 +63,9 @@ signals: private slots: void slotPresChanged(); void slotChanged(); - void slotSetAutoUser( const QString &user ); - void slotSetPreselUser( const QString &user ); - void slotUpdateNoPassUser( QListViewItem *item ); + void slotSetAutoUser( const TQString &user ); + void slotSetPreselUser( const TQString &user ); + void slotUpdateNoPassUser( TQListViewItem *item ); private: QGroupBox *alGroup, *puGroup, *npGroup, *btGroup; diff --git a/kcontrol/kdm/kdm-font.cpp b/kcontrol/kdm/kdm-font.cpp index 456573b4d..af83176b1 100644 --- a/kcontrol/kdm/kdm-font.cpp +++ b/kcontrol/kdm/kdm-font.cpp @@ -21,13 +21,13 @@ #include <sys/types.h> -#include <qapplication.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqapplication.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <kdialog.h> #include <ksimpleconfig.h> @@ -39,38 +39,38 @@ extern KSimpleConfig *config; -KDMFontWidget::KDMFontWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KDMFontWidget::KDMFontWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QGridLayout *ml = new QGridLayout(this, 5, 2, KDialog::marginHint(), KDialog::spacingHint()); - QLabel *label = new QLabel(i18n("&General:"), this); + TQGridLayout *ml = new TQGridLayout(this, 5, 2, KDialog::marginHint(), KDialog::spacingHint()); + TQLabel *label = new TQLabel(i18n("&General:"), this); stdFontChooser = new KFontRequester(this); label->setBuddy(stdFontChooser); - QWhatsThis::add( stdFontChooser, i18n("This changes the font which is used for all the text in the login manager except for the greeting and failure messages.") ); - connect(stdFontChooser, SIGNAL(fontSelected(const QFont&)),this,SLOT(configChanged())); + TQWhatsThis::add( stdFontChooser, i18n("This changes the font which is used for all the text in the login manager except for the greeting and failure messages.") ); + connect(stdFontChooser, TQT_SIGNAL(fontSelected(const TQFont&)),this,TQT_SLOT(configChanged())); ml->addWidget(label, 1, 0); ml->addWidget(stdFontChooser, 1, 1); - label = new QLabel(i18n("&Failures:"), this); + label = new TQLabel(i18n("&Failures:"), this); failFontChooser = new KFontRequester(this); label->setBuddy(failFontChooser); - QWhatsThis::add( failFontChooser, i18n("This changes the font which is used for failure messages in the login manager.") ); - connect(failFontChooser, SIGNAL(fontSelected(const QFont&)),this,SLOT(configChanged())); + TQWhatsThis::add( failFontChooser, i18n("This changes the font which is used for failure messages in the login manager.") ); + connect(failFontChooser, TQT_SIGNAL(fontSelected(const TQFont&)),this,TQT_SLOT(configChanged())); ml->addWidget(label, 2, 0); ml->addWidget(failFontChooser, 2, 1); - label = new QLabel(i18n("Gree&ting:"), this); + label = new TQLabel(i18n("Gree&ting:"), this); greetingFontChooser = new KFontRequester(this); label->setBuddy(greetingFontChooser); - QWhatsThis::add( greetingFontChooser, i18n("This changes the font which is used for the login manager's greeting.") ); - connect(greetingFontChooser, SIGNAL(fontSelected(const QFont&)),this,SLOT(configChanged())); + TQWhatsThis::add( greetingFontChooser, i18n("This changes the font which is used for the login manager's greeting.") ); + connect(greetingFontChooser, TQT_SIGNAL(fontSelected(const TQFont&)),this,TQT_SLOT(configChanged())); ml->addWidget(label, 3, 0); ml->addWidget(greetingFontChooser, 3, 1); - aacb = new QCheckBox (i18n("Use anti-aliasing for fonts"), this); - QWhatsThis::add( aacb, i18n("If you check this box and your X-Server has the Xft extension, " + aacb = new TQCheckBox (i18n("Use anti-aliasing for fonts"), this); + TQWhatsThis::add( aacb, i18n("If you check this box and your X-Server has the Xft extension, " "fonts will be antialiased (smoothed) in the login dialog.") ); - connect(aacb, SIGNAL(toggled ( bool )),this,SLOT(configChanged())); + connect(aacb, TQT_SIGNAL(toggled ( bool )),this,TQT_SLOT(configChanged())); ml->addMultiCellWidget(aacb, 4, 4, 0, 1); ml->setRowStretch(5, 10); } @@ -90,9 +90,9 @@ void KDMFontWidget::configChanged() void KDMFontWidget::set_def() { - stdFontChooser->setFont(QFont("Sans Serif", 10)); - failFontChooser->setFont(QFont("Sans Serif", 10, QFont::Bold)); - greetingFontChooser->setFont(QFont("Sans Serif", 22)); + stdFontChooser->setFont(TQFont("Sans Serif", 10)); + failFontChooser->setFont(TQFont("Sans Serif", 10, TQFont::Bold)); + greetingFontChooser->setFont(TQFont("Sans Serif", 22)); } void KDMFontWidget::save() @@ -114,7 +114,7 @@ void KDMFontWidget::load() config->setGroup("X-*-Greeter"); // Read the fonts - QFont font = stdFontChooser->font(); + TQFont font = stdFontChooser->font(); stdFontChooser->setFont(config->readFontEntry("StdFont", &font)); font = failFontChooser->font(); failFontChooser->setFont(config->readFontEntry("FailFont", &font)); diff --git a/kcontrol/kdm/kdm-font.h b/kcontrol/kdm/kdm-font.h index 232db3cb4..92488d3e7 100644 --- a/kcontrol/kdm/kdm-font.h +++ b/kcontrol/kdm/kdm-font.h @@ -20,7 +20,7 @@ #ifndef __KDMFONT_H__ #define __KDMFONT_H__ -#include <qwidget.h> +#include <tqwidget.h> class KFontRequester; class QCheckBox; @@ -30,7 +30,7 @@ class KDMFontWidget : public QWidget Q_OBJECT public: - KDMFontWidget(QWidget *parent=0, const char *name=0); + KDMFontWidget(TQWidget *parent=0, const char *name=0); void load(); void save(); diff --git a/kcontrol/kdm/kdm-shut.cpp b/kcontrol/kdm/kdm-shut.cpp index 2eb88ac51..3b442956a 100644 --- a/kcontrol/kdm/kdm-shut.cpp +++ b/kcontrol/kdm/kdm-shut.cpp @@ -21,11 +21,11 @@ #include <sys/types.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> #include <ksimpleconfig.h> #include <karrowbutton.h> @@ -40,27 +40,27 @@ extern KSimpleConfig *config; -KDMSessionsWidget::KDMSessionsWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KDMSessionsWidget::KDMSessionsWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QString wtstr; + TQString wtstr; - QGroupBox *group0 = new QGroupBox( i18n("Allow Shutdown"), this ); + TQGroupBox *group0 = new TQGroupBox( i18n("Allow Shutdown"), this ); - sdlcombo = new QComboBox( FALSE, group0 ); - sdllabel = new QLabel (sdlcombo, i18n ("&Local:"), group0); + sdlcombo = new TQComboBox( FALSE, group0 ); + sdllabel = new TQLabel (sdlcombo, i18n ("&Local:"), group0); sdlcombo->insertItem(i18n("Everybody"), SdAll); sdlcombo->insertItem(i18n("Only Root"), SdRoot); sdlcombo->insertItem(i18n("Nobody"), SdNone); - connect(sdlcombo, SIGNAL(activated(int)), SLOT(changed())); - sdrcombo = new QComboBox( FALSE, group0 ); - sdrlabel = new QLabel (sdrcombo, i18n ("&Remote:"), group0); + connect(sdlcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + sdrcombo = new TQComboBox( FALSE, group0 ); + sdrlabel = new TQLabel (sdrcombo, i18n ("&Remote:"), group0); sdrcombo->insertItem(i18n("Everybody"), SdAll); sdrcombo->insertItem(i18n("Only Root"), SdRoot); sdrcombo->insertItem(i18n("Nobody"), SdNone); - connect(sdrcombo, SIGNAL(activated(int)), SLOT(changed())); - QWhatsThis::add( group0, i18n("Here you can select who is allowed to shutdown" + connect(sdrcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + TQWhatsThis::add( group0, i18n("Here you can select who is allowed to shutdown" " the computer using KDM. You can specify different values for local (console) and remote displays. " "Possible values are:<ul>" " <li><em>Everybody:</em> everybody can shutdown the computer using KDM</li>" @@ -68,26 +68,26 @@ KDMSessionsWidget::KDMSessionsWidget(QWidget *parent, const char *name) " <li><em>Nobody:</em> nobody can shutdown the computer using KDM</li></ul>") ); - QGroupBox *group1 = new QGroupBox( i18n("Commands"), this ); + TQGroupBox *group1 = new TQGroupBox( i18n("Commands"), this ); shutdown_lined = new KURLRequester(group1); - QLabel *shutdown_label = new QLabel(shutdown_lined, i18n("H&alt:"), group1); - connect(shutdown_lined, SIGNAL(textChanged(const QString&)), - SLOT(changed())); + TQLabel *shutdown_label = new TQLabel(shutdown_lined, i18n("H&alt:"), group1); + connect(shutdown_lined, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(changed())); wtstr = i18n("Command to initiate the system halt. Typical value: /sbin/halt"); - QWhatsThis::add( shutdown_label, wtstr ); - QWhatsThis::add( shutdown_lined, wtstr ); + TQWhatsThis::add( shutdown_label, wtstr ); + TQWhatsThis::add( shutdown_lined, wtstr ); restart_lined = new KURLRequester(group1); - QLabel *restart_label = new QLabel(restart_lined, i18n("Reb&oot:"), group1); - connect(restart_lined, SIGNAL(textChanged(const QString&)), - SLOT(changed())); + TQLabel *restart_label = new TQLabel(restart_lined, i18n("Reb&oot:"), group1); + connect(restart_lined, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(changed())); wtstr = i18n("Command to initiate the system reboot. Typical value: /sbin/reboot"); - QWhatsThis::add( restart_label, wtstr ); - QWhatsThis::add( restart_lined, wtstr ); + TQWhatsThis::add( restart_label, wtstr ); + TQWhatsThis::add( restart_lined, wtstr ); - QGroupBox *group4 = new QGroupBox( i18n("Miscellaneous"), this ); + TQGroupBox *group4 = new TQGroupBox( i18n("Miscellaneous"), this ); bm_combo = new KBackedComboBox( group4 ); bm_combo->insertItem("None", i18n("boot manager", "None")); @@ -95,16 +95,16 @@ KDMSessionsWidget::KDMSessionsWidget(QWidget *parent, const char *name) #if defined(__linux__) && ( defined(__i386__) || defined(__amd64__) ) bm_combo->insertItem("Lilo", i18n("Lilo")); #endif - QLabel *bm_label = new QLabel( bm_combo, i18n("Boot manager:"), group4 ); - connect(bm_combo, SIGNAL(activated(int)), SLOT(changed())); + TQLabel *bm_label = new TQLabel( bm_combo, i18n("Boot manager:"), group4 ); + connect(bm_combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); wtstr = i18n("Enable boot options in the \"Shutdown...\" dialog."); - QWhatsThis::add( bm_label, wtstr ); - QWhatsThis::add( bm_combo, wtstr ); + TQWhatsThis::add( bm_label, wtstr ); + TQWhatsThis::add( bm_combo, wtstr ); - QBoxLayout *main = new QVBoxLayout( this, 10 ); - QGridLayout *lgroup0 = new QGridLayout( group0, 1, 1, 10); - QGridLayout *lgroup1 = new QGridLayout( group1, 1, 1, 10); - QGridLayout *lgroup4 = new QGridLayout( group4, 1, 1, 10); + TQBoxLayout *main = new TQVBoxLayout( this, 10 ); + TQGridLayout *lgroup0 = new TQGridLayout( group0, 1, 1, 10); + TQGridLayout *lgroup1 = new TQGridLayout( group1, 1, 1, 10); + TQGridLayout *lgroup4 = new TQGridLayout( group4, 1, 1, 10); main->addWidget(group0); main->addWidget(group1); @@ -151,9 +151,9 @@ void KDMSessionsWidget::makeReadOnly() bm_combo->setEnabled(false); } -void KDMSessionsWidget::writeSD(QComboBox *combo) +void KDMSessionsWidget::writeSD(TQComboBox *combo) { - QString what; + TQString what; switch (combo->currentItem()) { case SdAll: what = "All"; break; case SdRoot: what = "Root"; break; @@ -177,9 +177,9 @@ void KDMSessionsWidget::save() config->writeEntry("BootManager", bm_combo->currentId()); } -void KDMSessionsWidget::readSD(QComboBox *combo, QString def) +void KDMSessionsWidget::readSD(TQComboBox *combo, TQString def) { - QString str = config->readEntry("AllowShutdown", def); + TQString str = config->readEntry("AllowShutdown", def); SdModes sdMode; if(str == "All") sdMode = SdAll; diff --git a/kcontrol/kdm/kdm-shut.h b/kcontrol/kdm/kdm-shut.h index 8bad7d5a0..0d603e9eb 100644 --- a/kcontrol/kdm/kdm-shut.h +++ b/kcontrol/kdm/kdm-shut.h @@ -21,7 +21,7 @@ #define __KDMSESS_H__ -#include <qstring.h> +#include <tqstring.h> class QComboBox; class QCheckBox; @@ -33,7 +33,7 @@ class KDMSessionsWidget : public QWidget Q_OBJECT public: - KDMSessionsWidget(QWidget *parent=0, const char *name=0); + KDMSessionsWidget(TQWidget *parent=0, const char *name=0); void load(); void save(); @@ -49,8 +49,8 @@ protected slots: void changed(); private: - void readSD (QComboBox *, QString); - void writeSD (QComboBox *); + void readSD (TQComboBox *, TQString); + void writeSD (TQComboBox *); QComboBox *sdlcombo, *sdrcombo; QLabel *sdllabel, *sdrlabel; diff --git a/kcontrol/kdm/kdm-users.cpp b/kcontrol/kdm/kdm-users.cpp index d8a540bd3..ce27f6498 100644 --- a/kcontrol/kdm/kdm-users.cpp +++ b/kcontrol/kdm/kdm-users.cpp @@ -20,14 +20,14 @@ #include <unistd.h> #include <sys/types.h> -#include <qstyle.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qvalidator.h> -#include <qwhatsthis.h> -#include <qvgroupbox.h> -#include <qpushbutton.h> +#include <tqstyle.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqvalidator.h> +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> +#include <tqpushbutton.h> #include <kfiledialog.h> #include <kimageio.h> @@ -45,8 +45,8 @@ extern KSimpleConfig *config; -KDMUsersWidget::KDMUsersWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KDMUsersWidget::KDMUsersWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { #ifdef __linux__ struct stat st; @@ -76,130 +76,130 @@ KDMUsersWidget::KDMUsersWidget(QWidget *parent, const char *name) config->setGroup( "X-*-Greeter" ); m_userPixDir = config->readEntry( "FaceDir", KGlobal::dirs()->resourceDirs("data").last() + "kdm/faces" ) + '/'; m_notFirst = false; - QDir testDir( m_userPixDir ); + TQDir testDir( m_userPixDir ); if ( !testDir.exists() && !testDir.mkdir( testDir.absPath() ) && !geteuid() ) KMessageBox::sorry( this, i18n("Unable to create folder %1").arg( testDir.absPath() ) ); - chmod( QFile::encodeName( m_userPixDir ), 0755 ); + chmod( TQFile::encodeName( m_userPixDir ), 0755 ); m_defaultText = i18n("<default>"); - QString wtstr; + TQString wtstr; - minGroup = new QGroupBox( 2, Horizontal, i18n("System U&IDs"), this ); - QWhatsThis::add( minGroup, i18n("Users with a UID (numerical user identification) outside this range will not be listed by KDM and this setup dialog." + minGroup = new TQGroupBox( 2, Horizontal, i18n("System U&IDs"), this ); + TQWhatsThis::add( minGroup, i18n("Users with a UID (numerical user identification) outside this range will not be listed by KDM and this setup dialog." " Note that users with the UID 0 (typically root) are not affected by this and must be" " explicitly hidden in \"Not hidden\" mode.")); - QSizePolicy sp_ign_fix( QSizePolicy::Ignored, QSizePolicy::Fixed ); - QValidator *valid = new QIntValidator( 0, 999999, minGroup ); - QLabel *minlab = new QLabel( i18n("Below:"), minGroup ); + TQSizePolicy sp_ign_fix( TQSizePolicy::Ignored, TQSizePolicy::Fixed ); + TQValidator *valid = new TQIntValidator( 0, 999999, minGroup ); + TQLabel *minlab = new TQLabel( i18n("Below:"), minGroup ); leminuid = new KLineEdit( minGroup ); minlab->setBuddy( leminuid ); leminuid->setSizePolicy( sp_ign_fix ); leminuid->setValidator( valid ); - connect( leminuid, SIGNAL(textChanged( const QString & )), SLOT(slotChanged()) ); - connect( leminuid, SIGNAL(textChanged( const QString & )), SLOT(slotMinMaxChanged()) ); - QLabel *maxlab = new QLabel( i18n("Above:"), minGroup ); + connect( leminuid, TQT_SIGNAL(textChanged( const TQString & )), TQT_SLOT(slotChanged()) ); + connect( leminuid, TQT_SIGNAL(textChanged( const TQString & )), TQT_SLOT(slotMinMaxChanged()) ); + TQLabel *maxlab = new TQLabel( i18n("Above:"), minGroup ); lemaxuid = new KLineEdit( minGroup ); maxlab->setBuddy( lemaxuid ); lemaxuid->setSizePolicy( sp_ign_fix ); lemaxuid->setValidator( valid ); - connect(lemaxuid, SIGNAL(textChanged( const QString & )), SLOT(slotChanged()) ); - connect(lemaxuid, SIGNAL(textChanged( const QString & )), SLOT(slotMinMaxChanged()) ); - - usrGroup = new QButtonGroup( 5, Qt::Vertical, i18n("Users"), this ); - connect( usrGroup, SIGNAL(clicked( int )), SLOT(slotShowOpts()) ); - connect( usrGroup, SIGNAL(clicked( int )), SLOT(slotChanged()) ); - cbshowlist = new QCheckBox( i18n("Show list"), usrGroup ); - QWhatsThis::add( cbshowlist, i18n("If this option is checked, KDM will show a list of users," + connect(lemaxuid, TQT_SIGNAL(textChanged( const TQString & )), TQT_SLOT(slotChanged()) ); + connect(lemaxuid, TQT_SIGNAL(textChanged( const TQString & )), TQT_SLOT(slotMinMaxChanged()) ); + + usrGroup = new TQButtonGroup( 5, Qt::Vertical, i18n("Users"), this ); + connect( usrGroup, TQT_SIGNAL(clicked( int )), TQT_SLOT(slotShowOpts()) ); + connect( usrGroup, TQT_SIGNAL(clicked( int )), TQT_SLOT(slotChanged()) ); + cbshowlist = new TQCheckBox( i18n("Show list"), usrGroup ); + TQWhatsThis::add( cbshowlist, i18n("If this option is checked, KDM will show a list of users," " so users can click on their name or image rather than typing in their login.") ); - cbcomplete = new QCheckBox( i18n("Autocompletion"), usrGroup ); - QWhatsThis::add( cbcomplete, i18n("If this option is checked, KDM will automatically complete" + cbcomplete = new TQCheckBox( i18n("Autocompletion"), usrGroup ); + TQWhatsThis::add( cbcomplete, i18n("If this option is checked, KDM will automatically complete" " user names while they are typed in the line edit.") ); - cbinverted = new QCheckBox( i18n("Inverse selection"), usrGroup ); - QWhatsThis::add( cbinverted, i18n("This option specifies how the users for \"Show list\" and \"Autocompletion\"" + cbinverted = new TQCheckBox( i18n("Inverse selection"), usrGroup ); + TQWhatsThis::add( cbinverted, i18n("This option specifies how the users for \"Show list\" and \"Autocompletion\"" " are selected in the \"Select users and groups\" list: " "If not checked, select only the checked users. " "If checked, select all non-system users, except the checked ones.")); - cbusrsrt = new QCheckBox( i18n("Sor&t users"), usrGroup ); - connect( cbusrsrt, SIGNAL(toggled( bool )), SLOT(slotChanged()) ); - QWhatsThis::add( cbusrsrt, i18n("If this is checked, KDM will alphabetically sort the user list." + cbusrsrt = new TQCheckBox( i18n("Sor&t users"), usrGroup ); + connect( cbusrsrt, TQT_SIGNAL(toggled( bool )), TQT_SLOT(slotChanged()) ); + TQWhatsThis::add( cbusrsrt, i18n("If this is checked, KDM will alphabetically sort the user list." " Otherwise users are listed in the order they appear in the password file.") ); - wstack = new QWidgetStack( this ); - s_label = new QLabel( wstack, i18n("S&elect users and groups:"), this ); + wstack = new TQWidgetStack( this ); + s_label = new TQLabel( wstack, i18n("S&elect users and groups:"), this ); optinlv = new KListView( this ); optinlv->addColumn( i18n("Selected Users") ); - optinlv->setResizeMode( QListView::LastColumn ); - QWhatsThis::add( optinlv, i18n("KDM will show all checked users. Entries denoted with '@' are user groups. Checking a group is like checking all users in that group.") ); + optinlv->setResizeMode( TQListView::LastColumn ); + TQWhatsThis::add( optinlv, i18n("KDM will show all checked users. Entries denoted with '@' are user groups. Checking a group is like checking all users in that group.") ); wstack->addWidget( optinlv ); - connect( optinlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotUpdateOptIn( QListViewItem * )) ); - connect( optinlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotChanged()) ); + connect( optinlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotUpdateOptIn( TQListViewItem * )) ); + connect( optinlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotChanged()) ); optoutlv = new KListView( this ); optoutlv->addColumn( i18n("Hidden Users") ); - optoutlv->setResizeMode( QListView::LastColumn ); - QWhatsThis::add( optoutlv, i18n("KDM will show all non-checked non-system users. Entries denoted with '@' are user groups. Checking a group is like checking all users in that group.") ); + optoutlv->setResizeMode( TQListView::LastColumn ); + TQWhatsThis::add( optoutlv, i18n("KDM will show all non-checked non-system users. Entries denoted with '@' are user groups. Checking a group is like checking all users in that group.") ); wstack->addWidget( optoutlv ); - connect( optoutlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotUpdateOptOut( QListViewItem * )) ); - connect( optoutlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotChanged()) ); + connect( optoutlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotUpdateOptOut( TQListViewItem * )) ); + connect( optoutlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotChanged()) ); - faceGroup = new QButtonGroup( 5, Qt::Vertical, i18n("User Image Source"), this ); - QWhatsThis::add( faceGroup, i18n("Here you can specify where KDM will obtain the images that represent users." + faceGroup = new TQButtonGroup( 5, Qt::Vertical, i18n("User Image Source"), this ); + TQWhatsThis::add( faceGroup, i18n("Here you can specify where KDM will obtain the images that represent users." " \"Admin\" represents the global folder; these are the pictures you can set below." " \"User\" means that KDM should read the user's $HOME/.face.icon file." " The two selections in the middle define the order of preference if both sources are available.") ); - connect( faceGroup, SIGNAL(clicked( int )), SLOT(slotFaceOpts()) ); - connect( faceGroup, SIGNAL(clicked( int )), SLOT(slotChanged()) ); - rbadmonly = new QRadioButton( i18n("Admin"), faceGroup ); - rbprefadm = new QRadioButton( i18n("Admin, user"), faceGroup ); - rbprefusr = new QRadioButton( i18n("User, admin"), faceGroup ); - rbusronly = new QRadioButton( i18n("User"), faceGroup ); - - QGroupBox *picGroup = new QVGroupBox( i18n("User Images"), this ); - QWidget *hlpw = new QWidget( picGroup ); + connect( faceGroup, TQT_SIGNAL(clicked( int )), TQT_SLOT(slotFaceOpts()) ); + connect( faceGroup, TQT_SIGNAL(clicked( int )), TQT_SLOT(slotChanged()) ); + rbadmonly = new TQRadioButton( i18n("Admin"), faceGroup ); + rbprefadm = new TQRadioButton( i18n("Admin, user"), faceGroup ); + rbprefusr = new TQRadioButton( i18n("User, admin"), faceGroup ); + rbusronly = new TQRadioButton( i18n("User"), faceGroup ); + + TQGroupBox *picGroup = new TQVGroupBox( i18n("User Images"), this ); + TQWidget *hlpw = new TQWidget( picGroup ); usercombo = new KComboBox( hlpw ); - QWhatsThis::add( usercombo, i18n("The user the image below belongs to.") ); - connect( usercombo, SIGNAL(activated( int )), - SLOT(slotUserSelected()) ); - QLabel *userlabel = new QLabel( usercombo, i18n("User:"), hlpw ); - userbutton = new QPushButton( hlpw ); + TQWhatsThis::add( usercombo, i18n("The user the image below belongs to.") ); + connect( usercombo, TQT_SIGNAL(activated( int )), + TQT_SLOT(slotUserSelected()) ); + TQLabel *userlabel = new TQLabel( usercombo, i18n("User:"), hlpw ); + userbutton = new TQPushButton( hlpw ); userbutton->setAcceptDrops( true ); userbutton->installEventFilter( this ); // for drag and drop - uint sz = style().pixelMetric( QStyle::PM_ButtonMargin ) * 2 + 48; + uint sz = style().pixelMetric( TQStyle::PM_ButtonMargin ) * 2 + 48; userbutton->setFixedSize( sz, sz ); - connect( userbutton, SIGNAL(clicked()), - SLOT(slotUserButtonClicked()) ); - QToolTip::add( userbutton, i18n("Click or drop an image here") ); - QWhatsThis::add( userbutton, i18n("Here you can see the image assigned to the user selected in the combo box above. Click on the image button to select from a list" + connect( userbutton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotUserButtonClicked()) ); + TQToolTip::add( userbutton, i18n("Click or drop an image here") ); + TQWhatsThis::add( userbutton, i18n("Here you can see the image assigned to the user selected in the combo box above. Click on the image button to select from a list" " of images or drag and drop your own image on to the button (e.g. from Konqueror).") ); - rstuserbutton = new QPushButton( i18n("Unset"), hlpw ); - QWhatsThis::add( rstuserbutton, i18n("Click this button to make KDM use the default image for the selected user.") ); - connect( rstuserbutton, SIGNAL(clicked()), - SLOT(slotUnsetUserPix()) ); - QGridLayout *hlpl = new QGridLayout( hlpw, 3, 2, 0, KDialog::spacingHint() ); + rstuserbutton = new TQPushButton( i18n("Unset"), hlpw ); + TQWhatsThis::add( rstuserbutton, i18n("Click this button to make KDM use the default image for the selected user.") ); + connect( rstuserbutton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotUnsetUserPix()) ); + TQGridLayout *hlpl = new TQGridLayout( hlpw, 3, 2, 0, KDialog::spacingHint() ); hlpl->addWidget( userlabel, 0, 0 ); // hlpl->addSpacing( KDialog::spacingHint() ); hlpl->addWidget( usercombo, 0, 1 ); hlpl->addMultiCellWidget( userbutton, 1,1, 0,1, AlignHCenter ); hlpl->addMultiCellWidget( rstuserbutton, 2,2, 0,1, AlignHCenter ); - QHBoxLayout *main = new QHBoxLayout( this, 10 ); + TQHBoxLayout *main = new TQHBoxLayout( this, 10 ); - QVBoxLayout *lLayout = new QVBoxLayout( main, 10 ); + TQVBoxLayout *lLayout = new TQVBoxLayout( main, 10 ); lLayout->addWidget( minGroup ); lLayout->addWidget( usrGroup ); lLayout->addStretch( 1 ); - QVBoxLayout *mLayout = new QVBoxLayout( main, 10 ); + TQVBoxLayout *mLayout = new TQVBoxLayout( main, 10 ); mLayout->addWidget( s_label ); mLayout->addWidget( wstack ); mLayout->setStretchFactor( wstack, 1 ); main->setStretchFactor( mLayout, 1 ); - QVBoxLayout *rLayout = new QVBoxLayout( main, 10 ); + TQVBoxLayout *rLayout = new TQVBoxLayout( main, 10 ); rLayout->addWidget( faceGroup ); rLayout->addWidget( picGroup ); rLayout->addStretch( 1 ); @@ -219,7 +219,7 @@ void KDMUsersWidget::makeReadOnly() rbprefusr->setEnabled(false); rbusronly->setEnabled(false); wstack->setEnabled(false); - disconnect( userbutton, SIGNAL(clicked()), this, SLOT(slotUserButtonClicked()) ); + disconnect( userbutton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUserButtonClicked()) ); userbutton->setAcceptDrops(false); rstuserbutton->setEnabled(false); } @@ -254,8 +254,8 @@ void KDMUsersWidget::slotFaceOpts() void KDMUsersWidget::slotUserSelected() { - QString user = usercombo->currentText(); - QImage p; + TQString user = usercombo->currentText(); + TQImage p; if (user != m_defaultText && p.load( m_userPixDir + user + ".face.icon" )) { rstuserbutton->setEnabled( !getuid() ); @@ -263,22 +263,22 @@ void KDMUsersWidget::slotUserSelected() p.load( m_userPixDir + ".default.face.icon" ); rstuserbutton->setEnabled( false ); } - userbutton->setPixmap( p.smoothScale( 48, 48, QImage::ScaleMin ) ); + userbutton->setPixmap( p.smoothScale( 48, 48, TQImage::ScaleMin ) ); } -void KDMUsersWidget::changeUserPix(const QString &pix) +void KDMUsersWidget::changeUserPix(const TQString &pix) { - QString user( usercombo->currentText() ); + TQString user( usercombo->currentText() ); if (user == m_defaultText) { user = ".default"; - if (KMessageBox::questionYesNo(this, i18n("Save image as default image?"),QString::null,KStdGuiItem::save(),KStdGuiItem::cancel()) + if (KMessageBox::questionYesNo(this, i18n("Save image as default image?"),TQString::null,KStdGuiItem::save(),KStdGuiItem::cancel()) != KMessageBox::Yes) return; } - QImage p( pix ); + TQImage p( pix ); if (p.isNull()) { KMessageBox::sorry( this, i18n("There was an error loading the image\n" @@ -286,21 +286,21 @@ void KDMUsersWidget::changeUserPix(const QString &pix) return; } - p = p.smoothScale( 48, 48, QImage::ScaleMin ); - QString userpix = m_userPixDir + user + ".face.icon"; + p = p.smoothScale( 48, 48, TQImage::ScaleMin ); + TQString userpix = m_userPixDir + user + ".face.icon"; if (!p.save( userpix, "PNG" )) KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1") .arg( userpix ) ); else - chmod( QFile::encodeName( userpix ), 0644 ); + chmod( TQFile::encodeName( userpix ), 0644 ); slotUserSelected(); } void KDMUsersWidget::slotUserButtonClicked() { - KFileDialog dlg(m_notFirst ? QString::null : + KFileDialog dlg(m_notFirst ? TQString::null : KGlobal::dirs()->resourceDirs("data").last() + "kdm/pics/users", KImageIO::pattern( KImageIO::Reading ), this, 0, true); @@ -310,7 +310,7 @@ void KDMUsersWidget::slotUserButtonClicked() KImageFilePreview *ip = new KImageFilePreview( &dlg ); dlg.setPreviewWidget( ip ); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; m_notFirst = true; @@ -319,33 +319,33 @@ void KDMUsersWidget::slotUserButtonClicked() void KDMUsersWidget::slotUnsetUserPix() { - QFile::remove( m_userPixDir + usercombo->currentText() + ".face.icon" ); + TQFile::remove( m_userPixDir + usercombo->currentText() + ".face.icon" ); slotUserSelected(); } -bool KDMUsersWidget::eventFilter(QObject *, QEvent *e) +bool KDMUsersWidget::eventFilter(TQObject *, TQEvent *e) { - if (e->type() == QEvent::DragEnter) { - QDragEnterEvent *ee = (QDragEnterEvent *) e; + if (e->type() == TQEvent::DragEnter) { + TQDragEnterEvent *ee = (TQDragEnterEvent *) e; ee->accept( KURLDrag::canDecode(ee) ); return true; } - if (e->type() == QEvent::Drop) { - userButtonDropEvent((QDropEvent *) e); + if (e->type() == TQEvent::Drop) { + userButtonDropEvent((TQDropEvent *) e); return true; } return false; } -KURL *decodeImgDrop(QDropEvent *e, QWidget *wdg); +KURL *decodeImgDrop(TQDropEvent *e, TQWidget *wdg); -void KDMUsersWidget::userButtonDropEvent(QDropEvent *e) +void KDMUsersWidget::userButtonDropEvent(TQDropEvent *e) { KURL *url = decodeImgDrop(e, this); if (url) { - QString pixpath; + TQString pixpath; KIO::NetAccess::download(*url, pixpath, parentWidget()); changeUserPix( pixpath ); KIO::NetAccess::removeTempFile(pixpath); @@ -376,12 +376,12 @@ void KDMUsersWidget::save() } -void KDMUsersWidget::updateOptList( QListViewItem *item, QStringList &list ) +void KDMUsersWidget::updateOptList( TQListViewItem *item, TQStringList &list ) { if ( !item ) return; - QCheckListItem *itm = (QCheckListItem *)item; - QStringList::iterator it = list.find( itm->text() ); + TQCheckListItem *itm = (TQCheckListItem *)item; + TQStringList::iterator it = list.find( itm->text() ); if (itm->isOn()) { if (it == list.end()) list.append( itm->text() ); @@ -391,12 +391,12 @@ void KDMUsersWidget::updateOptList( QListViewItem *item, QStringList &list ) } } -void KDMUsersWidget::slotUpdateOptIn( QListViewItem *item ) +void KDMUsersWidget::slotUpdateOptIn( TQListViewItem *item ) { updateOptList( item, selectedUsers ); } -void KDMUsersWidget::slotUpdateOptOut( QListViewItem *item ) +void KDMUsersWidget::slotUpdateOptOut( TQListViewItem *item ) { updateOptList( item, hiddenUsers ); } @@ -409,14 +409,14 @@ void KDMUsersWidget::slotClearUsers() usercombo->insertItem( m_defaultText ); } -void KDMUsersWidget::slotAddUsers(const QMap<QString,int> &users) +void KDMUsersWidget::slotAddUsers(const TQMap<TQString,int> &users) { - QMapConstIterator<QString,int> it; + TQMapConstIterator<TQString,int> it; for (it = users.begin(); it != users.end(); ++it) { - const QString *name = &it.key(); - (new QCheckListItem(optinlv, *name, QCheckListItem::CheckBox))-> + const TQString *name = &it.key(); + (new TQCheckListItem(optinlv, *name, TQCheckListItem::CheckBox))-> setOn(selectedUsers.find(*name) != selectedUsers.end()); - (new QCheckListItem(optoutlv, *name, QCheckListItem::CheckBox))-> + (new TQCheckListItem(optoutlv, *name, TQCheckListItem::CheckBox))-> setOn(hiddenUsers.find(*name) != hiddenUsers.end()); if ((*name)[0] != '@') usercombo->insertItem(*name); @@ -427,11 +427,11 @@ void KDMUsersWidget::slotAddUsers(const QMap<QString,int> &users) usercombo->listBox()->sort(); } -void KDMUsersWidget::slotDelUsers(const QMap<QString,int> &users) +void KDMUsersWidget::slotDelUsers(const TQMap<TQString,int> &users) { - QMapConstIterator<QString,int> it; + TQMapConstIterator<TQString,int> it; for (it = users.begin(); it != users.end(); ++it) { - const QString *name = &it.key(); + const TQString *name = &it.key(); if (usercombo->listBox()) delete usercombo->listBox()->findItem( *name, ExactMatch | CaseSensitive ); delete optinlv->findItem( *name, 0 ); @@ -441,7 +441,7 @@ void KDMUsersWidget::slotDelUsers(const QMap<QString,int> &users) void KDMUsersWidget::load() { - QString str; + TQString str; config->setGroup("X-*-Greeter"); @@ -456,12 +456,12 @@ void KDMUsersWidget::load() cbinverted->setChecked( config->readEntry( "ShowUsers" ) != "Selected" ); cbusrsrt->setChecked(config->readBoolEntry("SortUsers", true)); - QString ps = config->readEntry( "FaceSource" ); - if (ps == QString::fromLatin1("UserOnly")) + TQString ps = config->readEntry( "FaceSource" ); + if (ps == TQString::fromLatin1("UserOnly")) rbusronly->setChecked(true); - else if (ps == QString::fromLatin1("PreferUser")) + else if (ps == TQString::fromLatin1("PreferUser")) rbprefusr->setChecked(true); - else if (ps == QString::fromLatin1("PreferAdmin")) + else if (ps == TQString::fromLatin1("PreferAdmin")) rbprefadm->setChecked(true); else rbadmonly->setChecked(true); diff --git a/kcontrol/kdm/kdm-users.h b/kcontrol/kdm/kdm-users.h index b54d96ff8..129f5301d 100644 --- a/kcontrol/kdm/kdm-users.h +++ b/kcontrol/kdm/kdm-users.h @@ -20,14 +20,14 @@ #ifndef __KDMUSERS_H__ #define __KDMUSERS_H__ -#include <qwidget.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qimage.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qwidgetstack.h> +#include <tqwidget.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqwidgetstack.h> #include <klineedit.h> #include <klistview.h> @@ -42,19 +42,19 @@ class KDMUsersWidget : public QWidget Q_OBJECT public: - KDMUsersWidget( QWidget *parent = 0, const char *name = 0 ); + KDMUsersWidget( TQWidget *parent = 0, const char *name = 0 ); void load(); void save(); void defaults(); void makeReadOnly(); - bool eventFilter( QObject *o, QEvent *e ); + bool eventFilter( TQObject *o, TQEvent *e ); public slots: void slotClearUsers(); - void slotAddUsers( const QMap<QString,int> & ); - void slotDelUsers( const QMap<QString,int> & ); + void slotAddUsers( const TQMap<TQString,int> & ); + void slotDelUsers( const TQMap<TQString,int> & ); signals: void changed( bool state ); @@ -63,8 +63,8 @@ signals: private slots: void slotMinMaxChanged(); void slotShowOpts(); - void slotUpdateOptIn( QListViewItem *item ); - void slotUpdateOptOut( QListViewItem *item ); + void slotUpdateOptIn( TQListViewItem *item ); + void slotUpdateOptOut( TQListViewItem *item ); void slotUserSelected(); void slotUnsetUserPix(); void slotFaceOpts(); @@ -72,9 +72,9 @@ private slots: void slotChanged(); private: - void updateOptList( QListViewItem *item, QStringList &list ); - void userButtonDropEvent( QDropEvent *e ); - void changeUserPix( const QString & ); + void updateOptList( TQListViewItem *item, TQStringList &list ); + void userButtonDropEvent( TQDropEvent *e ); + void changeUserPix( const TQString & ); QGroupBox *minGroup; // top left QLineEdit *leminuid, *lemaxuid; diff --git a/kcontrol/kdm/main.cpp b/kcontrol/kdm/main.cpp index 12c356e5c..ae99b51f5 100644 --- a/kcontrol/kdm/main.cpp +++ b/kcontrol/kdm/main.cpp @@ -23,7 +23,7 @@ #include <config.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kaboutdata.h> #include <kgenericfactory.h> @@ -47,10 +47,10 @@ #include <pwd.h> #include <grp.h> -typedef KGenericFactory<KDModule, QWidget> KDMFactory; +typedef KGenericFactory<KDModule, TQWidget> KDMFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kdm, KDMFactory("kdmconfig") ) -KURL *decodeImgDrop(QDropEvent *e, QWidget *wdg) +KURL *decodeImgDrop(TQDropEvent *e, TQWidget *wdg) { KURL::List uris; @@ -61,10 +61,10 @@ KURL *decodeImgDrop(QDropEvent *e, QWidget *wdg) if( KImageIO::canRead(KImageIO::type(url->fileName())) ) return url; - QStringList qs = QStringList::split('\n', KImageIO::pattern()); + TQStringList qs = TQStringList::split('\n', KImageIO::pattern()); qs.remove(qs.begin()); - QString msg = i18n( "%1 " + TQString msg = i18n( "%1 " "does not appear to be an image file.\n" "Please use files with these extensions:\n" "%2") @@ -78,7 +78,7 @@ KURL *decodeImgDrop(QDropEvent *e, QWidget *wdg) KSimpleConfig *config; -KDModule::KDModule(QWidget *parent, const char *name, const QStringList &) +KDModule::KDModule(TQWidget *parent, const char *name, const TQStringList &) : KCModule(KDMFactory::instance(), parent, name) , minshowuid(0) , maxshowuid(0) @@ -123,17 +123,17 @@ KDModule::KDModule(QWidget *parent, const char *name, const QStringList &) KGlobal::locale()->insertCatalogue("kcmbackground"); - QStringList sl; - QMap<gid_t,QStringList> tgmap; - QMap<gid_t,QStringList>::Iterator tgmapi; - QMap<gid_t,QStringList>::ConstIterator tgmapci; - QMap<QString, QPair<int,QStringList> >::Iterator umapi; + TQStringList sl; + TQMap<gid_t,TQStringList> tgmap; + TQMap<gid_t,TQStringList>::Iterator tgmapi; + TQMap<gid_t,TQStringList>::ConstIterator tgmapci; + TQMap<TQString, QPair<int,TQStringList> >::Iterator umapi; struct passwd *ps; for (setpwent(); (ps = getpwent()); ) { - QString un( QFile::decodeName( ps->pw_name ) ); + TQString un( TQFile::decodeName( ps->pw_name ) ); if (usermap.find( un ) == usermap.end()) { - usermap.insert( un, QPair<int,QStringList>( ps->pw_uid, sl ) ); + usermap.insert( un, QPair<int,TQStringList>( ps->pw_uid, sl ) ); if ((tgmapi = tgmap.find( ps->pw_gid )) != tgmap.end()) (*tgmapi).append( un ); else @@ -144,22 +144,22 @@ KDModule::KDModule(QWidget *parent, const char *name, const QStringList &) struct group *grp; for (setgrent(); (grp = getgrent()); ) { - QString gn( QFile::decodeName( grp->gr_name ) ); + TQString gn( TQFile::decodeName( grp->gr_name ) ); bool delme = false; if ((tgmapi = tgmap.find( grp->gr_gid )) != tgmap.end()) { if ((*tgmapi).count() == 1 && (*tgmapi).first() == gn) delme = true; else - for (QStringList::ConstIterator it = (*tgmapi).begin(); + for (TQStringList::ConstIterator it = (*tgmapi).begin(); it != (*tgmapi).end(); ++it) usermap[*it].second.append( gn ); tgmap.remove( tgmapi ); } if (!*grp->gr_mem || - (delme && !grp->gr_mem[1] && gn == QFile::decodeName( *grp->gr_mem ))) + (delme && !grp->gr_mem[1] && gn == TQFile::decodeName( *grp->gr_mem ))) continue; do { - QString un( QFile::decodeName( *grp->gr_mem ) ); + TQString un( TQFile::decodeName( *grp->gr_mem ) ); if ((umapi = usermap.find( un )) != usermap.end()) { if ((*umapi).second.find( gn ) == (*umapi).second.end()) (*umapi).second.append( gn ); @@ -173,10 +173,10 @@ KDModule::KDModule(QWidget *parent, const char *name, const QStringList &) kdWarning() << "user(s) '" << tgmapci.data().join(",") << "' have unknown GID " << tgmapci.key() << endl; - config = new KSimpleConfig( QString::fromLatin1( KDE_CONFDIR "/kdm/kdmrc" )); + config = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/kdm/kdmrc" )); - QVBoxLayout *top = new QVBoxLayout(this); - tab = new QTabWidget(this); + TQVBoxLayout *top = new TQVBoxLayout(this); + tab = new TQTabWidget(this); // ***** // _don't_ add a theme configurator until the theming engine is _really_ done!! @@ -184,34 +184,34 @@ KDModule::KDModule(QWidget *parent, const char *name, const QStringList &) appearance = new KDMAppearanceWidget(this); tab->addTab(appearance, i18n("A&ppearance")); - connect(appearance, SIGNAL(changed(bool)), SIGNAL( changed(bool))); + connect(appearance, TQT_SIGNAL(changed(bool)), TQT_SIGNAL( changed(bool))); font = new KDMFontWidget(this); tab->addTab(font, i18n("&Font")); - connect(font, SIGNAL(changed(bool)), SIGNAL(changed(bool))); + connect(font, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); background = new KBackground(this); tab->addTab(background, i18n("&Background")); - connect(background, SIGNAL(changed(bool)), SIGNAL(changed(bool))); + connect(background, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); sessions = new KDMSessionsWidget(this); tab->addTab(sessions, i18n("&Shutdown")); - connect(sessions, SIGNAL(changed(bool)), SIGNAL(changed(bool))); + connect(sessions, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); users = new KDMUsersWidget(this, 0); tab->addTab(users, i18n("&Users")); - connect(users, SIGNAL(changed(bool)), SIGNAL(changed(bool))); - connect(users, SIGNAL(setMinMaxUID(int,int)), SLOT(slotMinMaxUID(int,int))); - connect(this, SIGNAL(addUsers(const QMap<QString,int> &)), users, SLOT(slotAddUsers(const QMap<QString,int> &))); - connect(this, SIGNAL(delUsers(const QMap<QString,int> &)), users, SLOT(slotDelUsers(const QMap<QString,int> &))); - connect(this, SIGNAL(clearUsers()), users, SLOT(slotClearUsers())); + connect(users, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); + connect(users, TQT_SIGNAL(setMinMaxUID(int,int)), TQT_SLOT(slotMinMaxUID(int,int))); + connect(this, TQT_SIGNAL(addUsers(const TQMap<TQString,int> &)), users, TQT_SLOT(slotAddUsers(const TQMap<TQString,int> &))); + connect(this, TQT_SIGNAL(delUsers(const TQMap<TQString,int> &)), users, TQT_SLOT(slotDelUsers(const TQMap<TQString,int> &))); + connect(this, TQT_SIGNAL(clearUsers()), users, TQT_SLOT(slotClearUsers())); convenience = new KDMConvenienceWidget(this, 0); tab->addTab(convenience, i18n("Con&venience")); - connect(convenience, SIGNAL(changed(bool)), SIGNAL(changed(bool))); - connect(this, SIGNAL(addUsers(const QMap<QString,int> &)), convenience, SLOT(slotAddUsers(const QMap<QString,int> &))); - connect(this, SIGNAL(delUsers(const QMap<QString,int> &)), convenience, SLOT(slotDelUsers(const QMap<QString,int> &))); - connect(this, SIGNAL(clearUsers()), convenience, SLOT(slotClearUsers())); + connect(convenience, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); + connect(this, TQT_SIGNAL(addUsers(const TQMap<TQString,int> &)), convenience, TQT_SLOT(slotAddUsers(const TQMap<TQString,int> &))); + connect(this, TQT_SIGNAL(delUsers(const TQMap<TQString,int> &)), convenience, TQT_SLOT(slotDelUsers(const TQMap<TQString,int> &))); + connect(this, TQT_SIGNAL(clearUsers()), convenience, TQT_SLOT(slotClearUsers())); load(); if (getuid() != 0 || !config->checkConfigFilesWritable( true )) { @@ -272,10 +272,10 @@ void KDModule::propagateUsers() { groupmap.clear(); emit clearUsers(); - QMap<QString,int> lusers; - QMapConstIterator<QString, QPair<int,QStringList> > it; - QStringList::ConstIterator jt; - QMap<QString,int>::Iterator gmapi; + TQMap<TQString,int> lusers; + TQMapConstIterator<TQString, QPair<int,TQStringList> > it; + TQStringList::ConstIterator jt; + TQMap<TQString,int>::Iterator gmapi; for (it = usermap.begin(); it != usermap.end(); ++it) { int uid = it.data().first; if (!uid || (uid >= minshowuid && uid <= maxshowuid)) { @@ -295,10 +295,10 @@ void KDModule::propagateUsers() void KDModule::slotMinMaxUID(int min, int max) { if (updateOK) { - QMap<QString,int> alusers, dlusers; - QMapConstIterator<QString, QPair<int,QStringList> > it; - QStringList::ConstIterator jt; - QMap<QString,int>::Iterator gmapi; + TQMap<TQString,int> alusers, dlusers; + TQMapConstIterator<TQString, QPair<int,TQStringList> > it; + TQStringList::ConstIterator jt; + TQMap<TQString,int>::Iterator gmapi; for (it = usermap.begin(); it != usermap.end(); ++it) { int uid = it.data().first; if (!uid) continue; diff --git a/kcontrol/kdm/main.h b/kcontrol/kdm/main.h index 5e8da66b8..8bec1a715 100644 --- a/kcontrol/kdm/main.h +++ b/kcontrol/kdm/main.h @@ -24,8 +24,8 @@ #ifndef __kdm_main_h #define __kdm_main_h -#include <qtabwidget.h> -#include <qmap.h> +#include <tqtabwidget.h> +#include <tqmap.h> #include <kcmodule.h> @@ -42,7 +42,7 @@ class KDModule : public KCModule public: - KDModule(QWidget *parent, const char *name, const QStringList &); + KDModule(TQWidget *parent, const char *name, const TQStringList &); ~KDModule(); void load(); @@ -56,8 +56,8 @@ public slots: signals: void clearUsers(); - void addUsers(const QMap<QString,int> &); - void delUsers(const QMap<QString,int> &); + void addUsers(const TQMap<TQString,int> &); + void delUsers(const TQMap<TQString,int> &); private: @@ -70,8 +70,8 @@ private: KDMUsersWidget *users; KDMConvenienceWidget *convenience; - QMap<QString, QPair<int,QStringList> > usermap; - QMap<QString,int> groupmap; + TQMap<TQString, QPair<int,TQStringList> > usermap; + TQMap<TQString,int> groupmap; int minshowuid, maxshowuid; bool updateOK; |