diff options
Diffstat (limited to 'lilo-config/kde-qt-common/images.cpp')
-rw-r--r-- | lilo-config/kde-qt-common/images.cpp | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/lilo-config/kde-qt-common/images.cpp b/lilo-config/kde-qt-common/images.cpp index 98dd1cb..9159d97 100644 --- a/lilo-config/kde-qt-common/images.cpp +++ b/lilo-config/kde-qt-common/images.cpp @@ -28,9 +28,9 @@ */ #include "images.moc" #include <ui.h> -#include <qwhatsthis.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqwhatsthis.h> +#include <tqregexp.h> +#include <tqstring.h> #ifdef USE_KDE #include "kde/InputBox.h" @@ -40,63 +40,63 @@ #include "qt/Details.h" #endif -Images::Images(liloconf *l, QWidget *parent, const char *name):QWidget(parent, name) +Images::Images(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name) { - current=""; previous=""; // Using QString::null gives problems! + current=""; previous=""; // Using TQString::null gives problems! lilo=l; - layout=new QHBoxLayout(this); + layout=new TQHBoxLayout(this); layout->setMargin(SPACE_MARGIN); layout->setSpacing(SPACE_INSIDE); - images=new QListBox(this); + images=new TQListBox(this); layout->addWidget(images, 1); - connect(images, SIGNAL(highlighted(const QString &)), SLOT(imageSelected(const QString &))); - QWhatsThis::add(images, _("This is the list of kernels and operating systems you can currently boot. Select which one you want to edit here.")); + connect(images, TQT_SIGNAL(highlighted(const TQString &)), TQT_SLOT(imageSelected(const TQString &))); + TQWhatsThis::add(images, _("This is the list of kernels and operating systems you can currently boot. Select which one you want to edit here.")); - parameters=new QVBox(this); + parameters=new TQVBox(this); parameters->setMargin(SPACE_MARGIN); parameters->setSpacing(SPACE_INSIDE); layout->addWidget(parameters, 2); image=new EditWidget(_("&Kernel:"), "", true, parameters); - QWhatsThis::add(image, _("Enter the filename of the kernel you want to boot here.")); - connect(image, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(image, _("Enter the filename of the kernel you want to boot here.")); + connect(image, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); label=new EditWidget(_("&Label:"), "", false, parameters); - QWhatsThis::add(label, _("Enter the label (name) of the kernel you want to boot here.")); - connect(label, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(label, _("Enter the label (name) of the kernel you want to boot here.")); + connect(label, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); root=new EditWidget(_("&Root filesystem:"), "", true, parameters); - QWhatsThis::add(root, _("Enter the root filesystem (i.e. the partition that will be mounted as / at boot time) for the kernel you want to boot here.")); - connect(root, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(root, _("Enter the root filesystem (i.e. the partition that will be mounted as / at boot time) for the kernel you want to boot here.")); + connect(root, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); initrd=new EditWidget(_("&Initial ramdisk:"), "", true, parameters); - QWhatsThis::add(initrd, _("If you want to use an initial ramdisk (initrd) for this kernel, enter its filename here. Leave this field blank if you don't intend to use an initial ramdisk for this kernel.")); - connect(initrd, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(initrd, _("If you want to use an initial ramdisk (initrd) for this kernel, enter its filename here. Leave this field blank if you don't intend to use an initial ramdisk for this kernel.")); + connect(initrd, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); append=new EditWidget(_("E&xtra parameters:"), "", false, parameters); - QWhatsThis::add(append, _("Enter any extra parameters you wish to pass to the kernel here. Usually, this can be left blank.<br>This sets the <i>append</i> option in lilo.conf.")); - connect(append, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(append, _("Enter any extra parameters you wish to pass to the kernel here. Usually, this can be left blank.<br>This sets the <i>append</i> option in lilo.conf.")); + connect(append, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); - actions=new QVBox(this); + actions=new TQVBox(this); actions->setMargin(SPACE_MARGIN); actions->setSpacing(SPACE_INSIDE); layout->addWidget(actions); - dflt=new QPushButton(_("Set &Default"), actions); - QWhatsThis::add(dflt, _("Boot this kernel/OS if the user doesn't make a different choice")); - connect(dflt, SIGNAL(clicked()), SLOT(dfltClicked())); - details=new QPushButton(_("De&tails"), actions); - QWhatsThis::add(details, _("This button brings up a dialog box with further, less commonly used, options.")); - connect(details, SIGNAL(clicked()), SLOT(detailsClicked())); - probe=new QPushButton(_("&Probe"), actions); - connect(probe, SIGNAL(clicked()), SLOT(probeClicked())); - QWhatsThis::add(probe, _("Automatically generate a (hopefully) reasonable lilo.conf for your system")); - check=new QPushButton(_("&Check Configuration"), actions); - connect(check, SIGNAL(clicked()), SLOT(checkClicked())); - QWhatsThis::add(check, _("Run LILO in test mode to see if the configuration is ok")); - addKrnl=new QPushButton(_("Add &Kernel..."), actions); - connect(addKrnl, SIGNAL(clicked()), SLOT(addKrnlClicked())); - QWhatsThis::add(addKrnl, _("Add a new Linux kernel to the boot menu")); - addOS=new QPushButton(_("Add Other &OS..."), actions); - connect(addOS, SIGNAL(clicked()), SLOT(addOSClicked())); - QWhatsThis::add(addOS, _("Add a non-Linux OS to the boot menu")); - remove=new QPushButton(_("&Remove Entry"), actions); - connect(remove, SIGNAL(clicked()), SLOT(removeClicked())); - QWhatsThis::add(remove, _("Remove entry from the boot menu")); + dflt=new TQPushButton(_("Set &Default"), actions); + TQWhatsThis::add(dflt, _("Boot this kernel/OS if the user doesn't make a different choice")); + connect(dflt, TQT_SIGNAL(clicked()), TQT_SLOT(dfltClicked())); + details=new TQPushButton(_("De&tails"), actions); + TQWhatsThis::add(details, _("This button brings up a dialog box with further, less commonly used, options.")); + connect(details, TQT_SIGNAL(clicked()), TQT_SLOT(detailsClicked())); + probe=new TQPushButton(_("&Probe"), actions); + connect(probe, TQT_SIGNAL(clicked()), TQT_SLOT(probeClicked())); + TQWhatsThis::add(probe, _("Automatically generate a (hopefully) reasonable lilo.conf for your system")); + check=new TQPushButton(_("&Check Configuration"), actions); + connect(check, TQT_SIGNAL(clicked()), TQT_SLOT(checkClicked())); + TQWhatsThis::add(check, _("Run LILO in test mode to see if the configuration is ok")); + addKrnl=new TQPushButton(_("Add &Kernel..."), actions); + connect(addKrnl, TQT_SIGNAL(clicked()), TQT_SLOT(addKrnlClicked())); + TQWhatsThis::add(addKrnl, _("Add a new Linux kernel to the boot menu")); + addOS=new TQPushButton(_("Add Other &OS..."), actions); + connect(addOS, TQT_SIGNAL(clicked()), TQT_SLOT(addOSClicked())); + TQWhatsThis::add(addOS, _("Add a non-Linux OS to the boot menu")); + remove=new TQPushButton(_("&Remove Entry"), actions); + connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeClicked())); + TQWhatsThis::add(remove, _("Remove entry from the boot menu")); update(); } Images::~Images() @@ -131,7 +131,7 @@ void Images::probeClicked() // SLOT void Images::dfltClicked() // SLOT { if (images->currentItem() < 0) return; - lilo->setDefault(images->currentText().replace(QRegExp(" (default)", true, true), "").latin1()); + lilo->setDefault(images->currentText().replace(TQRegExp(" (default)", true, true), "").latin1()); update(); emit configChanged(); } @@ -139,7 +139,7 @@ void Images::detailsClicked() // SLOT { liloimage *l=lilo->images[current.latin1()]; Details *d = new Details(l, this); - if(d->exec()==QDialog::Accepted) { + if(d->exec()==TQDialog::Accepted) { String tmp; tmp=l->grep("^[ \t]*read-only[ \t]*"); if(d->isReadOnly() && tmp.empty()) @@ -172,7 +172,7 @@ void Images::detailsClicked() // SLOT } void Images::checkClicked() // SLOT { - QString LiloOut=lilo->liloOut().cstr(); + TQString LiloOut=lilo->liloOut().cstr(); if(lilo->isOk()) { LiloOut=_("Configuration ok. LILO said:\n")+LiloOut; InformationOK(this, LiloOut, _("Configuration OK"), "lilo-config.confOK"); @@ -193,9 +193,9 @@ void Images::addKrnlClicked() // SLOT e.insert(e.end(), l2); e.insert(e.end(), l3); InputBox *label=new InputBox(e, this); - if(label->exec()==QDialog::Accepted) { - QStringList s=label->text(); - QStringList::Iterator it=s.begin(); + if(label->exec()==TQDialog::Accepted) { + TQStringList s=label->text(); + TQStringList::Iterator it=s.begin(); String kernel=(*it).latin1(); it++; String label=(*it).latin1(); @@ -217,9 +217,9 @@ void Images::addOSClicked() // SLOT e.insert(e.end(), l0); e.insert(e.end(), l1); InputBox *label=new InputBox(e, this); - if(label->exec()==QDialog::Accepted) { - QStringList s=label->text(); - QStringList::Iterator it=s.begin(); + if(label->exec()==TQDialog::Accepted) { + TQStringList s=label->text(); + TQStringList::Iterator it=s.begin(); String disk=(*it).latin1(); it++; String label=(*it).latin1(); @@ -233,7 +233,7 @@ void Images::removeClicked() // SLOT { if(images->currentItem()==-1) return; - QString s=images->currentText(); + TQString s=images->currentText(); if(s.right(10)==" (default)") s=s.left(s.length()-10); if (s.isNull()) @@ -244,9 +244,9 @@ void Images::removeClicked() // SLOT emit configChanged(); } -QString value(QString const &s) +TQString value(TQString const &s) { - QString r=s.mid(s.find('=')+1).simplifyWhiteSpace(); + TQString r=s.mid(s.find('=')+1).simplifyWhiteSpace(); if(r.left(1)=="\"") r=r.mid(1); if(r.right(1)=="\"") @@ -256,11 +256,11 @@ QString value(QString const &s) return r; } -void Images::imageSelected(const QString &i) // SLOT +void Images::imageSelected(const TQString &i) // SLOT { bool blocked = signalsBlocked(); blockSignals(true); - QString s=i; + TQString s=i; if(s.right(10)==" (default)") s=s.left(s.length()-10); if(previous!=s && !previous.isEmpty()) { @@ -274,7 +274,7 @@ void Images::imageSelected(const QString &i) // SLOT current=s; liloimage *l=lilo->images[s.latin1()]; if(l) { - QString img=value(l->grep("^[ \t]*(image|other)[ \t]*=").cstr()); + TQString img=value(l->grep("^[ \t]*(image|other)[ \t]*=").cstr()); image->setText(img); label->setText(s); if(l->isLinux()) { |