summaryrefslogtreecommitdiffstats
path: root/lilo-config
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /lilo-config
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lilo-config')
-rw-r--r--lilo-config/common/String.cc8
-rw-r--r--lilo-config/common/String.h10
-rw-r--r--lilo-config/common/lilo.cc56
-rw-r--r--lilo-config/common/lilo.h4
-rw-r--r--lilo-config/common/tests/String.cc16
-rw-r--r--lilo-config/kde-qt-common/EditWidget.cpp38
-rw-r--r--lilo-config/kde-qt-common/EditWidget.h19
-rw-r--r--lilo-config/kde-qt-common/expert.cpp6
-rw-r--r--lilo-config/kde-qt-common/expert.h9
-rw-r--r--lilo-config/kde-qt-common/general.cpp26
-rw-r--r--lilo-config/kde-qt-common/general.h25
-rw-r--r--lilo-config/kde-qt-common/images.cpp24
-rw-r--r--lilo-config/kde-qt-common/images.h31
-rw-r--r--lilo-config/kde-qt-common/mainwidget.cpp4
-rw-r--r--lilo-config/kde-qt-common/mainwidget.h3
-rw-r--r--lilo-config/kde-qt-common/ui.h36
-rw-r--r--lilo-config/kde/Details.cpp8
-rw-r--r--lilo-config/kde/Details.h17
-rw-r--r--lilo-config/kde/InputBox.cpp4
-rw-r--r--lilo-config/kde/InputBox.h3
-rw-r--r--lilo-config/kde/kcontrol.cpp12
-rw-r--r--lilo-config/kde/kcontrol.h3
-rw-r--r--lilo-config/qt/Details.cpp24
-rw-r--r--lilo-config/qt/Details.h23
-rw-r--r--lilo-config/qt/InputBox.cpp14
-rw-r--r--lilo-config/qt/InputBox.h5
-rw-r--r--lilo-config/qt/standalone.cpp8
-rw-r--r--lilo-config/qt/standalone.h5
28 files changed, 226 insertions, 215 deletions
diff --git a/lilo-config/common/String.cc b/lilo-config/common/String.cc
index f8a0e35..6fda1fa 100644
--- a/lilo-config/common/String.cc
+++ b/lilo-config/common/String.cc
@@ -98,7 +98,7 @@ bool String::casecmp(char const * const s) const
return false;
return (strncasecmp(data(), s, size())==0);
}
-bool String::contains(String const &s, bool cs) const
+bool String::tqcontains(String const &s, bool cs) const
{
if(cs)
if(strstr(cstr(), s.cstr()))
@@ -226,10 +226,10 @@ String &String::regex(String const &expr, bool cs) const
}
return *ret;
}
-String &String::replace(String const &what, String const &with, bool all) const
+String &String::tqreplace(String const &what, String const &with, bool all) const
{
String *result;
- if(!contains(what)) {
+ if(!tqcontains(what)) {
result=new String(*this);
return *result;
}
@@ -331,7 +331,7 @@ void StringList::operator +=(StringList const * const s)
for(const_iterator it=s->begin(); it!=s->end(); it++)
insert(end(), *it);
}
-bool StringList::contains(String const &s) const
+bool StringList::tqcontains(String const &s) const
{
for(const_iterator it=begin(); it!=end(); it++)
if(*it == s)
diff --git a/lilo-config/common/String.h b/lilo-config/common/String.h
index 354c427..5eaa77a 100644
--- a/lilo-config/common/String.h
+++ b/lilo-config/common/String.h
@@ -54,7 +54,7 @@ public:
char * cstr() const;
bool cmp(char const * const s) const;
bool casecmp(char const * const s) const;
- bool contains(String const &s, bool cs=true) const;
+ bool tqcontains(String const &s, bool cs=true) const;
int locate(String const &s, bool cs=true, unsigned int startat=0) const;
void sprintf(const char *format, ...);
bool readfile(String filename);
@@ -63,11 +63,11 @@ public:
String right(unsigned int num=1) const;
String mid(unsigned int start, unsigned int num=0) const;
String &regex(String const &expr, bool cs=true) const;
- String &replace(String const &what, String const &with, bool all=true) const;
+ String &tqreplace(String const &what, String const &with, bool all=true) const;
static String escapeForRegExp(String const &s);
char chr(unsigned int index) const { if(index>=size()) return 0; else return data()[index]; }
- int length() const { return size(); } // For compatibility with QString
- char const *latin1() const { return cstr(); } // For compatibility with QString
+ int length() const { return size(); } // For compatibility with TQString
+ char const *latin1() const { return cstr(); } // For compatibility with TQString
};
class StringList:public strlist {
@@ -82,7 +82,7 @@ public:
void operator +=(StringList const &s);
void operator +=(StringList const * const s);
operator String() const;
- bool contains(String const &s) const;
+ bool tqcontains(String const &s) const;
void remove(String const &s);
void add(String const &s) { insert(end(), s); }
String const &grep(String const &s) const;
diff --git a/lilo-config/common/lilo.cc b/lilo-config/common/lilo.cc
index 6625f0d..6ce15dc 100644
--- a/lilo-config/common/lilo.cc
+++ b/lilo-config/common/lilo.cc
@@ -42,13 +42,13 @@ using namespace std;
bool liloimage::isLinux() const {
const_iterator it=begin();
- if((*it).contains("image"))
+ if((*it).tqcontains("image"))
return true;
else
return false;
}
-liloimage *liloimages::find(String const &s) const
+liloimage *liloimages::tqfind(String const &s) const
{
String t = String::escapeForRegExp(s);
@@ -61,7 +61,7 @@ liloimage *liloimages::find(String const &s) const
}
void liloimages::remove(String const &s)
{
- liloimage *i=find(s);
+ liloimage *i=tqfind(s);
for(iterator it=begin(); it!=end(); it++)
if(*it==*i) {
erase(it);
@@ -186,18 +186,18 @@ bool liloconf::probe()
images.clear();
/* Set some reasonable defaults... */
// Try to figure out the boot device first...
- if(drives.contains("/dev/hda")) {
+ if(drives.tqcontains("/dev/hda")) {
defaults += "boot=/dev/hda"; // 1st IDE/ATAPI harddisk
defaults += "lba32"; // otherwise it is assumed
}
- else if(drives.contains("/dev/sda")) {
+ else if(drives.tqcontains("/dev/sda")) {
defaults += "boot=/dev/sda"; // 1st SCSI harddisk
defaults += "linear"; // some SCSI disks need this
- } else if(drives.contains("/dev/i2o/hda"))
+ } else if(drives.tqcontains("/dev/i2o/hda"))
defaults += "boot=/dev/i2o/hda"; // 1st I2O harddisk
- else if(drives.contains("/dev/eda"))
+ else if(drives.tqcontains("/dev/eda"))
defaults += "boot=/dev/eda"; // 1st MCA ESDI harddisk
- else if(drives.contains("/dev/pda"))
+ else if(drives.tqcontains("/dev/pda"))
defaults += "boot=/dev/pda"; // 1st Parallel port IDE disk
else
defaults += "boot=Insert_your_boot_device_here"; // shouldn't happen
@@ -226,12 +226,12 @@ bool liloconf::probe()
continue;
if(s.st_size<131072) // if you managed to compile a kernel at less than 128k, you're cheating. ;)
continue;
- if((*it).contains("System.map") || (*it).contains("initrd")) // definitely not a kernel
+ if((*it).tqcontains("System.map") || (*it).tqcontains("initrd")) // definitely not a kernel
continue;
- if((*it).contains("vmlinux")) {
+ if((*it).tqcontains("vmlinux")) {
// If the kernel exists both in compressed and in
// uncompressed form, ignore the uncompressed one.
- String compr=(*it).replace("vmlinux", "vmlinuz");
+ String compr=(*it).tqreplace("vmlinux", "vmlinuz");
if(!access(compr, F_OK))
continue;
}
@@ -243,27 +243,27 @@ bool liloconf::probe()
if (label.empty())
{
label = (*it);
- if (label.find('/') != string::npos)
+ if (label.tqfind('/') != string::npos)
label = label.right(label.length()-1-label.rfind('/'));
}
// Check if we have an initial ramdisk (initrd) for this kernel...
String initrd1; // first guess
String initrd2; // second guess
- if((*it).contains("vmlinuz")) {
- initrd1=(*it).replace("vmlinux", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ if((*it).tqcontains("vmlinuz")) {
+ initrd1=(*it).tqreplace("vmlinux", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
- else if((*it).contains("vmlinux")) {
- initrd1=(*it).replace("vmlinux", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ else if((*it).tqcontains("vmlinux")) {
+ initrd1=(*it).tqreplace("vmlinux", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
- else if((*it).contains("kernel")) {
- initrd1=(*it).replace("kernel", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ else if((*it).tqcontains("kernel")) {
+ initrd1=(*it).tqreplace("kernel", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
- else if((*it).contains("linux")) {
- initrd1=(*it).replace("linux", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ else if((*it).tqcontains("linux")) {
+ initrd1=(*it).tqreplace("linux", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
else {
initrd1="/boot/initrd-"+version+".img";
@@ -277,8 +277,8 @@ bool liloconf::probe()
initrd = initrd2;
if(label.size()>15) // LILO can't handle this
- if(label.contains("enterprise"))
- label=label.replace("enterprise", "E");
+ if(label.tqcontains("enterprise"))
+ label=label.tqreplace("enterprise", "E");
if(label.size()>15)
label=label.left(15);
@@ -399,8 +399,8 @@ bool liloconf::probe()
case 0x40: // Venix 80286
addOther("Venix", *it);
break;
- case 0x4d: // QNX
- addOther("QNX", *it);
+ case 0x4d: // TQNX
+ addOther("TQNX", *it);
break;
case 0x52: // CP/M (does anyone dual-boot between CP/M and
// Linux? Would be interesting to see. ;) )
diff --git a/lilo-config/common/lilo.h b/lilo-config/common/lilo.h
index c992df0..22d6517 100644
--- a/lilo-config/common/lilo.h
+++ b/lilo-config/common/lilo.h
@@ -39,8 +39,8 @@ public:
class liloimages:public std::list<liloimage> {
public:
void remove(String const &s);
- liloimage *find(String const &s) const;
- liloimage *operator[](String const &s) const { return find(s); }
+ liloimage *tqfind(String const &s) const;
+ liloimage *operator[](String const &s) const { return tqfind(s); }
};
class liloconf {
diff --git a/lilo-config/common/tests/String.cc b/lilo-config/common/tests/String.cc
index 7b0b60e..cfd9744 100644
--- a/lilo-config/common/tests/String.cc
+++ b/lilo-config/common/tests/String.cc
@@ -54,20 +54,20 @@ int main(int argc, char **argv)
cerr << "regex() seems to be broken." << endl;
bugs++;
}
- if(!s.contains("Red Hat")) {
- cerr << "contains() seems to be broken." << endl;
+ if(!s.tqcontains("Red Hat")) {
+ cerr << "tqcontains() seems to be broken." << endl;
bugs++;
}
- if(t.replace("Microsoft", "Windows", false) != "Windows sucks! Destroy Microsoft! Microsoft must die!") {
- cerr << "replace() [once] seems to be broken." << endl;
+ if(t.tqreplace("Microsoft", "Windows", false) != "Windows sucks! Destroy Microsoft! Microsoft must die!") {
+ cerr << "tqreplace() [once] seems to be broken." << endl;
bugs++;
}
- if(t.replace("Microsoft", "Windows") != "Windows sucks! Destroy Windows! Windows must die!") {
- cerr << "replace() [all] seems to be broken." << endl;
+ if(t.tqreplace("Microsoft", "Windows") != "Windows sucks! Destroy Windows! Windows must die!") {
+ cerr << "tqreplace() [all] seems to be broken." << endl;
bugs++;
}
- if(u.replace("Microsoft", "Windows") != "Windows sucks!") {
- cerr << "replace() [all, test case 2] seems to be broken." << endl;
+ if(u.tqreplace("Microsoft", "Windows") != "Windows sucks!") {
+ cerr << "tqreplace() [all, test case 2] seems to be broken." << endl;
bugs++;
}
diff --git a/lilo-config/kde-qt-common/EditWidget.cpp b/lilo-config/kde-qt-common/EditWidget.cpp
index 292e016..e80cd19 100644
--- a/lilo-config/kde-qt-common/EditWidget.cpp
+++ b/lilo-config/kde-qt-common/EditWidget.cpp
@@ -28,7 +28,7 @@
*/
#include "EditWidget.moc"
#include "ui.h"
-EditWidget::EditWidget(TQString const label, TQString const text, bool isFile, TQWidget *parent, const char *name, WFlags f, bool allowLines):TQHBox(allowLines, parent, name, f)
+EditWidget::EditWidget(TQString const label, TQString const text, bool isFile, TQWidget *tqparent, const char *name, WFlags f, bool allowLines):TQHBox(allowLines, tqparent, name, f)
{
setMargin(SPACE_MARGIN);
setSpacing(SPACE_INSIDE);
@@ -42,40 +42,40 @@ EditWidget::EditWidget(TQString const label, TQString const text, bool isFile, T
if(isFile) {
select=new TQPushButton(_("Select..."), this);
connect(select, TQT_SIGNAL(clicked()), TQT_SLOT(selectFileClicked()));
- select->resize(select->minimumSizeHint());
+ select->resize(select->tqminimumSizeHint());
setStretchFactor(select, 0);
} else
select=0;
}
void EditWidget::selectFileClicked()
{
- TQString filename=FileDlg::getOpenFileName(TQString::null, TQString::null, this);
+ TQString filename=FileDlg::getOpenFileName(TQString(), TQString(), this);
if(!filename.isEmpty())
line->setText(filename);
}
-TQSize EditWidget::sizeHint() const
+TQSize EditWidget::tqsizeHint() const
{
- int w=2*SPACE_MARGIN+lbl->sizeHint().width()+SPACE_INSIDE+line->sizeHint().width();
- int h=lbl->sizeHint().height();
- if(h<line->sizeHint().height())
- h=line->sizeHint().height();
+ int w=2*SPACE_MARGIN+lbl->tqsizeHint().width()+SPACE_INSIDE+line->tqsizeHint().width();
+ int h=lbl->tqsizeHint().height();
+ if(h<line->tqsizeHint().height())
+ h=line->tqsizeHint().height();
if(select!=0) {
- w+=SPACE_INSIDE+select->sizeHint().width();
- if(h<select->sizeHint().height())
- h=select->sizeHint().height();
+ w+=SPACE_INSIDE+select->tqsizeHint().width();
+ if(h<select->tqsizeHint().height())
+ h=select->tqsizeHint().height();
}
return TQSize(w, h);
}
-TQSize EditWidget::minimumSizeHint() const
+TQSize EditWidget::tqminimumSizeHint() const
{
- int w=2*SPACE_MARGIN+lbl->minimumSizeHint().width()+SPACE_INSIDE+line->minimumSizeHint().width();
- int h=lbl->minimumSizeHint().height();
- if(h<line->minimumSizeHint().height())
- h=line->minimumSizeHint().height();
+ int w=2*SPACE_MARGIN+lbl->tqminimumSizeHint().width()+SPACE_INSIDE+line->tqminimumSizeHint().width();
+ int h=lbl->tqminimumSizeHint().height();
+ if(h<line->tqminimumSizeHint().height())
+ h=line->tqminimumSizeHint().height();
if(select!=0) {
- w+=SPACE_INSIDE+select->minimumSizeHint().width();
- if(h<select->minimumSizeHint().height())
- h=select->minimumSizeHint().height();
+ w+=SPACE_INSIDE+select->tqminimumSizeHint().width();
+ if(h<select->tqminimumSizeHint().height())
+ h=select->tqminimumSizeHint().height();
}
return TQSize(w, h);
}
diff --git a/lilo-config/kde-qt-common/EditWidget.h b/lilo-config/kde-qt-common/EditWidget.h
index 0a64750..0c0c97d 100644
--- a/lilo-config/kde-qt-common/EditWidget.h
+++ b/lilo-config/kde-qt-common/EditWidget.h
@@ -32,11 +32,12 @@
#include <tqlabel.h>
#include <tqlineedit.h>
#include <tqpushbutton.h>
-class EditWidget:public QHBox
+class EditWidget:public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditWidget(TQString const label="", TQString const text="", bool isFile=false, TQWidget *parent=0, const char *name=0, WFlags f=0, bool allowLines=true);
+ EditWidget(TQString const label="", TQString const text="", bool isFile=false, TQWidget *tqparent=0, const char *name=0, WFlags f=0, bool allowLines=true);
void setLabel(TQString const &label) { lbl->setText(label); };
TQString text() const { return line->text(); };
TQString displayText() const { return line->displayText(); };
@@ -57,8 +58,8 @@ public:
void cut() { line->cut(); };
void copy() const { line->copy(); };
void paste() { line->paste(); };
- void setAlignment(int flag) { line->setAlignment(flag); };
- int alignment() const { return line->alignment(); };
+ void tqsetAlignment(int flag) { line->tqsetAlignment(flag); };
+ int tqalignment() const { return line->tqalignment(); };
void cursorLeft(bool mark, int steps=1) { line->cursorLeft(mark, steps); };
void cursorRight(bool mark, int steps=1) { line->cursorRight(mark, steps); };
void cursorWordForward(bool mark) { line->cursorWordForward(mark); };
@@ -71,8 +72,8 @@ public:
bool edited() const { return line->edited(); };
bool hasMarkedText() const { return line->hasMarkedText(); };
TQString markedText() const { return line->markedText(); };
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
public slots:
virtual void setText(const TQString &text) { line->setText(text); };
void selectAll() { line->selectAll(); };
@@ -85,8 +86,8 @@ signals:
void textChanged(const TQString &);
void returnPressed();
private:
- QLabel *lbl;
- QLineEdit *line;
- QPushButton *select;
+ TQLabel *lbl;
+ TQLineEdit *line;
+ TQPushButton *select;
};
#endif
diff --git a/lilo-config/kde-qt-common/expert.cpp b/lilo-config/kde-qt-common/expert.cpp
index d74b6b6..d9e65e5 100644
--- a/lilo-config/kde-qt-common/expert.cpp
+++ b/lilo-config/kde-qt-common/expert.cpp
@@ -31,12 +31,12 @@
#include <tqwhatsthis.h>
#include <String.h>
#include <strstream>
-Expert::Expert(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name)
+Expert::Expert(liloconf *l, TQWidget *tqparent, const char *name):TQWidget(tqparent, name)
{
lilo=l;
- layout=new TQHBoxLayout(this);
+ tqlayout=new TQHBoxLayout(this);
edit=new TQMultiLineEdit(this);
- layout->addWidget(edit);
+ tqlayout->addWidget(edit);
connect(edit, TQT_SIGNAL(textChanged()), TQT_SIGNAL(configChanged()));
TQWhatsThis::add(edit, _("You can edit the lilo.conf file directly here. All changes you make here are automatically transferred to the graphical interface."));
update();
diff --git a/lilo-config/kde-qt-common/expert.h b/lilo-config/kde-qt-common/expert.h
index e2fec97..7b39530 100644
--- a/lilo-config/kde-qt-common/expert.h
+++ b/lilo-config/kde-qt-common/expert.h
@@ -32,11 +32,12 @@
#include <tqwidget.h>
#include <tqmultilineedit.h>
#include <tqlayout.h>
-class Expert:public QWidget
+class Expert:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Expert(liloconf *l=0, TQWidget *parent=0, const char *name=0);
+ Expert(liloconf *l=0, TQWidget *tqparent=0, const char *name=0);
~Expert();
void setCfg(liloconf *l) { lilo=l; };
void makeReadOnly();
@@ -47,7 +48,7 @@ signals:
void configChanged();
private:
liloconf *lilo;
- QHBoxLayout *layout;
- QMultiLineEdit *edit;
+ TQHBoxLayout *tqlayout;
+ TQMultiLineEdit *edit;
};
#endif
diff --git a/lilo-config/kde-qt-common/general.cpp b/lilo-config/kde-qt-common/general.cpp
index 2040025..858ba9c 100644
--- a/lilo-config/kde-qt-common/general.cpp
+++ b/lilo-config/kde-qt-common/general.cpp
@@ -35,12 +35,12 @@
#include <stdlib.h>
-General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name)
+General::General(liloconf *l, TQWidget *tqparent, const char *name):TQWidget(tqparent, name)
{
lilo=l;
- TQVBoxLayout *layout=new TQVBoxLayout(this);
- layout->setMargin(SPACE_MARGIN);
- layout->setSpacing(SPACE_INSIDE);
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(this);
+ tqlayout->setMargin(SPACE_MARGIN);
+ tqlayout->setSpacing(SPACE_INSIDE);
TQHBox *drv=new TQHBox(this);
TQLabel *drive_lbl=new TQLabel(_("Install &boot record to drive/partition:"), drv);
drive=new TQComboBox(false, drv);
@@ -51,7 +51,7 @@ General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(paren
for(StringList::const_iterator it=p.begin(); it!=p.end(); it++)
drive->insertItem((*it).cstr());
connect(drive, TQT_SIGNAL(activated(int)), TQT_SIGNAL(configChanged()));
- layout->addWidget(drv);
+ tqlayout->addWidget(drv);
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."));
TQHBox *to=new TQHBox(this);
@@ -60,7 +60,7 @@ General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(paren
timeout->setSuffix(_("/10 seconds"));
connect(timeout, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(configChanged()));
to_lbl->setBuddy(timeout);
- layout->addWidget(to);
+ tqlayout->addWidget(to);
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."));
TQHBox *modes=new TQHBox(this);
@@ -70,7 +70,7 @@ General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(paren
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);
+ tqlayout->addWidget(modes);
TQHBox *opts=new TQHBox(this);
lock=new TQCheckBox(_("&Record boot command lines for defaults"), opts);
@@ -80,7 +80,7 @@ General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(paren
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);
+ tqlayout->addWidget(opts);
TQHBox *pw=new TQHBox(this);
use_password=new TQCheckBox(_("Require &password:"), pw);
@@ -91,7 +91,7 @@ General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(paren
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);
+ tqlayout->addWidget(pw);
TQHBox *vgab=new TQHBox(this);
TQLabel *vlbl=new TQLabel(_("&Default graphics mode on text console:"), vgab);
@@ -125,13 +125,13 @@ General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(paren
vga->insertItem(_("VGA 1280x1024, 65536 colors (794)"));
vga->insertItem(_("VGA 1280x1024, 16.7M colors (795)"));
connect( vga, TQT_SIGNAL(activated ( int )), TQT_SIGNAL(configChanged()));
- layout->addWidget(vgab);
+ tqlayout->addWidget(vgab);
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);
+ tqlayout->addWidget(prompt);
update();
}
@@ -168,7 +168,7 @@ void General::saveChanges()
} else {
TQString mode=vga->currentText();
if(mode!="ask") {
- mode=mode.mid(mode.find('(')+1);
+ mode=mode.mid(mode.tqfind('(')+1);
mode=mode.left(mode.length()-1);
}
lilo->defaults.set("vga", mode.latin1());
@@ -201,7 +201,7 @@ void General::update()
vga->setCurrentItem(1);
else
for(int i=0; i<vga->count(); i++) {
- if(vga->text(i).contains("(" + mode + ")")) {
+ if(vga->text(i).tqcontains("(" + mode + ")")) {
vga->setCurrentItem(i);
break;
}
diff --git a/lilo-config/kde-qt-common/general.h b/lilo-config/kde-qt-common/general.h
index d925ad1..01d090b 100644
--- a/lilo-config/kde-qt-common/general.h
+++ b/lilo-config/kde-qt-common/general.h
@@ -33,11 +33,12 @@
#include <tqcombobox.h>
#include <tqspinbox.h>
#include <tqcheckbox.h>
-class General:public QWidget
+class General:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- General(liloconf *l=0, TQWidget *parent=0, const char *name=0);
+ General(liloconf *l=0, TQWidget *tqparent=0, const char *name=0);
void makeReadOnly();
signals:
void configChanged();
@@ -48,15 +49,15 @@ private slots:
void check_pw();
private:
liloconf *lilo;
- QComboBox *drive;
- QSpinBox *timeout;
- QCheckBox *linear;
- QCheckBox *compact;
- QCheckBox *lock;
- QCheckBox *restricted;
- QCheckBox *use_password;
- QLineEdit *password;
- QComboBox *vga;
- QCheckBox *prompt;
+ TQComboBox *drive;
+ TQSpinBox *timeout;
+ TQCheckBox *linear;
+ TQCheckBox *compact;
+ TQCheckBox *lock;
+ TQCheckBox *restricted;
+ TQCheckBox *use_password;
+ TQLineEdit *password;
+ TQComboBox *vga;
+ TQCheckBox *prompt;
};
#endif
diff --git a/lilo-config/kde-qt-common/images.cpp b/lilo-config/kde-qt-common/images.cpp
index 9159d97..bdbdac4 100644
--- a/lilo-config/kde-qt-common/images.cpp
+++ b/lilo-config/kde-qt-common/images.cpp
@@ -36,26 +36,26 @@
#include "kde/InputBox.h"
#include "kde/Details.h"
#else
-#include "qt/InputBox.h"
-#include "qt/Details.h"
+#include "tqt/InputBox.h"
+#include "tqt/Details.h"
#endif
-Images::Images(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name)
+Images::Images(liloconf *l, TQWidget *tqparent, const char *name):TQWidget(tqparent, name)
{
- current=""; previous=""; // Using TQString::null gives problems!
+ current=""; previous=""; // Using TQString() gives problems!
lilo=l;
- layout=new TQHBoxLayout(this);
- layout->setMargin(SPACE_MARGIN);
- layout->setSpacing(SPACE_INSIDE);
+ tqlayout=new TQHBoxLayout(this);
+ tqlayout->setMargin(SPACE_MARGIN);
+ tqlayout->setSpacing(SPACE_INSIDE);
images=new TQListBox(this);
- layout->addWidget(images, 1);
+ tqlayout->addWidget(images, 1);
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 TQVBox(this);
parameters->setMargin(SPACE_MARGIN);
parameters->setSpacing(SPACE_INSIDE);
- layout->addWidget(parameters, 2);
+ tqlayout->addWidget(parameters, 2);
image=new EditWidget(_("&Kernel:"), "", true, parameters);
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()));
@@ -75,7 +75,7 @@ Images::Images(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent,
actions=new TQVBox(this);
actions->setMargin(SPACE_MARGIN);
actions->setSpacing(SPACE_INSIDE);
- layout->addWidget(actions);
+ tqlayout->addWidget(actions);
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()));
@@ -131,7 +131,7 @@ void Images::probeClicked() // SLOT
void Images::dfltClicked() // SLOT
{
if (images->currentItem() < 0) return;
- lilo->setDefault(images->currentText().replace(TQRegExp(" (default)", true, true), "").latin1());
+ lilo->setDefault(images->currentText().tqreplace(TQRegExp(" (default)", true, true), "").latin1());
update();
emit configChanged();
}
@@ -246,7 +246,7 @@ void Images::removeClicked() // SLOT
TQString value(TQString const &s)
{
- TQString r=s.mid(s.find('=')+1).simplifyWhiteSpace();
+ TQString r=s.mid(s.tqfind('=')+1).simplifyWhiteSpace();
if(r.left(1)=="\"")
r=r.mid(1);
if(r.right(1)=="\"")
diff --git a/lilo-config/kde-qt-common/images.h b/lilo-config/kde-qt-common/images.h
index 6a089f4..8e8060d 100644
--- a/lilo-config/kde-qt-common/images.h
+++ b/lilo-config/kde-qt-common/images.h
@@ -36,11 +36,12 @@
#include <tqlistbox.h>
#include <tqvbox.h>
#include "EditWidget.h"
-class Images:public QWidget
+class Images:public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Images(liloconf *l=0, TQWidget *parent=0, const char *name=0);
+ Images(liloconf *l=0, TQWidget *tqparent=0, const char *name=0);
~Images();
void setCfg(liloconf *l) { lilo=l; };
void makeReadOnly();
@@ -60,23 +61,23 @@ signals:
void configChanged();
private:
liloconf *lilo;
- QString previous;
- QString current;
- QHBoxLayout *layout;
- QListBox *images;
- QVBox *parameters;
+ TQString previous;
+ TQString current;
+ TQHBoxLayout *tqlayout;
+ TQListBox *images;
+ TQVBox *parameters;
EditWidget *image;
EditWidget *label;
EditWidget *root;
EditWidget *initrd;
EditWidget *append;
- QVBox *actions;
- QPushButton *dflt;
- QPushButton *details;
- QPushButton *probe;
- QPushButton *check;
- QPushButton *addKrnl;
- QPushButton *addOS;
- QPushButton *remove;
+ TQVBox *actions;
+ TQPushButton *dflt;
+ TQPushButton *details;
+ TQPushButton *probe;
+ TQPushButton *check;
+ TQPushButton *addKrnl;
+ TQPushButton *addOS;
+ TQPushButton *remove;
};
#endif
diff --git a/lilo-config/kde-qt-common/mainwidget.cpp b/lilo-config/kde-qt-common/mainwidget.cpp
index bb966f2..7ea74a1 100644
--- a/lilo-config/kde-qt-common/mainwidget.cpp
+++ b/lilo-config/kde-qt-common/mainwidget.cpp
@@ -29,8 +29,8 @@
#include "mainwidget.moc"
#include "ui.h"
-MainWidget::MainWidget(TQWidget *parent, const char *name)
- : TQTabWidget(parent, name)
+MainWidget::MainWidget(TQWidget *tqparent, const char *name)
+ : TQTabWidget(tqparent, name)
{
l=new liloconf();
general=new General(l, this);
diff --git a/lilo-config/kde-qt-common/mainwidget.h b/lilo-config/kde-qt-common/mainwidget.h
index 716931d..28cc37d 100644
--- a/lilo-config/kde-qt-common/mainwidget.h
+++ b/lilo-config/kde-qt-common/mainwidget.h
@@ -38,8 +38,9 @@
class MainWidget: public TQTabWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- MainWidget(TQWidget *parent, const char *name=0);
+ MainWidget(TQWidget *tqparent, const char *name=0);
void arrangeWidgets();
void makeReadOnly();
public slots:
diff --git a/lilo-config/kde-qt-common/ui.h b/lilo-config/kde-qt-common/ui.h
index 4454bde..9df62ae 100644
--- a/lilo-config/kde-qt-common/ui.h
+++ b/lilo-config/kde-qt-common/ui.h
@@ -39,14 +39,14 @@
#include <kdialog.h>
#include <kfiledialog.h>
#define _(x) i18n(x)
-#define WarningYesNo(parent, caption, text) \
- KMessageBox::warningYesNo(parent, text, caption)
-#define ErrorOK(parent, caption, text) \
- KMessageBox::sorry(parent, text, caption)
-#define InformationOK(parent, text, caption, dontShowAgainName) \
- KMessageBox::information(parent, text, caption, dontShowAgainName)
-#define CriticalErrorOK(parent, text, caption) \
- KMessageBox::error(parent, text, caption)
+#define WarningYesNo(tqparent, caption, text) \
+ KMessageBox::warningYesNo(tqparent, text, caption)
+#define ErrorOK(tqparent, caption, text) \
+ KMessageBox::sorry(tqparent, text, caption)
+#define InformationOK(tqparent, text, caption, dontShowAgainName) \
+ KMessageBox::information(tqparent, text, caption, dontShowAgainName)
+#define CriticalErrorOK(tqparent, text, caption) \
+ KMessageBox::error(tqparent, text, caption)
#define TabBar KTabCtl
#define FileDlg KFileDialog
#define SPACE_MARGIN KDialog::marginHint()
@@ -57,16 +57,16 @@
#include <tqdialog.h>
#include <tqfiledialog.h>
#define _(x) tr(x)
-#define WarningYesNo(parent, caption, text) \
- TQMessageBox::warning(parent, caption, text, TQMessageBox::Yes, TQMessageBox::No)
-#define ErrorOK(parent, caption, text) \
- TQMessageBox::information(parent, caption, text)
-#define InformationOK(parent, text, caption, dontShowAgainName) \
- TQMessageBox::information(parent, caption, text)
-#define CriticalErrorOK(parent, text, caption) \
- TQMessageBox::critical(parent, caption, text)
-#define TabBar QTabWidget
-#define FileDlg QFileDialog
+#define WarningYesNo(tqparent, caption, text) \
+ TQMessageBox::warning(tqparent, caption, text, TQMessageBox::Yes, TQMessageBox::No)
+#define ErrorOK(tqparent, caption, text) \
+ TQMessageBox::information(tqparent, caption, text)
+#define InformationOK(tqparent, text, caption, dontShowAgainName) \
+ TQMessageBox::information(tqparent, caption, text)
+#define CriticalErrorOK(tqparent, text, caption) \
+ TQMessageBox::critical(tqparent, caption, text)
+#define TabBar TQTabWidget
+#define FileDlg TQFileDialog
#define SPACE_MARGIN 5
#define SPACE_INSIDE 5
#endif
diff --git a/lilo-config/kde/Details.cpp b/lilo-config/kde/Details.cpp
index 0775e8d..385b715 100644
--- a/lilo-config/kde/Details.cpp
+++ b/lilo-config/kde/Details.cpp
@@ -33,8 +33,8 @@
#include <tqlabel.h>
#include <ui.h>
-Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags /* f */)
- : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
+Details::Details(liloimage *lilo, TQWidget *tqparent, const char *name, WFlags /* f */)
+ : KDialogBase(tqparent, name, true, TQString(), Ok|Cancel, Ok, true)
{
l=lilo;
@@ -101,7 +101,7 @@ Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags /*
vga->setCurrentItem(1);
else
for(int i=0; i<vga->count(); i++) {
- if(vga->text(i).contains("(" + mode + ")")) {
+ if(vga->text(i).tqcontains("(" + mode + ")")) {
vga->setCurrentItem(i);
break;
}
@@ -127,7 +127,7 @@ TQString Details::vgaMode() const
if(s=="default")
return "";
else if(s!="ask") {
- s=s.mid(s.find('(')+1);
+ s=s.mid(s.tqfind('(')+1);
s=s.left(s.length()-1);
}
return s;
diff --git a/lilo-config/kde/Details.h b/lilo-config/kde/Details.h
index 2e9f0f6..85cfe68 100644
--- a/lilo-config/kde/Details.h
+++ b/lilo-config/kde/Details.h
@@ -37,8 +37,9 @@
class Details:public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- Details(liloimage *lilo, TQWidget *parent=0, const char *name=0, WFlags f=0);
+ Details(liloimage *lilo, TQWidget *tqparent=0, const char *name=0, WFlags f=0);
bool isReadOnly() const { return readonly->isChecked(); };
TQString vgaMode() const;
bool isUnsafe() const { return unsafe->isChecked(); };
@@ -50,12 +51,12 @@ private slots:
void check_pw();
private:
liloimage *l;
- QCheckBox *readonly;
- QComboBox *vga;
- QCheckBox *unsafe;
- QCheckBox *lock;
- QCheckBox *restricted;
- QCheckBox *use_password;
- QLineEdit *password;
+ TQCheckBox *readonly;
+ TQComboBox *vga;
+ TQCheckBox *unsafe;
+ TQCheckBox *lock;
+ TQCheckBox *restricted;
+ TQCheckBox *use_password;
+ TQLineEdit *password;
};
#endif
diff --git a/lilo-config/kde/InputBox.cpp b/lilo-config/kde/InputBox.cpp
index 3a707cf..585874d 100644
--- a/lilo-config/kde/InputBox.cpp
+++ b/lilo-config/kde/InputBox.cpp
@@ -31,8 +31,8 @@
#include <tqwhatsthis.h>
#include <ui.h>
-InputBox::InputBox(entries e, TQWidget *parent, const char *name, bool hasCancel, WFlags f)
- : KDialogBase(parent, name, true, TQString::null, hasCancel ? Ok | Cancel : Ok, Ok, true )
+InputBox::InputBox(entries e, TQWidget *tqparent, const char *name, bool hasCancel, WFlags f)
+ : KDialogBase(tqparent, name, true, TQString(), hasCancel ? Ok | Cancel : Ok, Ok, true )
{
TQVBox *page = makeVBoxMainWidget();
for(entries::iterator it=e.begin(); it!=e.end(); it++) {
diff --git a/lilo-config/kde/InputBox.h b/lilo-config/kde/InputBox.h
index 9bf88cd..50b9d10 100644
--- a/lilo-config/kde/InputBox.h
+++ b/lilo-config/kde/InputBox.h
@@ -39,10 +39,11 @@
class InputBox:public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef struct { TQString label; TQString dflt; bool isFile; TQString help; } entry;
typedef std::list<entry> entries;
- InputBox(entries e, TQWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0);
+ InputBox(entries e, TQWidget *tqparent=0, const char *name=0, bool hasCancel=true, WFlags f=0);
TQStringList const text() const { TQStringList s; for(std::list<EditWidget*>::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; };
private:
std::list<EditWidget*> edit;
diff --git a/lilo-config/kde/kcontrol.cpp b/lilo-config/kde/kcontrol.cpp
index 846edc8..dbf2f40 100644
--- a/lilo-config/kde/kcontrol.cpp
+++ b/lilo-config/kde/kcontrol.cpp
@@ -35,12 +35,12 @@
#include <kaboutdata.h>
#include <unistd.h>
-KControl::KControl(TQWidget *parent, const char *name)
- : KCModule(parent, name)
+KControl::KControl(TQWidget *tqparent, const char *name)
+ : KCModule(tqparent, name)
{
- TQVBoxLayout *layout=new TQVBoxLayout(this);
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(this);
m=new MainWidget(this, name);
- layout->addWidget(m);
+ tqlayout->addWidget(m);
connect(m, TQT_SIGNAL(configChanged()), TQT_SLOT(configChanged()));
if (getuid() != 0) {
m->makeReadOnly();
@@ -79,9 +79,9 @@ void KControl::configChanged() // SLOT
extern "C"
{
- KDE_EXPORT KCModule *create_lilo(TQWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_lilo(TQWidget *tqparent, const char *name)
{
- return new KControl(parent, "kcmlilo");
+ return new KControl(tqparent, "kcmlilo");
}
}
diff --git a/lilo-config/kde/kcontrol.h b/lilo-config/kde/kcontrol.h
index edb64d9..75d98dd 100644
--- a/lilo-config/kde/kcontrol.h
+++ b/lilo-config/kde/kcontrol.h
@@ -38,8 +38,9 @@ class KAboutData;
class KControl: public KCModule {
Q_OBJECT
+ TQ_OBJECT
public:
- KControl(TQWidget *parent, const char *name);
+ KControl(TQWidget *tqparent, const char *name);
void load();
void save();
void defaults();
diff --git a/lilo-config/qt/Details.cpp b/lilo-config/qt/Details.cpp
index 944ba0d..6b4e50a 100644
--- a/lilo-config/qt/Details.cpp
+++ b/lilo-config/qt/Details.cpp
@@ -32,13 +32,13 @@
#include <tqlabel.h>
#include <ui.h>
-Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags f):TQDialog(parent, name, true, f)
+Details::Details(liloimage *lilo, TQWidget *tqparent, const char *name, WFlags f):TQDialog(tqparent, name, true, f)
{
l=lilo;
- TQVBoxLayout *layout=new TQVBoxLayout(this);
- layout->setMargin(SPACE_MARGIN);
- layout->setSpacing(SPACE_INSIDE);
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(this);
+ tqlayout->setMargin(SPACE_MARGIN);
+ tqlayout->setSpacing(SPACE_INSIDE);
TQHBox *vgab=new TQHBox(this);
TQLabel *vlbl=new TQLabel(_("&Graphics mode on text console:"), vgab);
@@ -71,15 +71,15 @@ Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags f):
vga->insertItem(_("VGA 1280x1024, 32767 colors (793)"));
vga->insertItem(_("VGA 1280x1024, 65536 colors (794)"));
vga->insertItem(_("VGA 1280x1024, 16.7M colors (795)"));
- layout->addWidget(vgab);
+ tqlayout->addWidget(vgab);
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.<br>Don't turn this off unless you know what you're doing."));
- layout->addWidget(readonly);
+ tqlayout->addWidget(readonly);
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.<br>This sets the <i>unsafe</i> keyword in lilo.conf."));
- layout->addWidget(unsafe);
+ tqlayout->addWidget(unsafe);
TQHBox *opts=new TQHBox(this);
lock=new TQCheckBox(_("&Record boot command lines for defaults"), opts);
@@ -87,7 +87,7 @@ Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags f):
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 <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."));
- layout->addWidget(opts);
+ tqlayout->addWidget(opts);
TQHBox *pw=new TQHBox(this);
use_password=new TQCheckBox(_("Require &password:"), pw);
@@ -96,12 +96,12 @@ Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags f):
password->setMaxLength(15);
password->setEchoMode(TQLineEdit::Password);
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."));
- layout->addWidget(pw);
+ tqlayout->addWidget(pw);
TQHBox *btns=new TQHBox(this);
ok=new TQPushButton(_("&OK"), btns);
cancel=new TQPushButton(_("&Cancel"), btns);
- layout->addWidget(btns);
+ tqlayout->addWidget(btns);
connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
@@ -113,7 +113,7 @@ Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags f):
vga->setCurrentItem(1);
else
for(int i=0; i<vga->count(); i++) {
- if(vga->text(i).contains("(" + mode + ")")) {
+ if(vga->text(i).tqcontains("(" + mode + ")")) {
vga->setCurrentItem(i);
break;
}
@@ -137,7 +137,7 @@ TQString Details::vgaMode() const
if(s=="default")
return "";
else if(s!="ask") {
- s=s.mid(s.find('(')+1);
+ s=s.mid(s.tqfind('(')+1);
s=s.left(s.length()-1);
}
return s;
diff --git a/lilo-config/qt/Details.h b/lilo-config/qt/Details.h
index c7c7f98..079a83a 100644
--- a/lilo-config/qt/Details.h
+++ b/lilo-config/qt/Details.h
@@ -32,11 +32,12 @@
#include <tqcombobox.h>
#include <tqlineedit.h>
#include <tqpushbutton.h>
-class Details:public QDialog
+class Details:public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- Details(liloimage *lilo, TQWidget *parent=0, const char *name=0, WFlags f=0);
+ Details(liloimage *lilo, TQWidget *tqparent=0, const char *name=0, WFlags f=0);
bool isReadOnly() const { return readonly->isChecked(); };
TQString vgaMode() const;
bool isUnsafe() const { return unsafe->isChecked(); };
@@ -48,14 +49,14 @@ private slots:
void check_pw();
private:
liloimage *l;
- QCheckBox *readonly;
- QComboBox *vga;
- QCheckBox *unsafe;
- QCheckBox *lock;
- QCheckBox *restricted;
- QCheckBox *use_password;
- QLineEdit *password;
- QPushButton *ok;
- QPushButton *cancel;
+ TQCheckBox *readonly;
+ TQComboBox *vga;
+ TQCheckBox *unsafe;
+ TQCheckBox *lock;
+ TQCheckBox *restricted;
+ TQCheckBox *use_password;
+ TQLineEdit *password;
+ TQPushButton *ok;
+ TQPushButton *cancel;
};
#endif
diff --git a/lilo-config/qt/InputBox.cpp b/lilo-config/qt/InputBox.cpp
index 9836a91..a8aaa1d 100644
--- a/lilo-config/qt/InputBox.cpp
+++ b/lilo-config/qt/InputBox.cpp
@@ -31,26 +31,26 @@
#include <tqwhatsthis.h>
#include <ui.h>
-InputBox::InputBox(entries e, TQWidget *parent, const char *name, bool hasCancel, WFlags f):TQDialog(parent, name, true, f)
+InputBox::InputBox(entries e, TQWidget *tqparent, const char *name, bool hasCancel, WFlags f):TQDialog(tqparent, name, true, f)
{
- TQVBoxLayout *layout=new TQVBoxLayout(this);
- layout->setMargin(SPACE_MARGIN);
- layout->setSpacing(SPACE_INSIDE);
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(this);
+ tqlayout->setMargin(SPACE_MARGIN);
+ tqlayout->setSpacing(SPACE_INSIDE);
for(entries::iterator it=e.begin(); it!=e.end(); it++) {
EditWidget *ed=new EditWidget((*it).label, (*it).dflt, (*it).isFile, this);
TQWhatsThis::add(ed, (*it).help);
- layout->addWidget(ed);
+ tqlayout->addWidget(ed);
edit.insert(edit.end(), ed);
}
if(hasCancel) {
TQHBox *btns=new TQHBox(this);
ok=new TQPushButton(_("&OK"), btns);
cancel=new TQPushButton(_("&Cancel"), btns);
- layout->addWidget(btns);
+ tqlayout->addWidget(btns);
connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
} else {
ok=new TQPushButton(_("&OK"), this);
- layout->addWidget(ok);
+ tqlayout->addWidget(ok);
}
connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
}
diff --git a/lilo-config/qt/InputBox.h b/lilo-config/qt/InputBox.h
index f4be6e9..1a624c8 100644
--- a/lilo-config/qt/InputBox.h
+++ b/lilo-config/qt/InputBox.h
@@ -33,13 +33,14 @@
#include <tqpushbutton.h>
#include "EditWidget.h"
#include <list>
-class InputBox:public QDialog
+class InputBox:public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef struct { TQString label; TQString dflt; bool isFile; TQString help; } entry;
typedef std::list<entry> entries;
- InputBox(entries e, TQWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0);
+ InputBox(entries e, TQWidget *tqparent=0, const char *name=0, bool hasCancel=true, WFlags f=0);
TQStringList const text() const { TQStringList s; for(std::list<EditWidget*>::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; };
private:
std::list<EditWidget*> edit;
diff --git a/lilo-config/qt/standalone.cpp b/lilo-config/qt/standalone.cpp
index 4dc73e2..acab064 100644
--- a/lilo-config/qt/standalone.cpp
+++ b/lilo-config/qt/standalone.cpp
@@ -33,7 +33,7 @@
#include <ui.h>
#include "standalone.moc"
-Standalone::Standalone(TQWidget *parent, const char *name):TQWidget(parent,name)
+Standalone::Standalone(TQWidget *tqparent, const char *name):TQWidget(tqparent,name)
{
m=new MainWidget(this);
connect(m, TQT_SIGNAL(configChanged()), TQT_SLOT(configChanged()));
@@ -62,14 +62,14 @@ Standalone::Standalone(TQWidget *parent, const char *name):TQWidget(parent,name)
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);
+ setMinimumWidth(actions->tqsizeHint().width()+10);
arrangeWidgets();
}
void Standalone::arrangeWidgets()
{
- m->setGeometry(SPACE_MARGIN, SPACE_MARGIN, width()-2*SPACE_MARGIN, height()-actions->sizeHint().height()-SPACE_MARGIN-SPACE_INSIDE);
- actions->setGeometry(SPACE_MARGIN, height()-actions->sizeHint().height()-SPACE_MARGIN, width()-2*SPACE_MARGIN, actions->sizeHint().height());
+ m->setGeometry(SPACE_MARGIN, SPACE_MARGIN, width()-2*SPACE_MARGIN, height()-actions->tqsizeHint().height()-SPACE_MARGIN-SPACE_INSIDE);
+ actions->setGeometry(SPACE_MARGIN, height()-actions->tqsizeHint().height()-SPACE_MARGIN, width()-2*SPACE_MARGIN, actions->tqsizeHint().height());
}
void Standalone::resizeEvent(TQResizeEvent *e)
diff --git a/lilo-config/qt/standalone.h b/lilo-config/qt/standalone.h
index 3d5c4bf..2131b2a 100644
--- a/lilo-config/qt/standalone.h
+++ b/lilo-config/qt/standalone.h
@@ -32,11 +32,12 @@
#include <tqhbuttongroup.h>
#include <tqevent.h>
#include "mainwidget.h"
-class Standalone: public QWidget
+class Standalone: public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Standalone(TQWidget *parent=0, const char *name=0);
+ Standalone(TQWidget *tqparent=0, const char *name=0);
void resizeEvent(TQResizeEvent *e);
public slots:
void whatsthis();