diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:51 -0600 | 
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:51 -0600 | 
| commit | 2781e27b871150395a5a82e221684108641002b2 (patch) | |
| tree | 57f4d7c01a48faef1a840fbe0de8f4ec1e5f606f /src/newstuff/dialog.cpp | |
| parent | 031454e56009d576589c28757f6c6fcf4884095e (diff) | |
| download | tellico-2781e27b871150395a5a82e221684108641002b2.tar.gz tellico-2781e27b871150395a5a82e221684108641002b2.zip  | |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 031454e56009d576589c28757f6c6fcf4884095e.
Diffstat (limited to 'src/newstuff/dialog.cpp')
| -rw-r--r-- | src/newstuff/dialog.cpp | 78 | 
1 files changed, 39 insertions, 39 deletions
diff --git a/src/newstuff/dialog.cpp b/src/newstuff/dialog.cpp index 8ee1569..646793a 100644 --- a/src/newstuff/dialog.cpp +++ b/src/newstuff/dialog.cpp @@ -31,8 +31,8 @@  #include <ktempfile.h>  #include <tqlabel.h> -#include <textedit.h> -#include <layout.h> +#include <tqtextedit.h> +#include <tqlayout.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) {} -  InstallStatus status() const { return m_status; } -  void setStatus(InstallStatus status) { +  InstalltqStatus status() const { return m_status; } +  void settqStatus(InstalltqStatus status) {      m_status = status;      if(m_status  == Current) { -      setPixmap(0, SmallIcon(TQString::fromLatin1("ok"))); +      setPixmap(0, SmallIcon(TQString::tqfromLatin1("ok")));      } else if(m_status == OldVersion) { -      setPixmap(0, SmallIcon(TQString::fromLatin1("reload"))); +      setPixmap(0, SmallIcon(TQString::tqfromLatin1("reload")));      }    } @@ -87,7 +87,7 @@ public:    }  private: -  InstallStatus m_status; +  InstalltqStatus 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->setAlignment(TQt::AlignTop | TQt::AlignLeft); +  m_iconLabel->tqsetAlignment(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::fromLatin1("knewstuff"))); +  m_install->setIconSet(SmallIconSet(TQString::tqfromLatin1("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->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()); +  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());    m_install->setMinimumWidth(maxWidth);    m_install->setMinimumHeight(maxHeight);    TQPixmap pix;    if(m_type == EntryTemplate) { -    pix = DesktopIcon(TQString::fromLatin1("looknfeel"), KIcon::SizeLarge); +    pix = DesktopIcon(TQString::tqfromLatin1("looknfeel"), KIcon::SizeLarge);      TQWhatsThis::add(m_install, i18n("Download and install the selected template."));    } else { -    pix = UserIcon(TQString::fromLatin1("script")); +    pix = UserIcon(TQString::tqfromLatin1("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(colorGroup().background()); +  m_descLabel->setPaper(tqcolorGroup().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::fromLatin1("NewStuff Dialog Options"))); +  resize(configDialogSize(TQString::tqfromLatin1("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);    } -  setStatus(i18n("Downloading information...")); +  settqStatus(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::fromLatin1("http://periapsis.org/tellico/newstuff/tellicotemplates-providers.php"); -      TQString alt = TQString::fromLatin1("http://download.kde.org/khotnewstuff/tellicotemplates-providers.xml"); +      prov = TQString::tqfromLatin1("http://periapsis.org/tellico/newstuff/tellicotemplates-providers.php"); +      TQString alt = TQString::tqfromLatin1("http://download.kde.org/khotnewstuff/tellicotemplates-providers.xml");        loader->setAlternativeProvider(alt);      } else { -      prov = TQString::fromLatin1("http://periapsis.org/tellico/newstuff/tellicoscripts-providers.php"); +      prov = TQString::tqfromLatin1("http://periapsis.org/tellico/newstuff/tellicoscripts-providers.php");      }    }    if(m_type == EntryTemplate) { -    m_typeName = TQString::fromLatin1("tellico/entry-template"); +    m_typeName = TQString::tqfromLatin1("tellico/entry-template");    } else { -    m_typeName = TQString::fromLatin1("tellico/data-source"); +    m_typeName = TQString::tqfromLatin1("tellico/data-source");    }    loader->load(m_typeName, prov); @@ -253,7 +253,7 @@ Dialog::~Dialog() {    delete m_cursorSaver;    m_cursorSaver = 0; -  saveDialogSize(TQString::fromLatin1("NewStuff Dialog Options")); +  saveDialogSize(TQString::tqfromLatin1("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; -    setStatus(TQString()); +    settqStatus(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()) { -      setStatus(i18n("Ready.")); +      settqStatus(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()) { -    setStatus(i18n("Ready.")); +    settqStatus(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->setStatus(NewStuff::Manager::installStatus(entry_)); +  item->settqStatus(NewStuff::Manager::installtqStatus(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::fromLatin1("looknfeel"), KIcon::SizeLarge) -              : UserIcon(TQString::fromLatin1("script")); +              ? DesktopIcon(TQString::tqfromLatin1("looknfeel"), KIcon::SizeLarge) +              : UserIcon(TQString::tqfromLatin1("script"));    m_iconLabel->setPixmap(pix);    TQString license = entry->license();    if(!license.isEmpty()) {      license.prepend('(').append(')');    } -  TQString name = TQString::fromLatin1("%1 %2").arg(ENTRYNAME(entry)).arg(license); +  TQString name = TQString::tqfromLatin1("%1 %2").tqarg(ENTRYNAME(entry)).tqarg(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::fromLatin1("\\n")), TQString::fromLatin1("<br>")); +  desc.replace(TQRegExp(TQString::tqfromLatin1("\\n")), TQString::tqfromLatin1("<br>"));    m_descLabel->setText(desc); -  InstallStatus installed = static_cast<Item*>(item_)->status(); +  InstalltqStatus 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(); -  setStatus(i18n("Installing item...")); +  settqStatus(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_) { -      InstallStatus installed = Manager::installStatus(entry_); -      static_cast<Item*>(it.key())->setStatus(installed); +      InstalltqStatus installed = Manager::installtqStatus(entry_); +      static_cast<Item*>(it.key())->settqStatus(installed);        m_install->setEnabled(installed != Current);        break;      }    }    delete m_cursorSaver;    m_cursorSaver = 0; -  setStatus(i18n("Ready.")); +  settqStatus(i18n("Ready."));    m_timer->stop();    m_progress->hide();  } @@ -440,7 +440,7 @@ void Dialog::slotMoveProgress() {    m_progress->setProgress(m_progress->progress()+5);  } -void Dialog::setStatus(const TQString& text_) { +void Dialog::settqStatus(const TQString& text_) {    m_statusBar->changeItem(TQChar(' ') + text_, PROGRESS_STATUS_ID);  }  | 
