From 586a5f786f9af3ddccdb6eba16fd529a5e88ed4c Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 15 Oct 2011 09:34:36 +0000 Subject: Raw TQt conversion of kiosktool git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kiosktool@1258970 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kiosktool/component.cpp | 4 +- kiosktool/component.h | 7 +- kiosktool/componentPage.cpp | 98 +++--- kiosktool/componentPage.h | 11 +- kiosktool/componentPage_ui.ui | 30 +- kiosktool/componentSelectionPage.cpp | 36 +-- kiosktool/componentSelectionPage.h | 11 +- kiosktool/componentSelectionPage_ui.ui | 20 +- kiosktool/desktopComponent.cpp | 70 ++--- kiosktool/desktopComponent.h | 13 +- kiosktool/filetypeeditComponent.cpp | 34 +- kiosktool/filetypeeditComponent.h | 7 +- kiosktool/kcms/autostart/kcmautostart.cpp | 78 ++--- kiosktool/kcms/autostart/kcmautostart.h | 24 +- kiosktool/kioskConfigDialog.cpp | 34 +- kiosktool/kioskConfigDialog.h | 3 +- kiosktool/kioskConfigDialog_ui.ui | 50 +-- kiosktool/kioskdata.cpp | 78 ++--- kiosktool/kioskdata.h | 66 ++-- kiosktool/kioskgui.cpp | 164 +++++----- kiosktool/kioskgui.h | 15 +- kiosktool/kioskrun.cpp | 500 +++++++++++++++--------------- kiosktool/kioskrun.h | 116 +++---- kiosktool/kiosksync.cpp | 56 ++-- kiosktool/kiosksync.h | 37 +-- kiosktool/kiosktool-kdedirs.cpp | 52 ++-- kiosktool/main.cpp | 4 +- kiosktool/mainview.ui | 40 +-- kiosktool/menueditComponent.cpp | 72 ++--- kiosktool/menueditComponent.h | 7 +- kiosktool/pageWidget.cpp | 32 +- kiosktool/pageWidget.h | 14 +- kiosktool/panelComponent.cpp | 16 +- kiosktool/panelComponent.h | 7 +- kiosktool/profilePropsPage.cpp | 62 ++-- kiosktool/profilePropsPage.h | 13 +- kiosktool/profilePropsPage_ui.ui | 32 +- kiosktool/profileSelectionPage_ui.ui | 30 +- kiosktool/screensaverComponent.cpp | 4 +- kiosktool/screensaverComponent.h | 7 +- kiosktool/userManagement.cpp | 96 +++--- kiosktool/userManagement.h | 11 +- kiosktool/userManagementGroup_ui.ui | 22 +- kiosktool/userManagementUser_ui.ui | 22 +- kiosktool/userManagement_ui.ui | 38 +-- 45 files changed, 1080 insertions(+), 1063 deletions(-) diff --git a/kiosktool/component.cpp b/kiosktool/component.cpp index f00c414..00b98bc 100644 --- a/kiosktool/component.cpp +++ b/kiosktool/component.cpp @@ -19,8 +19,8 @@ #include "component.h" -Component::Component( QObject *parent) - : QObject(parent) +Component::Component( TQObject *parent) + : TQObject(parent) { } diff --git a/kiosktool/component.h b/kiosktool/component.h index a9c4cd2..0966989 100644 --- a/kiosktool/component.h +++ b/kiosktool/component.h @@ -19,13 +19,14 @@ #ifndef _COMPONENT_H_ #define _COMPONENT_H_ -#include +#include -class Component : public QObject +class Component : public TQObject { Q_OBJECT + TQ_OBJECT public: - Component( QObject *parent); + Component( TQObject *parent); virtual ~Component(); virtual bool setupFinished(); diff --git a/kiosktool/componentPage.cpp b/kiosktool/componentPage.cpp index 4793db4..3f7e3a7 100644 --- a/kiosktool/componentPage.cpp +++ b/kiosktool/componentPage.cpp @@ -19,12 +19,12 @@ #include "componentPage.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -40,15 +40,15 @@ #include "kioskdata.h" #include "kioskrun.h" -ComponentPage::ComponentPage( ComponentData *data, Component *component, QWidget* parent, const char* name, WFlags fl ) +ComponentPage::ComponentPage( ComponentData *data, Component *component, TQWidget* parent, const char* name, WFlags fl ) : ComponentPageUI(parent, name, fl), PageWidget(this), m_data(data), m_component(component) { m_process = 0; - connect(pbSetup, SIGNAL(clicked()), this, SLOT(slotSetup())); - connect(pbPreview, SIGNAL(clicked()), this, SLOT(slotPreview())); + connect(pbSetup, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetup())); + connect(pbPreview, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPreview())); - pbSetup->setText(i18n("&Setup %1").arg(m_data->caption)); - pbPreview->setText(i18n("&Preview %1").arg(m_data->caption)); + pbSetup->setText(i18n("&Setup %1").tqarg(m_data->caption)); + pbPreview->setText(i18n("&Preview %1").tqarg(m_data->caption)); if (m_data->preview.exec.isEmpty()) pbPreview->hide(); @@ -63,14 +63,14 @@ ComponentPage::ComponentPage( ComponentData *data, Component *component, QWidget if (firstTime) { firstTime = false; - QTimer::singleShot(0, this, SLOT(slotShowNotice())); + TQTimer::singleShot(0, this, TQT_SLOT(slotShowNotice())); } } fillActionList(listComponentConfig, m_data); - connect(listComponentConfig, SIGNAL(currentChanged(QListViewItem *)), - this, SLOT(slotShowAction(QListViewItem *))); + connect(listComponentConfig, TQT_SIGNAL(currentChanged(TQListViewItem *)), + this, TQT_SLOT(slotShowAction(TQListViewItem *))); slotShowAction(listComponentConfig->currentItem()); } @@ -101,9 +101,9 @@ void ComponentPage::setFocus() listComponentConfig->setFocus(); } -QString ComponentPage::subCaption() +TQString ComponentPage::subCaption() { - return i18n("Setup %1").arg(m_data->caption); + return i18n("Setup %1").tqarg(m_data->caption); } void ComponentPage::slotSetup() @@ -113,15 +113,15 @@ void ComponentPage::slotSetup() m_process->kill(); delete m_process; } - QCString dcopApp = m_data->setup.dcop.utf8(); - QCString dcopObj = "qt/" + dcopApp; + TQCString dcopApp = m_data->setup.dcop.utf8(); + TQCString dcopObj = "qt/" + dcopApp; if (!dcopApp.isEmpty() && m_data->setup.hasOption("restart")) DCOPRef(dcopApp, dcopObj).call("quit"); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) ); if (!KioskRun::self()->prepare()) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::sorry(this, i18n("There was an unexpected problem with the runtime environment.")); return; @@ -129,22 +129,22 @@ void ComponentPage::slotSetup() KioskRun::self()->makeMutable(true); if (!save()) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return; } if (m_component) m_component->slotSetupPrepare(); KioskRun::self()->updateSycoca(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if (!dcopApp.isEmpty()) { KioskRun::self()->dcopClient()->setNotifications(true); - connect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )), - this, SLOT(slotSetupAppRegistered( const QCString& ))); + connect(KioskRun::self()->dcopClient(), TQT_SIGNAL(applicationRegistered( const TQCString& )), + this, TQT_SLOT(slotSetupAppRegistered( const TQCString& ))); } - QStringList args; + TQStringList args; if (m_data->setup.hasOption("nofork")) args << "--nofork"; @@ -154,7 +154,7 @@ void ComponentPage::slotSetup() int result = KMessageBox::questionYesNo(this, i18n("You can now configure %1. " "When you are finished click Save to make the new configuration permanent.") - .arg(m_data->caption), i18n("%1 Setup").arg(m_data->caption), + .tqarg(m_data->caption), i18n("%1 Setup").tqarg(m_data->caption), KStdGuiItem::save(), KStdGuiItem::discard()); m_saveSettings = (result == KMessageBox::Yes); if (!dcopApp.isEmpty()) @@ -162,7 +162,7 @@ void ComponentPage::slotSetup() if (m_process->isRunning()) { - connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotPreviewDone())); + connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotPreviewDone())); } else { @@ -176,8 +176,8 @@ void ComponentPage::slotSetupDone() m_process = 0; KioskRun::self()->dcopClient()->setNotifications(false); - disconnect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )), - this, SLOT(slotSetupAppRegistered( const QCString& ))); + disconnect(KioskRun::self()->dcopClient(), TQT_SIGNAL(applicationRegistered( const TQCString& )), + this, TQT_SLOT(slotSetupAppRegistered( const TQCString& ))); KioskRun::self()->makeMutable(false); if (m_saveSettings) @@ -189,8 +189,8 @@ void ComponentPage::slotSetupDone() if (!result) return; // Find new config files. - QStringList newFiles = KioskRun::self()->newConfigFiles(); - for(QStringList::ConstIterator it = newFiles.begin(); + TQStringList newFiles = KioskRun::self()->newConfigFiles(); + for(TQStringList::ConstIterator it = newFiles.begin(); it != newFiles.end(); ++it) { if (m_data->ignoreFiles.contains(*it)) @@ -207,9 +207,9 @@ void ComponentPage::slotSetupDone() KApplication::kdeinitExec(m_data->setup.exec); } -void ComponentPage::slotSetupAppRegistered( const QCString &appid) +void ComponentPage::slotSetupAppRegistered( const TQCString &appid) { - QCString dcopApp = m_data->setup.dcop.utf8(); + TQCString dcopApp = m_data->setup.dcop.utf8(); if (dcopApp == appid) { kdDebug() << appid << " is up and running" << endl; @@ -225,25 +225,25 @@ void ComponentPage::slotPreview() m_process->kill(); delete m_process; } - QCString dcopApp = m_data->preview.dcop.utf8(); - QCString dcopObj = "qt/" + dcopApp; + TQCString dcopApp = m_data->preview.dcop.utf8(); + TQCString dcopObj = "qt/" + dcopApp; if (!dcopApp.isEmpty() && m_data->preview.hasOption("restart")) DCOPRef(dcopApp, dcopObj).call("quit"); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) ); KioskRun::self()->prepare(); save(); KioskRun::self()->updateSycoca(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if (!dcopApp.isEmpty()) { KioskRun::self()->dcopClient()->setNotifications(true); - connect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )), - this, SLOT(slotPreviewAppRegistered( const QCString& ))); + connect(KioskRun::self()->dcopClient(), TQT_SIGNAL(applicationRegistered( const TQCString& )), + this, TQT_SLOT(slotPreviewAppRegistered( const TQCString& ))); } - QStringList args; + TQStringList args; if (m_data->preview.hasOption("nofork")) args << "--nofork"; @@ -254,13 +254,13 @@ void ComponentPage::slotPreview() i18n("This is how %1 will behave and look with the new settings. " "Any changes you now make to the settings will not be saved.

" "Click Ok to return to your own personal %2 configuration.") - .arg(m_data->caption, m_data->caption), i18n("%1 Preview").arg(m_data->caption)); + .tqarg(m_data->caption, m_data->caption), i18n("%1 Preview").tqarg(m_data->caption)); if (!dcopApp.isEmpty()) KioskRun::self()->dcopRef(dcopApp, dcopObj).call("quit"); if (m_process->isRunning()) { - connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotPreviewDone())); + connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotPreviewDone())); } else { @@ -268,9 +268,9 @@ void ComponentPage::slotPreview() } } -void ComponentPage::slotPreviewAppRegistered( const QCString &appid) +void ComponentPage::slotPreviewAppRegistered( const TQCString &appid) { - QCString dcopApp = m_data->preview.dcop.utf8(); + TQCString dcopApp = m_data->preview.dcop.utf8(); if (dcopApp == appid) { kdDebug() << appid << " is up and running" << endl; @@ -282,8 +282,8 @@ void ComponentPage::slotPreviewAppRegistered( const QCString &appid) void ComponentPage::slotPreviewDone() { KioskRun::self()->dcopClient()->setNotifications(false); - disconnect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )), - this, SLOT(slotPreviewAppRegistered( const QCString& ))); + disconnect(KioskRun::self()->dcopClient(), TQT_SIGNAL(applicationRegistered( const TQCString& )), + this, TQT_SLOT(slotPreviewAppRegistered( const TQCString& ))); delete m_process; m_process = 0; @@ -291,13 +291,13 @@ void ComponentPage::slotPreviewDone() KApplication::kdeinitExec(m_data->preview.exec); } -void ComponentPage::slotShowAction(QListViewItem *item) +void ComponentPage::slotShowAction(TQListViewItem *item) { ComponentActionItem *actionItem = dynamic_cast(item); - QString description; + TQString description; if (actionItem) { - description = "

"+QStyleSheet::escape(actionItem->action()->caption)+"

\n"; + description = "

"+TQStyleSheet::escape(actionItem->action()->caption)+"

\n"; description += actionItem->action()->description; } componentDescription->setText(description); diff --git a/kiosktool/componentPage.h b/kiosktool/componentPage.h index d5d392c..33452cd 100644 --- a/kiosktool/componentPage.h +++ b/kiosktool/componentPage.h @@ -29,8 +29,9 @@ class ComponentData; class ComponentPage : public ComponentPageUI, public PageWidget { Q_OBJECT + TQ_OBJECT public: - ComponentPage( ComponentData *data, Component *component, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ComponentPage( ComponentData *data, Component *component, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~ComponentPage(); virtual void load(); @@ -38,7 +39,7 @@ public: virtual void setFocus(); - virtual QString subCaption(); + virtual TQString subCaption(); public slots: void slotSetup(); @@ -48,9 +49,9 @@ protected slots: void slotShowNotice(); void slotSetupDone(); void slotPreviewDone(); - void slotShowAction(QListViewItem *item); - void slotSetupAppRegistered( const QCString &appid); - void slotPreviewAppRegistered( const QCString &appid); + void slotShowAction(TQListViewItem *item); + void slotSetupAppRegistered( const TQCString &appid); + void slotPreviewAppRegistered( const TQCString &appid); protected: void prepareMutableFiles(); diff --git a/kiosktool/componentPage_ui.ui b/kiosktool/componentPage_ui.ui index 73f88cf..bc4c6c1 100644 --- a/kiosktool/componentPage_ui.ui +++ b/kiosktool/componentPage_ui.ui @@ -1,6 +1,6 @@ ComponentPageUI - + ComponentPageUI @@ -19,17 +19,17 @@ unnamed - + componentDescription - + 0 140 - + 32767 140 @@ -41,7 +41,7 @@ Sunken - + WordBreak|AlignTop @@ -55,22 +55,22 @@ Fixed - + 20 16 - + - layout1 + tqlayout1 unnamed - + pbSetup @@ -88,14 +88,14 @@ Fixed - + 20 16 - + pbPreview @@ -113,7 +113,7 @@ Expanding - + 21 171 @@ -132,7 +132,7 @@ Fixed - + 16 20 @@ -162,7 +162,7 @@ 1 - + 300 150 @@ -178,7 +178,7 @@ true - + textLabel1 diff --git a/kiosktool/componentSelectionPage.cpp b/kiosktool/componentSelectionPage.cpp index f02ef33..bc940ad 100644 --- a/kiosktool/componentSelectionPage.cpp +++ b/kiosktool/componentSelectionPage.cpp @@ -19,7 +19,7 @@ #include "componentSelectionPage.h" -#include +#include #include #include @@ -29,29 +29,29 @@ #include "kioskdata.h" -class ComponentViewItem : public QIconViewItem +class ComponentViewItem : public TQIconViewItem { public: - ComponentViewItem( QIconView * parent, const QString & text, const QPixmap & icon, const QString & _id ) - : QIconViewItem( parent, text, icon), id(_id) + ComponentViewItem( TQIconView * parent, const TQString & text, const TQPixmap & icon, const TQString & _id ) + : TQIconViewItem( parent, text, icon), id(_id) { } - QString id; + TQString id; }; -ComponentSelectionPage::ComponentSelectionPage( KioskData *data, QWidget* parent, const char* name, WFlags fl ) +ComponentSelectionPage::ComponentSelectionPage( KioskData *data, TQWidget* parent, const char* name, WFlags fl ) : ComponentSelectionPageUI(parent, name, fl), PageWidget(this), m_data(data) { - listComponent->setSelectionMode(QIconView::Single); + listComponent->setSelectionMode(TQIconView::Single); listComponent->setItemsMovable(false); listComponent->setSpacing(20); listComponent->setGridX(110); listComponent->setGridY(75); loadComponentList(); - connect(listComponent, SIGNAL(clicked(QIconViewItem *)), this, SLOT(slotComponentActivated(QIconViewItem *))); - connect(listComponent, SIGNAL(returnPressed (QIconViewItem *)), this, SLOT(slotComponentActivated(QIconViewItem *))); - connect(pbSetup, SIGNAL(clicked()), this, SLOT(slotComponentActivated())); + connect(listComponent, TQT_SIGNAL(clicked(TQIconViewItem *)), this, TQT_SLOT(slotComponentActivated(TQIconViewItem *))); + connect(listComponent, TQT_SIGNAL(returnPressed (TQIconViewItem *)), this, TQT_SLOT(slotComponentActivated(TQIconViewItem *))); + connect(pbSetup, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotComponentActivated())); } ComponentSelectionPage::~ComponentSelectionPage() @@ -75,21 +75,21 @@ void ComponentSelectionPage::setFocus() { } -QString ComponentSelectionPage::subCaption() +TQString ComponentSelectionPage::subCaption() { - return QString::null; + return TQString(); } void ComponentSelectionPage::loadComponentList() { listComponent->clear(); - for(QStringList::ConstIterator it = m_data->m_componentList.begin(); + for(TQStringList::ConstIterator it = m_data->m_componentList.begin(); it != m_data->m_componentList.end(); ++it) { ComponentData *data = m_data->m_componentData.find(*it); Q_ASSERT(data); if (!data) continue; - QPixmap icon = DesktopIcon( data->icon, KIcon::SizeMedium ); + TQPixmap icon = DesktopIcon( data->icon, KIcon::SizeMedium ); new ComponentViewItem(listComponent, data->caption, icon, data->id); } } @@ -99,7 +99,7 @@ bool ComponentSelectionPage::hasSelection() return !currentComponent().isEmpty(); } -QString ComponentSelectionPage::currentComponent() +TQString ComponentSelectionPage::currentComponent() { ComponentViewItem *item = static_cast(listComponent->firstItem()); while(item) @@ -109,10 +109,10 @@ QString ComponentSelectionPage::currentComponent() item = static_cast(item->nextItem()); } - return QString::null; + return TQString(); } -void ComponentSelectionPage::setCurrentComponent(const QString &id) +void ComponentSelectionPage::setCurrentComponent(const TQString &id) { ComponentViewItem *item = static_cast(listComponent->firstItem()); while(item) @@ -128,7 +128,7 @@ void ComponentSelectionPage::setCurrentComponent(const QString &id) listComponent->setSelected(listComponent->firstItem(), true); } -void ComponentSelectionPage::slotComponentActivated(QIconViewItem *item) +void ComponentSelectionPage::slotComponentActivated(TQIconViewItem *item) { if (item) emit componentActivated(); diff --git a/kiosktool/componentSelectionPage.h b/kiosktool/componentSelectionPage.h index 7472d1e..cd02c83 100644 --- a/kiosktool/componentSelectionPage.h +++ b/kiosktool/componentSelectionPage.h @@ -27,8 +27,9 @@ class KioskData; class ComponentSelectionPage : public ComponentSelectionPageUI, public PageWidget { Q_OBJECT + TQ_OBJECT public: - ComponentSelectionPage( KioskData *data, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ComponentSelectionPage( KioskData *data, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~ComponentSelectionPage(); virtual void load(); @@ -36,10 +37,10 @@ public: virtual void setFocus(); - virtual QString subCaption(); + virtual TQString subCaption(); - void setCurrentComponent(const QString &); - QString currentComponent(); + void setCurrentComponent(const TQString &); + TQString currentComponent(); signals: void componentActivated(); @@ -49,7 +50,7 @@ protected: bool hasSelection(); protected slots: - void slotComponentActivated(QIconViewItem *item); + void slotComponentActivated(TQIconViewItem *item); void slotComponentActivated(); private: diff --git a/kiosktool/componentSelectionPage_ui.ui b/kiosktool/componentSelectionPage_ui.ui index 17b2ab5..6069bda 100644 --- a/kiosktool/componentSelectionPage_ui.ui +++ b/kiosktool/componentSelectionPage_ui.ui @@ -1,6 +1,6 @@ ComponentSelectionPageUI - + ComponentSelectionPageUI @@ -29,7 +29,7 @@ Fixed - + 20 20 @@ -46,22 +46,22 @@ Fixed - + 20 20 - + - layout1 + tqlayout1 unnamed - + pbSetup @@ -79,7 +79,7 @@ Expanding - + 20 211 @@ -88,7 +88,7 @@ - + listComponent @@ -100,14 +100,14 @@ 0 - + 400 200 - + textLabel1 diff --git a/kiosktool/desktopComponent.cpp b/kiosktool/desktopComponent.cpp index b8aa060..5456687 100644 --- a/kiosktool/desktopComponent.cpp +++ b/kiosktool/desktopComponent.cpp @@ -19,8 +19,8 @@ #include "desktopComponent.h" -#include -#include +#include +#include #include #include @@ -32,7 +32,7 @@ #include "kioskrun.h" -DesktopComponent::DesktopComponent( QObject *parent) +DesktopComponent::DesktopComponent( TQObject *parent) : Component(parent) { } @@ -45,19 +45,19 @@ void DesktopComponent::slotSetupPrepare() { m_iconPositionsFile = KioskRun::self()->locateLocal("data", "kdesktop/IconPositions"); - ::unlink(QFile::encodeName(m_iconPositionsFile)); - connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupStarted())); + ::unlink(TQFile::encodeName(m_iconPositionsFile)); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSetupStarted())); } void DesktopComponent::slotSetupStarted() { - QString desktop = KioskRun::self()->desktopPath(); - QFileInfo info(desktop); + TQString desktop = KioskRun::self()->desktopPath(); + TQFileInfo info(desktop); if (info.exists()) { - disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupStarted())); - connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupReady())); + disconnect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSetupStarted())); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSetupReady())); m_timer.start(1000, true); } else @@ -66,13 +66,13 @@ DesktopComponent::slotSetupStarted() } } -void filterFileList(const QString &path, QStringList *files, QStringList *oldFiles) +void filterFileList(const TQString &path, TQStringList *files, TQStringList *oldFiles) { files->remove("."); files->remove(".."); - QStringList::Iterator next; - for(QStringList::Iterator it = files->begin(); + TQStringList::Iterator next; + for(TQStringList::Iterator it = files->begin(); it != files->end(); it = next) { next = it; @@ -100,10 +100,10 @@ void filterFileList(const QString &path, QStringList *files, QStringList *oldFil void DesktopComponent::slotSetupReady() { - QString desktop = KioskRun::self()->desktopPath(); + TQString desktop = KioskRun::self()->desktopPath(); - QDir dir(desktop); - m_origDesktopFiles = dir.entryList(QDir::All, QDir::Unsorted); + TQDir dir(desktop); + m_origDesktopFiles = dir.entryList(TQDir::All, TQDir::Unsorted); filterFileList(desktop, &m_origDesktopFiles, 0); } @@ -113,16 +113,16 @@ DesktopComponent::setupFinished() { bool result = true; - disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupStarted())); - disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupReady())); + disconnect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSetupStarted())); + disconnect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSetupReady())); m_timer.stop(); KSimpleConfig newCfg(m_iconPositionsFile, true); - QString desktop = KioskRun::self()->desktopPath(); + TQString desktop = KioskRun::self()->desktopPath(); - QDir dir(desktop); - QStringList newDesktopFiles = dir.entryList(QDir::All, QDir::Unsorted); + TQDir dir(desktop); + TQStringList newDesktopFiles = dir.entryList(TQDir::All, TQDir::Unsorted); filterFileList(desktop, &newDesktopFiles, &m_origDesktopFiles); KTempFile positionsFile; @@ -130,12 +130,12 @@ DesktopComponent::setupFinished() KSimpleConfig positions(positionsFile.name()); - QStringList newGroups = newCfg.groupList(); + TQStringList newGroups = newCfg.groupList(); - QString prefix = "IconPosition::"; + TQString prefix = "IconPosition::"; // Save icon positions - for(QStringList::Iterator it = newGroups.begin(); + for(TQStringList::Iterator it = newGroups.begin(); it != newGroups.end(); ++it) { if (!(*it).startsWith(prefix)) @@ -151,8 +151,8 @@ DesktopComponent::setupFinished() } // Remove old icons from new list - QStringList::Iterator next; - for(QStringList::Iterator it = m_origDesktopFiles.begin(); + TQStringList::Iterator next; + for(TQStringList::Iterator it = m_origDesktopFiles.begin(); it != m_origDesktopFiles.end(); it = next) { next = it; @@ -166,17 +166,17 @@ DesktopComponent::setupFinished() } - QString installPath = KioskRun::self()->locateSave("data", "kdesktop/Desktop/"); - QString installPath2 = KioskRun::self()->locateSave("data", "kdesktop/DesktopLinks/"); + TQString installPath = KioskRun::self()->locateSave("data", "kdesktop/Desktop/"); + TQString installPath2 = KioskRun::self()->locateSave("data", "kdesktop/DesktopLinks/"); // Remove all icons that are no longer - for(QStringList::Iterator it = m_origDesktopFiles.begin(); + for(TQStringList::Iterator it = m_origDesktopFiles.begin(); it != m_origDesktopFiles.end(); ++it) { - QString file; - if (QFile::exists(installPath + *it)) + TQString file; + if (TQFile::exists(installPath + *it)) file = installPath + *it; - else if (QFile::exists(installPath2 + *it)) + else if (TQFile::exists(installPath2 + *it)) file = installPath2 + *it; if (!file.isEmpty()) @@ -187,7 +187,7 @@ DesktopComponent::setupFinished() } else { - QString installFile = installPath + *it; + TQString installFile = installPath + *it; file = KioskRun::self()->locate("data", "kdesktop/Desktop/" + *it); if (file.isEmpty()) { @@ -219,11 +219,11 @@ DesktopComponent::setupFinished() if (!result) return false; // Add all icons that have been added - for(QStringList::Iterator it = newDesktopFiles.begin(); + for(TQStringList::Iterator it = newDesktopFiles.begin(); it != newDesktopFiles.end(); ++it) { - QString file = KioskRun::self()->desktopPath() + *it; - if (QFile::exists(file)) + TQString file = KioskRun::self()->desktopPath() + *it; + if (TQFile::exists(file)) { result = KioskRun::self()->install(file, installPath + *it); if (!result) return false; diff --git a/kiosktool/desktopComponent.h b/kiosktool/desktopComponent.h index 189f4f2..3ce1c37 100644 --- a/kiosktool/desktopComponent.h +++ b/kiosktool/desktopComponent.h @@ -21,14 +21,15 @@ #include "component.h" -#include -#include +#include +#include class DesktopComponent: public Component { Q_OBJECT + TQ_OBJECT public: - DesktopComponent( QObject *parent = 0); + DesktopComponent( TQObject *parent = 0); virtual ~DesktopComponent(); virtual bool setupFinished(); @@ -42,9 +43,9 @@ protected slots: void slotSetupReady(); private: - QTimer m_timer; - QString m_iconPositionsFile; - QStringList m_origDesktopFiles; + TQTimer m_timer; + TQString m_iconPositionsFile; + TQStringList m_origDesktopFiles; }; #endif diff --git a/kiosktool/filetypeeditComponent.cpp b/kiosktool/filetypeeditComponent.cpp index 4e3fbaa..ce9b815 100644 --- a/kiosktool/filetypeeditComponent.cpp +++ b/kiosktool/filetypeeditComponent.cpp @@ -19,9 +19,9 @@ #include "filetypeeditComponent.h" -#include -#include -#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ #include "kioskrun.h" #include "kiosksync.h" -FileTypeEditComponent::FileTypeEditComponent( QObject *parent) +FileTypeEditComponent::FileTypeEditComponent( TQObject *parent) : Component(parent) { } @@ -61,15 +61,15 @@ FileTypeEditComponent::setupFinished() // Install mimetype files { - QString mimetypeFiles = KioskRun::self()->locateLocal("mime", QString::null); - QString mimetypeSaveFiles = KioskRun::self()->locateSave("mime", QString::null); + TQString mimetypeFiles = KioskRun::self()->locateLocal("mime", TQString()); + TQString mimetypeSaveFiles = KioskRun::self()->locateSave("mime", TQString()); KioskSync mimeDir(kapp->mainWidget()); mimeDir.addDir(mimetypeFiles, KURL()); - QStringList newMimetypeFiles = mimeDir.listFiles(); + TQStringList newMimetypeFiles = mimeDir.listFiles(); - for(QStringList::ConstIterator it = newMimetypeFiles.begin(); + for(TQStringList::ConstIterator it = newMimetypeFiles.begin(); it != newMimetypeFiles.end(); ++it) { if ((*it).endsWith(".desktop")) @@ -83,15 +83,15 @@ FileTypeEditComponent::setupFinished() // Install legacy .desktop files { - QString legacyApplications = KioskRun::self()->locateLocal("apps", QString::null); - QString legacySaveApplications = KioskRun::self()->locateSave("apps", QString::null); + TQString legacyApplications = KioskRun::self()->locateLocal("apps", TQString()); + TQString legacySaveApplications = KioskRun::self()->locateSave("apps", TQString()); KioskSync legacyDir(kapp->mainWidget()); legacyDir.addDir(legacyApplications, KURL()); - QStringList newLegacyApplications = legacyDir.listFiles(); + TQStringList newLegacyApplications = legacyDir.listFiles(); - for(QStringList::ConstIterator it = newLegacyApplications.begin(); + for(TQStringList::ConstIterator it = newLegacyApplications.begin(); it != newLegacyApplications.end(); ++it) { if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk") || (*it).endsWith(".directory")) @@ -105,15 +105,15 @@ FileTypeEditComponent::setupFinished() // Install .desktop files { - QString xdgApplications = KioskRun::self()->locateLocal("xdgdata-apps", QString::null); - QString xdgSaveApplications = KioskRun::self()->locateSave("xdgdata-apps", QString::null); + TQString xdgApplications = KioskRun::self()->locateLocal("xdgdata-apps", TQString()); + TQString xdgSaveApplications = KioskRun::self()->locateSave("xdgdata-apps", TQString()); - QDir dir(xdgApplications); - QStringList newXdgApplications = dir.entryList(QDir::All, QDir::Unsorted); + TQDir dir(xdgApplications); + TQStringList newXdgApplications = dir.entryList(TQDir::All, TQDir::Unsorted); newXdgApplications.remove("."); newXdgApplications.remove(".."); - for(QStringList::ConstIterator it = newXdgApplications.begin(); + for(TQStringList::ConstIterator it = newXdgApplications.begin(); it != newXdgApplications.end(); ++it) { if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk")) diff --git a/kiosktool/filetypeeditComponent.h b/kiosktool/filetypeeditComponent.h index 1410dc5..e6024db 100644 --- a/kiosktool/filetypeeditComponent.h +++ b/kiosktool/filetypeeditComponent.h @@ -21,14 +21,15 @@ #include "component.h" -#include -#include +#include +#include class FileTypeEditComponent: public Component { Q_OBJECT + TQ_OBJECT public: - FileTypeEditComponent( QObject *parent = 0); + FileTypeEditComponent( TQObject *parent = 0); virtual ~FileTypeEditComponent(); virtual bool setupFinished(); diff --git a/kiosktool/kcms/autostart/kcmautostart.cpp b/kiosktool/kcms/autostart/kcmautostart.cpp index 7a553bb..9866a94 100644 --- a/kiosktool/kcms/autostart/kcmautostart.cpp +++ b/kiosktool/kcms/autostart/kcmautostart.cpp @@ -18,13 +18,13 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -44,10 +44,10 @@ Boston, MA 02111-1307, USA. #include "kcmautostart.h" #include "kcmautostart.moc" -typedef KGenericFactory AutoStartFactory; +typedef KGenericFactory AutoStartFactory; K_EXPORT_COMPONENT_FACTORY( kcm_autostart, AutoStartFactory( "kcmautostart" ) ) -AutoStartConfig::AutoStartConfig(QWidget* parent, const char* name, const QStringList &) : +AutoStartConfig::AutoStartConfig(TQWidget* parent, const char* name, const TQStringList &) : KCModule( AutoStartFactory::instance(), parent, name ) { KGlobal::dirs()->addResourceType("autostart", "share/autostart"); @@ -60,10 +60,10 @@ AutoStartConfig::AutoStartConfig(QWidget* parent, const char* name, const QStrin setAboutData( about ); #endif - QVBoxLayout *lay = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *lay = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - QGroupBox *gb = new QVGroupBox( i18n( "Startup Services" ), this ); - QWhatsThis::add(gb, i18n("This shows all KDE services that can be loaded " + TQGroupBox *gb = new TQVGroupBox( i18n( "Startup Services" ), this ); + TQWhatsThis::add(gb, i18n("This shows all KDE services that can be loaded " "on KDE startup. Checked services will be invoked on next startup. " "Be careful with deactivation of unknown services.")); lay->addWidget( gb ); @@ -78,9 +78,9 @@ AutoStartConfig::AutoStartConfig(QWidget* parent, const char* name, const QStrin load(); } -void setModuleGroup(KConfig *config, const QString &filename) +void setModuleGroup(KConfig *config, const TQString &filename) { - QString module = filename; + TQString module = filename; int i = module.findRev('/'); if (i != -1) module = module.mid(i+1); @@ -88,16 +88,16 @@ void setModuleGroup(KConfig *config, const QString &filename) if (i != -1) module = module.left(i); - config->setGroup(QString("Module-%1").arg(module)); + config->setGroup(TQString("Module-%1").tqarg(module)); } -bool AutoStartConfig::autoloadEnabled(KConfig *config, const QString &filename) +bool AutoStartConfig::autoloadEnabled(KConfig *config, const TQString &filename) { setModuleGroup(config, filename); return config->readBoolEntry("autoload", true); } -void AutoStartConfig::setAutoloadEnabled(KConfig *config, const QString &filename, bool b) +void AutoStartConfig::setAutoloadEnabled(KConfig *config, const TQString &filename, bool b) { setModuleGroup(config, filename); return config->writeEntry("autoload", b); @@ -106,18 +106,18 @@ void AutoStartConfig::setAutoloadEnabled(KConfig *config, const QString &filenam void AutoStartConfig::load() { _lvStartup->clear(); - QStringList files = KGlobal::dirs()->findAllResources( "autostart", QString::fromLatin1( "*.desktop" ), false, true ); + TQStringList files = KGlobal::dirs()->findAllResources( "autostart", TQString::tqfromLatin1( "*.desktop" ), false, true ); - for ( QStringList::ConstIterator it = files.begin(); it != files.end(); it++ ) + for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); it++ ) { - if ( KDesktopFile::isDesktopFile( QFileInfo( *it ).fileName() ) ) + if ( KDesktopFile::isDesktopFile( TQFileInfo( *it ).fileName() ) ) { - KDesktopFile file( QFileInfo( *it ).fileName(), true, "autostart" ); - QString name = file.readName(); + KDesktopFile file( TQFileInfo( *it ).fileName(), true, "autostart" ); + TQString name = file.readName(); if ( !name.isEmpty() ) { - CheckListItem *clitem = new CheckListItem( _lvStartup, QString::null ); - connect( clitem, SIGNAL( changed( QCheckListItem * ) ), SLOT( slotItemChecked( QCheckListItem * ) ) ); + CheckListItem *clitem = new CheckListItem( _lvStartup, TQString() ); + connect( clitem, TQT_SIGNAL( changed( TQCheckListItem * ) ), TQT_SLOT( slotItemChecked( TQCheckListItem * ) ) ); clitem->setText( 1, name ); clitem->setText( 2, file.readComment() ); clitem->setText( 3, *it ); @@ -129,19 +129,19 @@ void AutoStartConfig::load() { void AutoStartConfig::save() { - QListViewItemIterator it( _lvStartup ); + TQListViewItemIterator it( _lvStartup ); while ( it.current() ) { if ( KDesktopFile::isDesktopFile( it.current()->text( 3 ) ) ) { // Determine whether we need to change the file on a readonly desktop file // by giving a full path first - QString path = it.current()->text( 3 ); + TQString path = it.current()->text( 3 ); KDesktopFile file( path, true, "services" ); - bool shouldBeHidden = !( static_cast( it.current() )->isOn() ); + bool shouldBeHidden = !( static_cast( it.current() )->isOn() ); if ( file.readBoolEntry( "Hidden", false ) != shouldBeHidden ) { - KDesktopFile outFile( QFileInfo( path ).fileName(), false, "autostart" ); + KDesktopFile outFile( TQFileInfo( path ).fileName(), false, "autostart" ); kdDebug() << "************** Writing out " << path << endl; outFile.writeEntry( "Hidden", shouldBeHidden ); outFile.sync(); @@ -150,15 +150,15 @@ void AutoStartConfig::save() ++it; } - //QTimer::singleShot(0, this, SLOT(slotServiceRunningToggled())); + //TQTimer::singleShot(0, this, TQT_SLOT(slotServiceRunningToggled())); } void AutoStartConfig::defaults() { - QListViewItemIterator it( _lvStartup); + TQListViewItemIterator it( _lvStartup); while ( it.current() != 0 ) { if (it.current()->rtti()==1) { - QCheckListItem *item = static_cast(it.current()); + TQCheckListItem *item = static_cast(it.current()); item->setOn(false); } ++it; @@ -167,19 +167,19 @@ void AutoStartConfig::defaults() void AutoStartConfig::slotReload() { - QString current = _lvStartup->currentItem()->text(4); + TQString current = _lvStartup->currentItem()->text(4); load(); - QListViewItem *item = _lvStartup->findItem(current, 4); + TQListViewItem *item = _lvStartup->findItem(current, 4); if (item) _lvStartup->setCurrentItem(item); } -void AutoStartConfig::slotItemChecked(QCheckListItem*) +void AutoStartConfig::slotItemChecked(TQCheckListItem*) { emit changed(true); } -QString AutoStartConfig::quickHelp() const +TQString AutoStartConfig::quickHelp() const { return i18n("

Service Manager

This module allows you to have an overview of all plugins of the " "KDE Daemon, also referred to as KDE Services. Generally, there are two types of service:

" @@ -190,13 +190,13 @@ QString AutoStartConfig::quickHelp() const " do not know what you are doing.

"); } -CheckListItem::CheckListItem(QListView *parent, const QString &text) - : QObject(parent), - QCheckListItem(parent, text, CheckBox) +CheckListItem::CheckListItem(TQListView *parent, const TQString &text) + : TQObject(parent), + TQCheckListItem(parent, text, CheckBox) { } void CheckListItem::stateChange(bool on) { - QCheckListItem::stateChange(on); + TQCheckListItem::stateChange(on); emit changed(this); } diff --git a/kiosktool/kcms/autostart/kcmautostart.h b/kiosktool/kcms/autostart/kcmautostart.h index dfb5eba..6fe07c8 100644 --- a/kiosktool/kcms/autostart/kcmautostart.h +++ b/kiosktool/kcms/autostart/kcmautostart.h @@ -19,45 +19,47 @@ #ifndef KCMAUTOSTART_H #define KCMAUTOSTART_H -#include +#include #include class KListView; -class QStringList; -class QPushButton; +class TQStringList; +class TQPushButton; class AutoStartConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - AutoStartConfig(QWidget* parent, const char* name= 0L, const QStringList& foo = QStringList()); + AutoStartConfig(TQWidget* parent, const char* name= 0L, const TQStringList& foo = TQStringList()); ~AutoStartConfig() {}; void load(); void save(); void defaults(); - QString quickHelp() const; + TQString quickHelp() const; protected slots: void slotReload(); - void slotItemChecked(QCheckListItem *item); + void slotItemChecked(TQCheckListItem *item); - bool autoloadEnabled(KConfig *config, const QString &filename); - void setAutoloadEnabled(KConfig *config, const QString &filename, bool b); + bool autoloadEnabled(KConfig *config, const TQString &filename); + void setAutoloadEnabled(KConfig *config, const TQString &filename, bool b); private: KListView *_lvStartup; }; -class CheckListItem : public QObject, public QCheckListItem +class CheckListItem : public TQObject, public TQCheckListItem { Q_OBJECT + TQ_OBJECT public: - CheckListItem(QListView* parent, const QString &text); + CheckListItem(TQListView* parent, const TQString &text); ~CheckListItem() { } signals: - void changed(QCheckListItem*); + void changed(TQCheckListItem*); protected: virtual void stateChange(bool); }; diff --git a/kiosktool/kioskConfigDialog.cpp b/kiosktool/kioskConfigDialog.cpp index 8b523bb..7111e5f 100644 --- a/kiosktool/kioskConfigDialog.cpp +++ b/kiosktool/kioskConfigDialog.cpp @@ -19,8 +19,8 @@ #include "kioskConfigDialog.h" -#include -#include +#include +#include #include #include @@ -34,7 +34,7 @@ #include "kioskConfigDialog_ui.h" -KioskConfigDialog::KioskConfigDialog(QWidget *parent) +KioskConfigDialog::KioskConfigDialog(TQWidget *parent) : KDialogBase(parent, "KioskConfigDialog", true, i18n("Configure Kiosk Admin Tool"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { @@ -45,9 +45,9 @@ KioskConfigDialog::KioskConfigDialog(QWidget *parent) setMainWidget(w); init(); - connect(w->lineProfilePrefix, SIGNAL(textChanged( const QString& )), SLOT(updateExample())); - connect(w->lineUpload, SIGNAL(textChanged( const QString& )), SLOT(updateExample())); - connect(w->lineUploadPrefix, SIGNAL(textChanged( const QString& )), SLOT(updateExample())); + connect(w->lineProfilePrefix, TQT_SIGNAL(textChanged( const TQString& )), TQT_SLOT(updateExample())); + connect(w->lineUpload, TQT_SIGNAL(textChanged( const TQString& )), TQT_SLOT(updateExample())); + connect(w->lineUploadPrefix, TQT_SIGNAL(textChanged( const TQString& )), TQT_SLOT(updateExample())); } KioskConfigDialog::~KioskConfigDialog() @@ -56,7 +56,7 @@ KioskConfigDialog::~KioskConfigDialog() void KioskConfigDialog::init() { - QString prefix = KioskRun::self()->getProfilePrefix(); + TQString prefix = KioskRun::self()->getProfilePrefix(); if (prefix.isEmpty()) { @@ -72,7 +72,7 @@ void KioskConfigDialog::init() KConfig *config = kapp->config(); config->setGroup("General"); - QString uploadURL = config->readEntry("uploadURL"); + TQString uploadURL = config->readEntry("uploadURL"); if (uploadURL.isEmpty()) { w->checkUpload->setChecked(false); @@ -102,27 +102,27 @@ void KioskConfigDialog::init() void KioskConfigDialog::updateExample() { - QString uploadPrefix = w->lineUploadPrefix->text(); - QString file1 = w->lineProfilePrefix->url()+"default"; - QString file2 = file1; + TQString uploadPrefix = w->lineUploadPrefix->text(); + TQString file1 = w->lineProfilePrefix->url()+"default"; + TQString file2 = file1; if (file2.startsWith(uploadPrefix)) file2 = file2.mid(uploadPrefix.length()); if (file2.startsWith("/")) file2 = file2.mid(1); - QString url = w->lineUpload->url(); + TQString url = w->lineUpload->url(); if (!url.endsWith("/")) url += "/"; url += file2; - QString example = QString("
%1
-->
%2
").arg(file1, url); + TQString example = TQString("
%1
-->
%2
").tqarg(file1, url); w->lblUploadExample->setText(example); - w->lblUploadExample->setFixedSize(QSize(500,fontMetrics().lineSpacing()*3 + 6)); + w->lblUploadExample->setFixedSize(TQSize(500,fontMetrics().lineSpacing()*3 + 6)); } bool KioskConfigDialog::save() { - QString uploadURL; - QString uploadPrefix; - QString prefix; + TQString uploadURL; + TQString uploadPrefix; + TQString prefix; int minUID = 0; uploadPrefix = w->lineUploadPrefix->text(); diff --git a/kiosktool/kioskConfigDialog.h b/kiosktool/kioskConfigDialog.h index 56c969c..94ca0e0 100644 --- a/kiosktool/kioskConfigDialog.h +++ b/kiosktool/kioskConfigDialog.h @@ -26,8 +26,9 @@ class KioskConfigDialogUI; class KioskConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KioskConfigDialog(QWidget *parent); + KioskConfigDialog(TQWidget *parent); ~KioskConfigDialog(); bool save(); diff --git a/kiosktool/kioskConfigDialog_ui.ui b/kiosktool/kioskConfigDialog_ui.ui index 136ce9d..0bb5ef2 100644 --- a/kiosktool/kioskConfigDialog_ui.ui +++ b/kiosktool/kioskConfigDialog_ui.ui @@ -1,6 +1,6 @@ KioskConfigDialogUI - + KioskConfigDialogUI @@ -16,7 +16,7 @@ unnamed - + checkProfilePrefix @@ -24,9 +24,9 @@ Store all &profiles under the same base directory
- + - layout3 + tqlayout3 @@ -42,22 +42,22 @@ Fixed - + 20 20 - + - layout2 + tqlayout2 unnamed - + textLabel1 @@ -80,7 +80,7 @@ - + checkUpload @@ -88,9 +88,9 @@ On exit, &upload profiles to remote server
- + - layout8 + tqlayout8 @@ -106,22 +106,22 @@ Fixed - + 16 20 - + - layout7 + tqlayout7 unnamed - + textLabel1_2 @@ -140,7 +140,7 @@ false - + textLabel1_3 @@ -156,7 +156,7 @@ false - + textLabel2 @@ -164,7 +164,7 @@ Example: - + lblUploadExample @@ -179,7 +179,7 @@ 0 - + 500 10 @@ -202,7 +202,7 @@ - + checkUID @@ -213,9 +213,9 @@ - + - layout6 + tqlayout6 @@ -231,7 +231,7 @@ Fixed - + 20 20 @@ -259,7 +259,7 @@ Expanding - + 60 20 @@ -278,7 +278,7 @@ Expanding - + 20 20 diff --git a/kiosktool/kioskdata.cpp b/kiosktool/kioskdata.cpp index a007389..135c8f2 100644 --- a/kiosktool/kioskdata.cpp +++ b/kiosktool/kioskdata.cpp @@ -19,8 +19,8 @@ #include "kioskdata.h" -#include -#include +#include +#include #include #include @@ -28,7 +28,7 @@ #include #include -QDict *ComponentAction::s_stdActionCaptions = 0; +TQDict *ComponentAction::s_stdActionCaptions = 0; ComponentAction::ComponentAction() { @@ -38,9 +38,9 @@ ComponentAction::~ComponentAction() { } -static QDict *readStdActionCaptions() +static TQDict *readStdActionCaptions() { - QDict *captions = new QDict; + TQDict *captions = new TQDict; for(int i = KStdAction::ActionNone; true;) { i++; @@ -48,28 +48,28 @@ static QDict *readStdActionCaptions() if (!action) break; - QString caption = action->text(); + TQString caption = action->text(); caption.replace("&",""); - captions->insert(QString::fromLatin1(action->name()), new QString(caption)); + captions->insert(TQString::tqfromLatin1(action->name()), new TQString(caption)); } return captions; } -QString -ComponentAction::expand(const QString &s) +TQString +ComponentAction::expand(const TQString &s) { if (s.contains("%action")) { if (!s_stdActionCaptions) s_stdActionCaptions= readStdActionCaptions(); - QString action = key; + TQString action = key; action.replace("action/", ""); - QString *caption = s_stdActionCaptions->find(action); + TQString *caption = s_stdActionCaptions->find(action); if (caption) { - QString result = s; + TQString result = s; result.replace("%action", *caption); return result; } @@ -78,9 +78,9 @@ ComponentAction::expand(const QString &s) } bool -ComponentAction::load(const QDomElement &docElem) +ComponentAction::load(const TQDomElement &docElem) { - QString _type = docElem.attribute("type"); + TQString _type = docElem.attribute("type"); if (_type == "immutable") type = ActImmutable; else if (_type == "action restriction") @@ -109,10 +109,10 @@ ComponentAction::load(const QDomElement &docElem) key = docElem.attribute("key"); defaultValue = (docElem.attribute("default").lower() == "true"); - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if (e.tagName() == "caption") caption = expand(i18n(e.text().simplifyWhiteSpace().utf8())); @@ -147,12 +147,12 @@ ComponentData::~ComponentData() { } -bool ComponentData::loadActions(const QDomElement &docElem) +bool ComponentData::loadActions(const TQDomElement &docElem) { - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if (e.tagName() != "action") return false; @@ -172,31 +172,31 @@ bool ComponentData::loadActions(const QDomElement &docElem) } void -ComponentExecData::load(const QDomElement &e) +ComponentExecData::load(const TQDomElement &e) { exec = e.attribute("binary"); dcop = e.attribute("dcop"); - options = QStringList::split(',', e.attribute("options")); - args = QStringList::split(',', e.attribute("args")); + options = TQStringList::split(',', e.attribute("options")); + args = TQStringList::split(',', e.attribute("args")); } void -ComponentData::loadSetup(const QDomElement &docElem) +ComponentData::loadSetup(const TQDomElement &docElem) { - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if (e.tagName() == "mutable") { - QString f = e.attribute("file"); + TQString f = e.attribute("file"); if (!f.isEmpty()) mutableFiles.append(f); } else if (e.tagName() == "ignore") { - QString f = e.attribute("file"); + TQString f = e.attribute("file"); if (!f.isEmpty()) ignoreFiles.append(f); } @@ -205,16 +205,16 @@ ComponentData::loadSetup(const QDomElement &docElem) } } -bool ComponentData::load(const QDomElement &docElem) +bool ComponentData::load(const TQDomElement &docElem) { id = docElem.attribute("name"); icon = docElem.attribute("icon"); if (id.isEmpty()) return false; - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if (e.tagName() == "caption") { @@ -256,37 +256,37 @@ KioskData::~KioskData() bool KioskData::load() { - QString filename = locate("appdata", "kiosk_data.xml"); + TQString filename = locate("appdata", "kiosk_data.xml"); if (filename.isEmpty()) { m_errorMsg = i18n("Could not find kiosk_data.xml"); return false; } - QDomDocument doc; - QFile file( filename ); + TQDomDocument doc; + TQFile file( filename ); if ( !file.open( IO_ReadOnly ) ) { - m_errorMsg = i18n("Could not open %1").arg(filename); + m_errorMsg = i18n("Could not open %1").tqarg(filename); return false; } - QString errorMsg; + TQString errorMsg; int errorRow; int errorCol; if ( !doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) ) { - m_errorMsg = i18n("Syntax error in %1
Line %3, column %4: %2
").arg(filename, errorMsg).arg(errorRow).arg(errorCol); + m_errorMsg = i18n("Syntax error in %1
Line %3, column %4: %2
").tqarg(filename, errorMsg).tqarg(errorRow).tqarg(errorCol); file.close(); return false; } file.close(); - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if (e.tagName() == "group") { diff --git a/kiosktool/kioskdata.h b/kiosktool/kioskdata.h index fcae0f9..57b265e 100644 --- a/kiosktool/kioskdata.h +++ b/kiosktool/kioskdata.h @@ -19,46 +19,46 @@ #ifndef _KIOSKDATA_H_ #define _KIOSKDATA_H_ -#include -#include -#include +#include +#include +#include -class QDomElement; +class TQDomElement; class ComponentAction { public: ComponentAction(); ~ComponentAction(); - bool load(const QDomElement &docElem); + bool load(const TQDomElement &docElem); private: - QString expand(const QString &); + TQString expand(const TQString &); public: - QString caption; - QString description; + TQString caption; + TQString description; typedef enum {ActImmutable, ActRestrict, ActCustom, ActModule, ActConfig, ActResource } ActionType; ActionType type; - QString file; - QString group; - QString key; - QPtrList subActions; + TQString file; + TQString group; + TQString key; + TQPtrList subActions; bool defaultValue; - static QDict *s_stdActionCaptions; + static TQDict *s_stdActionCaptions; }; class ComponentExecData { public: - void load(const QDomElement &docElem); - bool hasOption(const QString &option) { return options.contains(option); } + void load(const TQDomElement &docElem); + bool hasOption(const TQString &option) { return options.contains(option); } public: - QString exec; - QString dcop; - QStringList options; - QStringList args; + TQString exec; + TQString dcop; + TQStringList options; + TQStringList args; }; class ComponentData @@ -66,20 +66,20 @@ class ComponentData public: ComponentData(); ~ComponentData(); - bool load(const QDomElement &docElem); - bool loadActions(const QDomElement &docElem); + bool load(const TQDomElement &docElem); + bool loadActions(const TQDomElement &docElem); protected: - void loadSetup(const QDomElement &docElem); + void loadSetup(const TQDomElement &docElem); public: - QString id; - QString caption; -// QString description; - QString icon; - QPtrList actions; - QStringList mutableFiles; - QStringList ignoreFiles; + TQString id; + TQString caption; +// TQString description; + TQString icon; + TQPtrList actions; + TQStringList mutableFiles; + TQStringList ignoreFiles; ComponentExecData setup; ComponentExecData preview; }; @@ -90,16 +90,16 @@ public: KioskData(); ~KioskData(); - QString errorMsg() { return m_errorMsg; } + TQString errorMsg() { return m_errorMsg; } bool load(); public: - QStringList m_componentList; - QDict m_componentData; + TQStringList m_componentList; + TQDict m_componentData; protected: - QString m_errorMsg; + TQString m_errorMsg; }; #endif diff --git a/kiosktool/kioskgui.cpp b/kiosktool/kioskgui.cpp index 44ec213..2f1e75e 100644 --- a/kiosktool/kioskgui.cpp +++ b/kiosktool/kioskgui.cpp @@ -18,11 +18,11 @@ */ #include "kioskgui.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -88,8 +88,8 @@ KioskGui::KioskGui() m_view->pbHelp->hide(); // TODO, write help :) - connect(m_view->pbDiscard, SIGNAL(clicked()), this, SLOT(discardPage())); - connect(m_view->pbFinished, SIGNAL(clicked()), this, SLOT(finishedPage())); + connect(m_view->pbDiscard, TQT_SIGNAL(clicked()), this, TQT_SLOT(discardPage())); + connect(m_view->pbFinished, TQT_SIGNAL(clicked()), this, TQT_SLOT(finishedPage())); KConfig *config = kapp->config(); config->setGroup("General"); @@ -98,7 +98,7 @@ KioskGui::KioskGui() selectPage(PAGE_PROFILE_SELECTION, true); - QTimer::singleShot(0, this, SLOT(slotCheckEtcSkel())); + TQTimer::singleShot(0, this, TQT_SLOT(slotCheckEtcSkel())); } KioskGui::~KioskGui() @@ -109,10 +109,10 @@ KioskGui::~KioskGui() void KioskGui::slotCheckEtcSkel() { - QString etcSkel = "/etc/skel/.kde"; + TQString etcSkel = "/etc/skel/.kde"; KioskSync skelDir; skelDir.addDir(etcSkel, KURL()); - QStringList skelFiles = skelDir.listFiles(); + TQStringList skelFiles = skelDir.listFiles(); if (!skelFiles.isEmpty()) { KMessageBox::informationList(this, @@ -126,49 +126,49 @@ void KioskGui::slotCheckEtcSkel() "If this is not the intended behavior, please remove the offending " "files from the skeleton folder on all systems that you want to " "administer with user profiles.

" - "The following files were found under %2:").arg(etcSkel).arg(etcSkel), + "The following files were found under %2:").tqarg(etcSkel).tqarg(etcSkel), skelFiles, - QString::null, + TQString(), "etc_skel_warning"); } } -void KioskGui::setWidgetBackground(QWidget *w) +void KioskGui::setWidgetBackground(TQWidget *w) { - QObjectList *l = w->queryList( "QWidget" ); - QObjectListIt it( *l ); - for(QWidget *wid=0; (wid = (QWidget*)it.current()); ++it) + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectListIt it( *l ); + for(TQWidget *wid=0; (wid = (TQWidget*)it.current()); ++it) { wid->setBackgroundOrigin(WindowOrigin); - if (::qt_cast(wid)) + if (::tqqt_cast(wid)) wid->setAutoMask(true); } w->setBackgroundOrigin(WindowOrigin); delete l; } -void KioskGui::setSubCaption(const QString &subCaption) +void KioskGui::setSubCaption(const TQString &subCaption) { m_view->subCaptionLabel->setText("

"+subCaption+"

"); } void KioskGui::setupActions() { -// KStdAction::open(this, SLOT(fileOpen()), actionCollection()); -// KStdAction::save(this, SLOT(fileSave()), actionCollection()); -// KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); - KStdAction::quit(this, SLOT(close()), actionCollection()); -// KStdAction::back(this, SLOT(previousPage()), actionCollection(), "previousPage"); -// KStdAction::forward(this, SLOT(nextPage()), actionCollection(), "nextPage"); +// KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); +// KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); +// KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); +// KStdAction::back(this, TQT_SLOT(previousPage()), actionCollection(), "previousPage"); +// KStdAction::forward(this, TQT_SLOT(nextPage()), actionCollection(), "nextPage"); // createStandardStatusBarAction(); // setStandardToolBarMenuEnabled(true); -// KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); -// KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::preferences(this, SLOT(slotConfig()), actionCollection()); - m_uploadAction = new KAction(i18n("Upload &All Profiles"), QString::null, 0, this, SLOT(uploadAllProfiles()), actionCollection(), "upload_all"); - m_backgroundAction = new KToggleAction(i18n("Background Graphics"), QString::null, 0, this, SLOT(slotUpdateBackground()), actionCollection(), "show_background"); +// KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); +// KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::preferences(this, TQT_SLOT(slotConfig()), actionCollection()); + m_uploadAction = new KAction(i18n("Upload &All Profiles"), TQString(), 0, this, TQT_SLOT(uploadAllProfiles()), actionCollection(), "upload_all"); + m_backgroundAction = new KToggleAction(i18n("Background Graphics"), TQString(), 0, this, TQT_SLOT(slotUpdateBackground()), actionCollection(), "show_background"); updateActions(); } @@ -223,7 +223,7 @@ void KioskGui::slotProfileSetup() selectPage(PAGE_COMPONENT_SELECTION, true); } -void KioskGui::slotDeleteProfile(QListViewItem *item) +void KioskGui::slotDeleteProfile(TQListViewItem *item) { if (!m_profileSelectionPage) return; @@ -231,11 +231,11 @@ void KioskGui::slotDeleteProfile(QListViewItem *item) item = m_profileSelectionPage->listProfile->selectedItem(); if (!item) return; - QString profile = item->text(0); + TQString profile = item->text(0); int result = KMessageBox::warningContinueCancel(this, i18n("You are about to delete the profile %1.

" - "Are you sure you want to do this?").arg(profile), - QString::null, KGuiItem(i18n("Delete"),"editdelete")); + "Are you sure you want to do this?").tqarg(profile), + TQString(), KGuiItem(i18n("Delete"),"editdelete")); if (result == KMessageBox::Continue) { if (KioskRun::self()->deleteProfile(profile)) @@ -254,11 +254,11 @@ void KioskGui::slotManageUsers() selectPage(PAGE_PROFILE_ASSIGN, true); } -void KioskGui::slotProfileContextMenu(QListViewItem *item, const QPoint &p) +void KioskGui::slotProfileContextMenu(TQListViewItem *item, const TQPoint &p) { if (!item) return; // No item selected - QPopupMenu menu(this); + TQPopupMenu menu(this); menu.insertItem(i18n("&Delete Profile"), 1); int result = menu.exec( p ); @@ -277,21 +277,21 @@ void KioskGui::selectPage(int page, bool save) setWidgetBackground(m_profileSelectionPage); connect(m_profileSelectionPage->listProfile, - SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - this, SLOT(slotProfileContextMenu(QListViewItem *, const QPoint &))); + TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + this, TQT_SLOT(slotProfileContextMenu(TQListViewItem *, const TQPoint &))); connect(m_profileSelectionPage->listProfile, - SIGNAL(doubleClicked (QListViewItem *, const QPoint &, int )), - this, SLOT(nextPage())); - connect(m_profileSelectionPage->buttonDelete, SIGNAL(clicked()), - this, SLOT(slotDeleteProfile())); - connect(m_profileSelectionPage->buttonAdd, SIGNAL(clicked()), - this, SLOT(slotAddProfile())); - connect(m_profileSelectionPage->buttonProperty, SIGNAL(clicked()), - this, SLOT(slotProfileProperties())); - connect(m_profileSelectionPage->buttonSetup, SIGNAL(clicked()), - this, SLOT(slotProfileSetup())); - connect(m_profileSelectionPage->buttonUsers, SIGNAL(clicked()), - this, SLOT(slotManageUsers())); + TQT_SIGNAL(doubleClicked (TQListViewItem *, const TQPoint &, int )), + this, TQT_SLOT(nextPage())); + connect(m_profileSelectionPage->buttonDelete, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteProfile())); + connect(m_profileSelectionPage->buttonAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddProfile())); + connect(m_profileSelectionPage->buttonProperty, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotProfileProperties())); + connect(m_profileSelectionPage->buttonSetup, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotProfileSetup())); + connect(m_profileSelectionPage->buttonUsers, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotManageUsers())); m_view->widgetStack->addWidget(m_profileSelectionPage, PAGE_PROFILE_SELECTION); m_profileSelectionPage->listProfile->setFocus(); @@ -305,7 +305,7 @@ void KioskGui::selectPage(int page, bool save) } m_componentSelectionPage = new ComponentSelectionPage(m_data, this); - connect(m_componentSelectionPage, SIGNAL(componentActivated()), this, SLOT(nextPage())); + connect(m_componentSelectionPage, TQT_SIGNAL(componentActivated()), this, TQT_SLOT(nextPage())); m_componentSelectionPage->setCurrentComponent(m_component); setWidgetBackground(m_componentSelectionPage); @@ -315,7 +315,7 @@ void KioskGui::selectPage(int page, bool save) if (m_activePage == PAGE_PROFILE_NEW) { delete m_profilePropsPage; - m_profilePropsPage = new ProfilePropsPage(this, QString::null); + m_profilePropsPage = new ProfilePropsPage(this, TQString()); setWidgetBackground(m_profilePropsPage->widget()); m_view->widgetStack->addWidget(m_profilePropsPage->widget(), PAGE_PROFILE_NEW); @@ -376,7 +376,7 @@ void KioskGui::selectPage(int page, bool save) setCaption(i18n("Profile Properties")); break; case PAGE_COMPONENT_SELECTION: - setSubCaption(i18n("Setup Profile \"%1\"").arg(m_profile)); + setSubCaption(i18n("Setup Profile \"%1\"").tqarg(m_profile)); setCaption(m_profile); break; case PAGE_COMPONENT: @@ -456,19 +456,19 @@ void KioskGui::loadProfiles() { m_profileSelectionPage->listProfile->clear(); - QStringList profiles = KioskRun::self()->allProfiles(); + TQStringList profiles = KioskRun::self()->allProfiles(); - for(QStringList::ConstIterator it = profiles.begin(); + for(TQStringList::ConstIterator it = profiles.begin(); it != profiles.end(); ++it) { - QString profile = *it; - QString description; - QString installUser; - QString installDir; + TQString profile = *it; + TQString description; + TQString installUser; + TQString installDir; KioskRun::self()->getProfileInfo(profile, description, installDir, installUser); - QListViewItem *item = new QListViewItem(m_profileSelectionPage->listProfile, profile, description); + TQListViewItem *item = new TQListViewItem(m_profileSelectionPage->listProfile, profile, description); if (m_profile == profile) m_profileSelectionPage->listProfile->setSelected(item, true); } @@ -519,20 +519,20 @@ bool KioskGui::savePage(int page) case PAGE_PROFILE_SELECTION: { m_profile = m_profileSelectionPage->listProfile->selectedItem() ? - m_profileSelectionPage->listProfile->selectedItem()->text(0) : QString::null; + m_profileSelectionPage->listProfile->selectedItem()->text(0) : TQString(); KConfig *config = kapp->config(); config->setGroup("General"); config->writeEntry("CurrentProfile", m_profile); config->sync(); - QString description; - QString installDir; - QString installUser; + TQString description; + TQString installDir; + TQString installUser; KioskRun::self()->getProfileInfo(m_profile, description, installDir, installUser); - QStringList kdeDirs; + TQStringList kdeDirs; kdeDirs << installDir; m_run->setKdeDirs(kdeDirs); m_run->setUser(installUser); @@ -622,7 +622,7 @@ bool KioskGui::queryClose() { int result = KMessageBox::warningContinueCancel(this, i18n("Your changes could not be saved, do you want to quit anyway?"), - QString::null, + TQString(), KStdGuiItem::quit()); if (result == KMessageBox::Continue) return true; @@ -635,7 +635,7 @@ bool KioskGui::queryClose() KURL uploadUrl = config->readEntry("uploadURL"); int result = KMessageBox::questionYesNo(this, - i18n("Do you want to upload the profiles to %1 ?").arg(uploadUrl.prettyURL())); + i18n("Do you want to upload the profiles to %1 ?").tqarg(uploadUrl.prettyURL())); if (result == KMessageBox::Yes) { uploadAllProfiles(); @@ -649,26 +649,26 @@ void KioskGui::uploadAllProfiles() { KConfig *config = kapp->config(); config->setGroup("General"); - QString uploadPrefix = config->readEntry("uploadPrefix"); - QString uploadURL = config->readEntry("uploadURL"); + TQString uploadPrefix = config->readEntry("uploadPrefix"); + TQString uploadURL = config->readEntry("uploadURL"); KioskSync sync(this); - QStringList profiles = KioskRun::self()->allProfiles(); + TQStringList profiles = KioskRun::self()->allProfiles(); - for(QStringList::ConstIterator it = profiles.begin(); + for(TQStringList::ConstIterator it = profiles.begin(); it != profiles.end(); ++it) { - QString profile = *it; - QString description; - QString installUser; - QString installDir; + TQString profile = *it; + TQString description; + TQString installUser; + TQString installDir; KioskRun::self()->getProfileInfo(profile, description, installDir, installUser); // sync.addDir(installDir, KURL("ftp://localhost/kde/profiles")); - QString dir = installDir; + TQString dir = installDir; if (dir.startsWith(uploadPrefix)) dir = dir.mid(uploadPrefix.length()); if (dir.startsWith("/")) @@ -681,7 +681,7 @@ void KioskGui::uploadAllProfiles() if (sync.sync()) { - KMessageBox::information(this, i18n("All profiles have been successfully uploaded to %1").arg(uploadURL)); + KMessageBox::information(this, i18n("All profiles have been successfully uploaded to %1").tqarg(uploadURL)); } } @@ -704,21 +704,21 @@ void KioskGui::updateBackground() { m_view->setPaletteBackgroundPixmap(locate("appdata", "background.png")); m_view->logoLabel->setPixmap(locate("appdata", "logo.png")); - m_view->logoLabel->setMinimumSize(QSize(160,170)); - QString language = KGlobal::locale()->language(); - QString caption = locate("appdata", "caption-"+language+".png"); + m_view->logoLabel->setMinimumSize(TQSize(160,170)); + TQString language = KGlobal::locale()->language(); + TQString caption = locate("appdata", "caption-"+language+".png"); if (caption.isEmpty()) caption = locate("appdata", "caption.png"); - QPixmap pm(caption); + TQPixmap pm(caption); m_view->captionLabel->setPixmap(pm); m_view->captionLabel->setMinimumHeight(pm.height()); } else { m_view->unsetPalette(); - m_view->logoLabel->setPixmap(QPixmap()); + m_view->logoLabel->setPixmap(TQPixmap()); m_view->logoLabel->setMinimumSize(0,0); - m_view->captionLabel->setPixmap(QPixmap()); + m_view->captionLabel->setPixmap(TQPixmap()); m_view->captionLabel->setMinimumHeight(0); } } diff --git a/kiosktool/kioskgui.h b/kiosktool/kioskgui.h index 2cb814d..86addfb 100644 --- a/kiosktool/kioskgui.h +++ b/kiosktool/kioskgui.h @@ -19,7 +19,7 @@ #ifndef _KIOSKGUI_H_ #define _KIOSKGUI_H_ -#include +#include #include #include @@ -38,6 +38,7 @@ class KToggleAction; class KioskGui : public KMainWindow { Q_OBJECT + TQ_OBJECT public: enum { PAGE_PROFILE_SELECTION = 1, PAGE_COMPONENT_SELECTION = 2, @@ -65,12 +66,12 @@ public slots: void finishedPage(bool save=true); void discardPage(); void nextPage(); - void slotDeleteProfile(QListViewItem *item=0); + void slotDeleteProfile(TQListViewItem *item=0); void slotAddProfile(); void slotProfileProperties(); void slotProfileSetup(); void slotManageUsers(); - void slotProfileContextMenu(QListViewItem *item, const QPoint &p); + void slotProfileContextMenu(TQListViewItem *item, const TQPoint &p); void slotConfig(); void uploadAllProfiles(); @@ -82,8 +83,8 @@ public slots: protected: void updateActions(); void updateBackground(); - void setWidgetBackground(QWidget *w); - void setSubCaption(const QString &subCaption); + void setWidgetBackground(TQWidget *w); + void setSubCaption(const TQString &subCaption); virtual bool queryClose(); @@ -99,8 +100,8 @@ protected: KioskRun *m_run; int m_activePage; - QString m_profile; - QString m_component; + TQString m_profile; + TQString m_component; ComponentData * m_componentData; KAction *m_uploadAction; KToggleAction *m_backgroundAction; diff --git a/kiosktool/kioskrun.cpp b/kiosktool/kioskrun.cpp index f243cfc..bdf7353 100644 --- a/kiosktool/kioskrun.cpp +++ b/kiosktool/kioskrun.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -51,17 +51,17 @@ KioskRun *KioskRun::s_self = 0; -KioskRun::KioskRun( QObject* parent, const char* name) - : QObject(parent, name), m_dcopClient(0), m_instance(0), m_localKdercConfig(0) +KioskRun::KioskRun( TQObject* parent, const char* name) + : TQObject(parent, name), m_dcopClient(0), m_instance(0), m_localKdercConfig(0) { m_noRestrictions = false; m_forceSycocaUpdate = false; s_self = this; m_saveConfigCache.setAutoDelete(true); m_immutableStatusCache.setAutoDelete(true); - m_homeDir = QDir::homeDirPath()+"/.kde-test"; + m_homeDir = TQDir::homeDirPath()+"/.kde-test"; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - m_kderc = QFile::decodeName(args->getOption("kderc")); + m_kderc = TQFile::decodeName(args->getOption("kderc")); m_isRoot = (getuid() == 0); } @@ -72,7 +72,7 @@ KioskRun::~KioskRun() } void -KioskRun::setUser(const QString &user) +KioskRun::setUser(const TQString &user) { if (m_user == user) return; @@ -81,10 +81,10 @@ KioskRun::setUser(const QString &user) m_user = user; } -static void filterDupes(QStringList &list) +static void filterDupes(TQStringList &list) { - QStringList tmp; - for(QStringList::ConstIterator it = list.begin(); + TQStringList tmp; + for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { if (!tmp.contains(*it)) @@ -94,19 +94,19 @@ static void filterDupes(QStringList &list) } void -KioskRun::setKdeDirs(const QStringList &dirs) +KioskRun::setKdeDirs(const TQStringList &dirs) { if (m_kdeDirs == dirs) return; shutdownRuntimeEnv(); shutdownConfigEnv(); m_kdeDirs = dirs; - QStringList xdgDataDirs = QStringList::split(':', QFile::decodeName(getenv("XDG_DATA_DIRS"))); + TQStringList xdgDataDirs = TQStringList::split(':', TQFile::decodeName(getenv("XDG_DATA_DIRS"))); if (xdgDataDirs.isEmpty()) { - xdgDataDirs = QStringList::split(':', KGlobal::dirs()->kfsstnd_prefixes()); + xdgDataDirs = TQStringList::split(':', KGlobal::dirs()->kfsstnd_prefixes()); xdgDataDirs.pop_front(); - for(QStringList::Iterator it = xdgDataDirs.begin(); + for(TQStringList::Iterator it = xdgDataDirs.begin(); it != xdgDataDirs.end(); ++it) { *it += "share"; @@ -115,7 +115,7 @@ KioskRun::setKdeDirs(const QStringList &dirs) } m_xdgDataDirs.clear(); - for(QStringList::ConstIterator it = dirs.begin(); + for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { m_xdgDataDirs.append(*it+"/share"); @@ -123,18 +123,18 @@ KioskRun::setKdeDirs(const QStringList &dirs) m_xdgDataDirs += xdgDataDirs; filterDupes(m_xdgDataDirs); - QStringList xdgConfigDirs = QStringList::split(':', QFile::decodeName(getenv("XDG_CONFIG_DIRS"))); + TQStringList xdgConfigDirs = TQStringList::split(':', TQFile::decodeName(getenv("XDG_CONFIG_DIRS"))); if (xdgConfigDirs.isEmpty()) { xdgConfigDirs << "/etc/xdg"; - QString sysconfMenuDir = KGlobal::dirs()->findDirs("xdgconf-menu", QString::null).last(); + TQString sysconfMenuDir = KGlobal::dirs()->findDirs("xdgconf-menu", TQString()).last(); if (sysconfMenuDir.endsWith("/menus/")) xdgConfigDirs << sysconfMenuDir.left(sysconfMenuDir.length()-7); } m_xdgConfigDirs.clear(); - for(QStringList::ConstIterator it = dirs.begin(); + for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { m_xdgConfigDirs.append(*it+"/etc/xdg"); @@ -145,7 +145,7 @@ KioskRun::setKdeDirs(const QStringList &dirs) } void -KioskRun::deleteDir(const QString &dir) +KioskRun::deleteDir(const TQString &dir) { if (dir.length() <= 1) // Safety return; @@ -192,8 +192,8 @@ void KioskRun::updateSycoca() { // Force update - QString sycocaUpdateFile = KioskRun::self()->locateLocal("services", "update_ksycoca"); - QFile file(sycocaUpdateFile); + TQString sycocaUpdateFile = KioskRun::self()->locateLocal("services", "update_ksycoca"); + TQFile file(sycocaUpdateFile); file.remove(); file.open(IO_WriteOnly); file.close(); @@ -202,7 +202,7 @@ KioskRun::updateSycoca() } KProcess* -KioskRun::run(const QString &cmd, const QStringList &args) +KioskRun::run(const TQString &cmd, const TQStringList &args) { KProcess *proc = new KProcess(this); @@ -218,10 +218,10 @@ KioskRun::run(const QString &cmd, const QStringList &args) class SetEnv { public: - SetEnv(const char *key, const QString &value) : m_key(key) + SetEnv(const char *key, const TQString &value) : m_key(key) { m_oldValue = getenv(m_key); - setenv(m_key, QFile::encodeName(value), 1); + setenv(m_key, TQFile::encodeName(value), 1); } ~SetEnv() @@ -234,7 +234,7 @@ public: private: const char* m_key; - QCString m_oldValue; + TQCString m_oldValue; }; void @@ -243,11 +243,11 @@ KioskRun::setupConfigEnv() if (m_instance) return; // ::locateLocal must be called before we change the env. vars! - QString newTmpDir = ::locateLocal("tmp", "kioskdir"); - QString newSocketDir = ::locateLocal("socket", "kioskdir"); + TQString newTmpDir = ::locateLocal("tmp", "kioskdir"); + TQString newSocketDir = ::locateLocal("socket", "kioskdir"); SetEnv home("HOME", m_homeDir); - QString kdeHome = m_homeDir+"/.kde"; + TQString kdeHome = m_homeDir+"/.kde"; SetEnv kdehome("KDEHOME", kdeHome); SetEnv kderoothome("KDEROOTHOME", kdeHome); SetEnv kdedirs("KDEDIRS", m_kdeDirs.join(":")); @@ -256,32 +256,32 @@ KioskRun::setupConfigEnv() SetEnv xdgConfigHome("XDG_CONFIG_HOME", m_homeDir+"/.config"); SetEnv xdgConfigDirs("XDG_CONFIG_DIRS", m_xdgConfigDirs.join(":")); - ::mkdir(QFile::encodeName(m_homeDir), 0700); - ::mkdir(QFile::encodeName(kdeHome), 0700); + ::mkdir(TQFile::encodeName(m_homeDir), 0700); + ::mkdir(TQFile::encodeName(kdeHome), 0700); // Create temp & socket dirs. char hostname[256]; hostname[0] = 0; gethostname(hostname, 255); - QString tmpDir = QString("%1/%2-%3").arg(kdeHome).arg("tmp").arg(hostname); + TQString tmpDir = TQString("%1/%2-%3").tqarg(kdeHome).tqarg("tmp").tqarg(hostname); deleteDir(tmpDir); - ::mkdir(QFile::encodeName(newTmpDir), 0700); - ::symlink(QFile::encodeName(newTmpDir), QFile::encodeName(tmpDir)); + ::mkdir(TQFile::encodeName(newTmpDir), 0700); + ::symlink(TQFile::encodeName(newTmpDir), TQFile::encodeName(tmpDir)); - QString socketDir = QString("%1/%2-%3").arg(kdeHome).arg("socket").arg(hostname); + TQString socketDir = TQString("%1/%2-%3").tqarg(kdeHome).tqarg("socket").tqarg(hostname); deleteDir(socketDir); - ::mkdir(QFile::encodeName(newSocketDir), 0700); - ::symlink(QFile::encodeName(newSocketDir), QFile::encodeName(socketDir)); + ::mkdir(TQFile::encodeName(newSocketDir), 0700); + ::symlink(TQFile::encodeName(newSocketDir), TQFile::encodeName(socketDir)); - m_configDir = QString("%1/.kde/share/config/").arg(m_homeDir); + m_configDir = TQString("%1/.kde/share/config/").tqarg(m_homeDir); m_instance = new KInstance("kioskrun"); (void) m_instance->dirs(); // Create KStandardDirs obj m_desktopPath = m_homeDir + "/Desktop/"; m_desktopPath = m_instance->config()->readPathEntry( "Desktop", m_desktopPath); - m_desktopPath = QDir::cleanDirPath( m_desktopPath ); + m_desktopPath = TQDir::cleanDirPath( m_desktopPath ); if ( !m_desktopPath.endsWith("/") ) m_desktopPath.append('/'); @@ -296,35 +296,35 @@ KioskRun::setupConfigEnv() } } -QString -KioskRun::locate(const char *resource, const QString &filename) +TQString +KioskRun::locate(const char *resource, const TQString &filename) { setupConfigEnv(); return m_saveInstance->dirs()->findResource(resource, filename); } -QString -KioskRun::locateSave(const char *resource, const QString &filename) +TQString +KioskRun::locateSave(const char *resource, const TQString &filename) { setupConfigEnv(); // split path from filename int slash = filename.findRev('/')+1; - QString dir = filename.left(slash); - QString file = filename.mid(slash); + TQString dir = filename.left(slash); + TQString file = filename.mid(slash); return m_saveInstance->dirs()->saveLocation(resource, dir, false) + file; } -QString -KioskRun::locateLocal(const char *resource, const QString &filename) +TQString +KioskRun::locateLocal(const char *resource, const TQString &filename) { setupConfigEnv(); // split path from filename int slash = filename.findRev('/')+1; - QString dir = filename.left(slash); - QString file = filename.mid(slash); + TQString dir = filename.left(slash); + TQString file = filename.mid(slash); return m_instance->dirs()->saveLocation(resource, dir, true) + file; } @@ -338,21 +338,21 @@ KioskRun::shutdownConfigEnv() m_instance = 0; } -class ImmutableStatus +class ImmutabletqStatus { public: bool m_fileScope; - QDict m_lines; - QString m_tmpFile; + TQDict m_lines; + TQString m_tmpFile; bool m_dirty; }; bool -KioskRun::isConfigImmutable(const QString &filename, const QString &group) +KioskRun::isConfigImmutable(const TQString &filename, const TQString &group) { (void) configFile(filename); - ImmutableStatus *status = m_immutableStatusCache.find(filename); + ImmutabletqStatus *status = m_immutableStatusCache.find(filename); assert(status); if (group.isEmpty()) return status->m_fileScope; @@ -361,10 +361,10 @@ KioskRun::isConfigImmutable(const QString &filename, const QString &group) } void -KioskRun::setConfigImmutable(const QString &filename, const QString &_group, bool bImmutable) +KioskRun::setConfigImmutable(const TQString &filename, const TQString &_group, bool bImmutable) { (void) configFile(filename); - ImmutableStatus *status = m_immutableStatusCache.find(filename); + ImmutabletqStatus *status = m_immutableStatusCache.find(filename); assert(status); if (_group.isEmpty()) { @@ -377,7 +377,7 @@ KioskRun::setConfigImmutable(const QString &filename, const QString &_group, boo } else { - QString group = QString("[%1]").arg(_group); + TQString group = TQString("[%1]").tqarg(_group); if (status->m_lines.find(group)) { if (!bImmutable) @@ -399,22 +399,22 @@ KioskRun::setConfigImmutable(const QString &filename, const QString &_group, boo } } -static void stripImmutable(QString &ext) +static void stripImmutable(TQString &ext) { ext.replace("i", ""); if (ext == "[$]") - ext = QString::null; + ext = TQString(); } -static void addImmutable(QString &ext) +static void addImmutable(TQString &ext) { ext.replace("[$", "[$i"); } -QString -KioskRun::saveImmutableStatus(const QString &filename) +TQString +KioskRun::saveImmutabletqStatus(const TQString &filename) { - ImmutableStatus *status = new ImmutableStatus; + ImmutabletqStatus *status = new ImmutabletqStatus; status->m_fileScope = false; status->m_dirty = false; m_immutableStatusCache.insert(filename, status); @@ -422,35 +422,35 @@ KioskRun::saveImmutableStatus(const QString &filename) KTempFile tmp; tmp.close(); - QString newPath = tmp.name(); + TQString newPath = tmp.name(); status->m_tmpFile = tmp.name(); - QString path = m_saveInstance->dirs()->findResource("config", filename); + TQString path = m_saveInstance->dirs()->findResource("config", filename); if (path.isEmpty()) return newPath; // Nothing to do - QFile oldCfg(path); + TQFile oldCfg(path); if (!oldCfg.open( IO_ReadOnly )) return newPath; // Error - QFile newCfg(newPath); + TQFile newCfg(newPath); if (!newCfg.open( IO_WriteOnly )) return newPath; // Error - QTextStream txtIn(&oldCfg); - txtIn.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream txtIn(&oldCfg); + txtIn.setEncoding(TQTextStream::UnicodeUTF8); - QTextStream pTxtOut(&newCfg); - pTxtOut.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream pTxtOut(&newCfg); + pTxtOut.setEncoding(TQTextStream::UnicodeUTF8); - QRegExp immutable("(\\[\\$e?ie?\\])$"); + TQRegExp immutable("(\\[\\$e?ie?\\])$"); // TODO: Use "group+key" instead of "key" as index, otherwise it might not be unique while(! txtIn.atEnd()) { - QString line = txtIn.readLine().stripWhiteSpace(); + TQString line = txtIn.readLine().stripWhiteSpace(); if (line.startsWith("#")) { @@ -461,8 +461,8 @@ KioskRun::saveImmutableStatus(const QString &filename) int pos = immutable.searchRev(line); if (pos != -1) { - QString group = line.left(pos); - QString ext = immutable.cap(0); + TQString group = line.left(pos); + TQString ext = immutable.cap(0); stripImmutable(ext); if (pos == 0) { @@ -478,12 +478,12 @@ KioskRun::saveImmutableStatus(const QString &filename) int equal = line.find('='); if (equal != -1) { - QString key = line.left(equal).stripWhiteSpace(); + TQString key = line.left(equal).stripWhiteSpace(); int pos = immutable.searchRev(key); if (pos != -1) { key = key.left(pos); - QString ext = immutable.cap(0); + TQString ext = immutable.cap(0); stripImmutable(ext); status->m_lines.replace(key, (int *)1 ); line = key + ext + line.mid(equal); @@ -505,23 +505,23 @@ KioskRun::saveImmutableStatus(const QString &filename) } bool -KioskRun::restoreImmutableStatus(const QString &filename, bool force) +KioskRun::restoreImmutabletqStatus(const TQString &filename, bool force) { - ImmutableStatus *status = m_immutableStatusCache.take(filename); + ImmutabletqStatus *status = m_immutableStatusCache.take(filename); if (!status) { - kdDebug() << "KioskRun::restoreImmutableStatus(" << filename << ") status info missing" << endl; + kdDebug() << "KioskRun::restoreImmutabletqStatus(" << filename << ") status info missing" << endl; return true; } if (!force && !status->m_dirty) { - kdDebug() << "KioskRun::restoreImmutableStatus(" << filename << ") not changed" << endl; + kdDebug() << "KioskRun::restoreImmutabletqStatus(" << filename << ") not changed" << endl; delete status; return true; } - kdDebug() << "KioskRun::restoreImmutableStatus(" << filename << ") restoring" << endl; + kdDebug() << "KioskRun::restoreImmutabletqStatus(" << filename << ") restoring" << endl; - QString path = status->m_tmpFile; + TQString path = status->m_tmpFile; KSaveFile newCfg(path); if (newCfg.status() != 0) @@ -530,10 +530,10 @@ KioskRun::restoreImmutableStatus(const QString &filename, bool force) return true; // Continue } - QTextStream *pTxtOut = newCfg.textStream(); - pTxtOut->setEncoding(QTextStream::UnicodeUTF8); + TQTextStream *pTxtOut = newCfg.textStream(); + pTxtOut->setEncoding(TQTextStream::UnicodeUTF8); - QRegExp option("(\\[\\$e\\])$"); + TQRegExp option("(\\[\\$e\\])$"); if (status->m_fileScope) { @@ -541,16 +541,16 @@ KioskRun::restoreImmutableStatus(const QString &filename, bool force) (*pTxtOut) << "[$i]" << endl; } - QFile oldCfg(path); + TQFile oldCfg(path); if (oldCfg.open( IO_ReadOnly )) { - QTextStream txtIn(&oldCfg); - txtIn.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream txtIn(&oldCfg); + txtIn.setEncoding(TQTextStream::UnicodeUTF8); while(! txtIn.atEnd()) { - QString line = txtIn.readLine().stripWhiteSpace(); + TQString line = txtIn.readLine().stripWhiteSpace(); if (line.startsWith("#")) { @@ -566,12 +566,12 @@ KioskRun::restoreImmutableStatus(const QString &filename, bool force) int equal = line.find('='); if (equal != -1) { - QString key = line.left(equal).stripWhiteSpace(); + TQString key = line.left(equal).stripWhiteSpace(); int pos = option.searchRev(key); if (pos != -1) { key = key.left(pos); - QString ext = option.cap(0); + TQString ext = option.cap(0); if (status->m_lines.take(key)) addImmutable(ext); line = key + ext + line.mid(equal); @@ -590,10 +590,10 @@ KioskRun::restoreImmutableStatus(const QString &filename, bool force) } // Create remaining groups that were marked as immutable - QDictIterator it( status->m_lines ); + TQDictIterator it( status->m_lines ); for( ; it.current(); ++it ) { - QString group = it.currentKey(); + TQString group = it.currentKey(); if ( it.current() ) (*pTxtOut) << endl << group << "[$i]" << endl; } @@ -605,7 +605,7 @@ KioskRun::restoreImmutableStatus(const QString &filename, bool force) return true; // Continue } - QString installLocation = m_saveInstance->dirs()->saveLocation("config", QString::null, false) + filename; + TQString installLocation = m_saveInstance->dirs()->saveLocation("config", TQString(), false) + filename; if (!install(path, installLocation)) { m_immutableStatusCache.insert(filename, status); // Keep it around @@ -620,12 +620,12 @@ KioskRun::flushConfigCache() { while ( !m_saveConfigCache.isEmpty() ) { - QDictIterator it( m_saveConfigCache ); - QString file = it.currentKey(); + TQDictIterator it( m_saveConfigCache ); + TQString file = it.currentKey(); KConfig *config = it.current(); bool dirty = config->isDirty(); config->sync(); // Save - if (!restoreImmutableStatus(file, dirty)) + if (!restoreImmutabletqStatus(file, dirty)) return false; m_saveConfigCache.remove(file); } @@ -636,7 +636,7 @@ KioskRun::flushConfigCache() } KConfig * -KioskRun::configFile(const QString &filename) +KioskRun::configFile(const TQString &filename) { KConfig *config = m_saveConfigCache.find(filename); if (config) @@ -646,7 +646,7 @@ KioskRun::configFile(const QString &filename) setupConfigEnv(); - QString saveLocation = saveImmutableStatus(filename); + TQString saveLocation = saveImmutabletqStatus(filename); config = new KSimpleConfig(saveLocation); m_saveConfigCache.insert(filename, config); @@ -669,36 +669,36 @@ KioskRun::makeMutable(bool bMutable) } else { - config->writeEntry("kiosk_exception", QString::null); + config->writeEntry("kiosk_exception", TQString()); } } // Propagate to kdeinit dcopRef("klauncher", "klauncher").call("setLaunchEnv", - QCString("KDE_KIOSK_NO_RESTRICTIONS"), QCString(m_noRestrictions ? "true" : "")); + TQCString("KDE_KIOSK_NO_RESTRICTIONS"), TQCString(m_noRestrictions ? "true" : "")); setConfigImmutable("kdeglobals", "KDE Action Restrictions", true); } -QStringList +TQStringList KioskRun::newConfigFiles() { setupConfigEnv(); - QStringList exceptions; + TQStringList exceptions; exceptions << "kconf_updaterc"; - QStringList result; - QDir dir(m_configDir); - dir.setFilter( QDir::Files | QDir::NoSymLinks ); + TQStringList result; + TQDir dir(m_configDir); + dir.setFilter( TQDir::Files | TQDir::NoSymLinks ); - const QFileInfoList *list = dir.entryInfoList(); + const TQFileInfoList *list = dir.entryInfoList(); if (!list) return result; - QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfoListIterator it( *list ); + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { - QString file = fi->fileName(); + TQString file = fi->fileName(); if (!file.endsWith("~") && !exceptions.contains(file)) // Skip backup files & exceptions result.append(file); ++it; @@ -707,20 +707,20 @@ KioskRun::newConfigFiles() } void -KioskRun::mergeConfigFile(const QString &filename) +KioskRun::mergeConfigFile(const TQString &filename) { KConfig *saveCfg = configFile(filename); kdDebug() << "KioskRun::mergeConfigFile(" << (m_configDir + filename) << ")" << endl; KSimpleConfig newCfg(m_configDir + filename); - QStringList groups = newCfg.groupList(); - for(QStringList::ConstIterator it = groups.begin(); + TQStringList groups = newCfg.groupList(); + for(TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it) { saveCfg->setGroup(*it); - QMap map = newCfg.entryMap(*it); - for(QMap::Iterator it2 = map.begin(); + TQMap map = newCfg.entryMap(*it); + for(TQMap::Iterator it2 = map.begin(); it2 != map.end(); ++it2) { #ifdef DEBUG_ENTRIES @@ -743,21 +743,21 @@ KioskRun::setupRuntimeEnv() char hostname[256]; hostname[0] = 0; gethostname(hostname, 255); - QString cacheDir = QString("%1/.kde/cache-%2").arg(m_homeDir).arg(hostname); + TQString cacheDir = TQString("%1/.kde/cache-%2").tqarg(m_homeDir).tqarg(hostname); deleteDir(cacheDir); KStandardDirs::makeDir(cacheDir); deleteDir(m_homeDir+"/.qt"); - ::unlink(QFile::encodeName(m_homeDir+".kderc")); + ::unlink(TQFile::encodeName(m_homeDir+".kderc")); - QString iceAuth = QString("%1/.ICEauthority").arg(QDir::homeDirPath()); - setenv("ICEAUTHORITY", QFile::encodeName(iceAuth), 0); // Don't overwrite existing setting + TQString iceAuth = TQString("%1/.ICEauthority").tqarg(TQDir::homeDirPath()); + setenv("ICEAUTHORITY", TQFile::encodeName(iceAuth), 0); // Don't overwrite existing setting - QString xAuth = QString("%1/.Xauthority").arg(QDir::homeDirPath()); - setenv("XAUTHORITY", QFile::encodeName(xAuth), 0); // Don't overwrite existing setting + TQString xAuth = TQString("%1/.Xauthority").tqarg(TQDir::homeDirPath()); + setenv("XAUTHORITY", TQFile::encodeName(xAuth), 0); // Don't overwrite existing setting - QString dcopServerFile = m_homeDir+"/.kde/DCOPserver"; + TQString dcopServerFile = m_homeDir+"/.kde/DCOPserver"; KProcess kdeinit; @@ -765,18 +765,18 @@ KioskRun::setupRuntimeEnv() kdeinit << "kdeinit"; - connect(&kdeinit, SIGNAL(processExited(KProcess *)), &dlg, SLOT(slotFinished())); + connect(&kdeinit, TQT_SIGNAL(processExited(KProcess *)), &dlg, TQT_SLOT(slotFinished())); kdeinit.start(KProcess::NotifyOnExit); dlg.exec(); - QCString dcopSrv; - QFile f(dcopServerFile); + TQCString dcopSrv; + TQFile f(dcopServerFile); if (f.open(IO_ReadOnly)) { - int size = QMIN( 1024, f.size() ); // protection against a huge file - QCString contents( size+1 ); + int size = TQMIN( 1024, f.size() ); // protection against a huge file + TQCString contents( size+1 ); if ( f.readBlock( contents.data(), size ) == size ) { contents[size] = '\0'; @@ -827,7 +827,7 @@ KioskRun::shutdownRuntimeEnv() } DCOPRef -KioskRun::dcopRef(const QCString &appId, const QCString &objId) +KioskRun::dcopRef(const TQCString &appId, const TQCString &objId) { if (!setupRuntimeEnv()) return DCOPRef(); @@ -838,7 +838,7 @@ KioskRun::dcopRef(const QCString &appId, const QCString &objId) // Lookup the setting for a custom action bool -KioskRun::lookupCustomAction(const QString &action) +KioskRun::lookupCustomAction(const TQString &action) { KConfig *cfg = KioskRun::self()->configFile("kdeglobals"); cfg->setGroup("KDE Custom Restrictions"); @@ -847,7 +847,7 @@ KioskRun::lookupCustomAction(const QString &action) // Change the setting for a custom action void -KioskRun::setCustomAction(const QString &action, bool checked) +KioskRun::setCustomAction(const TQString &action, bool checked) { KConfig *cfg = KioskRun::self()->configFile("kdeglobals"); cfg->setGroup("KDE Custom Restrictions"); @@ -865,9 +865,9 @@ KioskRun::setCustomAction(const QString &action, bool checked) // Create directory bool -KioskRun::createDir(const QString &dir) +KioskRun::createDir(const TQString &dir) { - if (QDir(dir).exists()) + if (TQDir(dir).exists()) return true; // Exists already KURL dest; @@ -897,28 +897,28 @@ KioskRun::createDir(const QString &dir) if (result == true) return true; - QString error = NETACCESS::lastErrorString(); - QString msg; + TQString error = NETACCESS::lastErrorString(); + TQString msg; if (error.isEmpty()) msg = i18n("The directory %1 could not be created because of an unspecified problem.

") - .arg(dir); + .tqarg(dir); else msg = i18n("The directory %1 could not be created because of the following problem:" "

%2

") - .arg(dir, NETACCESS::lastErrorString()); + .tqarg(dir, NETACCESS::lastErrorString()); msg += i18n("Without this directory your changes can not be saved.

" "Do you want to retry creating the directory or abort the saving of changes?"); - int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, QString::null, + int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, TQString(), i18n("&Retry"), i18n("&Abort")); if (msgResult == KMessageBox::No) return false; // Maybe the user created it in the meantime - if (QDir(dir).exists()) + if (TQDir(dir).exists()) return true; // Exists already } while (true); @@ -944,13 +944,13 @@ KioskRun::createRemoteDirRecursive(const KURL &dest, bool ask) // Parent doesn't exist, int result = KMessageBox::warningContinueCancel(kapp->mainWidget(), i18n("The directory %1 does not yet exist. " - "Do you want to create it?").arg(parent.prettyURL()), QString::null, + "Do you want to create it?").tqarg(parent.prettyURL()), TQString(), i18n("Create &Dir")); if (result != KMessageBox::Continue) return false; } - QString path = dest.path(1); + TQString path = dest.path(1); int i = 0; while ( (i = path.find('/', i+1)) != -1) { @@ -979,21 +979,21 @@ KioskRun::createRemoteDir(const KURL &dest) #endif //TODO Check directory already exists error - QString error = NETACCESS::lastErrorString(); - QString msg; + TQString error = NETACCESS::lastErrorString(); + TQString msg; if (error.isEmpty()) msg = i18n("The directory %1 could not be created because of an unspecified problem.

") - .arg(dest.prettyURL()); + .tqarg(dest.prettyURL()); else msg = i18n("The directory %1 could not be created because of the following problem:" "

%2

") - .arg(dest.prettyURL(), NETACCESS::lastErrorString()); + .tqarg(dest.prettyURL(), NETACCESS::lastErrorString()); msg += i18n("Without this directory your files can not be uploaded.

" "Do you want to retry creating the directory or abort uploading?"); - int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, QString::null, + int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, TQString(), i18n("&Retry"), i18n("&Abort")); if (msgResult == KMessageBox::No) @@ -1005,7 +1005,7 @@ KioskRun::createRemoteDir(const KURL &dest) // Install file bool -KioskRun::install(const QString &file, const QString &destination) +KioskRun::install(const TQString &file, const TQString &destination) { KURL dest; if (!m_isRoot || (m_user != "root")) @@ -1026,23 +1026,23 @@ KioskRun::install(const QString &file, const QString &destination) bool result = NETACCESS::file_copy(src, dest, 0644, true, false, kapp->mainWidget()); if (result == true) { - ::unlink(QFile::encodeName(file)); + ::unlink(TQFile::encodeName(file)); return true; } - QString error = NETACCESS::lastErrorString(); - QString msg; + TQString error = NETACCESS::lastErrorString(); + TQString msg; if (error.isEmpty()) msg = i18n("The file %1 could not be installed because of an unspecified problem.") - .arg(destination); + .tqarg(destination); else msg = i18n("The file %1 could not be installed because of the following problem:" "

%2

") - .arg(destination, NETACCESS::lastErrorString()); + .tqarg(destination, NETACCESS::lastErrorString()); msg += i18n("Do you want to retry the installation or abort the saving of changes?"); - int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, QString::null, + int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, TQString(), i18n("&Retry"), i18n("&Abort")); if (msgResult == KMessageBox::No) @@ -1054,7 +1054,7 @@ KioskRun::install(const QString &file, const QString &destination) // Upload file bool -KioskRun::uploadRemote(const QString &file, const KURL &dest) +KioskRun::uploadRemote(const TQString &file, const KURL &dest) { do { @@ -1064,19 +1064,19 @@ KioskRun::uploadRemote(const QString &file, const KURL &dest) if (result == true) return true; - QString error = NETACCESS::lastErrorString(); - QString msg; + TQString error = NETACCESS::lastErrorString(); + TQString msg; if (error.isEmpty()) msg = i18n("The file %1 could not be uploaded to %2 because of an unspecified problem.") - .arg(file, dest.prettyURL()); + .tqarg(file, dest.prettyURL()); else msg = i18n("The file %1 could not be uploaded to %2 because of the following problem:" "

%3

") - .arg(file, dest.prettyURL(),NETACCESS::lastErrorString()); + .tqarg(file, dest.prettyURL(),NETACCESS::lastErrorString()); msg += i18n("Do you want to retry or abort the uploading?"); - int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, QString::null, + int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, TQString(), i18n("&Retry"), i18n("&Abort")); if (msgResult == KMessageBox::No) @@ -1088,7 +1088,7 @@ KioskRun::uploadRemote(const QString &file, const KURL &dest) // Remove file bool -KioskRun::remove(const QString &destination) +KioskRun::remove(const TQString &destination) { KURL dest; if (!m_isRoot || (m_user != "root")) @@ -1104,7 +1104,7 @@ KioskRun::remove(const QString &destination) // Move file or directory bool -KioskRun::move(const QString &source, const QString &destination, const QStringList &files) +KioskRun::move(const TQString &source, const TQString &destination, const TQStringList &files) { KURL src; KURL dest; @@ -1118,7 +1118,7 @@ KioskRun::move(const QString &source, const QString &destination, const QStringL src.setUser(m_user); } - for(QStringList::ConstIterator it = files.begin(); + for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { src.setPath(source + *it); @@ -1139,32 +1139,32 @@ kdDebug() << "Moving " << src << " --> " << dest << endl; // Read information of profile @p profile void -KioskRun::getProfileInfo(const QString &profile, QString &description, QString &installDir, QString &installUser) +KioskRun::getProfileInfo(const TQString &profile, TQString &description, TQString &installDir, TQString &installUser) { KConfig *config = kapp->config(); - QString defaultInstallDir = getProfilePrefix(); + TQString defaultInstallDir = getProfilePrefix(); if (defaultInstallDir.isEmpty()) { defaultInstallDir = "/etc/kde-profile/"; } if (!defaultInstallDir.endsWith("/")) defaultInstallDir.append("/"); - QString tmp = profile; + TQString tmp = profile; tmp.replace(" ", "_"); tmp.replace(":", "_"); tmp.replace("/", "_"); defaultInstallDir += tmp+"/"; - QString group = QString("Directories-%1").arg(profile); + TQString group = TQString("Directories-%1").tqarg(profile); config->setGroup(group); installDir = config->readEntry("prefixes", defaultInstallDir); if (!installDir.endsWith("/")) installDir.append("/"); - QString profileInfoFile = installDir + ".kdeprofile"; - if (QFile::exists(profileInfoFile)) + TQString profileInfoFile = installDir + ".kdeprofile"; + if (TQFile::exists(profileInfoFile)) { KSimpleConfig profileInfo(profileInfoFile, true); description = profileInfo.readEntry("Description"); @@ -1172,7 +1172,7 @@ KioskRun::getProfileInfo(const QString &profile, QString &description, QString & return; } - QString defaultDescription; + TQString defaultDescription; if (profile == "default") defaultDescription = i18n("Default profile"); @@ -1190,29 +1190,29 @@ KioskRun::openKderc() settingsUrl.setPath(m_kderc); m_localKderc = ::locateLocal("tmp", "kderc_"+kapp->randomString(5)); - ::unlink(QFile::encodeName(m_localKderc)); + ::unlink(TQFile::encodeName(m_localKderc)); KURL localCopyUrl; localCopyUrl.setPath(m_localKderc); - if (QFile::exists(settingsUrl.path())) + if (TQFile::exists(settingsUrl.path())) { while (!NETACCESS::copy(settingsUrl, localCopyUrl, kapp->mainWidget())) { - QString error = NETACCESS::lastErrorString(); - QString msg; + TQString error = NETACCESS::lastErrorString(); + TQString msg; if (error.isEmpty()) msg = i18n("The file %1 could not be accessed because of an unspecified problem.") - .arg(settingsUrl.path()); + .tqarg(settingsUrl.path()); else msg = i18n("The file %1 could not be accessed because of the following problem:" "

%2

") - .arg(settingsUrl.path(), error); + .tqarg(settingsUrl.path(), error); msg += i18n("Do you want to retry the operation or abort the saving of changes?"); - int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, QString::null, + int msgResult = KMessageBox::warningYesNo(kapp->mainWidget(), msg, TQString(), i18n("&Retry"), i18n("&Abort")); if (msgResult == KMessageBox::No) @@ -1233,10 +1233,10 @@ KioskRun::closeKderc() delete m_localKdercConfig; m_localKdercConfig = 0; - QString saveUser = m_user; + TQString saveUser = m_user; m_user = "root"; bool result = install(m_localKderc, m_kderc); - m_localKderc = QString::null; + m_localKderc = TQString(); m_user = saveUser; kapp->config()->reparseConfiguration(); return result; @@ -1244,37 +1244,37 @@ KioskRun::closeKderc() // Store information for profile @p profile bool -KioskRun::setProfileInfo(const QString &profile, const QString &description, const QString &_installDir, const QString &installUser, bool deleteProfile, bool deleteFiles) +KioskRun::setProfileInfo(const TQString &profile, const TQString &description, const TQString &_installDir, const TQString &installUser, bool deleteProfile, bool deleteFiles) { - QString installDir = _installDir; + TQString installDir = _installDir; if (!installDir.endsWith("/")) installDir.append("/"); - QString saveProfileInfo = installDir + ".kdeprofile"; + TQString saveProfileInfo = installDir + ".kdeprofile"; KSimpleConfig profileInfo(saveProfileInfo, true); - QString oldDescription = profileInfo.readEntry("Description"); - QString oldInstallUser = profileInfo.readEntry("InstallUser"); + TQString oldDescription = profileInfo.readEntry("Description"); + TQString oldInstallUser = profileInfo.readEntry("InstallUser"); if (deleteProfile && !installDir.isEmpty()) { bool result = true; KioskSync profileDir(kapp->mainWidget()); profileDir.addDir(installDir, KURL()); - QStringList allFiles = profileDir.listFiles(); + TQStringList allFiles = profileDir.listFiles(); allFiles.remove(".kdeprofile"); if (allFiles.isEmpty()) { - if (QDir(installDir).exists()) + if (TQDir(installDir).exists()) { m_user = installUser; remove(installDir); - m_user = QString::null; + m_user = TQString(); } } else if (deleteFiles) { int msgResult = KMessageBox::warningYesNoCancelList(kapp->mainWidget(), i18n("The profile directory %1 contains the following files, " - "do you wish to delete these files?").arg(installDir), + "do you wish to delete these files?").tqarg(installDir), allFiles, i18n("Deleting Profile"), #if KDE_IS_VERSION(3,2,91) @@ -1290,7 +1290,7 @@ KioskRun::setProfileInfo(const QString &profile, const QString &description, con // Delete files m_user = installUser; result = remove(installDir); - m_user = QString::null; + m_user = TQString(); if (!result) return false; break; @@ -1306,17 +1306,17 @@ KioskRun::setProfileInfo(const QString &profile, const QString &description, con } m_user = installUser; - if (QFile::exists(saveProfileInfo)) + if (TQFile::exists(saveProfileInfo)) result = remove(saveProfileInfo); - m_user = QString::null; + m_user = TQString(); if (!result) return false; } else if ((description != oldDescription) || (installUser != oldInstallUser)) { - QString localProfileInfo = ::locateLocal("tmp", "kdeprofile_"+kapp->randomString(5)); - ::unlink(QFile::encodeName(localProfileInfo)); + TQString localProfileInfo = ::locateLocal("tmp", "kdeprofile_"+kapp->randomString(5)); + ::unlink(TQFile::encodeName(localProfileInfo)); KSimpleConfig newProfileInfo(localProfileInfo); newProfileInfo.writeEntry("Description", description); newProfileInfo.writeEntry("InstallUser", installUser); @@ -1327,14 +1327,14 @@ KioskRun::setProfileInfo(const QString &profile, const QString &description, con } KUser thisUser; - QString newAdmin = thisUser.loginName()+":"; // This user, all hosts + TQString newAdmin = thisUser.loginName()+":"; // This user, all hosts KConfig *config = kapp->config(); config->setGroup("Directories"); - QString oldAdmin = config->readEntry("kioskAdmin"); + TQString oldAdmin = config->readEntry("kioskAdmin"); - QString group = QString("Directories-%1").arg(profile); + TQString group = TQString("Directories-%1").tqarg(profile); config->setGroup(group); if ((installDir == config->readEntry("prefixes")) && @@ -1365,24 +1365,24 @@ KioskRun::setProfileInfo(const QString &profile, const QString &description, con } bool -KioskRun::deleteProfile(const QString &profile, bool deleteFiles) +KioskRun::deleteProfile(const TQString &profile, bool deleteFiles) { - QString description; - QString installDir; - QString installUser; + TQString description; + TQString installDir; + TQString installUser; getProfileInfo(profile, description, installDir, installUser); return setProfileInfo(profile, description, installDir, installUser, true, deleteFiles); } // Read profile prefix -QString +TQString KioskRun::getProfilePrefix() { KConfig *config = kapp->config(); config->setGroup("Directories"); - QString prefix = config->readEntry("profileDirsPrefix"); + TQString prefix = config->readEntry("profileDirsPrefix"); if (!prefix.isEmpty() && !prefix.endsWith("/")) prefix.append('/'); return prefix; @@ -1390,9 +1390,9 @@ KioskRun::getProfilePrefix() // Store profile prefix bool -KioskRun::setProfilePrefix(const QString &_prefix) +KioskRun::setProfilePrefix(const TQString &_prefix) { - QString prefix = _prefix; + TQString prefix = _prefix; if (!prefix.isEmpty() && !prefix.endsWith("/")) prefix.append('/'); @@ -1412,62 +1412,62 @@ KioskRun::setProfilePrefix(const QString &_prefix) return closeKderc(); } -QString +TQString KioskRun::newProfile() { - QString profilePrefix = getProfilePrefix(); + TQString profilePrefix = getProfilePrefix(); KConfig *config = kapp->config(); for(int p = 1; p; p++) { - QString profile = QString("profile%1").arg(p); - QString group = QString("Directories-%1").arg(profile); + TQString profile = TQString("profile%1").tqarg(p); + TQString group = TQString("Directories-%1").tqarg(profile); if (!config->hasGroup(group)) { if (profilePrefix.isEmpty()) return profile; - QString profileDir = profilePrefix + profile; - if (!QDir(profileDir).exists() && !QFile::exists(profileDir)) + TQString profileDir = profilePrefix + profile; + if (!TQDir(profileDir).exists() && !TQFile::exists(profileDir)) return profile; // Keep on looking... } } - return QString::null; + return TQString(); } -QStringList +TQStringList KioskRun::allProfiles() { KConfig *config = kapp->config(); - QStringList groups = config->groupList(); - QStringList profiles; - QStringList directories; - for(QStringList::ConstIterator it = groups.begin(); + TQStringList groups = config->groupList(); + TQStringList profiles; + TQStringList directories; + for(TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it) { if (!(*it).startsWith("Directories-")) continue; profiles.append((*it).mid(12)); config->setGroup(*it); - QString installDir = config->readEntry("prefixes"); + TQString installDir = config->readEntry("prefixes"); if (!installDir.endsWith("/")) installDir.append("/"); directories.append(installDir); } - QString profilePrefix = getProfilePrefix(); + TQString profilePrefix = getProfilePrefix(); if (!profilePrefix.isEmpty()) { - QDir dir(profilePrefix, QString::null, QDir::Unsorted, QDir::Dirs); - QStringList profileDirs = dir.entryList(); - for(QStringList::ConstIterator it = profileDirs.begin(); + TQDir dir(profilePrefix, TQString(), TQDir::Unsorted, TQDir::Dirs); + TQStringList profileDirs = dir.entryList(); + for(TQStringList::ConstIterator it = profileDirs.begin(); it != profileDirs.end(); ++it) { if ((*it).startsWith(".")) continue; - QString dir = profilePrefix + *it + "/"; + TQString dir = profilePrefix + *it + "/"; if (directories.contains(dir)) { kdDebug() << "Skipping " << dir << ", dir already listed" << endl; @@ -1479,7 +1479,7 @@ KioskRun::allProfiles() continue; } - if (!QFile::exists(dir+".kdeprofile")) + if (!TQFile::exists(dir+".kdeprofile")) { kdDebug() << "Skipping " << dir << ", no profile info" << endl; continue; @@ -1496,16 +1496,16 @@ KioskRun::allProfiles() } void -KioskRun::getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users, QStringList &groupOrder) +KioskRun::getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users, TQStringList &groupOrder) { groups.clear(); users.clear(); KConfig *config = kapp->config(); config->setGroup("Directories"); - QString mapFile = config->readEntry("userProfileMapFile"); + TQString mapFile = config->readEntry("userProfileMapFile"); - if (mapFile.isEmpty() || !QFile::exists(mapFile)) + if (mapFile.isEmpty() || !TQFile::exists(mapFile)) return; KSimpleConfig mapCfg(mapFile, true); @@ -1514,32 +1514,32 @@ KioskRun::getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users, groupOrder = mapCfg.readListEntry("groups"); mapCfg.setGroup("Groups"); - for ( QStringList::ConstIterator it = groupOrder.begin(); + for ( TQStringList::ConstIterator it = groupOrder.begin(); it != groupOrder.end(); ++it ) { - QString group = *it; - QStringList profiles = mapCfg.readListEntry(group); + TQString group = *it; + TQStringList profiles = mapCfg.readListEntry(group); if (!profiles.isEmpty()) groups.insert(group, profiles); } - QMap cfg_users = mapCfg.entryMap("Users"); - for ( QMap::Iterator it = cfg_users.begin(); + TQMap cfg_users = mapCfg.entryMap("Users"); + for ( TQMap::Iterator it = cfg_users.begin(); it != cfg_users.end(); ++it ) { - QString user = it.key(); - QStringList profiles = QStringList::split(",", it.data()); + TQString user = it.key(); + TQStringList profiles = TQStringList::split(",", it.data()); if (!profiles.isEmpty()) users.insert(user, profiles); } } bool -KioskRun::setUserProfileMappings( const ProfileMapping &groups, const ProfileMapping &users, const QStringList &groupOrder) +KioskRun::setUserProfileMappings( const ProfileMapping &groups, const ProfileMapping &users, const TQStringList &groupOrder) { KConfig *config = kapp->config(); config->setGroup("Directories"); - QString mapFile = config->readEntry("userProfileMapFile"); + TQString mapFile = config->readEntry("userProfileMapFile"); if (mapFile.isEmpty()) { mapFile = "/etc/kde-user-profile"; @@ -1554,8 +1554,8 @@ KioskRun::setUserProfileMappings( const ProfileMapping &groups, const ProfileMap return false; } - QString localMapFile = ::locateLocal("tmp", "kde-user-profile_"+kapp->randomString(5)); - ::unlink(QFile::encodeName(localMapFile)); + TQString localMapFile = ::locateLocal("tmp", "kde-user-profile_"+kapp->randomString(5)); + ::unlink(TQFile::encodeName(localMapFile)); KSimpleConfig mapConfig(localMapFile); @@ -1567,19 +1567,19 @@ KioskRun::setUserProfileMappings( const ProfileMapping &groups, const ProfileMap mapConfig.setGroup("Groups"); for ( it = groups.begin(); it != groups.end(); ++it ) { - QString group = it.key(); + TQString group = it.key(); mapConfig.writeEntry(group, it.data()); } mapConfig.setGroup("Users"); for ( it = users.begin(); it != users.end(); ++it ) { - QString user = it.key(); + TQString user = it.key(); mapConfig.writeEntry(user, it.data()); } mapConfig.sync(); - QString saveUser = m_user; + TQString saveUser = m_user; m_user = "root"; bool result = install(localMapFile, mapFile); m_user = saveUser; @@ -1592,7 +1592,7 @@ KioskRun::forceSycocaUpdate() // Touch $KDEDIR/share/services/update_ksycoca KTempFile tempFile; tempFile.close(); - QString sycocaUpdateFile = locateSave("services", "update_ksycoca"); + TQString sycocaUpdateFile = locateSave("services", "update_ksycoca"); remove(sycocaUpdateFile); install(tempFile.name(), sycocaUpdateFile); } @@ -1606,24 +1606,24 @@ KioskRun::scheduleSycocaUpdate() void KioskRun::setCustomRestrictionFileBrowsing(bool restrict) { - QString file = "kdeglobals"; - QString group = "KDE URL Restrictions"; + TQString file = "kdeglobals"; + TQString group = "KDE URL Restrictions"; KConfig *cfg = KioskRun::self()->configFile(file); cfg->setGroup(group); int count = cfg->readNumEntry("rule_count"); - QStringList urlRestrictions; + TQStringList urlRestrictions; for(int i = 0; i < count; i++) { - QString key = QString("rule_%1").arg(i+1); + TQString key = TQString("rule_%1").tqarg(i+1); if (cfg->hasKey(key)) urlRestrictions.append(cfg->readEntry(key)); } - QStringList newRestrictions; + TQStringList newRestrictions; newRestrictions << "list,,,,file,,,false"; newRestrictions << "list,,,,file,,$HOME,true"; - for(QStringList::ConstIterator it = newRestrictions.begin(); + for(TQStringList::ConstIterator it = newRestrictions.begin(); it != newRestrictions.end(); ++it) { urlRestrictions.remove(*it); @@ -1640,17 +1640,17 @@ KioskRun::setCustomRestrictionFileBrowsing(bool restrict) for(int i = 0; i < count; i++) { - QString key = QString("rule_%1").arg(i+1); + TQString key = TQString("rule_%1").tqarg(i+1); cfg->writeEntry(key, urlRestrictions[i]); } KioskRun::self()->setConfigImmutable(file, group, true); } -KioskRunProgressDialog::KioskRunProgressDialog(QWidget *parent, const char *name, - const QString &caption, const QString &text) +KioskRunProgressDialog::KioskRunProgressDialog(TQWidget *parent, const char *name, + const TQString &caption, const TQString &text) : KProgressDialog(parent, name, caption, text, true) { - connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotProgress())); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotProgress())); progressBar()->setTotalSteps(20); m_timeStep = 700; m_timer.start(m_timeStep); @@ -1679,7 +1679,7 @@ KioskRunProgressDialog::slotFinished() { progressBar()->setProgress(20); m_timer.stop(); - QTimer::singleShot(1000, this, SLOT(close())); + TQTimer::singleShot(1000, this, TQT_SLOT(close())); } diff --git a/kiosktool/kioskrun.h b/kiosktool/kioskrun.h index c4cb8f8..dcd114f 100644 --- a/kiosktool/kioskrun.h +++ b/kiosktool/kioskrun.h @@ -19,47 +19,48 @@ #ifndef _KIOSKRUN_H_ #define _KIOSKRUN_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -class ImmutableStatus; +class ImmutabletqStatus; class KConfig; class KProcess; class KSimpleConfig; class KioskGui; -class KioskRun : public QObject +class KioskRun : public TQObject { friend class KioskGui; Q_OBJECT + TQ_OBJECT public: static KioskRun* self() { return s_self; } - void setKdeDirs(const QStringList &dirs); - void setUser(const QString &user); + void setKdeDirs(const TQStringList &dirs); + void setUser(const TQString &user); - QString homeDir() { return m_homeDir; } - QStringList kdeDirs() { return m_kdeDirs; } - QString desktopPath() { return m_desktopPath; } + TQString homeDir() { return m_homeDir; } + TQStringList kdeDirs() { return m_kdeDirs; } + TQString desktopPath() { return m_desktopPath; } // Locate existing anywhere - QString locate(const char *resource, const QString &filename=QString::null); + TQString locate(const char *resource, const TQString &filename=TQString()); // Locate for saving - QString locateSave(const char *resource, const QString &filename=QString::null); + TQString locateSave(const char *resource, const TQString &filename=TQString()); // Locate for reading saved changed - QString locateLocal(const char *resource, const QString &filename=QString::null); + TQString locateLocal(const char *resource, const TQString &filename=TQString()); // Prepare runtime environment for run() bool prepare(); @@ -74,57 +75,57 @@ public: void forceSycocaUpdate(); // Run a program inside the runtime test environment - KProcess* run(const QString &cmd, const QStringList &args=QStringList()); + KProcess* run(const TQString &cmd, const TQStringList &args=TQStringList()); // A DCOPRef to make dcop calls into the runtime test environment - DCOPRef dcopRef(const QCString &appId, const QCString &objId); + DCOPRef dcopRef(const TQCString &appId, const TQCString &objId); // A DCOPClient to make dcop calls into the runtime test environment DCOPClient *dcopClient() { return m_dcopClient; } // Open config file in the install directory - KConfig *configFile(const QString &filename); + KConfig *configFile(const TQString &filename); // Make config files temporary mutable. void makeMutable(bool bMutable); // Returns whether specific config group is immutable, // or entire file if group is empty - bool isConfigImmutable(const QString &filename, const QString &group); + bool isConfigImmutable(const TQString &filename, const TQString &group); // Make specific config group immutable, // or entire file if group is empty - void setConfigImmutable(const QString &filename, const QString &group, bool bImmutable); + void setConfigImmutable(const TQString &filename, const TQString &group, bool bImmutable); // Close all opened config files. bool flushConfigCache(); // Return all config files created by the user - QStringList newConfigFiles(); + TQStringList newConfigFiles(); // Merge new settings from the test directory into the installation directory - void mergeConfigFile(const QString &filename); + void mergeConfigFile(const TQString &filename); // Lookup the setting for a custom action - bool lookupCustomAction(const QString &action); + bool lookupCustomAction(const TQString &action); // Change the setting for a custom action - void setCustomAction(const QString &action, bool checked); + void setCustomAction(const TQString &action, bool checked); // Create installation directory and its parent dirs - bool createDir(const QString &dir); + bool createDir(const TQString &dir); // Install file - bool install(const QString &file, const QString &destination); + bool install(const TQString &file, const TQString &destination); // Delete file - bool remove(const QString &destination); + bool remove(const TQString &destination); // Move file or directory - bool move(const QString &source, const QString &destination, const QStringList &files); + bool move(const TQString &source, const TQString &destination, const TQStringList &files); // Delete directory in test home dir - void deleteDir(const QString &); + void deleteDir(const TQString &); // Open /etc/kderc for writing KSimpleConfig *openKderc(); @@ -133,34 +134,34 @@ public: bool closeKderc(); // Read information of profile @p profile - void getProfileInfo(const QString &profile, QString &description, QString &installDir, QString &installUser); + void getProfileInfo(const TQString &profile, TQString &description, TQString &installDir, TQString &installUser); // Store information for profile @p profile - bool setProfileInfo(const QString &profile, const QString &description, const QString &installDir, const QString &installUser, bool b=false, bool deleteFiles=true); + bool setProfileInfo(const TQString &profile, const TQString &description, const TQString &installDir, const TQString &installUser, bool b=false, bool deleteFiles=true); // Get new, non-existing, profile name - QString newProfile(); + TQString newProfile(); // Delete profile @p profile - bool deleteProfile(const QString &profile, bool deleteFiles = true); + bool deleteProfile(const TQString &profile, bool deleteFiles = true); // Get list of all existing profiles - QStringList allProfiles(); + TQStringList allProfiles(); // Maps a single group or user to a one or more profiles - typedef QMap ProfileMapping; + typedef TQMap ProfileMapping; // Read mappings between groups/users and profiles - void getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users, QStringList &groupOrder); + void getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users, TQStringList &groupOrder); // Store mappings between groups/users and profiles - bool setUserProfileMappings( const ProfileMapping &groups, const ProfileMapping &users, const QStringList &groupOrder); + bool setUserProfileMappings( const ProfileMapping &groups, const ProfileMapping &users, const TQStringList &groupOrder); // Read profile prefix - QString getProfilePrefix(); + TQString getProfilePrefix(); // Store profile prefix - bool setProfilePrefix(const QString &prefix); + bool setProfilePrefix(const TQString &prefix); // Create upload directory bool createRemoteDir(const KURL &dir); @@ -169,10 +170,10 @@ public: bool createRemoteDirRecursive(const KURL &dir, bool ask); // Upload file - bool uploadRemote(const QString &file, const KURL &dest); + bool uploadRemote(const TQString &file, const KURL &dest); protected: - KioskRun( QObject* parent = 0, const char* name = 0); + KioskRun( TQObject* parent = 0, const char* name = 0); ~KioskRun(); bool setupRuntimeEnv(); @@ -181,31 +182,31 @@ protected: void shutdownConfigEnv(); void applyEnvironment(KProcess *p); - QString saveImmutableStatus(const QString &filename); - bool restoreImmutableStatus(const QString &filename, bool force); + TQString saveImmutabletqStatus(const TQString &filename); + bool restoreImmutabletqStatus(const TQString &filename, bool force); void setCustomRestrictionFileBrowsing(bool restrict); private: static KioskRun* s_self; - QString m_homeDir; - QString m_configDir; - QString m_desktopPath; - QString m_user; - QStringList m_kdeDirs; - QStringList m_xdgDataDirs; - QStringList m_xdgConfigDirs; + TQString m_homeDir; + TQString m_configDir; + TQString m_desktopPath; + TQString m_user; + TQStringList m_kdeDirs; + TQStringList m_xdgDataDirs; + TQStringList m_xdgConfigDirs; DCOPClient *m_dcopClient; KInstance *m_instance; KInstance *m_saveInstance; - QDict m_saveConfigCache; - QDict m_immutableStatusCache; + TQDict m_saveConfigCache; + TQDict m_immutableStatusCache; bool m_noRestrictions; bool m_forceSycocaUpdate; bool m_isRoot; - QString m_kderc; - QString m_localKderc; + TQString m_kderc; + TQString m_localKderc; KSimpleConfig *m_localKdercConfig; }; @@ -213,15 +214,16 @@ private: class KioskRunProgressDialog : public KProgressDialog { Q_OBJECT + TQ_OBJECT public: - KioskRunProgressDialog(QWidget *parent, const char *name, - const QString &caption, const QString &text); + KioskRunProgressDialog(TQWidget *parent, const char *name, + const TQString &caption, const TQString &text); public slots: void slotProgress(); void slotFinished(); private: - QTimer m_timer; + TQTimer m_timer; int m_timeStep; }; diff --git a/kiosktool/kiosksync.cpp b/kiosktool/kiosksync.cpp index 34f9df9..4fc0b8c 100644 --- a/kiosktool/kiosksync.cpp +++ b/kiosktool/kiosksync.cpp @@ -19,16 +19,16 @@ #include "kiosksync.h" -#include -#include +#include +#include #include #include #include #include -KioskSync::KioskSync( QWidget* parent, const char* name) - : QObject(parent, name), +KioskSync::KioskSync( TQWidget* parent, const char* name) + : TQObject(parent, name), m_parent(parent) { } @@ -38,9 +38,9 @@ KioskSync::~KioskSync() } void -KioskSync::addDir(const QString &_src, const KURL &dest) +KioskSync::addDir(const TQString &_src, const KURL &dest) { - QString src = _src; + TQString src = _src; if (!src.endsWith("/")) src.append("/"); @@ -69,9 +69,9 @@ KioskSync::sync(bool incremental) break; } - scanChangedFiles((*it).src, QString::null); + scanChangedFiles((*it).src, TQString()); - for(QStringList::ConstIterator it2 = m_changedDirs.begin(); + for(TQStringList::ConstIterator it2 = m_changedDirs.begin(); it2 != m_changedDirs.end(); ++it2) { KURL dest = (*it).dest; @@ -86,7 +86,7 @@ KioskSync::sync(bool incremental) if (canceled) break; - for(QStringList::ConstIterator it2 = m_changedFiles.begin(); + for(TQStringList::ConstIterator it2 = m_changedFiles.begin(); it2 != m_changedFiles.end(); ++it2) { KURL dest = (*it).dest; @@ -107,7 +107,7 @@ KioskSync::sync(bool incremental) return !canceled; } -QStringList +TQStringList KioskSync::listFiles() { m_changedFiles.clear(); @@ -118,13 +118,13 @@ KioskSync::listFiles() for(SyncDirList::ConstIterator it = m_syncDirs.begin(); it != m_syncDirs.end(); ++it) { - scanChangedFiles((*it).src, QString::null); + scanChangedFiles((*it).src, TQString()); } return m_changedFiles; } void -KioskSync::addChangedDir(const QString &dir) +KioskSync::addChangedDir(const TQString &dir) { if (dir.isEmpty()) return; @@ -135,7 +135,7 @@ KioskSync::addChangedDir(const QString &dir) int i = dir.findRev('/', -2); if (i != -1) { - QString parentDir = dir.left(i+1); + TQString parentDir = dir.left(i+1); addChangedDir(parentDir); } @@ -144,39 +144,39 @@ KioskSync::addChangedDir(const QString &dir) } void -KioskSync::scanChangedFiles(const QString &_dir, const QString &prefix) +KioskSync::scanChangedFiles(const TQString &_dir, const TQString &prefix) { kdDebug() << "KioskSync: Scanning " << _dir << endl; - QDir dir(_dir); + TQDir dir(_dir); if (!dir.exists()) { - emit warning(i18n("Directory %1 does not exist.").arg(_dir)); + emit warning(i18n("Directory %1 does not exist.").tqarg(_dir)); return; } if (!dir.isReadable()) { - emit warning(i18n("Directory %1 is not readable.").arg(_dir)); + emit warning(i18n("Directory %1 is not readable.").tqarg(_dir)); return; } - QStringList subDirs; - const QFileInfoList *list = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoSymLinks); + TQStringList subDirs; + const TQFileInfoList *list = dir.entryInfoList(TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks); bool dirtyDir = false; - QFileInfoListIterator it( *list ); - for ( QFileInfo *fi; (fi = it.current()) != 0; ++it) + TQFileInfoListIterator it( *list ); + for ( TQFileInfo *fi; (fi = it.current()) != 0; ++it) { if (fi->isDir()) { - QString subDir = fi->fileName(); + TQString subDir = fi->fileName(); if ((subDir != ".") && (subDir != "..")) subDirs.append(subDir+"/"); continue; } // TODO: Check file - QString file = prefix + fi->fileName(); - QDateTime lastModified = fi->lastModified(); + TQString file = prefix + fi->fileName(); + TQDateTime lastModified = fi->lastModified(); if (!m_incremental || !m_timestamps->hasKey(file) || (m_timestamps->readDateTimeEntry(file) != lastModified)) { @@ -187,23 +187,23 @@ KioskSync::scanChangedFiles(const QString &_dir, const QString &prefix) if (dirtyDir) addChangedDir(prefix); - for( QStringList::ConstIterator it = subDirs.begin(); + for( TQStringList::ConstIterator it = subDirs.begin(); it != subDirs.end(); ++it) { - QString subDir = *it; + TQString subDir = *it; scanChangedFiles(_dir + subDir, prefix + subDir); } } bool -KioskSync::syncFile(const QString &prefix, const QString &file, const KURL &dest) +KioskSync::syncFile(const TQString &prefix, const TQString &file, const KURL &dest) { kdDebug() << "KioskSync: Syncing [" << prefix << "]" << file << " --> " << dest.prettyURL() << endl; if (!KioskRun::self()->uploadRemote(prefix+file, dest)) return false; - QFileInfo fi(prefix+file); + TQFileInfo fi(prefix+file); m_timestamps->writeEntry(file, fi.lastModified()); return true; } diff --git a/kiosktool/kiosksync.h b/kiosktool/kiosksync.h index ffcc001..1879eb2 100644 --- a/kiosktool/kiosksync.h +++ b/kiosktool/kiosksync.h @@ -19,37 +19,38 @@ #ifndef _KIOSKSYNC_H_ #define _KIOSKSYNC_H_ -#include -#include +#include +#include #include #include "kioskrun.h" -class QWidget; +class TQWidget; class KSimpleConfig; -class KioskSync : public QObject +class KioskSync : public TQObject { Q_OBJECT + TQ_OBJECT public: - KioskSync( QWidget* parent = 0, const char* name = 0); + KioskSync( TQWidget* parent = 0, const char* name = 0); ~KioskSync(); - void addDir(const QString &src, const KURL &dest); + void addDir(const TQString &src, const KURL &dest); bool sync(bool incremental = false); // Returns all files found in the directories - QStringList listFiles(); + TQStringList listFiles(); signals: void finished(); - void status(const QString &); - void warning(const QString &); + void status(const TQString &); + void warning(const TQString &); protected: - void scanChangedFiles(const QString &_dir, const QString &prefix); - bool syncFile(const QString &prefix, const QString &file, const KURL &dest); - void addChangedDir(const QString &dir); + void scanChangedFiles(const TQString &_dir, const TQString &prefix); + bool syncFile(const TQString &prefix, const TQString &file, const KURL &dest); + void addChangedDir(const TQString &dir); private: struct SyncDir @@ -57,23 +58,23 @@ private: SyncDir() { } - SyncDir(const QString &_src, const KURL &_dest) : src(_src), dest(_dest) + SyncDir(const TQString &_src, const KURL &_dest) : src(_src), dest(_dest) { } SyncDir(const SyncDir &dir) : src(dir.src), dest(dir.dest) { } - QString src; + TQString src; KURL dest; }; - typedef QValueList SyncDirList; + typedef TQValueList SyncDirList; SyncDirList m_syncDirs; - QWidget *m_parent; + TQWidget *m_parent; KSimpleConfig *m_timestamps; - QStringList m_changedFiles; - QStringList m_changedDirs; + TQStringList m_changedFiles; + TQStringList m_changedDirs; bool m_incremental; }; diff --git a/kiosktool/kiosktool-kdedirs.cpp b/kiosktool/kiosktool-kdedirs.cpp index 3aaa0b7..99f6548 100644 --- a/kiosktool/kiosktool-kdedirs.cpp +++ b/kiosktool/kiosktool-kdedirs.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -39,19 +39,19 @@ static const char *description = I18N_NOOP("A tool to set $KDEDIRS according to the current user profile."); -static QString readEnvPath(const char *env) +static TQString readEnvPath(const char *env) { - QCString c_path = getenv(env); + TQCString c_path = getenv(env); if (c_path.isEmpty()) - return QString::null; - return QFile::decodeName(c_path); + return TQString(); + return TQFile::decodeName(c_path); } -static QStringList lookupProfiles(const QString &mapFile) +static TQStringList lookupProfiles(const TQString &mapFile) { - QStringList profiles; + TQStringList profiles; - if (mapFile.isEmpty() || !QFile::exists(mapFile)) + if (mapFile.isEmpty() || !TQFile::exists(mapFile)) { profiles << "default"; return profiles; @@ -64,7 +64,7 @@ static QStringList lookupProfiles(const QString &mapFile) return profiles; // Not good } - QCString user = pw->pw_name; + TQCString user = pw->pw_name; gid_t sup_gids[512]; int sup_gids_nr = getgroups(512, sup_gids); @@ -78,14 +78,14 @@ static QStringList lookupProfiles(const QString &mapFile) } mapCfg.setGroup("General"); - QStringList groups = mapCfg.readListEntry("groups"); + TQStringList groups = mapCfg.readListEntry("groups"); mapCfg.setGroup("Groups"); - for( QStringList::ConstIterator it = groups.begin(); + for( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it ) { - QCString grp = (*it).utf8(); + TQCString grp = (*it).utf8(); // Check if user is in this group struct group *grp_ent = getgrnam(grp); if (!grp_ent) continue; @@ -132,22 +132,22 @@ int main(int argc, char **argv) if (args->isSet("check")) { (void) KGlobal::config(); // Force config file processing - QString dirs = KGlobal::dirs()->kfsstnd_prefixes(); - printf("%s\n", QFile::encodeName(dirs).data()); + TQString dirs = KGlobal::dirs()->kfsstnd_prefixes(); + printf("%s\n", TQFile::encodeName(dirs).data()); return 0; } - QStringList kdedirList; + TQStringList kdedirList; // begin KDEDIRS - QString kdedirs = readEnvPath("KDEDIRS"); + TQString kdedirs = readEnvPath("KDEDIRS"); if (!kdedirs.isEmpty()) { - kdedirList = QStringList::split(":", kdedirs); + kdedirList = TQStringList::split(":", kdedirs); } else { - QString kdedir = readEnvPath("KDEDIR"); + TQString kdedir = readEnvPath("KDEDIR"); if (!kdedir.isEmpty()) { kdedir = KShell::tildeExpand(kdedir); @@ -157,19 +157,19 @@ int main(int argc, char **argv) KConfig *config = KGlobal::config(); config->setGroup("Directories"); - QString userMapFile = config->readEntry("userProfileMapFile"); - QString profileDirsPrefix = config->readEntry("profileDirsPrefix"); + TQString userMapFile = config->readEntry("userProfileMapFile"); + TQString profileDirsPrefix = config->readEntry("profileDirsPrefix"); if (!profileDirsPrefix.isEmpty() && !profileDirsPrefix.endsWith("/")) profileDirsPrefix.append('/'); - QStringList profiles = lookupProfiles(userMapFile); + TQStringList profiles = lookupProfiles(userMapFile); while(!profiles.isEmpty()) { - QString profile = profiles.back(); - config->setGroup(QString::fromLatin1("Directories-%1").arg(profile)); + TQString profile = profiles.back(); + config->setGroup(TQString::tqfromLatin1("Directories-%1").tqarg(profile)); profiles.pop_back(); - QStringList list = config->readListEntry("prefixes"); - for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) + TQStringList list = config->readListEntry("prefixes"); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); it++) { kdedirList.prepend(*it); } @@ -178,7 +178,7 @@ int main(int argc, char **argv) kdedirList.prepend(profileDirsPrefix + profile); } } - printf("%s\n", QFile::encodeName(kdedirList.join(":")).data()); + printf("%s\n", TQFile::encodeName(kdedirList.join(":")).data()); return 0; } diff --git a/kiosktool/main.cpp b/kiosktool/main.cpp index c6c80df..a67b514 100644 --- a/kiosktool/main.cpp +++ b/kiosktool/main.cpp @@ -20,7 +20,7 @@ #include -#include +#include #include #include @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) w->show(); bool versionOk; - if (QFile::exists("/etc/SuSE-release")) + if (TQFile::exists("/etc/SuSE-release")) versionOk = KDE::version() >= KDE_MAKE_VERSION(3,2,1); else versionOk = KDE::version() >= KDE_MAKE_VERSION(3,2,2); diff --git a/kiosktool/mainview.ui b/kiosktool/mainview.ui index cef0d4d..e08f69a 100644 --- a/kiosktool/mainview.ui +++ b/kiosktool/mainview.ui @@ -1,6 +1,6 @@ MainView - + MainView @@ -19,7 +19,7 @@ 0 - + captionLabel @@ -31,7 +31,7 @@ 0 - + 0 70 @@ -44,7 +44,7 @@ Plain - + logoLabel @@ -56,7 +56,7 @@ 0 - + 160 170 @@ -66,7 +66,7 @@ - + subCaptionLabel @@ -84,7 +84,7 @@ Plain - + AlignCenter @@ -98,7 +98,7 @@ Fixed - + 25 20 @@ -115,22 +115,22 @@ Fixed - + 25 20 - + - layout4 + tqlayout4 unnamed - + widgetStack @@ -142,7 +142,7 @@ 1 - + WStackPage @@ -151,7 +151,7 @@ - + frame3 @@ -173,7 +173,7 @@ unnamed - + pbHelp @@ -191,14 +191,14 @@ Expanding - + 20 20 - + pbDiscard @@ -216,14 +216,14 @@ Expanding - + 20 20 - + pbFinished @@ -245,7 +245,7 @@ Fixed - + 160 20 diff --git a/kiosktool/menueditComponent.cpp b/kiosktool/menueditComponent.cpp index 83606c6..c087e91 100644 --- a/kiosktool/menueditComponent.cpp +++ b/kiosktool/menueditComponent.cpp @@ -19,9 +19,9 @@ #include "menueditComponent.h" -#include -#include -#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ #include "kioskrun.h" #include "kiosksync.h" -MenuEditComponent::MenuEditComponent( QObject *parent) +MenuEditComponent::MenuEditComponent( TQObject *parent) : Component(parent) { } @@ -55,17 +55,17 @@ MenuEditComponent::slotSetupStarted() { } -static QDomDocument loadDoc(const QString &fileName) +static TQDomDocument loadDoc(const TQString &fileName) { - QDomDocument doc; + TQDomDocument doc; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { kdWarning() << "Could not open " << fileName << endl; return doc; } - QString errorMsg; + TQString errorMsg; int errorRow; int errorCol; if ( !doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) ) { @@ -77,11 +77,11 @@ static QDomDocument loadDoc(const QString &fileName) return doc; } -static bool saveDoc(const QString &fileName, QDomDocument doc) +static bool saveDoc(const TQString &fileName, TQDomDocument doc) { KSaveFile saveFile(fileName); - QTextStream *stream = saveFile.textStream(); + TQTextStream *stream = saveFile.textStream(); if (!stream) { kdWarning() << "Could not write " << fileName << endl; @@ -103,50 +103,50 @@ bool MenuEditComponent::setupFinished() { bool result; - QString menuEditFile = KioskRun::self()->locateLocal("xdgconf-menu", "applications-kmenuedit.menu"); - QString menuFile = KioskRun::self()->locate("xdgconf-menu", "applications.menu"); - QString menuFileSave = KioskRun::self()->locateSave("xdgconf-menu", "applications.menu"); + TQString menuEditFile = KioskRun::self()->locateLocal("xdgconf-menu", "applications-kmenuedit.menu"); + TQString menuFile = KioskRun::self()->locate("xdgconf-menu", "applications.menu"); + TQString menuFileSave = KioskRun::self()->locateSave("xdgconf-menu", "applications.menu"); kdDebug() << "MenuEditComponent: menuEditFile = " << menuEditFile << endl; kdDebug() << "MenuEditComponent: menuFile = " << menuFile << endl; kdDebug() << "MenuEditComponent: menuFileSave = " << menuFileSave << endl; - QDomDocument docChanges = loadDoc(menuEditFile); + TQDomDocument docChanges = loadDoc(menuEditFile); if (docChanges.isNull()) { kdDebug() << "No menu changes." << endl; return true; } - QDomDocument doc = loadDoc(menuFile); + TQDomDocument doc = loadDoc(menuFile); if (doc.isNull()) { kdWarning() << "Can't find menu file!" << endl; return true; } - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); - QDomNode next; + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); + TQDomNode next; for(; !n.isNull(); n = next ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. next = n.nextSibling(); if ((e.tagName() == "MergeFile") && (e.text() == "applications-kmenuedit.menu")) break; } - QDomNode insertionPoint = n; + TQDomNode insertionPoint = n; if (insertionPoint.isNull()) { kdWarning() << "Application menu fails to include applications-kmenuedit.menu" << endl; return false; } - QDomElement docChangesElem = docChanges.documentElement(); + TQDomElement docChangesElem = docChanges.documentElement(); n = docChangesElem.firstChild(); for(; !n.isNull(); n = next ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. next = n.nextSibling(); docElem.insertBefore(n, insertionPoint); @@ -162,15 +162,15 @@ MenuEditComponent::setupFinished() // Install .desktop files { - QString legacyApplications = KioskRun::self()->locateLocal("apps", QString::null); - QString legacySaveApplications = KioskRun::self()->locateSave("apps", QString::null); + TQString legacyApplications = KioskRun::self()->locateLocal("apps", TQString()); + TQString legacySaveApplications = KioskRun::self()->locateSave("apps", TQString()); KioskSync legacyDir(kapp->mainWidget()); legacyDir.addDir(legacyApplications, KURL()); - QStringList newLegacyApplications = legacyDir.listFiles(); + TQStringList newLegacyApplications = legacyDir.listFiles(); - for(QStringList::ConstIterator it = newLegacyApplications.begin(); + for(TQStringList::ConstIterator it = newLegacyApplications.begin(); it != newLegacyApplications.end(); ++it) { if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk") || (*it).endsWith(".directory")) @@ -184,15 +184,15 @@ MenuEditComponent::setupFinished() // Install .desktop files { - QString xdgApplications = KioskRun::self()->locateLocal("xdgdata-apps", QString::null); - QString xdgSaveApplications = KioskRun::self()->locateSave("xdgdata-apps", QString::null); + TQString xdgApplications = KioskRun::self()->locateLocal("xdgdata-apps", TQString()); + TQString xdgSaveApplications = KioskRun::self()->locateSave("xdgdata-apps", TQString()); - QDir dir(xdgApplications); - QStringList newXdgApplications = dir.entryList(QDir::All, QDir::Unsorted); + TQDir dir(xdgApplications); + TQStringList newXdgApplications = dir.entryList(TQDir::All, TQDir::Unsorted); newXdgApplications.remove("."); newXdgApplications.remove(".."); - for(QStringList::ConstIterator it = newXdgApplications.begin(); + for(TQStringList::ConstIterator it = newXdgApplications.begin(); it != newXdgApplications.end(); ++it) { if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk")) @@ -206,15 +206,15 @@ MenuEditComponent::setupFinished() // Install .directory files { - QString xdgDirectories = KioskRun::self()->locateLocal("xdgdata-dirs", QString::null); - QString xdgSaveDirectories = KioskRun::self()->locateSave("xdgdata-dirs", QString::null); + TQString xdgDirectories = KioskRun::self()->locateLocal("xdgdata-dirs", TQString()); + TQString xdgSaveDirectories = KioskRun::self()->locateSave("xdgdata-dirs", TQString()); - QDir dir(xdgDirectories); - QStringList newXdgDirectories = dir.entryList(QDir::All, QDir::Unsorted); + TQDir dir(xdgDirectories); + TQStringList newXdgDirectories = dir.entryList(TQDir::All, TQDir::Unsorted); newXdgDirectories.remove("."); newXdgDirectories.remove(".."); - for(QStringList::ConstIterator it = newXdgDirectories.begin(); + for(TQStringList::ConstIterator it = newXdgDirectories.begin(); it != newXdgDirectories.end(); ++it) { if ((*it).endsWith(".directory")) diff --git a/kiosktool/menueditComponent.h b/kiosktool/menueditComponent.h index b1a86ab..360a4f8 100644 --- a/kiosktool/menueditComponent.h +++ b/kiosktool/menueditComponent.h @@ -21,14 +21,15 @@ #include "component.h" -#include -#include +#include +#include class MenuEditComponent: public Component { Q_OBJECT + TQ_OBJECT public: - MenuEditComponent( QObject *parent = 0); + MenuEditComponent( TQObject *parent = 0); virtual ~MenuEditComponent(); virtual bool setupFinished(); diff --git a/kiosktool/pageWidget.cpp b/kiosktool/pageWidget.cpp index 487fac6..3316f8f 100644 --- a/kiosktool/pageWidget.cpp +++ b/kiosktool/pageWidget.cpp @@ -25,14 +25,14 @@ #include "kioskdata.h" #include "kioskrun.h" -ComponentActionItem::ComponentActionItem( QListView * parent, ComponentAction *action, int index) - : QCheckListItem(parent, action->caption, QCheckListItem::CheckBox), +ComponentActionItem::ComponentActionItem( TQListView * parent, ComponentAction *action, int index) + : TQCheckListItem(parent, action->caption, TQCheckListItem::CheckBox), m_action(action), m_index(index) { } -int ComponentActionItem::compare ( QListViewItem * i, int, bool ) const +int ComponentActionItem::compare ( TQListViewItem * i, int, bool ) const { ComponentActionItem *cai = static_cast(i); if (m_index == cai->m_index) @@ -42,7 +42,7 @@ int ComponentActionItem::compare ( QListViewItem * i, int, bool ) const return 1; } -PageWidget::PageWidget(QWidget *me) +PageWidget::PageWidget(TQWidget *me) { m_widget = me; } @@ -63,7 +63,7 @@ PageWidget::fillActionList(KListView *listView, ComponentData *componentData) item->setSelected(true); if (action->type == ComponentAction::ActRestrict) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); @@ -73,7 +73,7 @@ PageWidget::fillActionList(KListView *listView, ComponentData *componentData) } else if (action->type == ComponentAction::ActResource) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); @@ -83,7 +83,7 @@ PageWidget::fillActionList(KListView *listView, ComponentData *componentData) } else if (action->type == ComponentAction::ActModule) { - QString file = "kdeglobals"; + TQString file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); cfg->setGroup("KDE Control Module Restrictions"); bool restricted = !cfg->readBoolEntry(action->key, true); @@ -91,10 +91,10 @@ PageWidget::fillActionList(KListView *listView, ComponentData *componentData) } else if (action->type == ComponentAction::ActImmutable) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; - QString group = action->group; + TQString group = action->group; bool immutable = KioskRun::self()->isConfigImmutable(file, group); qWarning("File = %s Group = %s Immutable = %s", file.latin1(), group.latin1(), immutable ? "true" : "false"); item->setOn(immutable); @@ -106,7 +106,7 @@ qWarning("File = %s Group = %s Immutable = %s", file.latin1(), group.latin1(), i } else if (action->type == ComponentAction::ActConfig) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); @@ -123,7 +123,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b) { if (action->type == ComponentAction::ActRestrict) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); @@ -138,7 +138,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b) } else if (action->type == ComponentAction::ActResource) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); @@ -153,7 +153,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b) } else if (action->type == ComponentAction::ActModule) { - QString file = "kdeglobals"; + TQString file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); cfg->setGroup("KDE Control Module Restrictions"); @@ -166,10 +166,10 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b) } else if (action->type == ComponentAction::ActImmutable) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; - QString group = action->group; + TQString group = action->group; KioskRun::self()->setConfigImmutable(file, group, b); } else if (action->type == ComponentAction::ActCustom) @@ -178,7 +178,7 @@ PageWidget::saveActionListItem(ComponentAction *action, bool b) } else if (action->type == ComponentAction::ActConfig) { - QString file = action->file; + TQString file = action->file; if (file.isEmpty()) file = "kdeglobals"; KConfig *cfg = KioskRun::self()->configFile(file); diff --git a/kiosktool/pageWidget.h b/kiosktool/pageWidget.h index 4006fba..5921892 100644 --- a/kiosktool/pageWidget.h +++ b/kiosktool/pageWidget.h @@ -24,14 +24,14 @@ class ComponentAction; class ComponentData; -class ComponentActionItem : public QCheckListItem +class ComponentActionItem : public TQCheckListItem { public: - ComponentActionItem( QListView * parent, ComponentAction *action, int index); + ComponentActionItem( TQListView * parent, ComponentAction *action, int index); ComponentAction *action() const { return m_action; } - virtual int compare ( QListViewItem * i, int col, bool ascending ) const; + virtual int compare ( TQListViewItem * i, int col, bool ascending ) const; private: ComponentAction *m_action; @@ -41,10 +41,10 @@ private: class PageWidget { public: - PageWidget(QWidget *me); + PageWidget(TQWidget *me); virtual ~PageWidget(); - QWidget *widget() const { return m_widget; } + TQWidget *widget() const { return m_widget; } void fillActionList(KListView *listView, ComponentData *componentData); bool saveActionListChanges(KListView *listView); @@ -54,14 +54,14 @@ public: virtual void setFocus() = 0; - virtual QString subCaption() = 0; + virtual TQString subCaption() = 0; protected: void saveActionListItem(ComponentAction *action, bool b); private: - QWidget *m_widget; + TQWidget *m_widget; }; #endif diff --git a/kiosktool/panelComponent.cpp b/kiosktool/panelComponent.cpp index 1e541e3..9f0b984 100644 --- a/kiosktool/panelComponent.cpp +++ b/kiosktool/panelComponent.cpp @@ -19,8 +19,8 @@ #include "panelComponent.h" -#include -#include +#include +#include #include #include @@ -32,7 +32,7 @@ #include "kioskrun.h" -PanelComponent::PanelComponent( QObject *parent) +PanelComponent::PanelComponent( TQObject *parent) : Component(parent) { } @@ -58,15 +58,15 @@ PanelComponent::setupFinished() // Install .desktop files { - QString kickerApplications = KioskRun::self()->locateLocal("data", "kicker/"); - QString kickerSaveApplications = KioskRun::self()->locateSave("data", "kicker/"); + TQString kickerApplications = KioskRun::self()->locateLocal("data", "kicker/"); + TQString kickerSaveApplications = KioskRun::self()->locateSave("data", "kicker/"); - QDir dir(kickerApplications); - QStringList newKickerApplications = dir.entryList(QDir::All, QDir::Unsorted); + TQDir dir(kickerApplications); + TQStringList newKickerApplications = dir.entryList(TQDir::All, TQDir::Unsorted); newKickerApplications.remove("."); newKickerApplications.remove(".."); - for(QStringList::ConstIterator it = newKickerApplications.begin(); + for(TQStringList::ConstIterator it = newKickerApplications.begin(); it != newKickerApplications.end(); ++it) { if ((*it).endsWith(".desktop")) diff --git a/kiosktool/panelComponent.h b/kiosktool/panelComponent.h index 30a8871..90e79a8 100644 --- a/kiosktool/panelComponent.h +++ b/kiosktool/panelComponent.h @@ -21,14 +21,15 @@ #include "component.h" -#include -#include +#include +#include class PanelComponent: public Component { Q_OBJECT + TQ_OBJECT public: - PanelComponent( QObject *parent = 0); + PanelComponent( TQObject *parent = 0); virtual ~PanelComponent(); virtual bool setupFinished(); diff --git a/kiosktool/profilePropsPage.cpp b/kiosktool/profilePropsPage.cpp index 73f410f..4396218 100644 --- a/kiosktool/profilePropsPage.cpp +++ b/kiosktool/profilePropsPage.cpp @@ -19,8 +19,8 @@ #include "profilePropsPage.h" -#include -#include +#include +#include #include #include @@ -33,10 +33,10 @@ #include "kioskrun.h" #include "kiosksync.h" -static QStringList userList() +static TQStringList userList() { KUser thisUser; - QStringList result; + TQStringList result; result << thisUser.loginName(); result << "root"; @@ -46,8 +46,8 @@ static QStringList userList() result.sort(); // Remove dupes - QStringList::Iterator nextIt = result.begin(); - for(QStringList::Iterator it = result.begin(); + TQStringList::Iterator nextIt = result.begin(); + for(TQStringList::Iterator it = result.begin(); it != result.end(); it = nextIt) { nextIt = it; @@ -61,7 +61,7 @@ static QStringList userList() } -ProfilePropsPage::ProfilePropsPage(QWidget *parent, const QString &profile) +ProfilePropsPage::ProfilePropsPage(TQWidget *parent, const TQString &profile) : ProfilePropsPageUI(parent), PageWidget(this), m_profile(profile) { } @@ -72,11 +72,11 @@ ProfilePropsPage::~ProfilePropsPage() void ProfilePropsPage::slotProfileNameChanged() { - QString profile = editProfileName->text(); + TQString profile = editProfileName->text(); if (m_fixedProfileDir) { - QString profilePrefix = KioskRun::self()->getProfilePrefix(); - QString installDir = profilePrefix+profile+"/"; + TQString profilePrefix = KioskRun::self()->getProfilePrefix(); + TQString installDir = profilePrefix+profile+"/"; labelInstallDir->setText(installDir); } // TODO: enableButtonOK(!profile.isEmpty()); @@ -91,28 +91,28 @@ void ProfilePropsPage::load() bNewProfile = true; } - QString profilePrefix = KioskRun::self()->getProfilePrefix(); + TQString profilePrefix = KioskRun::self()->getProfilePrefix(); m_fixedProfileDir = !profilePrefix.isEmpty(); - connect(editProfileName, SIGNAL(textChanged(const QString&)), - this, SLOT(slotProfileNameChanged())); + connect(editProfileName, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotProfileNameChanged())); #if 0 - connect(kurlInstallDir, SIGNAL(textChanged(const QString&)), - this, SLOT(updateButtons())); + connect(kurlInstallDir, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(updateButtons())); #endif comboUser->setEditable(true); comboUser->insertStringList(userList()); - QRegExp rx( "[^/ :]*" ); - QValidator* validator = new QRegExpValidator( rx, this ); + TQRegExp rx( "[^/ :]*" ); + TQValidator* validator = new TQRegExpValidator( rx, this ); editProfileName->setValidator(validator); editProfileName->setFocus(); - QString description; - QString installDir; - QString installUser; + TQString description; + TQString installDir; + TQString installUser; KioskRun::self()->getProfileInfo(m_profile, description, installDir, installUser); @@ -145,19 +145,19 @@ void ProfilePropsPage::load() bool ProfilePropsPage::save() { - QString user = comboUser->currentText(); + TQString user = comboUser->currentText(); KUser userInfo(user); if (!userInfo.isValid()) { KMessageBox::sorry(this, - i18n("The user %1 is not an existing user.").arg(user)); + i18n("The user %1 is not an existing user.").tqarg(user)); comboUser->setFocus(); return false; } m_profile = editProfileName->text(); - QString description = editDescription->text(); - QString installDir; + TQString description = editDescription->text(); + TQString installDir; if (m_fixedProfileDir) { installDir = labelInstallDir->text(); @@ -174,7 +174,7 @@ bool ProfilePropsPage::save() { KioskSync origInstallDir; origInstallDir.addDir(m_origInstallDir, KURL()); - QStringList fileList = origInstallDir.listFiles(); + TQStringList fileList = origInstallDir.listFiles(); fileList.remove(".kdeprofile"); if (!fileList.isEmpty()) { @@ -182,7 +182,7 @@ bool ProfilePropsPage::save() i18n("The directory for this profile has changed " "from %1 to %2.

" "The following files under %3 will be moved to %4") - .arg(m_origInstallDir, installDir, m_origInstallDir, installDir), + .tqarg(m_origInstallDir, installDir, m_origInstallDir, installDir), fileList, i18n("Profile Directory Changed")); if (msgResult != KMessageBox::Continue) @@ -191,14 +191,14 @@ bool ProfilePropsPage::save() KioskRun::self()->setUser(user); if (!KioskRun::self()->move(m_origInstallDir, installDir, fileList)) return false; - if (QDir(m_origInstallDir).exists()) + if (TQDir(m_origInstallDir).exists()) { if (!KioskRun::self()->remove(m_origInstallDir)) return false; } } - QString installUser = user; + TQString installUser = user; bool result = KioskRun::self()->setProfileInfo( m_profile, description, installDir, installUser); @@ -210,7 +210,7 @@ bool ProfilePropsPage::save() // Store this user for easy access later KConfig *config = kapp->config(); config->setGroup("General"); - QStringList previousUsers= config->readListEntry("PreviousUsers"); + TQStringList previousUsers= config->readListEntry("PreviousUsers"); if (!previousUsers.contains(user)) { previousUsers << user; @@ -226,9 +226,9 @@ void ProfilePropsPage::setFocus() editProfileName->setFocus(); } -QString ProfilePropsPage::subCaption() +TQString ProfilePropsPage::subCaption() { - return QString::null; + return TQString(); } #include "profilePropsPage.moc" diff --git a/kiosktool/profilePropsPage.h b/kiosktool/profilePropsPage.h index e846020..c165884 100644 --- a/kiosktool/profilePropsPage.h +++ b/kiosktool/profilePropsPage.h @@ -25,8 +25,9 @@ class ProfilePropsPage : public ProfilePropsPageUI, public PageWidget { Q_OBJECT + TQ_OBJECT public: - ProfilePropsPage(QWidget *parent, const QString &profile); + ProfilePropsPage(TQWidget *parent, const TQString &profile); ~ProfilePropsPage(); virtual void load(); @@ -34,18 +35,18 @@ public: virtual void setFocus(); - virtual QString subCaption(); + virtual TQString subCaption(); - QString profile() { return m_profile; } + TQString profile() { return m_profile; } protected slots: void slotProfileNameChanged(); private: - QString m_profile; + TQString m_profile; bool m_fixedProfileDir; - QString m_origProfile; - QString m_origInstallDir; + TQString m_origProfile; + TQString m_origInstallDir; }; #endif diff --git a/kiosktool/profilePropsPage_ui.ui b/kiosktool/profilePropsPage_ui.ui index 8cfefc1..32a50f8 100644 --- a/kiosktool/profilePropsPage_ui.ui +++ b/kiosktool/profilePropsPage_ui.ui @@ -1,6 +1,6 @@ ProfilePropsPageUI - + Page2 @@ -29,7 +29,7 @@ Expanding - + 16 20 @@ -46,14 +46,14 @@ Expanding - + 60 20 - + frame3 @@ -70,7 +70,7 @@ unnamed - + textLabel2 @@ -88,7 +88,7 @@ editProfileName - + 400 0 @@ -105,14 +105,14 @@ Fixed - + 20 20 - + textLabel3 @@ -130,7 +130,7 @@ editDescription - + 400 0 @@ -147,14 +147,14 @@ Fixed - + 20 20 - + textLabel4_2 @@ -168,7 +168,7 @@ kurlInstallDir - + comboUser @@ -183,14 +183,14 @@ Fixed - + 20 20 - + textLabel4 @@ -208,7 +208,7 @@ kurlInstallDir - + 400 0 @@ -235,7 +235,7 @@ Expanding - + 20 30 diff --git a/kiosktool/profileSelectionPage_ui.ui b/kiosktool/profileSelectionPage_ui.ui index 9142445..f78200c 100644 --- a/kiosktool/profileSelectionPage_ui.ui +++ b/kiosktool/profileSelectionPage_ui.ui @@ -1,6 +1,6 @@ ProfileSelectionPageUI - + Page1 @@ -32,7 +32,7 @@ Fixed - + 20 20 @@ -73,7 +73,7 @@ 1 - + 300 220 @@ -99,22 +99,22 @@ Fixed - + 20 20 - + - layout3 + tqlayout3 unnamed - + buttonAdd @@ -132,14 +132,14 @@ Fixed - + 20 10 - + buttonSetup @@ -157,14 +157,14 @@ Fixed - + 20 10 - + buttonUsers @@ -182,14 +182,14 @@ MinimumExpanding - + 20 40 - + buttonProperty @@ -207,14 +207,14 @@ Fixed - + 20 10 - + buttonDelete diff --git a/kiosktool/screensaverComponent.cpp b/kiosktool/screensaverComponent.cpp index 530bd27..b718ea8 100644 --- a/kiosktool/screensaverComponent.cpp +++ b/kiosktool/screensaverComponent.cpp @@ -21,11 +21,11 @@ #include "kioskrun.h" -ScreenSaverComponent::ScreenSaverComponent( QObject *parent) +ScreenSaverComponent::ScreenSaverComponent( TQObject *parent) : Component(parent) { qWarning("ScreenSaverComponent::ScreenSaverComponent"); - connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotPreviewStarted())); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPreviewStarted())); } ScreenSaverComponent::~ScreenSaverComponent() diff --git a/kiosktool/screensaverComponent.h b/kiosktool/screensaverComponent.h index fd60047..5e62a81 100644 --- a/kiosktool/screensaverComponent.h +++ b/kiosktool/screensaverComponent.h @@ -21,13 +21,14 @@ #include "component.h" -#include +#include class ScreenSaverComponent: public Component { Q_OBJECT + TQ_OBJECT public: - ScreenSaverComponent( QObject *parent = 0); + ScreenSaverComponent( TQObject *parent = 0); virtual ~ScreenSaverComponent(); public slots: @@ -35,7 +36,7 @@ public slots: virtual void slotPreviewStarted(); private: - QTimer m_timer; + TQTimer m_timer; }; #endif diff --git a/kiosktool/userManagement.cpp b/kiosktool/userManagement.cpp index 3493b97..d93e834 100644 --- a/kiosktool/userManagement.cpp +++ b/kiosktool/userManagement.cpp @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -42,7 +42,7 @@ #define AVAILABLE_SINCE "KDE 3.2.3" -UserManagementPage::UserManagementPage(QWidget* parent, const char* name, WFlags fl) +UserManagementPage::UserManagementPage(TQWidget* parent, const char* name, WFlags fl) : UserManagementUI(parent, name, fl), PageWidget(this) { setCaption(i18n("Assign Profiles")); @@ -52,13 +52,13 @@ UserManagementPage::UserManagementPage(QWidget* parent, const char* name, WFlags // actionButton(KDialogBase::Ok)->setFocus(); - connect(buttonAddGroup, SIGNAL(clicked()), this, SLOT(slotAddGroup())); - connect(buttonDeleteGroup, SIGNAL(clicked()), this, SLOT(slotDeleteGroup())); - connect(buttonAddUser, SIGNAL(clicked()), this, SLOT(slotAddUser())); - connect(buttonDeleteUser, SIGNAL(clicked()), this, SLOT(slotDeleteUser())); + connect(buttonAddGroup, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddGroup())); + connect(buttonDeleteGroup, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteGroup())); + connect(buttonAddUser, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddUser())); + connect(buttonDeleteUser, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteUser())); - connect(listGroups, SIGNAL(selectionChanged()), this, SLOT(slotUpdateButtons())); - connect(listUsers, SIGNAL(selectionChanged()), this, SLOT(slotUpdateButtons())); + connect(listGroups, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateButtons())); + connect(listUsers, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateButtons())); // init(); static bool firstTime = true; @@ -66,7 +66,7 @@ UserManagementPage::UserManagementPage(QWidget* parent, const char* name, WFlags if (firstTime) { firstTime = false; - QTimer::singleShot(0, this, SLOT(slotShowNotice())); + TQTimer::singleShot(0, this, TQT_SLOT(slotShowNotice())); } } @@ -82,7 +82,7 @@ void UserManagementPage::slotShowNotice() "If you want to use these profiles in combination with older versions you need " "to manually set the $KDEDIRS environment variable from the startkde " "script by adding the following line:

" - "export KDEDIRS=$(kiosktool-kdedirs)

").arg(AVAILABLE_SINCE), + "export KDEDIRS=$(kiosktool-kdedirs)

").tqarg(AVAILABLE_SINCE), i18n("Attention"), "user-profiles"); } @@ -96,24 +96,24 @@ void UserManagementPage::load() KioskRun::ProfileMapping groups; KioskRun::ProfileMapping users; - QStringList groupOrder; + TQStringList groupOrder; KioskRun::self()->getUserProfileMappings(groups, users, groupOrder); - for ( QStringList::ConstIterator it = groupOrder.begin(); + for ( TQStringList::ConstIterator it = groupOrder.begin(); it != groupOrder.end(); ++it ) { - QString group = *it; - QString profile = groups[group].join(","); - new QListViewItem(listGroups, group, profile); + TQString group = *it; + TQString profile = groups[group].join(","); + new TQListViewItem(listGroups, group, profile); } for ( KioskRun::ProfileMapping::Iterator it = users.begin(); it != users.end(); ++it ) { - QString user = it.key(); - QString profile = it.data().join(","); - new QListViewItem(listUsers, user, profile); + TQString user = it.key(); + TQString profile = it.data().join(","); + new TQListViewItem(listUsers, user, profile); } slotUpdateButtons(); } @@ -128,13 +128,13 @@ bool UserManagementPage::save() { KioskRun::ProfileMapping groups; KioskRun::ProfileMapping users; - QStringList groupOrder; + TQStringList groupOrder; - QListViewItem *item = listGroups->firstChild(); + TQListViewItem *item = listGroups->firstChild(); for(; item; item = item->nextSibling()) { - QString group = item->text(0); - QStringList profiles = QStringList::split(",", item->text(1)); + TQString group = item->text(0); + TQStringList profiles = TQStringList::split(",", item->text(1)); groups.insert(group, profiles); groupOrder.prepend(group); } @@ -142,8 +142,8 @@ bool UserManagementPage::save() item = listUsers->firstChild(); for(; item; item = item->nextSibling()) { - QString user = item->text(0); - QStringList profiles = QStringList::split(",", item->text(1)); + TQString user = item->text(0); + TQStringList profiles = TQStringList::split(",", item->text(1)); users.insert(user, profiles); } @@ -154,13 +154,13 @@ void UserManagementPage::slotAddGroup() { KConfig *config = kapp->config(); config->setGroup("General"); - QStringList groupBlacklist = config->readListEntry("GroupBlacklist"); + TQStringList groupBlacklist = config->readListEntry("GroupBlacklist"); m_allGroups.clear(); setgrent(); for (struct group *grp; (grp = getgrent()); ) { - QString group = QString::fromUtf8(grp->gr_name); + TQString group = TQString::fromUtf8(grp->gr_name); if (!groupBlacklist.contains(group)) m_allGroups.append(group); } @@ -171,19 +171,19 @@ void UserManagementPage::slotAddGroup() KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); UserManagementGroupUI *wid = new UserManagementGroupUI(&dlg); - wid->labelCaption->setFixedSize(wid->labelCaption->sizeHint()); + wid->labelCaption->setFixedSize(wid->labelCaption->tqsizeHint()); wid->comboGroup->insertStringList(m_allGroups); wid->comboProfile->insertStringList(m_allProfiles); - wid->setFixedSize(wid->sizeHint()); + wid->setFixedSize(wid->tqsizeHint()); dlg.setMainWidget(wid); - dlg.setFixedSize(dlg.sizeHint()); + dlg.setFixedSize(dlg.tqsizeHint()); while (dlg.exec() == KDialogBase::Accepted) { - QString group = wid->comboGroup->currentText(); - QString profile = wid->comboProfile->currentText(); + TQString group = wid->comboGroup->currentText(); + TQString profile = wid->comboProfile->currentText(); // Check for dupes - QListViewItem *item = listGroups->firstChild(); + TQListViewItem *item = listGroups->firstChild(); for( ;item; item = item->nextSibling()) { if (item->text(0) == group) @@ -193,7 +193,7 @@ void UserManagementPage::slotAddGroup() { int result = KMessageBox::warningContinueCancel(this, i18n("You already have a profile defined for group %1. " - "Do you want to replace it?").arg(group), + "Do you want to replace it?").tqarg(group), i18n("Duplicate Warning"), i18n("&Replace")); if (result != KMessageBox::Continue) @@ -201,7 +201,7 @@ void UserManagementPage::slotAddGroup() delete item; } - item = new QListViewItem(listGroups, group, profile); + item = new TQListViewItem(listGroups, group, profile); listGroups->setSelected(item, true); slotUpdateButtons(); return; @@ -210,7 +210,7 @@ void UserManagementPage::slotAddGroup() void UserManagementPage::slotDeleteGroup() { - QListViewItem *item = listGroups->selectedItem(); + TQListViewItem *item = listGroups->selectedItem(); if (!item) return; @@ -233,7 +233,7 @@ void UserManagementPage::slotAddUser() for (struct passwd *user; (user = getpwent()); ) { if ((user->pw_uid >= (uid_t) minUID) || (user->pw_uid == 0)) - m_allUsers.append(QString::fromUtf8(user->pw_name)); + m_allUsers.append(TQString::fromUtf8(user->pw_name)); } endpwent(); m_allUsers.sort(); @@ -242,19 +242,19 @@ void UserManagementPage::slotAddUser() KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); UserManagementUserUI *wid = new UserManagementUserUI(&dlg); - wid->labelCaption->setFixedSize(wid->labelCaption->sizeHint()); + wid->labelCaption->setFixedSize(wid->labelCaption->tqsizeHint()); wid->comboUser->insertStringList(m_allUsers); wid->comboProfile->insertStringList(m_allProfiles); - wid->setFixedSize(wid->sizeHint()); + wid->setFixedSize(wid->tqsizeHint()); dlg.setMainWidget(wid); - dlg.setFixedSize(dlg.sizeHint()); + dlg.setFixedSize(dlg.tqsizeHint()); while (dlg.exec() == KDialogBase::Accepted) { - QString user = wid->comboUser->currentText(); - QString profile = wid->comboProfile->currentText(); + TQString user = wid->comboUser->currentText(); + TQString profile = wid->comboProfile->currentText(); // Check for dupes - QListViewItem *item = listUsers->firstChild(); + TQListViewItem *item = listUsers->firstChild(); for( ;item; item = item->nextSibling()) { if (item->text(0) == user) @@ -264,7 +264,7 @@ void UserManagementPage::slotAddUser() { int result = KMessageBox::warningContinueCancel(this, i18n("You already have a profile defined for user %1. " - "Do you want to replace it?").arg(user), + "Do you want to replace it?").tqarg(user), i18n("Duplicate Warning"), i18n("&Replace")); if (result != KMessageBox::Continue) @@ -272,7 +272,7 @@ void UserManagementPage::slotAddUser() delete item; } - item = new QListViewItem(listUsers, user, profile); + item = new TQListViewItem(listUsers, user, profile); listUsers->setSelected(item, true); slotUpdateButtons(); return; @@ -281,7 +281,7 @@ void UserManagementPage::slotAddUser() void UserManagementPage::slotDeleteUser() { - QListViewItem *item = listUsers->selectedItem(); + TQListViewItem *item = listUsers->selectedItem(); if (!item) return; @@ -298,7 +298,7 @@ void UserManagementPage::setFocus() // TODO } -QString UserManagementPage::subCaption() +TQString UserManagementPage::subCaption() { return i18n("Assign Profiles"); } diff --git a/kiosktool/userManagement.h b/kiosktool/userManagement.h index b4007a9..47317a6 100644 --- a/kiosktool/userManagement.h +++ b/kiosktool/userManagement.h @@ -27,8 +27,9 @@ class UserManagementUI; class UserManagementPage : public UserManagementUI, public PageWidget { Q_OBJECT + TQ_OBJECT public: - UserManagementPage(QWidget* parent, const char* name = 0, WFlags fl = 0); + UserManagementPage(TQWidget* parent, const char* name = 0, WFlags fl = 0); ~UserManagementPage(); virtual void load(); @@ -36,7 +37,7 @@ public: virtual void setFocus(); - virtual QString subCaption(); + virtual TQString subCaption(); protected: void init(); @@ -52,9 +53,9 @@ private slots: private: UserManagementUI *w; - QStringList m_allUsers; - QStringList m_allGroups; - QStringList m_allProfiles; + TQStringList m_allUsers; + TQStringList m_allGroups; + TQStringList m_allProfiles; }; #endif diff --git a/kiosktool/userManagementGroup_ui.ui b/kiosktool/userManagementGroup_ui.ui index 62fdb6a..261ce5d 100644 --- a/kiosktool/userManagementGroup_ui.ui +++ b/kiosktool/userManagementGroup_ui.ui @@ -1,6 +1,6 @@ UserManagementGroupUI - + UserManagementGroupUI @@ -16,7 +16,7 @@ unnamed - + labelCaption @@ -34,22 +34,22 @@ Expanding - + 20 10 - + - layout2 + tqlayout2 unnamed - + labelGroup @@ -57,7 +57,7 @@ Group: - + comboGroup @@ -72,14 +72,14 @@ Fixed - + 20 20 - + labelProfile @@ -87,7 +87,7 @@ Profile: - + comboProfile @@ -102,7 +102,7 @@ Expanding - + 51 20 diff --git a/kiosktool/userManagementUser_ui.ui b/kiosktool/userManagementUser_ui.ui index 82cda1e..f27088a 100644 --- a/kiosktool/userManagementUser_ui.ui +++ b/kiosktool/userManagementUser_ui.ui @@ -1,6 +1,6 @@ UserManagementUserUI - + UserManagementUserUI @@ -16,7 +16,7 @@ unnamed - + labelCaption @@ -34,22 +34,22 @@ Expanding - + 20 10 - + - layout2 + tqlayout2 unnamed - + labelUser @@ -57,7 +57,7 @@ User: - + comboUser @@ -72,14 +72,14 @@ Fixed - + 20 20 - + labelProfile @@ -87,7 +87,7 @@ Profile: - + comboProfile @@ -102,7 +102,7 @@ Expanding - + 51 20 diff --git a/kiosktool/userManagement_ui.ui b/kiosktool/userManagement_ui.ui index 6da92c7..4167e78 100644 --- a/kiosktool/userManagement_ui.ui +++ b/kiosktool/userManagement_ui.ui @@ -1,6 +1,6 @@ UserManagementUI - + UserManagementUI @@ -16,7 +16,7 @@ unnamed - + groupBox3 @@ -27,11 +27,11 @@ unnamed - + textLabel1 - + 0 0 @@ -54,7 +54,7 @@
- + groupBox1 @@ -91,7 +91,7 @@ listGroups - + 350 0 @@ -104,15 +104,15 @@ true - + - layout1 + tqlayout1 unnamed - + buttonAddGroup @@ -130,14 +130,14 @@ Fixed - + 20 20 - + buttonDeleteGroup @@ -155,7 +155,7 @@ Expanding - + 20 31 @@ -166,7 +166,7 @@ - + groupBox2 @@ -210,15 +210,15 @@ true - + - layout1_2 + tqlayout1_2 unnamed - + buttonAddUser @@ -236,14 +236,14 @@ Fixed - + 20 20 - + buttonDeleteUser @@ -261,7 +261,7 @@ Expanding - + 20 31 -- cgit v1.2.3