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/qt/Details.cpp | 68 +++++++++++++++++++++---------------------- lilo-config/qt/Details.h | 16 +++++----- lilo-config/qt/InputBox.cpp | 24 +++++++-------- lilo-config/qt/InputBox.h | 18 ++++++------ lilo-config/qt/standalone.cpp | 68 +++++++++++++++++++++---------------------- lilo-config/qt/standalone.h | 28 +++++++++--------- 6 files changed, 111 insertions(+), 111 deletions(-) (limited to 'lilo-config/qt') diff --git a/lilo-config/qt/Details.cpp b/lilo-config/qt/Details.cpp index eae3ed5..944ba0d 100644 --- a/lilo-config/qt/Details.cpp +++ b/lilo-config/qt/Details.cpp @@ -26,25 +26,25 @@ */ #include "Details.moc" -#include -#include -#include -#include +#include +#include +#include +#include #include -Details::Details(liloimage *lilo, QWidget *parent, const char *name, WFlags f):QDialog(parent, name, true, f) +Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags f):TQDialog(parent, name, true, f) { l=lilo; - QVBoxLayout *layout=new QVBoxLayout(this); + TQVBoxLayout *layout=new TQVBoxLayout(this); layout->setMargin(SPACE_MARGIN); layout->setSpacing(SPACE_INSIDE); - QHBox *vgab=new QHBox(this); - QLabel *vlbl=new QLabel(_("&Graphics mode on text console:"), vgab); - vga=new QComboBox(false, vgab); + TQHBox *vgab=new TQHBox(this); + TQLabel *vlbl=new TQLabel(_("&Graphics mode on text console:"), vgab); + vga=new TQComboBox(false, vgab); vlbl->setBuddy(vga); - QWhatsThis::add(vgab, _("You can select the graphics mode for this kernel 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.")); + TQWhatsThis::add(vgab, _("You can select the graphics mode for this kernel 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.")); vga->insertItem(_("default")); vga->insertItem(_("ask")); vga->insertItem(_("text 80x25 (0)")); @@ -73,40 +73,40 @@ Details::Details(liloimage *lilo, QWidget *parent, const char *name, WFlags f):Q vga->insertItem(_("VGA 1280x1024, 16.7M colors (795)")); layout->addWidget(vgab); - readonly=new QCheckBox(_("Mount root filesystem &read-only"), this); - QWhatsThis::add(readonly, _("Mount the root filesystem for this kernel read-only. Since the init scripts normally take care of remounting the root filesystem in read-write mode after running some checks, this should always be turned on.
Don't turn this off unless you know what you're doing.")); + readonly=new TQCheckBox(_("Mount root filesystem &read-only"), this); + TQWhatsThis::add(readonly, _("Mount the root filesystem for this kernel read-only. Since the init scripts normally take care of remounting the root filesystem in read-write mode after running some checks, this should always be turned on.
Don't turn this off unless you know what you're doing.")); layout->addWidget(readonly); - unsafe=new QCheckBox(_("Do not check &partition table"), this); - QWhatsThis::add(unsafe, _("This turns off some sanity checks while writing the configuration. This shouldn't be used under \"normal\" circumstances, but it's useful, for example, for installing the possibility to boot from a floppy disk without having a floppy in the drive every time you run lilo.
This sets the unsafe keyword in lilo.conf.")); + unsafe=new TQCheckBox(_("Do not check &partition table"), this); + TQWhatsThis::add(unsafe, _("This turns off some sanity checks while writing the configuration. This shouldn't be used under \"normal\" circumstances, but it's useful, for example, for installing the possibility to boot from a floppy disk without having a floppy in the drive every time you run lilo.
This sets the unsafe keyword in lilo.conf.")); layout->addWidget(unsafe); - QHBox *opts=new QHBox(this); - lock=new QCheckBox(_("&Record boot command lines for defaults"), opts); - QWhatsThis::add(lock, ""+_("Checking this box enables automatic recording of boot command lines as the default for the following bootups. This way, lilo \"locks\" on a choice until it is manually overridden.
This sets the lock option in lilo.conf")); - restricted=new QCheckBox(_("R&estrict parameters"), opts); - 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.")); + TQHBox *opts=new TQHBox(this); + lock=new TQCheckBox(_("&Record boot command lines for defaults"), opts); + TQWhatsThis::add(lock, ""+_("Checking this box enables automatic recording of boot command lines as the default for the following bootups. This way, lilo \"locks\" on a choice until it is manually overridden.
This sets the lock option in lilo.conf")); + restricted=new TQCheckBox(_("R&estrict parameters"), opts); + 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.")); layout->addWidget(opts); - QHBox *pw=new QHBox(this); - use_password=new QCheckBox(_("Require &password:"), pw); - 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_SLOT(check_pw())); + password=new TQLineEdit(pw); password->setMaxLength(15); - password->setEchoMode(QLineEdit::Password); - 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.")); + password->setEchoMode(TQLineEdit::Password); + 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.")); layout->addWidget(pw); - QHBox *btns=new QHBox(this); - ok=new QPushButton(_("&OK"), btns); - cancel=new QPushButton(_("&Cancel"), btns); + TQHBox *btns=new TQHBox(this); + ok=new TQPushButton(_("&OK"), btns); + cancel=new TQPushButton(_("&Cancel"), btns); layout->addWidget(btns); - connect(cancel, SIGNAL(clicked()), SLOT(reject())); - connect(ok, SIGNAL(clicked()), SLOT(accept())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); if(l) { - QString mode=l->get("vga", "").cstr(); + TQString mode=l->get("vga", "").cstr(); if(mode.isEmpty()) vga->setCurrentItem(0); else if(mode=="ask") @@ -131,9 +131,9 @@ void Details::check_pw() { password->setEnabled(restricted->isChecked() || use_password->isChecked()); } -QString Details::vgaMode() const +TQString Details::vgaMode() const { - QString s=vga->currentText(); + TQString s=vga->currentText(); if(s=="default") return ""; else if(s!="ask") { diff --git a/lilo-config/qt/Details.h b/lilo-config/qt/Details.h index f189430..c7c7f98 100644 --- a/lilo-config/qt/Details.h +++ b/lilo-config/qt/Details.h @@ -27,23 +27,23 @@ #ifndef _DETAILS_H_ #define _DETAILS_H_ 1 #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class Details:public QDialog { Q_OBJECT public: - Details(liloimage *lilo, QWidget *parent=0, const char *name=0, WFlags f=0); + Details(liloimage *lilo, TQWidget *parent=0, const char *name=0, WFlags f=0); bool isReadOnly() const { return readonly->isChecked(); }; - QString vgaMode() const; + TQString vgaMode() const; bool isUnsafe() const { return unsafe->isChecked(); }; bool isLocked() const { return lock->isChecked(); }; bool isRestricted() const { return restricted->isChecked(); }; bool usePassword() const { return use_password->isChecked(); }; - QString Password() const { return password->text(); }; + TQString Password() const { return password->text(); }; private slots: void check_pw(); private: diff --git a/lilo-config/qt/InputBox.cpp b/lilo-config/qt/InputBox.cpp index f95989b..9836a91 100644 --- a/lilo-config/qt/InputBox.cpp +++ b/lilo-config/qt/InputBox.cpp @@ -26,31 +26,31 @@ */ #include "InputBox.moc" -#include -#include -#include +#include +#include +#include #include -InputBox::InputBox(entries e, QWidget *parent, const char *name, bool hasCancel, WFlags f):QDialog(parent, name, true, f) +InputBox::InputBox(entries e, TQWidget *parent, const char *name, bool hasCancel, WFlags f):TQDialog(parent, name, true, f) { - QVBoxLayout *layout=new QVBoxLayout(this); + TQVBoxLayout *layout=new TQVBoxLayout(this); layout->setMargin(SPACE_MARGIN); layout->setSpacing(SPACE_INSIDE); for(entries::iterator it=e.begin(); it!=e.end(); it++) { EditWidget *ed=new EditWidget((*it).label, (*it).dflt, (*it).isFile, this); - QWhatsThis::add(ed, (*it).help); + TQWhatsThis::add(ed, (*it).help); layout->addWidget(ed); edit.insert(edit.end(), ed); } if(hasCancel) { - QHBox *btns=new QHBox(this); - ok=new QPushButton(_("&OK"), btns); - cancel=new QPushButton(_("&Cancel"), btns); + TQHBox *btns=new TQHBox(this); + ok=new TQPushButton(_("&OK"), btns); + cancel=new TQPushButton(_("&Cancel"), btns); layout->addWidget(btns); - connect(cancel, SIGNAL(clicked()), SLOT(reject())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); } else { - ok=new QPushButton(_("&OK"), this); + ok=new TQPushButton(_("&OK"), this); layout->addWidget(ok); } - connect(ok, SIGNAL(clicked()), SLOT(accept())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); } diff --git a/lilo-config/qt/InputBox.h b/lilo-config/qt/InputBox.h index da2371b..f4be6e9 100644 --- a/lilo-config/qt/InputBox.h +++ b/lilo-config/qt/InputBox.h @@ -27,23 +27,23 @@ #ifndef _INPUTBOX_H_ #define _INPUTBOX_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "EditWidget.h" #include class InputBox:public QDialog { Q_OBJECT public: - typedef struct { QString label; QString dflt; bool isFile; QString help; } entry; + typedef struct { TQString label; TQString dflt; bool isFile; TQString help; } entry; typedef std::list entries; - InputBox(entries e, QWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0); - QStringList const text() const { QStringList s; for(std::list::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; }; + InputBox(entries e, TQWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0); + TQStringList const text() const { TQStringList s; for(std::list::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; }; private: std::list edit; - QPushButton *ok; - QPushButton *cancel; + TQPushButton *ok; + TQPushButton *cancel; }; #endif diff --git a/lilo-config/qt/standalone.cpp b/lilo-config/qt/standalone.cpp index 268ad21..4dc73e2 100644 --- a/lilo-config/qt/standalone.cpp +++ b/lilo-config/qt/standalone.cpp @@ -25,42 +25,42 @@ ** Bug reports and questions can be sent to kde-devel@kde.org */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include "standalone.moc" -Standalone::Standalone(QWidget *parent, const char *name):QWidget(parent,name) +Standalone::Standalone(TQWidget *parent, const char *name):TQWidget(parent,name) { m=new MainWidget(this); - connect(m, SIGNAL(configChanged()), SLOT(configChanged())); - actions=new QHButtonGroup(this); - _whatsthis=new QPushButton(_("&What's This?"), actions); + connect(m, TQT_SIGNAL(configChanged()), TQT_SLOT(configChanged())); + actions=new TQHButtonGroup(this); + _whatsthis=new TQPushButton(_("&What's This?"), actions); _whatsthis->setAccel(SHIFT+Key_F1); - QWhatsThis::add(_whatsthis, _("The What's This? button is part of this program's help system. Click on the What's This? button then on any widget in the window to get information (like this) on it.")); - connect(_whatsthis, SIGNAL(clicked()), SLOT(whatsthis())); - _help=new QPushButton(_("&Help"), actions); + TQWhatsThis::add(_whatsthis, _("The What's This? button is part of this program's help system. Click on the What's This? button then on any widget in the window to get information (like this) on it.")); + connect(_whatsthis, TQT_SIGNAL(clicked()), TQT_SLOT(whatsthis())); + _help=new TQPushButton(_("&Help"), actions); _help->setAccel(Key_F1); - QWhatsThis::add(_help, _("This button calls up the program's online help system. If it does nothing, no help file has been written (yet); in that case, use the What's This button on the left.")); - connect(_help, SIGNAL(clicked()), this, SLOT(help())); - _deflt=new QPushButton(_("&Default"), actions); - QWhatsThis::add(_deflt, _("This button resets all parameters to some (hopefully sane) default values.")); - connect(_deflt, SIGNAL(clicked()), this, SLOT(defaults())); - _reset=new QPushButton(_("&Reset"), actions); - QWhatsThis::add(_reset, _("This button resets all parameters to what they were before you started the program.")); - connect(_reset, SIGNAL(clicked()), this, SLOT(reset())); - _apply=new QPushButton(_("&Apply"), actions); - QWhatsThis::add(_apply, _("This button saves all your changes without exiting.")); - connect(_apply, SIGNAL(clicked()), this, SLOT(apply())); - _ok=new QPushButton(_("&OK"), actions); - QWhatsThis::add(_ok, _("This button saves all your changes and exits the program.")); - connect(_ok, SIGNAL(clicked()), this, SLOT(ok())); - _cancel=new QPushButton(_("&Cancel"), actions); - QWhatsThis::add(_cancel, _("This button exits the program without saving your changes.")); - connect(_cancel, SIGNAL(clicked()), this, SLOT(cancel())); + TQWhatsThis::add(_help, _("This button calls up the program's online help system. If it does nothing, no help file has been written (yet); in that case, use the What's This button on the left.")); + connect(_help, TQT_SIGNAL(clicked()), this, TQT_SLOT(help())); + _deflt=new TQPushButton(_("&Default"), actions); + TQWhatsThis::add(_deflt, _("This button resets all parameters to some (hopefully sane) default values.")); + connect(_deflt, TQT_SIGNAL(clicked()), this, TQT_SLOT(defaults())); + _reset=new TQPushButton(_("&Reset"), actions); + TQWhatsThis::add(_reset, _("This button resets all parameters to what they were before you started the program.")); + connect(_reset, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset())); + _apply=new TQPushButton(_("&Apply"), actions); + TQWhatsThis::add(_apply, _("This button saves all your changes without exiting.")); + connect(_apply, TQT_SIGNAL(clicked()), this, TQT_SLOT(apply())); + _ok=new TQPushButton(_("&OK"), actions); + TQWhatsThis::add(_ok, _("This button saves all your changes and exits the program.")); + connect(_ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(ok())); + _cancel=new TQPushButton(_("&Cancel"), actions); + TQWhatsThis::add(_cancel, _("This button exits the program without saving your changes.")); + connect(_cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(cancel())); _apply->setEnabled(false); setMinimumWidth(actions->sizeHint().width()+10); arrangeWidgets(); @@ -72,15 +72,15 @@ void Standalone::arrangeWidgets() actions->setGeometry(SPACE_MARGIN, height()-actions->sizeHint().height()-SPACE_MARGIN, width()-2*SPACE_MARGIN, actions->sizeHint().height()); } -void Standalone::resizeEvent(QResizeEvent *e) +void Standalone::resizeEvent(TQResizeEvent *e) { - QWidget::resizeEvent(e); + TQWidget::resizeEvent(e); arrangeWidgets(); } void Standalone::whatsthis() { - QWhatsThis::enterWhatsThisMode(); + TQWhatsThis::enterWhatsThisMode(); } void Standalone::help() { @@ -113,12 +113,12 @@ void Standalone::configChanged() // SLOT } int main(int argc, char **argv) { - QApplication a(argc, argv); + TQApplication a(argc, argv); Standalone *s=new Standalone(0); int ret; - a.setStyle(new QWindowsStyle()); + a.setStyle(new TQWindowsStyle()); a.setMainWidget(s); - QObject::connect(s, SIGNAL(done()), &a, SLOT(quit())); + TQObject::connect(s, TQT_SIGNAL(done()), &a, TQT_SLOT(quit())); s->show(); ret=a.exec(); delete s; diff --git a/lilo-config/qt/standalone.h b/lilo-config/qt/standalone.h index 8b0fa16..3d5c4bf 100644 --- a/lilo-config/qt/standalone.h +++ b/lilo-config/qt/standalone.h @@ -27,17 +27,17 @@ #ifndef _STANDALONE_H_ #define _STANDALONE_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "mainwidget.h" class Standalone: public QWidget { Q_OBJECT public: - Standalone(QWidget *parent=0, const char *name=0); - void resizeEvent(QResizeEvent *e); + Standalone(TQWidget *parent=0, const char *name=0); + void resizeEvent(TQResizeEvent *e); public slots: void whatsthis(); void help(); @@ -52,13 +52,13 @@ signals: private: void arrangeWidgets(); MainWidget *m; - QHButtonGroup *actions; - QPushButton *_whatsthis; - QPushButton *_help; - QPushButton *_deflt; - QPushButton *_reset; - QPushButton *_apply; - QPushButton *_ok; - QPushButton *_cancel; + TQHButtonGroup *actions; + TQPushButton *_whatsthis; + TQPushButton *_help; + TQPushButton *_deflt; + TQPushButton *_reset; + TQPushButton *_apply; + TQPushButton *_ok; + TQPushButton *_cancel; }; #endif -- cgit v1.2.3