From aa3a1ca934bc541bddd3fa136a85f106f7da266e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:25:18 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lilo-config/kde-qt-common/general.cpp | 100 +++++++++++++++++----------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'lilo-config/kde-qt-common/general.cpp') 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 -#include +#include #include -#include +#include #include -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.
In this case, you should probably select /dev/hda if your boot drive is an IDE drive or /dev/sda 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.
In this case, you should probably select /dev/hda if your boot drive is an IDE drive or /dev/sda 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 default in the Images tab.")); + TQWhatsThis::add(to, _("LILO will wait the amount of time specified here before booting the kernel (or OS) marked as default in the Images 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.
Linear mode tells the boot loader the location of kernels in linear addressing rather than sector/head/cylinder.
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.
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.
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.
Linear mode tells the boot loader the location of kernels in linear addressing rather than sector/head/cylinder.
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.
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.
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, ""+_("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 lock 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 linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); + 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, ""+_("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 lock 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 linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); 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 restricted above is checked, the password is required for additional parameters only.
WARNING: 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.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); + 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 restricted above is checked, the password is required for additional parameters only.
WARNING: 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.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); 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.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); + TQWhatsThis::add(vgab, _("You can select the default graphics mode here.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); 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).
This sets the prompt 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).
This sets the prompt 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; icount(); 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") -- cgit v1.2.1