Qt3->TQt port

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/1/head
Mavridis Philippe 11 months ago
parent 47becbedc6
commit 2fbdf2c098
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -26,8 +26,8 @@
#include "altitemelement.h" #include "altitemelement.h"
#include "altparser.h" #include "altparser.h"
#include <qregexp.h> #include <tqregexp.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
@ -72,9 +72,9 @@ void AddAlternatives::slotOkClicked()
if (!m_textSlave->text().isEmpty()) if (!m_textSlave->text().isEmpty())
{ {
QRegExp reg("\n"); TQRegExp reg("\n");
QStringList slaveList = QStringList::split(reg, m_textSlave->text()); TQStringList slaveList = TQStringList::split(reg, m_textSlave->text());
QStringList::Iterator it = slaveList.begin(); TQStringList::Iterator it = slaveList.begin();
for ( ; it != slaveList.end(); ++it ) for ( ; it != slaveList.end(); ++it )
{ {
a->addSlave(*it); a->addSlave(*it);
@ -92,12 +92,12 @@ void AddAlternatives::slotOkClicked()
m_treeItem->getAltController()->addAltItem(altItem); m_treeItem->getAltController()->addAltItem(altItem);
QString priority; TQString priority;
priority.setNum(a->getPriority()); priority.setNum(a->getPriority());
altItem->setText( 1, priority); altItem->setText( 1, priority);
altItem->setText( 2, a->getPath()); altItem->setText( 2, a->getPath());
QString m_small_desc = altItem->getDescription(); TQString m_small_desc = altItem->getDescription();
if (!m_small_desc.isEmpty()) if (!m_small_desc.isEmpty())
{ {

@ -40,7 +40,7 @@ public:
AddAlternatives(TreeItemElement *treeItem, Kalternatives *kalt, int countSlaves); AddAlternatives(TreeItemElement *treeItem, Kalternatives *kalt, int countSlaves);
virtual ~AddAlternatives(); virtual ~AddAlternatives();
void addSlave(const QString& text){m_textSlave->append(text);} void addSlave(const TQString& text){m_textSlave->append(text);}
protected slots: protected slots:
void slotOkClicked(); void slotOkClicked();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AddAlternativesUi</class> <class>AddAlternativesUi</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>AddAlternatives</cstring> <cstring>AddAlternatives</cstring>
</property> </property>
@ -30,7 +30,7 @@
<property name="resizeMode"> <property name="resizeMode">
<enum>Minimum</enum> <enum>Minimum</enum>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -44,7 +44,7 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -52,7 +52,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -67,7 +67,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout11</cstring> <cstring>layout11</cstring>
</property> </property>
@ -75,7 +75,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -155,7 +155,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout13</cstring> <cstring>layout13</cstring>
</property> </property>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AddSlavesUi</class> <class>AddSlavesUi</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>AddSlaves</cstring> <cstring>AddSlaves</cstring>
</property> </property>
@ -30,7 +30,7 @@
<property name="resizeMode"> <property name="resizeMode">
<enum>Minimum</enum> <enum>Minimum</enum>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout13</cstring> <cstring>layout13</cstring>
</property> </property>
@ -44,7 +44,7 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout12</cstring> <cstring>layout12</cstring>
</property> </property>
@ -52,7 +52,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -81,7 +81,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout13</cstring> <cstring>layout13</cstring>
</property> </property>

@ -35,7 +35,7 @@ AltController::~AltController()
void AltController::setBoutonOnOff(KListView *list, AltItemElement *altItem) void AltController::setBoutonOnOff(KListView *list, AltItemElement *altItem)
{ {
QListViewItemIterator it( list ); TQListViewItemIterator it( list );
AltItemElement *alt; AltItemElement *alt;
while ( it.current() ) while ( it.current() )
{ {
@ -43,7 +43,7 @@ void AltController::setBoutonOnOff(KListView *list, AltItemElement *altItem)
{ {
if((alt!=altItem) && alt->isOn()) if((alt!=altItem) && alt->isOn())
{ {
alt->setState(QCheckListItem::Off); alt->setState(TQCheckListItem::Off);
} }
} }
++it; ++it;

@ -22,11 +22,11 @@
#define _ALTCONTROLLER_H_ #define _ALTCONTROLLER_H_
#include <klistview.h> #include <klistview.h>
#include <qptrlist.h> #include <tqptrlist.h>
class AltItemElement; class AltItemElement;
typedef QPtrList<AltItemElement> AltItemList; typedef TQPtrList<AltItemElement> AltItemList;
class AltController class AltController

@ -23,13 +23,13 @@
#include "altcontroller.h" #include "altcontroller.h"
#include "altparser.h" #include "altparser.h"
#include <qtimer.h> #include <tqtimer.h>
#include <klocale.h> #include <klocale.h>
#include <kdebug.h> #include <kdebug.h>
/******************************* AltItemElement ********************/ /******************************* AltItemElement ********************/
AltItemElement::AltItemElement(KListView *parent, Alternative *alternative) AltItemElement::AltItemElement(KListView *parent, Alternative *alternative)
: QCheckListItem(parent, "", QCheckListItem::RadioButton), : TQCheckListItem(parent, "", TQCheckListItem::RadioButton),
m_alt(alternative), m_alt(alternative),
m_parent(parent), m_parent(parent),
m_bisBroken(alternative->isBroken()), m_bisBroken(alternative->isBroken()),
@ -48,7 +48,7 @@ AltItemElement::~AltItemElement()
void AltItemElement::searchDescription() void AltItemElement::searchDescription()
{ {
QString exec = m_path; TQString exec = m_path;
int posSlash = exec.findRev("/"); int posSlash = exec.findRev("/");
if (posSlash != -1) if (posSlash != -1)
@ -110,7 +110,7 @@ void AltItemElement::slotDescriptionTermined(KProcess *proc)
void AltItemElement::slotGetDescription(KProcess *, char *buffer, int buflen) void AltItemElement::slotGetDescription(KProcess *, char *buffer, int buflen)
{ {
m_desc += QString::fromLatin1(buffer, buflen); m_desc += TQString::fromLatin1(buffer, buflen);
} }

@ -21,23 +21,23 @@
#ifndef _ALTITEMELEMENT_H_ #ifndef _ALTITEMELEMENT_H_
#define _ALTITEMELEMENT_H_ #define _ALTITEMELEMENT_H_
#include <qlistview.h> #include <tqlistview.h>
#include <klistview.h> #include <klistview.h>
#include <qstring.h> #include <tqstring.h>
#include <kprocess.h> #include <kprocess.h>
class Alternative; class Alternative;
class AltController; class AltController;
class AltItemElement : public QObject, public QCheckListItem class AltItemElement : public TQObject, public TQCheckListItem
{ {
Q_OBJECT Q_OBJECT
Alternative *m_alt; Alternative *m_alt;
KListView *m_parent; KListView *m_parent;
bool m_bisBroken; bool m_bisBroken;
QString m_path; TQString m_path;
QString m_desc; TQString m_desc;
public: public:
AltItemElement(KListView *parent, Alternative *alternative ); AltItemElement(KListView *parent, Alternative *alternative );
@ -46,8 +46,8 @@ public:
bool isBroken() const { return m_bisBroken; } bool isBroken() const { return m_bisBroken; }
KListView *getParent() const { return m_parent; } KListView *getParent() const { return m_parent; }
Alternative *getAlternative() { return m_alt; } Alternative *getAlternative() { return m_alt; }
QString getPath() const {return m_path; } TQString getPath() const {return m_path; }
QString getDescription() const {return m_desc;} TQString getDescription() const {return m_desc;}
void searchDescription(); void searchDescription();
private slots: private slots:

@ -19,10 +19,10 @@
***************************************************************************/ ***************************************************************************/
#include "altparser.h" #include "altparser.h"
#include <qfileinfo.h> #include <tqfileinfo.h>
#include <qfile.h> #include <tqfile.h>
#include <qdir.h> #include <tqdir.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
@ -31,7 +31,7 @@
Alternative::Alternative(Item *parentarg) : m_parent(parentarg) Alternative::Alternative(Item *parentarg) : m_parent(parentarg)
{ {
m_priority = 1; m_priority = 1;
m_altSlaves = new QStringList; m_altSlaves = new TQStringList;
} }
// Copy constructor // Copy constructor
@ -40,7 +40,7 @@ Alternative::Alternative(const Alternative &alt) :
m_priority(alt.getPriority()), m_priority(alt.getPriority()),
m_parent(alt.getParent()) m_parent(alt.getParent())
{ {
m_altSlaves = new QStringList( *(alt.m_altSlaves) ); m_altSlaves = new TQStringList( *(alt.m_altSlaves) );
} }
Alternative::~Alternative() Alternative::~Alternative()
@ -56,12 +56,12 @@ Alternative& Alternative::operator=(const Alternative &alt)
m_altPath = alt.getPath(); m_altPath = alt.getPath();
m_priority = alt.getPriority(); m_priority = alt.getPriority();
m_parent = alt.getParent(); m_parent = alt.getParent();
m_altSlaves = new QStringList( *(alt.m_altSlaves) ); m_altSlaves = new TQStringList( *(alt.m_altSlaves) );
} }
return (*this); return (*this);
} }
void Alternative::setSlaves(QStringList *slaves) void Alternative::setSlaves(TQStringList *slaves)
{ {
if(m_altSlaves) delete m_altSlaves; if(m_altSlaves) delete m_altSlaves;
m_altSlaves = slaves; m_altSlaves = slaves;
@ -70,7 +70,7 @@ void Alternative::setSlaves(QStringList *slaves)
bool Alternative::isSelected() const bool Alternative::isSelected() const
{ {
if(m_parent->isBroken()) return false; if(m_parent->isBroken()) return false;
QFileInfo file("/etc/alternatives/"+m_parent->getName()); TQFileInfo file("/etc/alternatives/"+m_parent->getName());
if(!file.isSymLink()) return false; if(!file.isSymLink()) return false;
if(file.readLink() == m_altPath) return 1; if(file.readLink() == m_altPath) return 1;
return 0; return 0;
@ -79,7 +79,7 @@ bool Alternative::isSelected() const
bool Alternative::isBroken() const bool Alternative::isBroken() const
{ {
return !QFile::exists(m_altPath); return !TQFile::exists(m_altPath);
} }
bool Alternative::select() bool Alternative::select()
@ -88,23 +88,23 @@ bool Alternative::select()
if(isSelected()) return true; if(isSelected()) return true;
if(isBroken()) if(isBroken())
{ {
m_selectError = QString("Broken alternative: Unexisting path %1").arg(m_altPath); m_selectError = TQString("Broken alternative: Unexisting path %1").arg(m_altPath);
return false; return false;
} }
// Remove the current link: // Remove the current link:
QString parentPath = QString("/etc/alternatives/%1").arg(m_parent->getName()); TQString parentPath = TQString("/etc/alternatives/%1").arg(m_parent->getName());
QFile origlink(parentPath); TQFile origlink(parentPath);
if(!origlink.remove()) if(!origlink.remove())
{ {
m_selectError = QString("Could not delete alternative link %1: %2").arg(parentPath).arg(origlink.errorString()); m_selectError = TQString("Could not delete alternative link %1: %2").arg(parentPath).arg(origlink.errorString());
return false; return false;
} }
// Then we do the main link: // Then we do the main link:
if(symlink(m_altPath.ascii(), parentPath.ascii()) == -1) if(symlink(m_altPath.ascii(), parentPath.ascii()) == -1)
{ {
m_selectError = QString(strerror(errno)); m_selectError = TQString(strerror(errno));
return false; return false;
} }
@ -113,21 +113,21 @@ bool Alternative::select()
parslaves->setAutoDelete(1); parslaves->setAutoDelete(1);
if(parslaves->count() == 0 || m_altSlaves->count() == 0) return true; if(parslaves->count() == 0 || m_altSlaves->count() == 0) return true;
int count = 0; int count = 0;
QStringList::iterator sl; TQStringList::iterator sl;
Slave *parsl; Slave *parsl;
for( sl = m_altSlaves->begin(); sl != m_altSlaves->end(); ++sl) for( sl = m_altSlaves->begin(); sl != m_altSlaves->end(); ++sl)
{ {
parsl = parslaves->at(count); parsl = parslaves->at(count);
QString parstr = QString("/etc/alternatives/%1").arg(parsl->slname); TQString parstr = TQString("/etc/alternatives/%1").arg(parsl->slname);
QFile parlink(parstr); TQFile parlink(parstr);
if(!parlink.remove()) if(!parlink.remove())
{ {
m_selectError = QString("Could not delete slave alternative link %1: %2").arg(parstr).arg(parlink.errorString()); m_selectError = TQString("Could not delete slave alternative link %1: %2").arg(parstr).arg(parlink.errorString());
return false; return false;
} }
if(symlink( (*sl).ascii(), parstr.ascii()) == -1) if(symlink( (*sl).ascii(), parstr.ascii()) == -1)
{ {
m_selectError = QString(strerror(errno)); m_selectError = TQString(strerror(errno));
return false; return false;
} }
++count; ++count;
@ -239,7 +239,7 @@ void Item::setSlaves(SlaveList *slaves)
this->m_itemSlaves = slaves; this->m_itemSlaves = slaves;
} }
void Item::addSlave(const QString &namearg, const QString &patharg) void Item::addSlave(const TQString &namearg, const TQString &patharg)
{ {
Slave *s = new Slave; Slave *s = new Slave;
s->slname = namearg; s->slname = namearg;
@ -247,9 +247,9 @@ void Item::addSlave(const QString &namearg, const QString &patharg)
m_itemSlaves->append(s); m_itemSlaves->append(s);
} }
void Item::delSlave(const QString &namearg) void Item::delSlave(const TQString &namearg)
{ {
QPtrListIterator<Slave> it(*m_itemSlaves); TQPtrListIterator<Slave> it(*m_itemSlaves);
Slave *s; Slave *s;
while( (s = it.current()) != 0) while( (s = it.current()) != 0)
@ -262,9 +262,9 @@ void Item::delSlave(const QString &namearg)
} }
} }
} }
void Item::delSlaveByPath(const QString &patharg) void Item::delSlaveByPath(const TQString &patharg)
{ {
QPtrListIterator<Slave> it(*m_itemSlaves); TQPtrListIterator<Slave> it(*m_itemSlaves);
Slave *s; Slave *s;
while( (s = it.current()) != 0) while( (s = it.current()) != 0)
@ -278,7 +278,7 @@ void Item::delSlaveByPath(const QString &patharg)
} }
} }
Alternative *Item::getAlternative(const QString &altpath) Alternative *Item::getAlternative(const TQString &altpath)
{ {
Alternative *a; Alternative *a;
for(a = m_itemAlts->first(); a; a = m_itemAlts->next()) for(a = m_itemAlts->first(); a; a = m_itemAlts->next())
@ -298,9 +298,9 @@ void Item::setAlternatives(AltsPtrList &alts)
this->m_itemAlts = &alts; this->m_itemAlts = &alts;
} }
void Item::delAlternativeByPath(const QString &patharg) void Item::delAlternativeByPath(const TQString &patharg)
{ {
QPtrListIterator<Alternative> it(*m_itemAlts); TQPtrListIterator<Alternative> it(*m_itemAlts);
Alternative *a; Alternative *a;
while( (a = it.current()) != 0) while( (a = it.current()) != 0)
@ -316,7 +316,7 @@ void Item::delAlternativeByPath(const QString &patharg)
void Item::delAlternativeByPriority(int priorityarg) void Item::delAlternativeByPriority(int priorityarg)
{ {
QPtrListIterator<Alternative> it(*m_itemAlts); TQPtrListIterator<Alternative> it(*m_itemAlts);
Alternative *a; Alternative *a;
while( (a = it.current()) != 0) while( (a = it.current()) != 0)
@ -332,12 +332,12 @@ void Item::delAlternativeByPriority(int priorityarg)
bool Item::isBroken() const bool Item::isBroken() const
{ {
return !QFile::exists(m_path); return !TQFile::exists(m_path);
} }
/********************** AltFIlesManager ************/ /********************** AltFIlesManager ************/
AltFilesManager::AltFilesManager(const QString &altdirarg) : AltFilesManager::AltFilesManager(const TQString &altdirarg) :
m_altdir(altdirarg) m_altdir(altdirarg)
{ {
m_itemlist = new ItemPtrList; m_itemlist = new ItemPtrList;
@ -365,9 +365,9 @@ AltFilesManager::~AltFilesManager()
*/ */
} }
Item* AltFilesManager::getItem(const QString &name) const Item* AltFilesManager::getItem(const TQString &name) const
{ {
QPtrListIterator<Item> it(*m_itemlist); TQPtrListIterator<Item> it(*m_itemlist);
Item *i; Item *i;
while( (i = it.current()) != 0) while( (i = it.current()) != 0)
{ {
@ -381,17 +381,17 @@ Item* AltFilesManager::getItem(const QString &name) const
return NULL; return NULL;
} }
bool AltFilesManager::parseAltFiles(QString &errorstr) bool AltFilesManager::parseAltFiles(TQString &errorstr)
{ {
QDir d(m_altdir); TQDir d(m_altdir);
QStringList fileList = d.entryList(); TQStringList fileList = d.entryList();
QStringList lines; TQStringList lines;
QFile altFile; TQFile altFile;
QString line, tmp; TQString line, tmp;
int nslaves; int nslaves;
unsigned int index, slavesend; unsigned int index, slavesend;
for( QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it) for( TQStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it)
{ {
Item *item = new Item; Item *item = new Item;
if(*it == "." || *it == "..") { if(*it == "." || *it == "..") {
@ -557,8 +557,8 @@ void AltFilesManager::debugPrintAlts() const
printf("\t\t\tNo slaves\n"); printf("\t\t\tNo slaves\n");
else else
{ {
QStringList altslaves = *(a->getSlaves()); TQStringList altslaves = *(a->getSlaves());
QStringList::iterator sl; TQStringList::iterator sl;
for( sl = altslaves.begin(); sl != altslaves.end(); ++sl) for( sl = altslaves.begin(); sl != altslaves.end(); ++sl)
{ {
printf("\t\t\t%s\n", (*sl).ascii()); printf("\t\t\t%s\n", (*sl).ascii());

@ -27,10 +27,10 @@
// //
//Quitar el stdio.h //Quitar el stdio.h
#include <qstring.h> #include <tqstring.h>
#include <qobject.h> #include <tqobject.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qstringlist.h> #include <tqstringlist.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
@ -40,17 +40,17 @@ class Item;
struct Slave struct Slave
{ {
QString slname; TQString slname;
QString slpath; TQString slpath;
}; };
class Alternative class Alternative
{ {
QString m_altPath; TQString m_altPath;
QString m_selectError; TQString m_selectError;
int m_priority; int m_priority;
Item *m_parent; Item *m_parent;
QStringList *m_altSlaves; TQStringList *m_altSlaves;
public: public:
Alternative(Item *parentarg); Alternative(Item *parentarg);
Alternative(const Alternative &alt); Alternative(const Alternative &alt);
@ -58,29 +58,29 @@ public:
Alternative& operator=(const Alternative &alt); Alternative& operator=(const Alternative &alt);
Item* getParent() const { return m_parent; } Item* getParent() const { return m_parent; }
QString getPath() const { return m_altPath; } TQString getPath() const { return m_altPath; }
void setPath(const QString &patharg) { m_altPath = patharg; } void setPath(const TQString &patharg) { m_altPath = patharg; }
int getPriority() const { return m_priority; } int getPriority() const { return m_priority; }
void setPriority(int priorityarg) { m_priority = priorityarg; } void setPriority(int priorityarg) { m_priority = priorityarg; }
QStringList* getSlaves() const { return m_altSlaves; } TQStringList* getSlaves() const { return m_altSlaves; }
void setSlaves(QStringList *m_altSlaves); void setSlaves(TQStringList *m_altSlaves);
void addSlave(const QString &slave) { m_altSlaves->append(slave); } void addSlave(const TQString &slave) { m_altSlaves->append(slave); }
uint countSlaves() const { return m_altSlaves->count(); } uint countSlaves() const { return m_altSlaves->count(); }
QString getSlave(int pos) const { return *(m_altSlaves->at(pos)); } TQString getSlave(int pos) const { return *(m_altSlaves->at(pos)); }
bool isSelected() const; bool isSelected() const;
bool isBroken() const; bool isBroken() const;
bool select(); bool select();
QString getSelectError() const { return m_selectError; } TQString getSelectError() const { return m_selectError; }
}; };
typedef QPtrList<Slave> SlaveList; typedef TQPtrList<Slave> SlaveList;
typedef QPtrList<Alternative> AltsPtrList; typedef TQPtrList<Alternative> AltsPtrList;
class Item class Item
{ {
QString m_name; TQString m_name;
QString m_mode; TQString m_mode;
QString m_path; TQString m_path;
SlaveList *m_itemSlaves; SlaveList *m_itemSlaves;
AltsPtrList *m_itemAlts; AltsPtrList *m_itemAlts;
public: public:
@ -91,49 +91,49 @@ public:
Item& operator=(const Item &item); Item& operator=(const Item &item);
Alternative* getSelected() const; Alternative* getSelected() const;
QString getName() const { return m_name; } TQString getName() const { return m_name; }
void setName(const QString &namearg) { m_name = namearg; } void setName(const TQString &namearg) { m_name = namearg; }
QString getMode() const { return m_mode; } TQString getMode() const { return m_mode; }
//Check the input (FIXME) //Check the input (FIXME)
void setMode(const QString &modearg) { m_mode = modearg; } void setMode(const TQString &modearg) { m_mode = modearg; }
QString getPath() const { return m_path; } TQString getPath() const { return m_path; }
void setPath(const QString &patharg) { m_path = patharg; } void setPath(const TQString &patharg) { m_path = patharg; }
SlaveList *getSlaves() const { return m_itemSlaves; } SlaveList *getSlaves() const { return m_itemSlaves; }
void setSlaves(SlaveList *slaves); void setSlaves(SlaveList *slaves);
void addSlave(const QString &namearg, const QString &patharg); void addSlave(const TQString &namearg, const TQString &patharg);
void delSlave(const QString &namearg); void delSlave(const TQString &namearg);
void delSlaveByPath(const QString &patharg); void delSlaveByPath(const TQString &patharg);
AltsPtrList *getAlternatives() const { return m_itemAlts; } AltsPtrList *getAlternatives() const { return m_itemAlts; }
Alternative *getAlternative(const QString &altpath); Alternative *getAlternative(const TQString &altpath);
void setAlternatives(AltsPtrList &alts); void setAlternatives(AltsPtrList &alts);
int countAlternatives() const { return m_itemAlts->count(); } int countAlternatives() const { return m_itemAlts->count(); }
void delAlternativeByPath(const QString &patharg); void delAlternativeByPath(const TQString &patharg);
void delAlternativeByPriority(int priorityarg); void delAlternativeByPriority(int priorityarg);
void addAlternative(Alternative *altarg) { m_itemAlts->append(altarg); } void addAlternative(Alternative *altarg) { m_itemAlts->append(altarg); }
bool isBroken() const; bool isBroken() const;
}; };
typedef QPtrList<Item> ItemPtrList; typedef TQPtrList<Item> ItemPtrList;
class AltFilesManager class AltFilesManager
{ {
ItemPtrList *m_itemlist; ItemPtrList *m_itemlist;
QString m_altdir; TQString m_altdir;
QString m_errorMsg; TQString m_errorMsg;
bool m_parseOk; bool m_parseOk;
bool parseAltFiles(QString &errorstr); bool parseAltFiles(TQString &errorstr);
public: public:
AltFilesManager(const QString &altdir); AltFilesManager(const TQString &altdir);
~AltFilesManager(); ~AltFilesManager();
ItemPtrList* getGlobalAlternativeList() const { return this->m_itemlist; } ItemPtrList* getGlobalAlternativeList() const { return this->m_itemlist; }
bool parsingOk() const { return m_parseOk; } bool parsingOk() const { return m_parseOk; }
QString getErrorMsg() const { return m_errorMsg; } TQString getErrorMsg() const { return m_errorMsg; }
Item* getItem (const QString &name) const; Item* getItem (const TQString &name) const;
//FIXME: Put in a #ifdef //FIXME: Put in a #ifdef
void debugPrintAlts() const; void debugPrintAlts() const;
QString getAltDir() { return m_altdir ;} TQString getAltDir() { return m_altdir ;}
//protected: //protected:
//virtual int compareItems(Item i1, Item i2); //virtual int compareItems(Item i1, Item i2);
}; };

@ -30,32 +30,32 @@
#include "addalternatives.h" #include "addalternatives.h"
#include "mainwindow.h" #include "mainwindow.h"
#include <qtimer.h> #include <tqtimer.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kaboutdialog.h> #include <kaboutdialog.h>
#include <ktextedit.h> #include <ktextedit.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <klocale.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qfile.h> #include <tqfile.h>
#include <qtextstream.h> #include <tqtextstream.h>
#include <kgenericfactory.h> #include <kgenericfactory.h>
#include <kstdguiitem.h> #include <kstdguiitem.h>
#include <kdeversion.h> #include <kdeversion.h>
typedef KGenericFactory<Kalternatives, QWidget> KalternativesFactory; typedef KGenericFactory<Kalternatives, TQWidget> KalternativesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kalternatives, KalternativesFactory("kcmkalternatives")) K_EXPORT_COMPONENT_FACTORY( kcm_kalternatives, KalternativesFactory("kcmkalternatives"))
extern "C" extern "C"
{ {
KCModule *create_kalternatives(QWidget *parent, const char *name) KCModule *create_kalternatives(TQWidget *parent, const char *name)
{ {
return new Kalternatives(parent, name); return new Kalternatives(parent, name);
}; };
} }
Kalternatives::Kalternatives(QWidget *parent, const char *name, const QStringList&) Kalternatives::Kalternatives(TQWidget *parent, const char *name, const TQStringList&)
:KCModule(/*KalternativesFactory::instance(), */parent, name), myAboutData(0) :KCModule(/*KalternativesFactory::instance(), */parent, name), myAboutData(0)
{ {
setUseRootOnlyMsg(false); setUseRootOnlyMsg(false);
@ -80,12 +80,12 @@ m_mgr = new AltFilesManager("/var/lib/rpm/alternatives");
m_mgr = new AltFilesManager("/var/lib/dpkg/alternatives"); m_mgr = new AltFilesManager("/var/lib/dpkg/alternatives");
#else #else
KMessageBox::sorry(this, i18n("Kalternatives only work on Debian- or Mandrake-based systems"), i18n("Wrong System Type")); KMessageBox::sorry(this, i18n("Kalternatives only work on Debian- or Mandrake-based systems"), i18n("Wrong System Type"));
QTimer::singleShot(0, this, SLOT(die())); TQTimer::singleShot(0, this, SLOT(die()));
#endif #endif
#endif #endif
MainWindow *mainwindow = new MainWindow(this); MainWindow *mainwindow = new MainWindow(this);
QBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint()); TQBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
layout->addWidget( mainwindow ); layout->addWidget( mainwindow );
layout->activate(); layout->activate();
@ -94,11 +94,11 @@ m_mgr = new AltFilesManager("/var/lib/rpm/alternatives");
connect(mainwindow->m_hideAlt, SIGNAL(clicked()), this, connect(mainwindow->m_hideAlt, SIGNAL(clicked()), this,
SLOT(slotHideAlternativesClicked())); SLOT(slotHideAlternativesClicked()));
connect(mainwindow->m_altList, SIGNAL(selectionChanged( QListViewItem* )), this, connect(mainwindow->m_altList, SIGNAL(selectionChanged( TQListViewItem* )), this,
SLOT(slotSelectAlternativesClicked(QListViewItem *))); SLOT(slotSelectAlternativesClicked(TQListViewItem *)));
connect(mainwindow->m_optionsList, SIGNAL(clicked(QListViewItem *)), connect(mainwindow->m_optionsList, SIGNAL(clicked(TQListViewItem *)),
this, SLOT(slotOptionClicked(QListViewItem *))); this, SLOT(slotOptionClicked(TQListViewItem *)));
connect(mainwindow->m_bAdd, SIGNAL(clicked()), this, connect(mainwindow->m_bAdd, SIGNAL(clicked()), this,
SLOT(slotAddClicked())); SLOT(slotAddClicked()));
connect(mainwindow->m_bDelete, SIGNAL(clicked()), this, connect(mainwindow->m_bDelete, SIGNAL(clicked()), this,
@ -161,7 +161,7 @@ void Kalternatives::die()
void Kalternatives::load() void Kalternatives::load()
{ {
clearList(m_altList); clearList(m_altList);
QPtrList<Item> *itemslist = m_mgr->getGlobalAlternativeList(); TQPtrList<Item> *itemslist = m_mgr->getGlobalAlternativeList();
Item *i; Item *i;
TreeItemElement *treeit; TreeItemElement *treeit;
for(i = itemslist->first(); i; i = itemslist->next()) for(i = itemslist->first(); i; i = itemslist->next())
@ -188,8 +188,8 @@ void Kalternatives::load()
void Kalternatives::clearList(KListView* list) void Kalternatives::clearList(KListView* list)
{ {
QListViewItemIterator it( list ); TQListViewItemIterator it( list );
QListViewItem *tmp; TQListViewItem *tmp;
while( (tmp=it.current()) ) while( (tmp=it.current()) )
{ {
it++; it++;
@ -198,7 +198,7 @@ void Kalternatives::clearList(KListView* list)
} }
void Kalternatives::slotSelectAlternativesClicked(QListViewItem *alternative) void Kalternatives::slotSelectAlternativesClicked(TQListViewItem *alternative)
{ {
clearList(m_optionsList); clearList(m_optionsList);
TreeItemElement *treeItem; TreeItemElement *treeItem;
@ -215,14 +215,14 @@ void Kalternatives::slotSelectAlternativesClicked(QListViewItem *alternative)
{ {
Alternative *a = altItem->getAlternative(); Alternative *a = altItem->getAlternative();
QString priority; TQString priority;
priority.setNum(a->getPriority()); priority.setNum(a->getPriority());
m_optionsList->insertItem(altItem); m_optionsList->insertItem(altItem);
altItem->setText( 1, priority); altItem->setText( 1, priority);
altItem->setText( 2, a->getPath()); altItem->setText( 2, a->getPath());
QString m_small_desc = altItem->getDescription(); TQString m_small_desc = altItem->getDescription();
if (!m_small_desc.isEmpty()) if (!m_small_desc.isEmpty())
{ {
@ -243,9 +243,9 @@ void Kalternatives::slotHideAlternativesClicked()
{ {
if (m_hideAlt->isChecked ()) if (m_hideAlt->isChecked ())
{ {
QListViewItemIterator it( m_altList ); TQListViewItemIterator it( m_altList );
TreeItemElement *i; TreeItemElement *i;
QListViewItem *tmp; TQListViewItem *tmp;
while ( it.current() ) while ( it.current() )
{ {
if((i = dynamic_cast<TreeItemElement *>(it.current()))) if((i = dynamic_cast<TreeItemElement *>(it.current())))
@ -269,7 +269,7 @@ void Kalternatives::slotHideAlternativesClicked()
} }
void Kalternatives::slotOptionClicked(QListViewItem *option) void Kalternatives::slotOptionClicked(TQListViewItem *option)
{ {
AltItemElement *altItem; AltItemElement *altItem;
if((altItem = dynamic_cast<AltItemElement *>(option))) if((altItem = dynamic_cast<AltItemElement *>(option)))
@ -330,7 +330,7 @@ void Kalternatives::slotPropertiesClicked()
if((altItem = dynamic_cast<AltItemElement *>(m_optionsList->selectedItem()))) if((altItem = dynamic_cast<AltItemElement *>(m_optionsList->selectedItem())))
{ {
QString text; TQString text;
PropertiesWindow *prop = new PropertiesWindow(this); PropertiesWindow *prop = new PropertiesWindow(this);
prop->bClose->setGuiItem(KStdGuiItem::close()); prop->bClose->setGuiItem(KStdGuiItem::close());
@ -341,10 +341,10 @@ void Kalternatives::slotPropertiesClicked()
text += i18n( "Path : %1\n" ).arg( a->getPath() ); text += i18n( "Path : %1\n" ).arg( a->getPath() );
text += i18n( "Priority : %1\n" ).arg( a->getPriority() ); text += i18n( "Priority : %1\n" ).arg( a->getPriority() );
QStringList* slavesList = a->getSlaves(); TQStringList* slavesList = a->getSlaves();
text += i18n( "Slave :", "Slaves :", slavesList->count() ); text += i18n( "Slave :", "Slaves :", slavesList->count() );
for ( QStringList::Iterator it = slavesList->begin(); it != slavesList->end(); ++it ) for ( TQStringList::Iterator it = slavesList->begin(); it != slavesList->end(); ++it )
{ {
text += "\n\t"; text += "\n\t";
text += *it; text += *it;
@ -357,7 +357,7 @@ void Kalternatives::slotPropertiesClicked()
void Kalternatives::save() void Kalternatives::save()
{ {
QListViewItemIterator it( m_altList ); TQListViewItemIterator it( m_altList );
TreeItemElement *treeItem; TreeItemElement *treeItem;
while ( it.current() ) while ( it.current() )
@ -366,11 +366,11 @@ void Kalternatives::save()
{ {
if(treeItem->isNbrAltChanged()) if(treeItem->isNbrAltChanged())
{ {
QString parentPath = QString("%1/%2") TQString parentPath = TQString("%1/%2")
.arg(m_mgr->getAltDir()) .arg(m_mgr->getAltDir())
.arg(treeItem->getName()); .arg(treeItem->getName());
QFile origFile(parentPath); TQFile origFile(parentPath);
if(origFile.exists()) if(origFile.exists())
{ {
origFile.remove(); origFile.remove();
@ -378,7 +378,7 @@ void Kalternatives::save()
if( origFile.open( IO_WriteOnly )) if( origFile.open( IO_WriteOnly ))
{ {
QTextStream stream( &origFile ); TQTextStream stream( &origFile );
Item *item = treeItem->getItem(); Item *item = treeItem->getItem();
@ -405,8 +405,8 @@ void Kalternatives::save()
stream << a->getPath() << endl; stream << a->getPath() << endl;
stream << a->getPriority() << endl; stream << a->getPriority() << endl;
QStringList *slaveList = a->getSlaves(); TQStringList *slaveList = a->getSlaves();
QStringList::Iterator it = slaveList->begin(); TQStringList::Iterator it = slaveList->begin();
for ( ; it != slaveList->end(); ++it ) for ( ; it != slaveList->end(); ++it )
{ {
stream << *it << endl; stream << *it << endl;
@ -446,7 +446,7 @@ void Kalternatives::configChanged()
} }
QString Kalternatives::quickHelp() const TQString Kalternatives::quickHelp() const
{ {
return i18n("<h1>Kalternatives</h1>\n" return i18n("<h1>Kalternatives</h1>\n"
"A Mandrake/Debian alternatives-system manager."); "A Mandrake/Debian alternatives-system manager.");

@ -31,9 +31,9 @@
#include <klistview.h> #include <klistview.h>
#include <kpushbutton.h> #include <kpushbutton.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <qwidget.h> #include <tqwidget.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kcmodule.h> #include <kcmodule.h>
#include <kaboutdata.h> #include <kaboutdata.h>
@ -50,31 +50,31 @@ class Kalternatives : public KCModule
KListView* m_optionsList; KListView* m_optionsList;
KListView* m_altList; KListView* m_altList;
KComboBox* m_statusCombo; KComboBox* m_statusCombo;
QLabel* m_altTilte; TQLabel* m_altTilte;
QCheckBox* m_hideAlt; TQCheckBox* m_hideAlt;
KAboutData *myAboutData; KAboutData *myAboutData;
void clearList(KListView* list); void clearList(KListView* list);
public: public:
Kalternatives(QWidget *parent=0, const char *name=0, const QStringList& = QStringList() ); Kalternatives(TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() );
virtual ~Kalternatives(); virtual ~Kalternatives();
KListView *optionsList() const {return m_optionsList;} KListView *optionsList() const {return m_optionsList;}
bool isBisRoot() const {return m_bisRoot;} bool isBisRoot() const {return m_bisRoot;}
virtual void load(); virtual void load();
virtual void save(); virtual void save();
virtual QString quickHelp() const; virtual TQString quickHelp() const;
virtual const KAboutData *aboutData()const { return myAboutData; }; virtual const KAboutData *aboutData()const { return myAboutData; };
public slots: public slots:
void configChanged(); void configChanged();
private slots: private slots:
void slotSelectAlternativesClicked(QListViewItem *); void slotSelectAlternativesClicked(TQListViewItem *);
void slotHideAlternativesClicked(); void slotHideAlternativesClicked();
void die(); void die();
void slotOptionClicked(QListViewItem *option); void slotOptionClicked(TQListViewItem *option);
void slotAddClicked(); void slotAddClicked();
void slotDeleteClicked(); void slotDeleteClicked();
void slotPropertiesClicked(); void slotPropertiesClicked();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>MainWindow</class> <class>MainWindow</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>Kalternatives</cstring> <cstring>Kalternatives</cstring>
</property> </property>
@ -33,14 +33,14 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QSplitter" row="0" column="0"> <widget class="TQSplitter" row="0" column="0">
<property name="name"> <property name="name">
<cstring>splitter2</cstring> <cstring>splitter2</cstring>
</property> </property>
<property name="orientation"> <property name="orientation">
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -67,7 +67,7 @@
<enum>LastColumn</enum> <enum>LastColumn</enum>
</property> </property>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox3</cstring> <cstring>groupBox3</cstring>
</property> </property>
@ -98,7 +98,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox" row="0" column="0"> <widget class="TQCheckBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_hideAlt</cstring> <cstring>m_hideAlt</cstring>
</property> </property>
@ -121,7 +121,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout24</cstring> <cstring>layout24</cstring>
</property> </property>
@ -129,7 +129,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout22</cstring> <cstring>layout22</cstring>
</property> </property>
@ -137,7 +137,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5_2</cstring> <cstring>layout5_2</cstring>
</property> </property>
@ -145,7 +145,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -208,7 +208,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_altTilte</cstring> <cstring>m_altTilte</cstring>
</property> </property>
@ -316,7 +316,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PropertiesWindow</class> <class>PropertiesWindow</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>PropertiesWindow</cstring> <cstring>PropertiesWindow</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout17</cstring> <cstring>layout17</cstring>
</property> </property>
@ -49,7 +49,7 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>

@ -21,14 +21,14 @@
#include "treeitemelement.h" #include "treeitemelement.h"
#include "altparser.h" #include "altparser.h"
#include "altcontroller.h" #include "altcontroller.h"
#include <qfont.h> #include <tqfont.h>
#include <qpainter.h> #include <tqpainter.h>
#include <iostream> #include <iostream>
using namespace std; using namespace std;
TreeItemElement::TreeItemElement(KListView *parent, Item *itemarg, AltController *altControl ) TreeItemElement::TreeItemElement(KListView *parent, Item *itemarg, AltController *altControl )
: QListViewItem(parent, itemarg->getName()), : TQListViewItem(parent, itemarg->getName()),
m_item(itemarg), m_item(itemarg),
m_name(itemarg->getName()), m_name(itemarg->getName()),
m_changed(FALSE), m_changed(FALSE),
@ -42,29 +42,29 @@ TreeItemElement::~TreeItemElement()
{ {
} }
void TreeItemElement::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) void TreeItemElement::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{ {
QColor color; TQColor color;
if (m_changed || m_nbrAltChanged) if (m_changed || m_nbrAltChanged)
{ {
color=QColor("red"); color=TQColor("red");
QFont f = p->font(); TQFont f = p->font();
f.setBold(true); f.setBold(true);
p->setFont(f); p->setFont(f);
} }
// the pallet of colors is saved // the pallet of colors is saved
QColorGroup _cg( cg ); TQColorGroup _cg( cg );
QColor oldText=_cg.text(); TQColor oldText=_cg.text();
// modification of the pallet of colors by defining // modification of the pallet of colors by defining
//our new color as color of text //our new color as color of text
_cg.setColor( QColorGroup::Text, color ); _cg.setColor( TQColorGroup::Text, color );
QListViewItem::paintCell( p, _cg, column, width, align ); TQListViewItem::paintCell( p, _cg, column, width, align );
// restoration of the pallet of "standard" colors // restoration of the pallet of "standard" colors
_cg.setColor( QColorGroup::Text, oldText ); _cg.setColor( TQColorGroup::Text, oldText );
} }

@ -21,19 +21,19 @@
#ifndef _TREEITEMELEMENT_H_ #ifndef _TREEITEMELEMENT_H_
#define _TREEITEMELEMENT_H_ #define _TREEITEMELEMENT_H_
#include <qstring.h> #include <tqstring.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qlistview.h> #include <tqlistview.h>
#include <klistview.h> #include <klistview.h>
class AltController; class AltController;
class Item; class Item;
class TreeItemElement : public QListViewItem class TreeItemElement : public TQListViewItem
{ {
Item *m_item; Item *m_item;
QString m_name; TQString m_name;
bool m_changed; bool m_changed;
bool m_nbrAltChanged; bool m_nbrAltChanged;
AltController *m_altControl; AltController *m_altControl;
@ -42,7 +42,7 @@ public:
TreeItemElement(KListView *parent, Item *itemarg, AltController *altControl); TreeItemElement(KListView *parent, Item *itemarg, AltController *altControl);
~TreeItemElement(); ~TreeItemElement();
QString getName() const { return m_name; } TQString getName() const { return m_name; }
Item *getItem() const { return m_item; } Item *getItem() const { return m_item; }
void setChanged(bool c) { m_changed = c; } void setChanged(bool c) { m_changed = c; }
bool isChanged() const { return m_changed; } bool isChanged() const { return m_changed; }
@ -50,7 +50,7 @@ public:
bool isNbrAltChanged() const { return m_nbrAltChanged; } bool isNbrAltChanged() const { return m_nbrAltChanged; }
AltController *getAltController() {return m_altControl;} AltController *getAltController() {return m_altControl;}
virtual void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ); virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
}; };
#endif //_TREEITEMELEMENT_H_ #endif //_TREEITEMELEMENT_H_

Loading…
Cancel
Save