summaryrefslogtreecommitdiffstats
path: root/src/newstuff
diff options
context:
space:
mode:
Diffstat (limited to 'src/newstuff')
-rw-r--r--src/newstuff/dialog.cpp78
-rw-r--r--src/newstuff/dialog.h2
-rw-r--r--src/newstuff/manager.cpp28
-rw-r--r--src/newstuff/manager.h4
-rw-r--r--src/newstuff/newscript.cpp2
5 files changed, 57 insertions, 57 deletions
diff --git a/src/newstuff/dialog.cpp b/src/newstuff/dialog.cpp
index 646793a..8ee1569 100644
--- a/src/newstuff/dialog.cpp
+++ b/src/newstuff/dialog.cpp
@@ -31,8 +31,8 @@
#include <ktempfile.h>
#include <tqlabel.h>
-#include <tqtextedit.h>
-#include <tqlayout.h>
+#include <textedit.h>
+#include <layout.h>
#include <tqwhatsthis.h>
#include <tqregexp.h>
#include <tqvbox.h>
@@ -62,13 +62,13 @@ class Dialog::Item : public GUI::ListViewItem {
public:
Item(GUI::ListView* parent) : GUI::ListViewItem(parent) {}
- InstalltqStatus status() const { return m_status; }
- void settqStatus(InstalltqStatus status) {
+ InstallStatus status() const { return m_status; }
+ void setStatus(InstallStatus status) {
m_status = status;
if(m_status == Current) {
- setPixmap(0, SmallIcon(TQString::tqfromLatin1("ok")));
+ setPixmap(0, SmallIcon(TQString::fromLatin1("ok")));
} else if(m_status == OldVersion) {
- setPixmap(0, SmallIcon(TQString::tqfromLatin1("reload")));
+ setPixmap(0, SmallIcon(TQString::fromLatin1("reload")));
}
}
@@ -87,7 +87,7 @@ public:
}
private:
- InstalltqStatus m_status;
+ InstallStatus m_status;
};
Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
@@ -126,7 +126,7 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
TQBoxLayout* boxLayout2 = new TQVBoxLayout(widget, 0, KDialog::spacingHint());
m_iconLabel = new TQLabel(widget);
- m_iconLabel->tqsetAlignment(TQt::AlignTop | TQt::AlignLeft);
+ m_iconLabel->setAlignment(TQt::AlignTop | TQt::AlignLeft);
m_iconLabel->setMargin(0);
m_nameLabel = new TQLabel(widget);
@@ -140,27 +140,27 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
TQWhatsThis::add(m_infoLabel, i18n("The author of the selected item"));
m_install = new KPushButton(i18n("Install"), widget);
- m_install->setIconSet(SmallIconSet(TQString::tqfromLatin1("knewstuff")));
+ m_install->setIconSet(SmallIconSet(TQString::fromLatin1("knewstuff")));
m_install->setEnabled(false);
connect(m_install, TQT_SIGNAL(clicked()), TQT_SLOT(slotInstall()));
// the button's text changes later
// I don't want it resizing, so figure out the maximum size and set that
m_install->polish();
- int maxWidth = m_install->tqsizeHint().width();
- int maxHeight = m_install->tqsizeHint().height();
- m_install->setGuiItem(KGuiItem(i18n("Update"), SmallIconSet(TQString::tqfromLatin1("knewstuff"))));
- maxWidth = TQMAX(maxWidth, m_install->tqsizeHint().width());
- maxHeight = TQMAX(maxHeight, m_install->tqsizeHint().height());
+ int maxWidth = m_install->sizeHint().width();
+ int maxHeight = m_install->sizeHint().height();
+ m_install->setGuiItem(KGuiItem(i18n("Update"), SmallIconSet(TQString::fromLatin1("knewstuff"))));
+ maxWidth = TQMAX(maxWidth, m_install->sizeHint().width());
+ maxHeight = TQMAX(maxHeight, m_install->sizeHint().height());
m_install->setMinimumWidth(maxWidth);
m_install->setMinimumHeight(maxHeight);
TQPixmap pix;
if(m_type == EntryTemplate) {
- pix = DesktopIcon(TQString::tqfromLatin1("looknfeel"), KIcon::SizeLarge);
+ pix = DesktopIcon(TQString::fromLatin1("looknfeel"), KIcon::SizeLarge);
TQWhatsThis::add(m_install, i18n("Download and install the selected template."));
} else {
- pix = UserIcon(TQString::tqfromLatin1("script"));
+ pix = UserIcon(TQString::fromLatin1("script"));
TQWhatsThis::add(m_install, i18n("Download and install the selected script. Some scripts "
"may need to be configured after being installed."));
}
@@ -188,7 +188,7 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
m_descLabel = new TQTextEdit(widget);
m_descLabel->setReadOnly(true);
m_descLabel->setTextFormat(TQt::RichText);
- m_descLabel->setPaper(tqcolorGroup().background());
+ m_descLabel->setPaper(colorGroup().background());
m_descLabel->setMinimumHeight(5 * fontMetrics().height());
boxLayout2->addWidget(m_descLabel, 10);
TQWhatsThis::add(m_descLabel, i18n("A description of the selected item is shown here."));
@@ -213,7 +213,7 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
setMinimumWidth(TQMAX(minimumWidth(), NEW_STUFF_MIN_WIDTH));
setMinimumHeight(TQMAX(minimumHeight(), NEW_STUFF_MIN_HEIGHT));
- resize(configDialogSize(TQString::tqfromLatin1("NewStuff Dialog Options")));
+ resize(configDialogSize(TQString::fromLatin1("NewStuff Dialog Options")));
KConfigGroup dialogConfig(KGlobal::config(), "NewStuff Dialog Options");
TQValueList<int> splitList = dialogConfig.readIntListEntry("Splitter Sizes");
@@ -221,7 +221,7 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
m_split->setSizes(splitList);
}
- settqStatus(i18n("Downloading information..."));
+ setStatus(i18n("Downloading information..."));
ProviderLoader* loader = new Tellico::NewStuff::ProviderLoader(this);
connect(loader, TQT_SIGNAL(providersLoaded(TQPtrList<KNS::Provider>*)), TQT_SLOT(slotProviders(TQPtrList<KNS::Provider>*)));
@@ -232,17 +232,17 @@ Dialog::Dialog(NewStuff::DataType type_, TQWidget* parent_)
TQString prov = config.readEntry("ProvidersUrl");
if(prov.isEmpty()) {
if(m_type == EntryTemplate) {
- prov = TQString::tqfromLatin1("http://periapsis.org/tellico/newstuff/tellicotemplates-providers.php");
- TQString alt = TQString::tqfromLatin1("http://download.kde.org/khotnewstuff/tellicotemplates-providers.xml");
+ prov = TQString::fromLatin1("http://periapsis.org/tellico/newstuff/tellicotemplates-providers.php");
+ TQString alt = TQString::fromLatin1("http://download.kde.org/khotnewstuff/tellicotemplates-providers.xml");
loader->setAlternativeProvider(alt);
} else {
- prov = TQString::tqfromLatin1("http://periapsis.org/tellico/newstuff/tellicoscripts-providers.php");
+ prov = TQString::fromLatin1("http://periapsis.org/tellico/newstuff/tellicoscripts-providers.php");
}
}
if(m_type == EntryTemplate) {
- m_typeName = TQString::tqfromLatin1("tellico/entry-template");
+ m_typeName = TQString::fromLatin1("tellico/entry-template");
} else {
- m_typeName = TQString::tqfromLatin1("tellico/data-source");
+ m_typeName = TQString::fromLatin1("tellico/data-source");
}
loader->load(m_typeName, prov);
@@ -253,7 +253,7 @@ Dialog::~Dialog() {
delete m_cursorSaver;
m_cursorSaver = 0;
- saveDialogSize(TQString::tqfromLatin1("NewStuff Dialog Options"));
+ saveDialogSize(TQString::fromLatin1("NewStuff Dialog Options"));
KConfigGroup config(KGlobal::config(), "NewStuff Dialog Options");
config.writeEntry("Splitter Sizes", m_split->sizes());
}
@@ -261,7 +261,7 @@ Dialog::~Dialog() {
void Dialog::slotProviderError() {
if(m_listView->childCount() == 0) {
myDebug() << "NewStuff::Dialog::slotCheckError() - no available items" << endl;
- settqStatus(TQString());
+ setStatus(TQString());
delete m_cursorSaver;
m_cursorSaver = 0;
@@ -294,7 +294,7 @@ void Dialog::slotResult(KIO::Job* job_) {
myDebug() << "NewStuff::Dialog::slotResult() - can't load result: " << u.url() << endl;
m_jobs.remove(job_);
if(m_jobs.isEmpty()) {
- settqStatus(i18n("Ready."));
+ setStatus(i18n("Ready."));
delete m_cursorSaver;
m_cursorSaver = 0;
}
@@ -321,7 +321,7 @@ void Dialog::slotResult(KIO::Job* job_) {
}
m_jobs.remove(job_);
if(m_jobs.isEmpty()) {
- settqStatus(i18n("Ready."));
+ setStatus(i18n("Ready."));
delete m_cursorSaver;
m_cursorSaver = 0;
}
@@ -338,7 +338,7 @@ void Dialog::addEntry(KNS::Entry* entry_) {
item->setText(2, TQString::number(entry_->rating()));
item->setText(3, TQString::number(entry_->downloads()));
item->setText(4, KGlobal::locale()->formatDate(entry_->releaseDate(), true /*short format */));
- item->settqStatus(NewStuff::Manager::installtqStatus(entry_));
+ item->setStatus(NewStuff::Manager::installStatus(entry_));
m_entryMap.insert(item, entry_);
if(!m_listView->selectedItem()) {
@@ -371,15 +371,15 @@ void Dialog::slotSelected(TQListViewItem* item_) {
m_lastPreviewItem = item_;
}
TQPixmap pix = m_type == EntryTemplate
- ? DesktopIcon(TQString::tqfromLatin1("looknfeel"), KIcon::SizeLarge)
- : UserIcon(TQString::tqfromLatin1("script"));
+ ? DesktopIcon(TQString::fromLatin1("looknfeel"), KIcon::SizeLarge)
+ : UserIcon(TQString::fromLatin1("script"));
m_iconLabel->setPixmap(pix);
TQString license = entry->license();
if(!license.isEmpty()) {
license.prepend('(').append(')');
}
- TQString name = TQString::tqfromLatin1("%1 %2").tqarg(ENTRYNAME(entry)).tqarg(license);
+ TQString name = TQString::fromLatin1("%1 %2").arg(ENTRYNAME(entry)).arg(license);
TQFont font = m_nameLabel->font();
font.setBold(true);
font.setItalic(false);
@@ -389,10 +389,10 @@ void Dialog::slotSelected(TQListViewItem* item_) {
m_infoLabel->setText(entry->author());
TQString desc = entry->summary(m_lang);
- desc.replace(TQRegExp(TQString::tqfromLatin1("\\n")), TQString::tqfromLatin1("<br>"));
+ desc.replace(TQRegExp(TQString::fromLatin1("\\n")), TQString::fromLatin1("<br>"));
m_descLabel->setText(desc);
- InstalltqStatus installed = static_cast<Item*>(item_)->status();
+ InstallStatus installed = static_cast<Item*>(item_)->status();
m_install->setText(installed == OldVersion ? i18n("Update Stuff", "Update") : i18n("Install"));
m_install->setEnabled(installed != Current);
}
@@ -410,7 +410,7 @@ void Dialog::slotInstall() {
delete m_cursorSaver;
m_cursorSaver = new GUI::CursorSaver();
- settqStatus(i18n("Installing item..."));
+ setStatus(i18n("Installing item..."));
m_progress->show();
m_timer->start(100);
connect(m_manager, TQT_SIGNAL(signalInstalled(KNS::Entry*)), TQT_SLOT(slotDoneInstall(KNS::Entry*)));
@@ -423,15 +423,15 @@ void Dialog::slotDoneInstall(KNS::Entry* entry_) {
TQMap<TQListViewItem*, KNS::Entry*>::Iterator it;
for(it = m_entryMap.begin(); entry_ && it != m_entryMap.end(); ++it) {
if(it.data() == entry_) {
- InstalltqStatus installed = Manager::installtqStatus(entry_);
- static_cast<Item*>(it.key())->settqStatus(installed);
+ InstallStatus installed = Manager::installStatus(entry_);
+ static_cast<Item*>(it.key())->setStatus(installed);
m_install->setEnabled(installed != Current);
break;
}
}
delete m_cursorSaver;
m_cursorSaver = 0;
- settqStatus(i18n("Ready."));
+ setStatus(i18n("Ready."));
m_timer->stop();
m_progress->hide();
}
@@ -440,7 +440,7 @@ void Dialog::slotMoveProgress() {
m_progress->setProgress(m_progress->progress()+5);
}
-void Dialog::settqStatus(const TQString& text_) {
+void Dialog::setStatus(const TQString& text_) {
m_statusBar->changeItem(TQChar(' ') + text_, PROGRESS_STATUS_ID);
}
diff --git a/src/newstuff/dialog.h b/src/newstuff/dialog.h
index 2afb0f2..8154c54 100644
--- a/src/newstuff/dialog.h
+++ b/src/newstuff/dialog.h
@@ -69,7 +69,7 @@ private slots:
private:
class Item;
- void settqStatus(const TQString& status);
+ void setStatus(const TQString& status);
void addEntry(KNS::Entry* entry);
Manager* const m_manager;
diff --git a/src/newstuff/manager.cpp b/src/newstuff/manager.cpp
index 3847df6..7011e9c 100644
--- a/src/newstuff/manager.cpp
+++ b/src/newstuff/manager.cpp
@@ -64,7 +64,7 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) {
KTar archive(ref->fileName());
if(archive.open(IO_ReadOnly)) {
const KArchiveDirectory* archiveDir = archive.directory();
- archiveDir->copyTo(Tellico::saveLocation(TQString::tqfromLatin1("entry-templates/")));
+ archiveDir->copyTo(Tellico::saveLocation(TQString::fromLatin1("entry-templates/")));
allFiles = archiveFiles(archiveDir);
// remember files installed for template
@@ -74,11 +74,11 @@ bool Manager::installTemplate(const KURL& url_, const TQString& entryName_) {
if(name.isEmpty()) {
name = url_.fileName();
}
- if(!name.endsWith(TQString::tqfromLatin1(".xsl"))) {
- name += TQString::tqfromLatin1(".xsl");
+ if(!name.endsWith(TQString::fromLatin1(".xsl"))) {
+ name += TQString::fromLatin1(".xsl");
}
KURL dest;
- dest.setPath(Tellico::saveLocation(TQString::tqfromLatin1("entry-templates/")) + name);
+ dest.setPath(Tellico::saveLocation(TQString::fromLatin1("entry-templates/")) + name);
success = true;
if(TQFile::exists(dest.path())) {
myDebug() << "Manager::installTemplate() - " << dest.path() << " exists!" << endl;
@@ -115,7 +115,7 @@ bool Manager::removeTemplate(const TQString& name_) {
}
bool success = true;
- TQString path = Tellico::saveLocation(TQString::tqfromLatin1("entry-templates/"));
+ TQString path = Tellico::saveLocation(TQString::fromLatin1("entry-templates/"));
for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
if((*it).endsWith(TQChar('/'))) {
// ok to not delete all directories
@@ -158,7 +158,7 @@ bool Manager::installScript(const KURL& url_) {
TQFileInfo exeInfo(exeFile);
DataSourceInfo* info = new DataSourceInfo();
- TQString copyTarget = Tellico::saveLocation(TQString::tqfromLatin1("data-sources/"));
+ TQString copyTarget = Tellico::saveLocation(TQString::fromLatin1("data-sources/"));
TQString scriptFolder;
// package could have a top-level directory or not
@@ -229,7 +229,7 @@ bool Manager::removeScript(const TQString& name_) {
TQStringList files = fileGroup.readListEntry(name_);
bool success = true;
- TQString path = Tellico::saveLocation(TQString::tqfromLatin1("data-sources/"));
+ TQString path = Tellico::saveLocation(TQString::fromLatin1("data-sources/"));
for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
if((*it).endsWith(TQChar('/'))) {
// ok to not delete all directories
@@ -252,7 +252,7 @@ bool Manager::removeScript(const TQString& name_) {
return success;
}
-Tellico::NewStuff::InstalltqStatus Manager::installtqStatus(KNS::Entry* entry_) {
+Tellico::NewStuff::InstallStatus Manager::installStatus(KNS::Entry* entry_) {
KConfigGroup config(KGlobal::config(), "KNewStuffStatus");
TQString datestring = config.readEntry(entry_->name());
if(datestring.isEmpty()) {
@@ -270,7 +270,7 @@ Tellico::NewStuff::InstalltqStatus Manager::installtqStatus(KNS::Entry* entry_)
// also check that executable files exists
KConfigGroup fileGroup(KGlobal::config(), "KNewStuffFiles");
TQStringList files = fileGroup.readListEntry(entry_->name());
- TQString path = Tellico::saveLocation(TQString::tqfromLatin1("data-sources/"));
+ TQString path = Tellico::saveLocation(TQString::fromLatin1("data-sources/"));
for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
if(!TQFile::exists(path + *it)) {
return NotInstalled;
@@ -303,7 +303,7 @@ TQString Manager::findXSL(const KArchiveDirectory* dir_) {
const TQStringList entries = dir_->entries();
for(TQStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it) {
const TQString& entry = *it;
- if(entry.endsWith(TQString::tqfromLatin1(".xsl"))) {
+ if(entry.endsWith(TQString::fromLatin1(".xsl"))) {
return entry;
}
}
@@ -414,12 +414,12 @@ bool Manager::checkCommonFile() {
// look for a file that gets installed to know the installation directory
// need to check timestamps
TQString userDataDir = Tellico::saveLocation(TQString());
- TQString userCommonFile = userDataDir + '/' + TQString::tqfromLatin1("tellico-common.xsl");
+ TQString userCommonFile = userDataDir + '/' + TQString::fromLatin1("tellico-common.xsl");
if(TQFile::exists(userCommonFile)) {
// check timestamps
// pics/tellico.png is not likely to be in a user directory
- TQString installDir = KGlobal::dirs()->findResourceDir("appdata", TQString::tqfromLatin1("pics/tellico.png"));
- TQString installCommonFile = installDir + '/' + TQString::tqfromLatin1("tellico-common.xsl");
+ TQString installDir = KGlobal::dirs()->findResourceDir("appdata", TQString::fromLatin1("pics/tellico.png"));
+ TQString installCommonFile = installDir + '/' + TQString::fromLatin1("tellico-common.xsl");
#ifndef NDEBUG
if(userCommonFile == installCommonFile) {
kdWarning() << "Manager::checkCommonFile() - install location is same as user location" << endl;
@@ -438,7 +438,7 @@ bool Manager::checkCommonFile() {
}
}
KURL src, dest;
- src.setPath(KGlobal::dirs()->findResource("appdata", TQString::tqfromLatin1("tellico-common.xsl")));
+ src.setPath(KGlobal::dirs()->findResource("appdata", TQString::fromLatin1("tellico-common.xsl")));
dest.setPath(userCommonFile);
return KIO::NetAccess::file_copy(src, dest);
}
diff --git a/src/newstuff/manager.h b/src/newstuff/manager.h
index 8b33dd4..b8cc2dc 100644
--- a/src/newstuff/manager.h
+++ b/src/newstuff/manager.h
@@ -40,7 +40,7 @@ enum DataType {
DataScript
};
-enum InstalltqStatus {
+enum InstallStatus {
NotInstalled,
OldVersion,
Current
@@ -71,7 +71,7 @@ public:
bool installScript(const KURL& url);
bool removeScript(const TQString& name);
- static InstalltqStatus installtqStatus(KNS::Entry* entry);
+ static InstallStatus installStatus(KNS::Entry* entry);
static bool checkCommonFile();
signals:
diff --git a/src/newstuff/newscript.cpp b/src/newstuff/newscript.cpp
index 3a47dd1..697f449 100644
--- a/src/newstuff/newscript.cpp
+++ b/src/newstuff/newscript.cpp
@@ -22,7 +22,7 @@ using Tellico::NewStuff::NewScript;
NewScript::NewScript(Manager* manager_, TQWidget* parentWidget_)
#if KDE_IS_VERSION(3,3,90)
- : KNewStuffSecure(TQString::tqfromLatin1("tellico/data-source"), parentWidget_)
+ : KNewStuffSecure(TQString::fromLatin1("tellico/data-source"), parentWidget_)
#else
: TQObject(parentWidget_)
#endif