summaryrefslogtreecommitdiffstats
path: root/lilo-config/kde-qt-common/general.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /lilo-config/kde-qt-common/general.cpp
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lilo-config/kde-qt-common/general.cpp')
-rw-r--r--lilo-config/kde-qt-common/general.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/lilo-config/kde-qt-common/general.cpp b/lilo-config/kde-qt-common/general.cpp
index 7944409..2040025 100644
--- a/lilo-config/kde-qt-common/general.cpp
+++ b/lilo-config/kde-qt-common/general.cpp
@@ -29,75 +29,75 @@
#include "general.moc"
#include "EditWidget.h"
#include <Disks.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <ui.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <stdlib.h>
-General::General(liloconf *l, QWidget *parent, const char *name):QWidget(parent, name)
+General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name)
{
lilo=l;
- QVBoxLayout *layout=new QVBoxLayout(this);
+ TQVBoxLayout *layout=new TQVBoxLayout(this);
layout->setMargin(SPACE_MARGIN);
layout->setSpacing(SPACE_INSIDE);
- QHBox *drv=new QHBox(this);
- QLabel *drive_lbl=new QLabel(_("Install &boot record to drive/partition:"), drv);
- drive=new QComboBox(false, drv);
+ TQHBox *drv=new TQHBox(this);
+ TQLabel *drive_lbl=new TQLabel(_("Install &boot record to drive/partition:"), drv);
+ drive=new TQComboBox(false, drv);
drive_lbl->setBuddy(drive);
StringList p=ptable::disklist();
p+=ptable::partlist();
p.sort();
for(StringList::const_iterator it=p.begin(); it!=p.end(); it++)
drive->insertItem((*it).cstr());
- connect(drive, SIGNAL(activated(int)), SIGNAL(configChanged()));
+ connect(drive, TQT_SIGNAL(activated(int)), TQT_SIGNAL(configChanged()));
layout->addWidget(drv);
- QWhatsThis::add(drv, _("Select the drive or partition you want to install the LILO boot loader to here. Unless you intend to use other boot managers in addition to LILO, this should be the MBR (master boot record) of your boot drive.<br>In this case, you should probably select <i>/dev/hda</i> if your boot drive is an IDE drive or <i>/dev/sda</i> if your boot drive is SCSI."));
+ TQWhatsThis::add(drv, _("Select the drive or partition you want to install the LILO boot loader to here. Unless you intend to use other boot managers in addition to LILO, this should be the MBR (master boot record) of your boot drive.<br>In this case, you should probably select <i>/dev/hda</i> if your boot drive is an IDE drive or <i>/dev/sda</i> if your boot drive is SCSI."));
- QHBox *to=new QHBox(this);
- QLabel *to_lbl=new QLabel(_("Boot the default kernel/OS &after:"), to);
- timeout=new QSpinBox(0, 1000000, 1, to);
+ TQHBox *to=new TQHBox(this);
+ TQLabel *to_lbl=new TQLabel(_("Boot the default kernel/OS &after:"), to);
+ timeout=new TQSpinBox(0, 1000000, 1, to);
timeout->setSuffix(_("/10 seconds"));
- connect(timeout, SIGNAL(valueChanged(int)), SIGNAL(configChanged()));
+ connect(timeout, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(configChanged()));
to_lbl->setBuddy(timeout);
layout->addWidget(to);
- QWhatsThis::add(to, _("LILO will wait the amount of time specified here before booting the kernel (or OS) marked as <i>default</i> in the <b>Images</b> tab."));
+ TQWhatsThis::add(to, _("LILO will wait the amount of time specified here before booting the kernel (or OS) marked as <i>default</i> in the <b>Images</b> tab."));
- QHBox *modes=new QHBox(this);
- linear=new QCheckBox(_("Use &linear mode"), modes);
- connect(linear, SIGNAL(clicked()), SIGNAL(configChanged()));
- QWhatsThis::add(linear, _("Check this box if you want to use the linear mode.<br>Linear mode tells the boot loader the location of kernels in linear addressing rather than sector/head/cylinder.<br>linear mode is required for some SCSI drives, and shouldn't hurt unless you're planning to create a boot disk to be used with a different computer.<br>See the lilo.conf man page for details."));
- compact=new QCheckBox(_("Use &compact mode"), modes);
- connect(compact, SIGNAL(clicked()), SIGNAL(configChanged()));
- QWhatsThis::add(compact, _("Check this box if you want to use the compact mode.<br>The compact mode tries to merge read requests for adjacent sectors into a single read request. This reduces load time and keeps the boot map smaller, but will not work on all systems."));
+ TQHBox *modes=new TQHBox(this);
+ linear=new TQCheckBox(_("Use &linear mode"), modes);
+ connect(linear, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged()));
+ TQWhatsThis::add(linear, _("Check this box if you want to use the linear mode.<br>Linear mode tells the boot loader the location of kernels in linear addressing rather than sector/head/cylinder.<br>linear mode is required for some SCSI drives, and shouldn't hurt unless you're planning to create a boot disk to be used with a different computer.<br>See the lilo.conf man page for details."));
+ compact=new TQCheckBox(_("Use &compact mode"), modes);
+ connect(compact, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged()));
+ TQWhatsThis::add(compact, _("Check this box if you want to use the compact mode.<br>The compact mode tries to merge read requests for adjacent sectors into a single read request. This reduces load time and keeps the boot map smaller, but will not work on all systems."));
layout->addWidget(modes);
- QHBox *opts=new QHBox(this);
- lock=new QCheckBox(_("&Record boot command lines for defaults"), opts);
- connect(lock, SIGNAL(clicked()), SIGNAL(configChanged()));
- QWhatsThis::add(lock, "<qt>"+_("Checking this box enables automatic recording of boot command lines as the defaults for the following boots. This way, lilo \"locks\" on a choice until it is manually overridden.\nThis sets the <b>lock</b> option in lilo.conf."));
- restricted=new QCheckBox(_("R&estrict parameters"), opts);
- connect(restricted, SIGNAL(clicked()), SIGNAL(configChanged()));
- connect(restricted, SIGNAL(clicked()), SLOT(check_pw()));
- QWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot <i>linux</i>, but not <i>linux single</i> or <i>linux init=/bin/sh</i>).\nThis sets the <b>restricted</b> option in lilo.conf.<br>This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the <i>Operating systems</i> tab and select <i>Details</i>."));
+ TQHBox *opts=new TQHBox(this);
+ lock=new TQCheckBox(_("&Record boot command lines for defaults"), opts);
+ connect(lock, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged()));
+ TQWhatsThis::add(lock, "<qt>"+_("Checking this box enables automatic recording of boot command lines as the defaults for the following boots. This way, lilo \"locks\" on a choice until it is manually overridden.\nThis sets the <b>lock</b> option in lilo.conf."));
+ restricted=new TQCheckBox(_("R&estrict parameters"), opts);
+ connect(restricted, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged()));
+ connect(restricted, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw()));
+ TQWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot <i>linux</i>, but not <i>linux single</i> or <i>linux init=/bin/sh</i>).\nThis sets the <b>restricted</b> option in lilo.conf.<br>This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the <i>Operating systems</i> tab and select <i>Details</i>."));
layout->addWidget(opts);
- QHBox *pw=new QHBox(this);
- use_password=new QCheckBox(_("Require &password:"), pw);
- connect(use_password, SIGNAL(clicked()), SIGNAL(configChanged()));
- connect(use_password, SIGNAL(clicked()), SLOT(check_pw()));
- password=new QLineEdit(pw);
+ TQHBox *pw=new TQHBox(this);
+ use_password=new TQCheckBox(_("Require &password:"), pw);
+ connect(use_password, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged()));
+ connect(use_password, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw()));
+ password=new TQLineEdit(pw);
password->setMaxLength(15);
- password->setEchoMode(QLineEdit::Password);
- connect(password, SIGNAL(textChanged(const QString &)), SIGNAL(configChanged()));
- QWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If <i>restricted</i> above is checked, the password is required for additional parameters only.<br><b>WARNING:</b> The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.<br>This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the <i>Operating systems</i> tab and select <i>Details</i>."));
+ password->setEchoMode(TQLineEdit::Password);
+ connect(password, TQT_SIGNAL(textChanged(const TQString &)), TQT_SIGNAL(configChanged()));
+ TQWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If <i>restricted</i> above is checked, the password is required for additional parameters only.<br><b>WARNING:</b> The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.<br>This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the <i>Operating systems</i> tab and select <i>Details</i>."));
layout->addWidget(pw);
- QHBox *vgab=new QHBox(this);
- QLabel *vlbl=new QLabel(_("&Default graphics mode on text console:"), vgab);
- vga=new QComboBox(false, vgab);
+ TQHBox *vgab=new TQHBox(this);
+ TQLabel *vlbl=new TQLabel(_("&Default graphics mode on text console:"), vgab);
+ vga=new TQComboBox(false, vgab);
vlbl->setBuddy(vga);
- QWhatsThis::add(vgab, _("You can select the default graphics mode here.<br>If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The <i>ask</i> setting brings up a prompt at boot time.<br>This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the <i>Operating systems</i> tab and select <i>Details</i>."));
+ TQWhatsThis::add(vgab, _("You can select the default graphics mode here.<br>If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The <i>ask</i> setting brings up a prompt at boot time.<br>This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the <i>Operating systems</i> tab and select <i>Details</i>."));
vga->insertItem(_("default"));
vga->insertItem(_("ask"));
vga->insertItem(_("text 80x25 (0)"));
@@ -124,12 +124,12 @@ General::General(liloconf *l, QWidget *parent, const char *name):QWidget(parent,
vga->insertItem(_("VGA 1280x1024, 32767 colors (793)"));
vga->insertItem(_("VGA 1280x1024, 65536 colors (794)"));
vga->insertItem(_("VGA 1280x1024, 16.7M colors (795)"));
- connect( vga, SIGNAL(activated ( int )), SIGNAL(configChanged()));
+ connect( vga, TQT_SIGNAL(activated ( int )), TQT_SIGNAL(configChanged()));
layout->addWidget(vgab);
- prompt=new QCheckBox(_("Enter LILO &prompt automatically"), this);
- QWhatsThis::add(prompt, _("If this box is checked, LILO goes to the LILO prompt whether or not a key is pressed. If it is turned off, LILO boots the default operating system unless shift is pressed (in that case, it goes to the LILO prompt).<br>This sets the <i>prompt</i> option in lilo.conf."));
- connect(prompt, SIGNAL(clicked()), SIGNAL(configChanged()));
+ prompt=new TQCheckBox(_("Enter LILO &prompt automatically"), this);
+ TQWhatsThis::add(prompt, _("If this box is checked, LILO goes to the LILO prompt whether or not a key is pressed. If it is turned off, LILO boots the default operating system unless shift is pressed (in that case, it goes to the LILO prompt).<br>This sets the <i>prompt</i> option in lilo.conf."));
+ connect(prompt, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged()));
layout->addWidget(prompt);
@@ -137,9 +137,9 @@ General::General(liloconf *l, QWidget *parent, const char *name):QWidget(parent,
}
void General::saveChanges()
{
- QString to;
+ TQString to;
to.sprintf("%u", timeout->value());
- QString boot = drive->currentText();
+ TQString boot = drive->currentText();
lilo->defaults.set("boot", boot.isEmpty() ? "" : boot.latin1());
lilo->defaults.set("timeout", to.latin1());
if(compact->isChecked() && lilo->defaults.grep("^[ \t]*compact[ \t]*$").empty())
@@ -166,7 +166,7 @@ void General::saveChanges()
if(!lilo->defaults.grep("[ \t]*vga[ \t]*=").empty())
lilo->defaults.remove(lilo->defaults.grep("[ \t]*vga[ \t]*="));
} else {
- QString mode=vga->currentText();
+ TQString mode=vga->currentText();
if(mode!="ask") {
mode=mode.mid(mode.find('(')+1);
mode=mode.left(mode.length()-1);
@@ -180,7 +180,7 @@ void General::saveChanges()
}
void General::update()
{
- QString boot=lilo->defaults.get("boot").cstr();
+ TQString boot=lilo->defaults.get("boot").cstr();
for(int i=0; i<drive->count(); i++)
if(drive->text(i)==boot)
drive->setCurrentItem(i);
@@ -194,7 +194,7 @@ void General::update()
if(!pw.empty())
password->setText(lilo->defaults.get("password").cstr());
check_pw();
- QString mode=lilo->defaults.get("vga", "").cstr();
+ TQString mode=lilo->defaults.get("vga", "").cstr();
if(mode.isEmpty())
vga->setCurrentItem(0);
else if(mode=="ask")