diff options
Diffstat (limited to 'src/configdialog.cpp')
-rw-r--r-- | src/configdialog.cpp | 538 |
1 files changed, 269 insertions, 269 deletions
diff --git a/src/configdialog.cpp b/src/configdialog.cpp index e05766d..62b9945 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -45,23 +45,23 @@ #include <kfontcombo.h> #include <kcolorcombo.h> -#include <qsize.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qptrlist.h> -#include <qpixmap.h> -#include <qgrid.h> -#include <qwhatsthis.h> -#include <qregexp.h> -#include <qhgroupbox.h> -#include <qvgroupbox.h> -#include <qpushbutton.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qfileinfo.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> +#include <tqsize.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqptrlist.h> +#include <tqpixmap.h> +#include <tqgrid.h> +#include <tqwhatsthis.h> +#include <tqregexp.h> +#include <tqhgroupbox.h> +#include <tqvgroupbox.h> +#include <tqpushbutton.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqfileinfo.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> namespace { static const int CONFIG_MIN_WIDTH = 640; @@ -71,21 +71,21 @@ namespace { using Tellico::SourceListViewItem; using Tellico::ConfigDialog; -SourceListViewItem::SourceListViewItem(KListView* parent_, const GeneralFetcherInfo& info_, - const QString& groupName_) - : KListViewItem(parent_, info_.name), m_info(info_), +SourceListViewItem::SourceListViewItem(KListView* tqparent_, const GeneralFetcherInfo& info_, + const TQString& groupName_) + : KListViewItem(tqparent_, info_.name), m_info(info_), m_configGroup(groupName_), m_newSource(groupName_.isNull()), m_fetcher(0) { - QPixmap pix = Fetch::Manager::fetcherIcon(info_.type); + TQPixmap pix = Fetch::Manager::fetcherIcon(info_.type); if(!pix.isNull()) { setPixmap(0, pix); } } -SourceListViewItem::SourceListViewItem(KListView* parent_, QListViewItem* after_, - const GeneralFetcherInfo& info_, const QString& groupName_) - : KListViewItem(parent_, after_, info_.name), m_info(info_), +SourceListViewItem::SourceListViewItem(KListView* tqparent_, TQListViewItem* after_, + const GeneralFetcherInfo& info_, const TQString& groupName_) + : KListViewItem(tqparent_, after_, info_.name), m_info(info_), m_configGroup(groupName_), m_newSource(groupName_.isNull()), m_fetcher(0) { - QPixmap pix = Fetch::Manager::fetcherIcon(info_.type); + TQPixmap pix = Fetch::Manager::fetcherIcon(info_.type); if(!pix.isNull()) { setPixmap(0, pix); } @@ -93,15 +93,15 @@ SourceListViewItem::SourceListViewItem(KListView* parent_, QListViewItem* after_ void SourceListViewItem::setFetcher(Fetch::Fetcher::Ptr fetcher) { m_fetcher = fetcher; - QPixmap pix = Fetch::Manager::fetcherIcon(fetcher.data()); + TQPixmap pix = Fetch::Manager::fetcherIcon(fetcher.data()); if(!pix.isNull()) { setPixmap(0, pix); } } -ConfigDialog::ConfigDialog(QWidget* parent_, const char* name_/*=0*/) +ConfigDialog::ConfigDialog(TQWidget* tqparent_, const char* name_/*=0*/) : KDialogBase(IconList, i18n("Configure Tellico"), Help|Ok|Apply|Cancel|Default, - Ok, parent_, name_, true, false) + Ok, tqparent_, name_, true, false) , m_modifying(false) , m_okClicked(false) { setupGeneralPage(); @@ -110,11 +110,11 @@ ConfigDialog::ConfigDialog(QWidget* parent_, const char* name_/*=0*/) setupFetchPage(); updateGeometry(); - QSize s = sizeHint(); - resize(QMAX(s.width(), CONFIG_MIN_WIDTH), QMAX(s.height(), CONFIG_MIN_HEIGHT)); + TQSize s = tqsizeHint(); + resize(TQMAX(s.width(), CONFIG_MIN_WIDTH), TQMAX(s.height(), CONFIG_MIN_HEIGHT)); // purely for asthetics make all widgets line up - QPtrList<QWidget> widgets; + TQPtrList<TQWidget> widgets; widgets.append(m_fontCombo); widgets.append(m_fontSizeInput); widgets.append(m_baseColorCombo); @@ -122,43 +122,43 @@ ConfigDialog::ConfigDialog(QWidget* parent_, const char* name_/*=0*/) widgets.append(m_highBaseColorCombo); widgets.append(m_highTextColorCombo); int w = 0; - for(QPtrListIterator<QWidget> it(widgets); it.current(); ++it) { + for(TQPtrListIterator<TQWidget> it(widgets); it.current(); ++it) { it.current()->polish(); - w = QMAX(w, it.current()->sizeHint().width()); + w = TQMAX(w, it.current()->tqsizeHint().width()); } - for(QPtrListIterator<QWidget> it(widgets); it.current(); ++it) { + for(TQPtrListIterator<TQWidget> it(widgets); it.current(); ++it) { it.current()->setMinimumWidth(w); } enableButtonOK(false); enableButtonApply(false); - setHelp(QString::fromLatin1("general-options")); - connect(this, SIGNAL(aboutToShowPage(QWidget*)), SLOT(slotUpdateHelpLink(QWidget*))); + setHelp(TQString::tqfromLatin1("general-options")); + connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), TQT_SLOT(slotUpdateHelpLink(TQWidget*))); } ConfigDialog::~ConfigDialog() { - for(QPtrListIterator<Fetch::ConfigWidget> it(m_newStuffConfigWidgets); it.current(); ++it) { + for(TQPtrListIterator<Fetch::ConfigWidget> it(m_newStuffConfigWidgets); it.current(); ++it) { it.current()->removed(); } } -void ConfigDialog::slotUpdateHelpLink(QWidget* w_) { +void ConfigDialog::slotUpdateHelpLink(TQWidget* w_) { switch(pageIndex(w_)) { case 0: - setHelp(QString::fromLatin1("general-options")); + setHelp(TQString::tqfromLatin1("general-options")); break; case 1: - setHelp(QString::fromLatin1("printing-options")); + setHelp(TQString::tqfromLatin1("printing-options")); break; case 2: - setHelp(QString::fromLatin1("template-options")); + setHelp(TQString::tqfromLatin1("template-options")); break; case 3: - setHelp(QString::fromLatin1("internet-sources-options")); + setHelp(TQString::tqfromLatin1("internet-sources-options")); break; default: @@ -194,85 +194,85 @@ void ConfigDialog::slotDefault() { } void ConfigDialog::setupGeneralPage() { - QPixmap pix = DesktopIcon(QString::fromLatin1("tellico"), KIcon::SizeMedium); - QFrame* frame = addPage(i18n("General"), i18n("General Options"), pix); - QVBoxLayout* l = new QVBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); + TQPixmap pix = DesktopIcon(TQString::tqfromLatin1("tellico"), KIcon::SizeMedium); + TQFrame* frame = addPage(i18n("General"), i18n("General Options"), pix); + TQVBoxLayout* l = new TQVBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); - m_cbOpenLastFile = new QCheckBox(i18n("&Reopen file at startup"), frame); - QWhatsThis::add(m_cbOpenLastFile, i18n("If checked, the file that was last open " + m_cbOpenLastFile = new TQCheckBox(i18n("&Reopen file at startup"), frame); + TQWhatsThis::add(m_cbOpenLastFile, i18n("If checked, the file that was last open " "will be re-opened at program start-up.")); l->addWidget(m_cbOpenLastFile); - connect(m_cbOpenLastFile, SIGNAL(clicked()), SLOT(slotModified())); + connect(m_cbOpenLastFile, TQT_SIGNAL(clicked()), TQT_SLOT(slotModified())); - m_cbShowTipDay = new QCheckBox(i18n("&Show \"Tip of the Day\" at startup"), frame); - QWhatsThis::add(m_cbShowTipDay, i18n("If checked, the \"Tip of the Day\" will be " + m_cbShowTipDay = new TQCheckBox(i18n("&Show \"Tip of the Day\" at startup"), frame); + TQWhatsThis::add(m_cbShowTipDay, i18n("If checked, the \"Tip of the Day\" will be " "shown at program start-up.")); l->addWidget(m_cbShowTipDay); - connect(m_cbShowTipDay, SIGNAL(clicked()), SLOT(slotModified())); + connect(m_cbShowTipDay, TQT_SIGNAL(clicked()), TQT_SLOT(slotModified())); - QButtonGroup* imageGroup = new QVButtonGroup(i18n("Image Storage Options"), frame); - m_rbImageInFile = new QRadioButton(i18n("Store images in data file"), imageGroup); - m_rbImageInAppDir = new QRadioButton(i18n("Store images in common application directory"), imageGroup); - m_rbImageInLocalDir = new QRadioButton(i18n("Store images in directory relative to data file"), imageGroup); - QWhatsThis::add(imageGroup, i18n("Images may be saved in the data file itself, which can " + TQButtonGroup* imageGroup = new TQVButtonGroup(i18n("Image Storage Options"), frame); + m_rbImageInFile = new TQRadioButton(i18n("Store images in data file"), imageGroup); + m_rbImageInAppDir = new TQRadioButton(i18n("Store images in common application directory"), imageGroup); + m_rbImageInLocalDir = new TQRadioButton(i18n("Store images in directory relative to data file"), imageGroup); + TQWhatsThis::add(imageGroup, i18n("Images may be saved in the data file itself, which can " "cause Tellico to run slowly, stored in the Tellico " "application directory, or stored in a directory in the " "same location as the data file.")); l->addWidget(imageGroup); - connect(imageGroup, SIGNAL(clicked(int)), SLOT(slotModified())); + connect(imageGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotModified())); - QVGroupBox* formatGroup = new QVGroupBox(i18n("Formatting Options"), frame); + TQVGroupBox* formatGroup = new TQVGroupBox(i18n("Formatting Options"), frame); l->addWidget(formatGroup); - m_cbCapitalize = new QCheckBox(i18n("Auto capitalize &titles and names"), formatGroup); - QWhatsThis::add(m_cbCapitalize, i18n("If checked, titles and names will " + m_cbCapitalize = new TQCheckBox(i18n("Auto capitalize &titles and names"), formatGroup); + TQWhatsThis::add(m_cbCapitalize, i18n("If checked, titles and names will " "be automatically capitalized.")); - connect(m_cbCapitalize, SIGNAL(clicked()), SLOT(slotModified())); + connect(m_cbCapitalize, TQT_SIGNAL(clicked()), TQT_SLOT(slotModified())); - m_cbFormat = new QCheckBox(i18n("Auto &format titles and names"), formatGroup); - QWhatsThis::add(m_cbFormat, i18n("If checked, titles and names will " + m_cbFormat = new TQCheckBox(i18n("Auto &format titles and names"), formatGroup); + TQWhatsThis::add(m_cbFormat, i18n("If checked, titles and names will " "be automatically formatted.")); - connect(m_cbFormat, SIGNAL(clicked()), SLOT(slotModified())); + connect(m_cbFormat, TQT_SIGNAL(clicked()), TQT_SLOT(slotModified())); - QGrid* g1 = new QGrid(2, formatGroup); + TQGrid* g1 = new TQGrid(2, formatGroup); g1->setSpacing(5); - QLabel* lab = new QLabel(i18n("No capitali&zation:"), g1); + TQLabel* lab = new TQLabel(i18n("No capitali&zation:"), g1); m_leCapitals = new KLineEdit(g1); lab->setBuddy(m_leCapitals); - QString whats = i18n("<qt>A list of words which should not be capitalized. Multiple values " + TQString whats = i18n("<qt>A list of words which should not be capitalized. Multiple values " "should be separated by a semi-colon.</qt>"); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_leCapitals, whats); - connect(m_leCapitals, SIGNAL(textChanged(const QString&)), SLOT(slotModified())); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_leCapitals, whats); + connect(m_leCapitals, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotModified())); - lab = new QLabel(i18n("Artic&les:"), g1); + lab = new TQLabel(i18n("Artic&les:"), g1); m_leArticles = new KLineEdit(g1); lab->setBuddy(m_leArticles); whats = i18n("<qt>A list of words which should be considered as articles " "if they are the first word in a title. Multiple values " "should be separated by a semi-colon.</qt>"); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_leArticles, whats); - connect(m_leArticles, SIGNAL(textChanged(const QString&)), SLOT(slotModified())); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_leArticles, whats); + connect(m_leArticles, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotModified())); - lab = new QLabel(i18n("Personal suffi&xes:"), g1); + lab = new TQLabel(i18n("Personal suffi&xes:"), g1); m_leSuffixes = new KLineEdit(g1); lab->setBuddy(m_leSuffixes); whats = i18n("<qt>A list of suffixes which might be used in personal names. Multiple values " "should be separated by a semi-colon.</qt>"); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_leSuffixes, whats); - connect(m_leSuffixes, SIGNAL(textChanged(const QString&)), SLOT(slotModified())); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_leSuffixes, whats); + connect(m_leSuffixes, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotModified())); - lab = new QLabel(i18n("Surname &prefixes:"), g1); + lab = new TQLabel(i18n("Surname &prefixes:"), g1); m_lePrefixes = new KLineEdit(g1); lab->setBuddy(m_lePrefixes); whats = i18n("<qt>A list of prefixes which might be used in surnames. Multiple values " "should be separated by a semi-colon.</qt>"); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_lePrefixes, whats); - connect(m_lePrefixes, SIGNAL(textChanged(const QString&)), SLOT(slotModified())); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_lePrefixes, whats); + connect(m_lePrefixes, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotModified())); // stretch to fill lower area l->addStretch(1); @@ -280,108 +280,108 @@ void ConfigDialog::setupGeneralPage() { void ConfigDialog::setupPrintingPage() { // SuSE changed the icon name on me - QPixmap pix; + TQPixmap pix; KIconLoader* loader = KGlobal::iconLoader(); if(loader) { - pix = loader->loadIcon(QString::fromLatin1("printer1"), KIcon::Desktop, KIcon::SizeMedium, + pix = loader->loadIcon(TQString::tqfromLatin1("printer1"), KIcon::Desktop, KIcon::SizeMedium, KIcon::DefaultState, 0, true /*canReturnNull */); if(pix.isNull()) { - pix = loader->loadIcon(QString::fromLatin1("printer2"), KIcon::Desktop, KIcon::SizeMedium, + pix = loader->loadIcon(TQString::tqfromLatin1("printer2"), KIcon::Desktop, KIcon::SizeMedium, KIcon::DefaultState, 0, true /*canReturnNull */); } if(pix.isNull()) { - pix = loader->loadIcon(QString::fromLatin1("print_printer"), KIcon::Desktop, KIcon::SizeMedium); + pix = loader->loadIcon(TQString::tqfromLatin1("print_printer"), KIcon::Desktop, KIcon::SizeMedium); } } - QFrame* frame = addPage(i18n("Printing"), i18n("Printing Options"), pix); - QVBoxLayout* l = new QVBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); + TQFrame* frame = addPage(i18n("Printing"), i18n("Printing Options"), pix); + TQVBoxLayout* l = new TQVBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); - QVGroupBox* formatOptions = new QVGroupBox(i18n("Formatting Options"), frame); + TQVGroupBox* formatOptions = new TQVGroupBox(i18n("Formatting Options"), frame); l->addWidget(formatOptions); - m_cbPrintFormatted = new QCheckBox(i18n("&Format titles and names"), formatOptions); - QWhatsThis::add(m_cbPrintFormatted, i18n("If checked, titles and names will be automatically formatted.")); - connect(m_cbPrintFormatted, SIGNAL(clicked()), SLOT(slotModified())); + m_cbPrintFormatted = new TQCheckBox(i18n("&Format titles and names"), formatOptions); + TQWhatsThis::add(m_cbPrintFormatted, i18n("If checked, titles and names will be automatically formatted.")); + connect(m_cbPrintFormatted, TQT_SIGNAL(clicked()), TQT_SLOT(slotModified())); - m_cbPrintHeaders = new QCheckBox(i18n("&Print field headers"), formatOptions); - QWhatsThis::add(m_cbPrintHeaders, i18n("If checked, the field names will be printed as table headers.")); - connect(m_cbPrintHeaders, SIGNAL(clicked()), SLOT(slotModified())); + m_cbPrintHeaders = new TQCheckBox(i18n("&Print field headers"), formatOptions); + TQWhatsThis::add(m_cbPrintHeaders, i18n("If checked, the field names will be printed as table headers.")); + connect(m_cbPrintHeaders, TQT_SIGNAL(clicked()), TQT_SLOT(slotModified())); - QHGroupBox* groupOptions = new QHGroupBox(i18n("Grouping Options"), frame); + TQHGroupBox* groupOptions = new TQHGroupBox(i18n("Grouping Options"), frame); l->addWidget(groupOptions); - m_cbPrintGrouped = new QCheckBox(i18n("&Group the entries"), groupOptions); - QWhatsThis::add(m_cbPrintGrouped, i18n("If checked, the entries will be grouped by the selected field.")); - connect(m_cbPrintGrouped, SIGNAL(clicked()), SLOT(slotModified())); + m_cbPrintGrouped = new TQCheckBox(i18n("&Group the entries"), groupOptions); + TQWhatsThis::add(m_cbPrintGrouped, i18n("If checked, the entries will be grouped by the selected field.")); + connect(m_cbPrintGrouped, TQT_SIGNAL(clicked()), TQT_SLOT(slotModified())); - QVGroupBox* imageOptions = new QVGroupBox(i18n("Image Options"), frame); + TQVGroupBox* imageOptions = new TQVGroupBox(i18n("Image Options"), frame); l->addWidget(imageOptions); - QGrid* grid = new QGrid(3, imageOptions); + TQGrid* grid = new TQGrid(3, imageOptions); grid->setSpacing(5); - QLabel* lab = new QLabel(i18n("Maximum image &width:"), grid); + TQLabel* lab = new TQLabel(i18n("Maximum image &width:"), grid); m_imageWidthBox = new KIntSpinBox(0, 999, 1, 50, 10, grid); - m_imageWidthBox->setSuffix(QString::fromLatin1(" px")); + m_imageWidthBox->setSuffix(TQString::tqfromLatin1(" px")); lab->setBuddy(m_imageWidthBox); - (void) new QWidget(grid); - QString whats = i18n("The maximum width of the images in the printout. The aspect ration is preserved."); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_imageWidthBox, whats); - connect(m_imageWidthBox, SIGNAL(valueChanged(int)), SLOT(slotModified())); - // QSpinBox doesn't emit valueChanged if you edit the value with + (void) new TQWidget(grid); + TQString whats = i18n("The maximum width of the images in the printout. The aspect ration is preserved."); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_imageWidthBox, whats); + connect(m_imageWidthBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotModified())); + // TQSpinBox doesn't emit valueChanged if you edit the value with // the lineEdit until you change the keyboard focus - connect(m_imageWidthBox->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), SLOT(slotModified())); + connect(m_imageWidthBox->child("qt_spinbox_edit"), TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotModified())); - lab = new QLabel(i18n("&Maximum image height:"), grid); + lab = new TQLabel(i18n("&Maximum image height:"), grid); m_imageHeightBox = new KIntSpinBox(0, 999, 1, 50, 10, grid); - m_imageHeightBox->setSuffix(QString::fromLatin1(" px")); + m_imageHeightBox->setSuffix(TQString::tqfromLatin1(" px")); lab->setBuddy(m_imageHeightBox); - (void) new QWidget(grid); + (void) new TQWidget(grid); whats = i18n("The maximum height of the images in the printout. The aspect ration is preserved."); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_imageHeightBox, whats); - connect(m_imageHeightBox, SIGNAL(valueChanged(int)), SLOT(slotModified())); - // QSpinBox doesn't emit valueChanged if you edit the value with + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_imageHeightBox, whats); + connect(m_imageHeightBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotModified())); + // TQSpinBox doesn't emit valueChanged if you edit the value with // the lineEdit until you change the keyboard focus - connect(m_imageHeightBox->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), SLOT(slotModified())); + connect(m_imageHeightBox->child("qt_spinbox_edit"), TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotModified())); // stretch to fill lower area l->addStretch(1); } void ConfigDialog::setupTemplatePage() { - QPixmap pix = DesktopIcon(QString::fromLatin1("looknfeel"), KIcon::SizeMedium); - QFrame* frame = addPage(i18n("Templates"), i18n("Template Options"), pix); - QVBoxLayout* l = new QVBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); + TQPixmap pix = DesktopIcon(TQString::tqfromLatin1("looknfeel"), KIcon::SizeMedium); + TQFrame* frame = addPage(i18n("Templates"), i18n("Template Options"), pix); + TQVBoxLayout* l = new TQVBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); - QGridLayout* gridLayout = new QGridLayout(l); + TQGridLayout* gridLayout = new TQGridLayout(l); gridLayout->setSpacing(KDialogBase::spacingHint()); int row = -1; // so I can reuse an i18n string, a plain label can't have an '&' - QLabel* lab = new QLabel(i18n("Collection &type:").remove('&'), frame); + TQLabel* lab = new TQLabel(i18n("Collection &type:").remove('&'), frame); gridLayout->addWidget(lab, ++row, 0); const int collType = Kernel::self()->collectionType(); - lab = new QLabel(CollectionFactory::nameMap()[collType], frame); + lab = new TQLabel(CollectionFactory::nameMap()[collType], frame); gridLayout->addMultiCellWidget(lab, row, row, 1, 2); - lab = new QLabel(i18n("Template:"), frame); + lab = new TQLabel(i18n("Template:"), frame); m_templateCombo = new GUI::ComboBox(frame); - connect(m_templateCombo, SIGNAL(activated(int)), SLOT(slotModified())); + connect(m_templateCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified())); lab->setBuddy(m_templateCombo); - QString whats = i18n("Select the template to use for the current type of collections. " + TQString whats = i18n("Select the template to use for the current type of collections. " "Not all templates will use the font and color settings."); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_templateCombo, whats); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_templateCombo, whats); gridLayout->addWidget(lab, ++row, 0); gridLayout->addWidget(m_templateCombo, row, 1); KPushButton* btn = new KPushButton(i18n("&Preview..."), frame); - QWhatsThis::add(btn, i18n("Show a preview of the template")); - btn->setIconSet(SmallIconSet(QString::fromLatin1("viewmag"))); + TQWhatsThis::add(btn, i18n("Show a preview of the template")); + btn->setIconSet(SmallIconSet(TQString::tqfromLatin1("viewmag"))); gridLayout->addWidget(btn, row, 2); - connect(btn, SIGNAL(clicked()), SLOT(slotShowTemplatePreview())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowTemplatePreview())); // so the button is squeezed small gridLayout->setColStretch(0, 10); @@ -389,106 +389,106 @@ void ConfigDialog::setupTemplatePage() { loadTemplateList(); -// QLabel* l1 = new QLabel(i18n("The options below will be passed to the template, but not " +// TQLabel* l1 = new TQLabel(i18n("The options below will be passed to the template, but not " // "all templates will use them. Some fonts and colors may be " // "specified directly in the template."), frame); -// l1->setTextFormat(Qt::RichText); +// l1->setTextFormat(TQt::RichText); // l->addWidget(l1); - QGroupBox* fontGroup = new QGroupBox(0, Qt::Vertical, i18n("Font Options"), frame); + TQGroupBox* fontGroup = new TQGroupBox(0, Qt::Vertical, i18n("Font Options"), frame); l->addWidget(fontGroup); row = -1; - QGridLayout* fontLayout = new QGridLayout(fontGroup->layout()); + TQGridLayout* fontLayout = new TQGridLayout(fontGroup->tqlayout()); fontLayout->setSpacing(KDialogBase::spacingHint()); - lab = new QLabel(i18n("Font:"), fontGroup); + lab = new TQLabel(i18n("Font:"), fontGroup); fontLayout->addWidget(lab, ++row, 0); m_fontCombo = new KFontCombo(fontGroup); fontLayout->addWidget(m_fontCombo, row, 1); - connect(m_fontCombo, SIGNAL(activated(int)), SLOT(slotModified())); + connect(m_fontCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified())); lab->setBuddy(m_fontCombo); whats = i18n("This font is passed to the template used in the Entry View."); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_fontCombo, whats); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_fontCombo, whats); - fontLayout->addWidget(new QLabel(i18n("Size:"), fontGroup), ++row, 0); + fontLayout->addWidget(new TQLabel(i18n("Size:"), fontGroup), ++row, 0); m_fontSizeInput = new KIntNumInput(fontGroup); m_fontSizeInput->setRange(5, 30); // 30 is same max as konq config - m_fontSizeInput->setSuffix(QString::fromLatin1("pt")); + m_fontSizeInput->setSuffix(TQString::tqfromLatin1("pt")); fontLayout->addWidget(m_fontSizeInput, row, 1); - connect(m_fontSizeInput, SIGNAL(valueChanged(int)), SLOT(slotModified())); + connect(m_fontSizeInput, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotModified())); lab->setBuddy(m_fontSizeInput); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_fontSizeInput, whats); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_fontSizeInput, whats); - QGroupBox* colGroup = new QGroupBox(0, Qt::Vertical, i18n("Color Options"), frame); + TQGroupBox* colGroup = new TQGroupBox(0, Qt::Vertical, i18n("Color Options"), frame); l->addWidget(colGroup); row = -1; - QGridLayout* colLayout = new QGridLayout(colGroup->layout()); + TQGridLayout* colLayout = new TQGridLayout(colGroup->tqlayout()); colLayout->setSpacing(KDialogBase::spacingHint()); - lab = new QLabel(i18n("Background color:"), colGroup); + lab = new TQLabel(i18n("Background color:"), colGroup); colLayout->addWidget(lab, ++row, 0); m_baseColorCombo = new KColorCombo(colGroup); colLayout->addWidget(m_baseColorCombo, row, 1); - connect(m_baseColorCombo, SIGNAL(activated(int)), SLOT(slotModified())); + connect(m_baseColorCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified())); lab->setBuddy(m_baseColorCombo); whats = i18n("This color is passed to the template used in the Entry View."); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_baseColorCombo, whats); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_baseColorCombo, whats); - lab = new QLabel(i18n("Text color:"), colGroup); + lab = new TQLabel(i18n("Text color:"), colGroup); colLayout->addWidget(lab, ++row, 0); m_textColorCombo = new KColorCombo(colGroup); colLayout->addWidget(m_textColorCombo, row, 1); - connect(m_textColorCombo, SIGNAL(activated(int)), SLOT(slotModified())); + connect(m_textColorCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified())); lab->setBuddy(m_textColorCombo); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_textColorCombo, whats); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_textColorCombo, whats); - lab = new QLabel(i18n("Highlight color:"), colGroup); + lab = new TQLabel(i18n("Highlight color:"), colGroup); colLayout->addWidget(lab, ++row, 0); m_highBaseColorCombo = new KColorCombo(colGroup); colLayout->addWidget(m_highBaseColorCombo, row, 1); - connect(m_highBaseColorCombo, SIGNAL(activated(int)), SLOT(slotModified())); + connect(m_highBaseColorCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified())); lab->setBuddy(m_highBaseColorCombo); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_highBaseColorCombo, whats); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_highBaseColorCombo, whats); - lab = new QLabel(i18n("Highlighted text color:"), colGroup); + lab = new TQLabel(i18n("Highlighted text color:"), colGroup); colLayout->addWidget(lab, ++row, 0); m_highTextColorCombo = new KColorCombo(colGroup); colLayout->addWidget(m_highTextColorCombo, row, 1); - connect(m_highTextColorCombo, SIGNAL(activated(int)), SLOT(slotModified())); + connect(m_highTextColorCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotModified())); lab->setBuddy(m_highTextColorCombo); - QWhatsThis::add(lab, whats); - QWhatsThis::add(m_highTextColorCombo, whats); + TQWhatsThis::add(lab, whats); + TQWhatsThis::add(m_highTextColorCombo, whats); - QVGroupBox* groupBox = new QVGroupBox(i18n("Manage Templates"), frame); + TQVGroupBox* groupBox = new TQVGroupBox(i18n("Manage Templates"), frame); l->addWidget(groupBox); - QHBox* box1 = new QHBox(groupBox); + TQHBox* box1 = new TQHBox(groupBox); box1->setSpacing(KDialog::spacingHint()); KPushButton* b1 = new KPushButton(i18n("Install..."), box1); - b1->setIconSet(SmallIconSet(QString::fromLatin1("add"))); - connect(b1, SIGNAL(clicked()), SLOT(slotInstallTemplate())); + b1->setIconSet(SmallIconSet(TQString::tqfromLatin1("add"))); + connect(b1, TQT_SIGNAL(clicked()), TQT_SLOT(slotInstallTemplate())); whats = i18n("Click to install a new template directly."); - QWhatsThis::add(b1, whats); + TQWhatsThis::add(b1, whats); KPushButton* b2 = new KPushButton(i18n("Download..."), box1); - b2->setIconSet(SmallIconSet(QString::fromLatin1("knewstuff"))); - connect(b2, SIGNAL(clicked()), SLOT(slotDownloadTemplate())); + b2->setIconSet(SmallIconSet(TQString::tqfromLatin1("knewstuff"))); + connect(b2, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownloadTemplate())); whats = i18n("Click to download additional templates via the Internet."); - QWhatsThis::add(b2, whats); + TQWhatsThis::add(b2, whats); KPushButton* b3 = new KPushButton(i18n("Delete..."), box1); - b3->setIconSet(SmallIconSet(QString::fromLatin1("remove"))); - connect(b3, SIGNAL(clicked()), SLOT(slotDeleteTemplate())); + b3->setIconSet(SmallIconSet(TQString::tqfromLatin1("remove"))); + connect(b3, TQT_SIGNAL(clicked()), TQT_SLOT(slotDeleteTemplate())); whats = i18n("Click to select and remove installed templates."); - QWhatsThis::add(b3, whats); + TQWhatsThis::add(b3, whats); // stretch to fill lower area l->addStretch(1); @@ -497,46 +497,46 @@ void ConfigDialog::setupTemplatePage() { } void ConfigDialog::setupFetchPage() { - QPixmap pix = DesktopIcon(QString::fromLatin1("network"), KIcon::SizeMedium); - QFrame* frame = addPage(i18n("Data Sources"), i18n("Data Source Options"), pix); - QHBoxLayout* l = new QHBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); + TQPixmap pix = DesktopIcon(TQString::tqfromLatin1("network"), KIcon::SizeMedium); + TQFrame* frame = addPage(i18n("Data Sources"), i18n("Data Source Options"), pix); + TQHBoxLayout* l = new TQHBoxLayout(frame, KDialog::marginHint(), KDialog::spacingHint()); - QVBoxLayout* leftLayout = new QVBoxLayout(l); + TQVBoxLayout* leftLayout = new TQVBoxLayout(l); m_sourceListView = new KListView(frame); m_sourceListView->addColumn(i18n("Source")); - m_sourceListView->setResizeMode(QListView::LastColumn); + m_sourceListView->setResizeMode(TQListView::LastColumn); m_sourceListView->setSorting(-1); // no sorting - m_sourceListView->setSelectionMode(QListView::Single); + m_sourceListView->setSelectionMode(TQListView::Single); leftLayout->addWidget(m_sourceListView, 1); - connect(m_sourceListView, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotSelectedSourceChanged(QListViewItem*))); - connect(m_sourceListView, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), SLOT(slotModifySourceClicked())); + connect(m_sourceListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotSelectedSourceChanged(TQListViewItem*))); + connect(m_sourceListView, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), TQT_SLOT(slotModifySourceClicked())); - QHBox* hb = new QHBox(frame); + TQHBox* hb = new TQHBox(frame); leftLayout->addWidget(hb); hb->setSpacing(KDialog::spacingHint()); m_moveUpSourceBtn = new KPushButton(i18n("Move &Up"), hb); - m_moveUpSourceBtn->setIconSet(SmallIconSet(QString::fromLatin1("up"))); - QWhatsThis::add(m_moveUpSourceBtn, i18n("The order of the data sources sets the order " + m_moveUpSourceBtn->setIconSet(SmallIconSet(TQString::tqfromLatin1("up"))); + TQWhatsThis::add(m_moveUpSourceBtn, i18n("The order of the data sources sets the order " "that Tellico uses when entries are automatically updated.")); m_moveDownSourceBtn = new KPushButton(i18n("Move &Down"), hb); - m_moveDownSourceBtn->setIconSet(SmallIconSet(QString::fromLatin1("down"))); - QWhatsThis::add(m_moveDownSourceBtn, i18n("The order of the data sources sets the order " + m_moveDownSourceBtn->setIconSet(SmallIconSet(TQString::tqfromLatin1("down"))); + TQWhatsThis::add(m_moveDownSourceBtn, i18n("The order of the data sources sets the order " "that Tellico uses when entries are automatically updated.")); // these icons are rather arbitrary, but seem to vaguely fit - QVBoxLayout* vlay = new QVBoxLayout(l); + TQVBoxLayout* vlay = new TQVBoxLayout(l); KPushButton* newSourceBtn = new KPushButton(i18n("&New..."), frame); - newSourceBtn->setIconSet(SmallIconSet(QString::fromLatin1("filenew"))); - QWhatsThis::add(newSourceBtn, i18n("Click to add a new data source.")); + newSourceBtn->setIconSet(SmallIconSet(TQString::tqfromLatin1("filenew"))); + TQWhatsThis::add(newSourceBtn, i18n("Click to add a new data source.")); m_modifySourceBtn = new KPushButton(i18n("&Modify..."), frame); - m_modifySourceBtn->setIconSet(SmallIconSet(QString::fromLatin1("network"))); - QWhatsThis::add(m_modifySourceBtn, i18n("Click to modify the selected data source.")); + m_modifySourceBtn->setIconSet(SmallIconSet(TQString::tqfromLatin1("network"))); + TQWhatsThis::add(m_modifySourceBtn, i18n("Click to modify the selected data source.")); m_removeSourceBtn = new KPushButton(i18n("&Delete"), frame); - m_removeSourceBtn->setIconSet(SmallIconSet(QString::fromLatin1("remove"))); - QWhatsThis::add(m_removeSourceBtn, i18n("Click to delete the selected data source.")); + m_removeSourceBtn->setIconSet(SmallIconSet(TQString::tqfromLatin1("remove"))); + TQWhatsThis::add(m_removeSourceBtn, i18n("Click to delete the selected data source.")); m_newStuffBtn = new KPushButton(i18n("Download..."), frame); - m_newStuffBtn->setIconSet(SmallIconSet(QString::fromLatin1("knewstuff"))); - QWhatsThis::add(m_newStuffBtn, i18n("Click to download additional data sources via the Internet.")); + m_newStuffBtn->setIconSet(SmallIconSet(TQString::tqfromLatin1("knewstuff"))); + TQWhatsThis::add(m_newStuffBtn, i18n("Click to download additional data sources via the Internet.")); #if !KDE_IS_VERSION(3,3,90) // only available in KDE 3.4 and up @@ -551,12 +551,12 @@ void ConfigDialog::setupFetchPage() { vlay->addWidget(m_newStuffBtn); vlay->addStretch(1); - connect(newSourceBtn, SIGNAL(clicked()), SLOT(slotNewSourceClicked())); - connect(m_modifySourceBtn, SIGNAL(clicked()), SLOT(slotModifySourceClicked())); - connect(m_moveUpSourceBtn, SIGNAL(clicked()), SLOT(slotMoveUpSourceClicked())); - connect(m_moveDownSourceBtn, SIGNAL(clicked()), SLOT(slotMoveDownSourceClicked())); - connect(m_removeSourceBtn, SIGNAL(clicked()), SLOT(slotRemoveSourceClicked())); - connect(m_newStuffBtn, SIGNAL(clicked()), SLOT(slotNewStuffClicked())); + connect(newSourceBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotNewSourceClicked())); + connect(m_modifySourceBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotModifySourceClicked())); + connect(m_moveUpSourceBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveUpSourceClicked())); + connect(m_moveDownSourceBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveDownSourceClicked())); + connect(m_removeSourceBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveSourceClicked())); + connect(m_newStuffBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotNewStuffClicked())); KAcceleratorManager::manage(frame); } @@ -587,13 +587,13 @@ void ConfigDialog::readGeneralConfig() { bool autoFormat = Config::autoFormat(); m_cbFormat->setChecked(autoFormat); - const QRegExp comma(QString::fromLatin1("\\s*,\\s*")); - const QString semicolon = QString::fromLatin1("; "); + const TQRegExp comma(TQString::tqfromLatin1("\\s*,\\s*")); + const TQString semicolon = TQString::tqfromLatin1("; "); - m_leCapitals->setText(Config::noCapitalizationString().replace(comma, semicolon)); - m_leArticles->setText(Config::articlesString().replace(comma, semicolon)); - m_leSuffixes->setText(Config::nameSuffixesString().replace(comma, semicolon)); - m_lePrefixes->setText(Config::surnamePrefixesString().replace(comma, semicolon)); + m_leCapitals->setText(Config::noCapitalizationString().tqreplace(comma, semicolon)); + m_leArticles->setText(Config::articlesString().tqreplace(comma, semicolon)); + m_leSuffixes->setText(Config::nameSuffixesString().tqreplace(comma, semicolon)); + m_lePrefixes->setText(Config::surnamePrefixesString().tqreplace(comma, semicolon)); } void ConfigDialog::readPrintingConfig() { @@ -607,9 +607,9 @@ void ConfigDialog::readPrintingConfig() { void ConfigDialog::readTemplateConfig() { // entry template selection const int collType = Kernel::self()->collectionType(); - QString file = Config::templateName(collType); - file.replace('_', ' '); - QString fileContext = file + QString::fromLatin1(" XSL Template"); + TQString file = Config::templateName(collType); + file.tqreplace('_', ' '); + TQString fileContext = file + TQString::tqfromLatin1(" XSL Template"); m_templateCombo->setCurrentItem(i18n(fileContext.utf8(), file.utf8())); m_fontCombo->setCurrentFont(Config::templateFont(collType).family()); @@ -633,7 +633,7 @@ void ConfigDialog::readFetchConfig() { Fetch::ConfigWidget* cw = it->configWidget(this); if(cw) { // might return 0 when no widget available for fetcher type m_configWidgets.insert(item, cw); - // there's weird layout bug if it's not hidden + // there's weird tqlayout bug if it's not hidden cw->hide(); } kapp->processEvents(); @@ -665,14 +665,14 @@ void ConfigDialog::saveConfiguration() { Config::setAutoCapitalization(m_cbCapitalize->isChecked()); Config::setAutoFormat(m_cbFormat->isChecked()); - const QRegExp semicolon(QString::fromLatin1("\\s*;\\s*")); - const QChar comma = ','; + const TQRegExp semicolon(TQString::tqfromLatin1("\\s*;\\s*")); + const TQChar comma = ','; - Config::setNoCapitalizationString(m_leCapitals->text().replace(semicolon, comma)); - Config::setArticlesString(m_leArticles->text().replace(semicolon, comma)); + Config::setNoCapitalizationString(m_leCapitals->text().tqreplace(semicolon, comma)); + Config::setArticlesString(m_leArticles->text().tqreplace(semicolon, comma)); Data::Field::articlesUpdated(); - Config::setNameSuffixesString(m_leSuffixes->text().replace(semicolon, comma)); - Config::setSurnamePrefixesString(m_lePrefixes->text().replace(semicolon, comma)); + Config::setNameSuffixesString(m_leSuffixes->text().tqreplace(semicolon, comma)); + Config::setSurnamePrefixesString(m_lePrefixes->text().tqreplace(semicolon, comma)); Config::setPrintFieldHeaders(m_cbPrintHeaders->isChecked()); Config::setPrintFormatted(m_cbPrintFormatted->isChecked()); @@ -683,7 +683,7 @@ void ConfigDialog::saveConfiguration() { // entry template selection const int collType = Kernel::self()->collectionType(); Config::setTemplateName(collType, m_templateCombo->currentData().toString()); - QFont font(m_fontCombo->currentFont(), m_fontSizeInput->value()); + TQFont font(m_fontCombo->currentFont(), m_fontSizeInput->value()); Config::setTemplateFont(collType, font); Config::setTemplateBaseColor(collType, m_baseColorCombo->color()); Config::setTemplateTextColor(collType, m_textColorCombo->color()); @@ -691,7 +691,7 @@ void ConfigDialog::saveConfiguration() { Config::setTemplateHighlightedTextColor(collType, m_highTextColorCombo->color()); // first, tell config widgets they got deleted - for(QPtrListIterator<Fetch::ConfigWidget> it(m_removedConfigWidgets); it.current(); ++it) { + for(TQPtrListIterator<Fetch::ConfigWidget> it(m_removedConfigWidgets); it.current(); ++it) { it.current()->removed(); } m_removedConfigWidgets.clear(); @@ -700,14 +700,14 @@ void ConfigDialog::saveConfiguration() { bool reloadFetchers = false; int count = 0; // start group numbering at 0 - for(QListViewItemIterator it(m_sourceListView); it.current(); ++it, ++count) { + for(TQListViewItemIterator it(m_sourceListView); it.current(); ++it, ++count) { SourceListViewItem* item = static_cast<SourceListViewItem*>(it.current()); Fetch::ConfigWidget* cw = m_configWidgets[item]; if(!cw || (!cw->shouldSave() && !item->isNewSource())) { continue; } m_newStuffConfigWidgets.removeRef(cw); - QString group = QString::fromLatin1("Data Source %1").arg(count); + TQString group = TQString::tqfromLatin1("Data Source %1").tqarg(count); // in case we later change the order, clear the group now masterConfig->deleteGroup(group); KConfigGroup configGroup(masterConfig, group); @@ -724,17 +724,17 @@ void ConfigDialog::saveConfiguration() { KConfigGroup sourceGroup(masterConfig, "Data Sources"); sourceGroup.writeEntry("Sources Count", count); // and purge old config groups - QString group = QString::fromLatin1("Data Source %1").arg(count); + TQString group = TQString::tqfromLatin1("Data Source %1").tqarg(count); while(masterConfig->hasGroup(group)) { masterConfig->deleteGroup(group); ++count; - group = QString::fromLatin1("Data Source %1").arg(count); + group = TQString::tqfromLatin1("Data Source %1").tqarg(count); } masterConfig->sync(); Config::writeConfig(); - QString s = m_sourceListView->selectedItem() ? m_sourceListView->selectedItem()->text(0) : QString(); + TQString s = m_sourceListView->selectedItem() ? m_sourceListView->selectedItem()->text(0) : TQString(); if(reloadFetchers) { Fetch::Manager::self()->loadFetchers(); Controller::self()->updatedFetchers(); @@ -743,7 +743,7 @@ void ConfigDialog::saveConfiguration() { if(!m_okClicked) { readFetchConfig(); if(!s.isEmpty()) { - for(QListViewItemIterator it(m_sourceListView); it.current(); ++it) { + for(TQListViewItemIterator it(m_sourceListView); it.current(); ++it) { if(it.current()->text(0) == s) { m_sourceListView->setSelected(it.current(), true); m_sourceListView->ensureItemVisible(it.current()); @@ -765,7 +765,7 @@ void ConfigDialog::slotModified() { void ConfigDialog::slotNewSourceClicked() { FetcherConfigDialog dlg(this); - if(dlg.exec() != QDialog::Accepted) { + if(dlg.exec() != TQDialog::Accepted) { return; } @@ -782,7 +782,7 @@ void ConfigDialog::slotNewSourceClicked() { if(cw) { cw->setAccepted(true); cw->slotSetModified(); - cw->reparent(this, QPoint()); // keep the config widget around + cw->reparent(this, TQPoint()); // keep the config widget around m_configWidgets.insert(item, cw); } m_modifySourceBtn->setEnabled(true); @@ -797,7 +797,7 @@ void ConfigDialog::slotModifySourceClicked() { } Fetch::ConfigWidget* cw = 0; - if(m_configWidgets.contains(item)) { + if(m_configWidgets.tqcontains(item)) { cw = m_configWidgets[item]; } if(!cw) { @@ -808,9 +808,9 @@ void ConfigDialog::slotModifySourceClicked() { } FetcherConfigDialog dlg(item->text(0), item->fetchType(), item->updateOverwrite(), cw, this); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { cw->setAccepted(true); // mark to save - QString newName = dlg.sourceName(); + TQString newName = dlg.sourceName(); if(newName != item->text(0)) { item->setText(0, newName); cw->slotSetModified(); @@ -818,7 +818,7 @@ void ConfigDialog::slotModifySourceClicked() { item->setUpdateOverwrite(dlg.updateOverwrite()); slotModified(); // toggle apply button } - cw->reparent(this, QPoint()); // keep the config widget around + cw->reparent(this, TQPoint()); // keep the config widget around } void ConfigDialog::slotRemoveSourceClicked() { @@ -830,7 +830,7 @@ void ConfigDialog::slotRemoveSourceClicked() { Fetch::ConfigWidget* cw = m_configWidgets[item]; if(cw) { m_removedConfigWidgets.append(cw); - // it gets deleted by the parent + // it gets deleted by the tqparent } m_configWidgets.remove(item); delete item; @@ -839,7 +839,7 @@ void ConfigDialog::slotRemoveSourceClicked() { } void ConfigDialog::slotMoveUpSourceClicked() { - QListViewItem* item = m_sourceListView->selectedItem(); + TQListViewItem* item = m_sourceListView->selectedItem(); if(!item) { return; } @@ -862,7 +862,7 @@ void ConfigDialog::slotMoveDownSourceClicked() { if(!item) { return; } - QListViewItem* next = item->nextSibling(); // could be 0 + TQListViewItem* next = item->nextSibling(); // could be 0 if(next) { GeneralFetcherInfo info(item->fetchType(), item->text(0), item->updateOverwrite()); SourceListViewItem* newItem = new SourceListViewItem(m_sourceListView, next, info, item->configGroup()); @@ -876,7 +876,7 @@ void ConfigDialog::slotMoveDownSourceClicked() { } } -void ConfigDialog::slotSelectedSourceChanged(QListViewItem* item_) { +void ConfigDialog::slotSelectedSourceChanged(TQListViewItem* item_) { m_moveUpSourceBtn->setEnabled(item_ && item_->itemAbove()); m_moveDownSourceBtn->setEnabled(item_ && item_->nextSibling()); } @@ -885,8 +885,8 @@ void ConfigDialog::slotNewStuffClicked() { NewStuff::Dialog dlg(NewStuff::DataScript, this); dlg.exec(); - QPtrList<NewStuff::DataSourceInfo> infoList = dlg.dataSourceInfo(); - for(QPtrListIterator<NewStuff::DataSourceInfo> it(infoList); it.current(); ++it) { + TQPtrList<NewStuff::DataSourceInfo> infoList = dlg.dataSourceInfo(); + for(TQPtrListIterator<NewStuff::DataSourceInfo> it(infoList); it.current(); ++it) { const NewStuff::DataSourceInfo& info = *it.current(); Fetch::ExecExternalFetcher::ConfigWidget* cw = 0; SourceListViewItem* item = 0; @@ -926,7 +926,7 @@ void ConfigDialog::slotNewStuffClicked() { } } -Tellico::SourceListViewItem* ConfigDialog::findItem(const QString& path_) const { +Tellico::SourceListViewItem* ConfigDialog::findItem(const TQString& path_) const { if(path_.isEmpty()) { kdWarning() << "ConfigDialog::findItem() - empty path" << endl; return 0; @@ -934,7 +934,7 @@ Tellico::SourceListViewItem* ConfigDialog::findItem(const QString& path_) const // this is a bit ugly, loop over all items, find the execexternal one // that matches the path - for(QListViewItemIterator it(m_sourceListView); it.current(); ++it) { + for(TQListViewItemIterator it(m_sourceListView); it.current(); ++it) { SourceListViewItem* item = static_cast<SourceListViewItem*>(it.current()); if(item->fetchType() != Fetch::ExecExternal) { continue; @@ -951,8 +951,8 @@ Tellico::SourceListViewItem* ConfigDialog::findItem(const QString& path_) const void ConfigDialog::slotShowTemplatePreview() { GUI::PreviewDialog* dlg = new GUI::PreviewDialog(this); - const QString templateName = m_templateCombo->currentData().toString(); - dlg->setXSLTFile(templateName + QString::fromLatin1(".xsl")); + const TQString templateName = m_templateCombo->currentData().toString(); + dlg->setXSLTFile(templateName + TQString::tqfromLatin1(".xsl")); StyleOptions options; options.fontFamily = m_fontCombo->currentFont(); @@ -973,11 +973,11 @@ void ConfigDialog::slotShowTemplatePreview() { } else if(f->type() == Data::Field::Choice) { e->setField(f->name(), f->allowed().front()); } else if(f->type() == Data::Field::Number) { - e->setField(f->name(), QString::fromLatin1("1")); + e->setField(f->name(), TQString::tqfromLatin1("1")); } else if(f->type() == Data::Field::Bool) { - e->setField(f->name(), QString::fromLatin1("true")); + e->setField(f->name(), TQString::tqfromLatin1("true")); } else if(f->type() == Data::Field::Rating) { - e->setField(f->name(), QString::fromLatin1("5")); + e->setField(f->name(), TQString::tqfromLatin1("5")); } else { e->setField(f->name(), f->title()); } @@ -990,38 +990,38 @@ void ConfigDialog::slotShowTemplatePreview() { } void ConfigDialog::loadTemplateList() { - QStringList files = KGlobal::dirs()->findAllResources("appdata", QString::fromLatin1("entry-templates/*.xsl"), + TQStringList files = KGlobal::dirs()->findAllResources("appdata", TQString::tqfromLatin1("entry-templates/*.xsl"), false, true); - KSortableValueList<QString, QString> templates; - for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { - QFileInfo fi(*it); - QString file = fi.fileName().section('.', 0, -2); - QString name = file; - name.replace('_', ' '); - QString title = i18n((name + QString::fromLatin1(" XSL Template")).utf8(), name.utf8()); + KSortableValueList<TQString, TQString> templates; + for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { + TQFileInfo fi(*it); + TQString file = fi.fileName().section('.', 0, -2); + TQString name = file; + name.tqreplace('_', ' '); + TQString title = i18n((name + TQString::tqfromLatin1(" XSL Template")).utf8(), name.utf8()); templates.insert(title, file); } templates.sort(); - QString s = m_templateCombo->currentText(); + TQString s = m_templateCombo->currentText(); m_templateCombo->clear(); - for(KSortableValueList<QString, QString>::iterator it2 = templates.begin(); it2 != templates.end(); ++it2) { + for(KSortableValueList<TQString, TQString>::iterator it2 = templates.begin(); it2 != templates.end(); ++it2) { m_templateCombo->insertItem((*it2).index(), (*it2).value()); } m_templateCombo->setCurrentItem(s); } void ConfigDialog::slotInstallTemplate() { - QString filter = i18n("*.xsl|XSL Files (*.xsl)") + '\n'; + TQString filter = i18n("*.xsl|XSL Files (*.xsl)") + '\n'; filter += i18n("*.tar.gz *.tgz|Template Packages (*.tar.gz)") + '\n'; filter += i18n("*|All Files"); - KURL u = KFileDialog::getOpenURL(QString::null, filter, this); + KURL u = KFileDialog::getOpenURL(TQString(), filter, this); if(u.isEmpty() || !u.isValid()) { return; } - NewStuff::Manager man(this); + NewStuff::Manager man(TQT_TQOBJECT(this)); if(man.installTemplate(u)) { loadTemplateList(); } @@ -1034,24 +1034,24 @@ void ConfigDialog::slotDownloadTemplate() { } void ConfigDialog::slotDeleteTemplate() { - QDir dir(Tellico::saveLocation(QString::fromLatin1("entry-templates/"))); - dir.setNameFilter(QString::fromLatin1("*.xsl")); - dir.setFilter(QDir::Files | QDir::Writable); - QStringList files = dir.entryList(); - QMap<QString, QString> nameFileMap; - for(QStringList::Iterator it = files.begin(); it != files.end(); ++it) { + TQDir dir(Tellico::saveLocation(TQString::tqfromLatin1("entry-templates/"))); + dir.setNameFilter(TQString::tqfromLatin1("*.xsl")); + dir.setFilter(TQDir::Files | TQDir::Writable); + TQStringList files = dir.entryList(); + TQMap<TQString, TQString> nameFileMap; + for(TQStringList::Iterator it = files.begin(); it != files.end(); ++it) { (*it).truncate((*it).length()-4); // remove ".xsl" - QString name = (*it); - name.replace('_', ' '); + TQString name = (*it); + name.tqreplace('_', ' '); nameFileMap.insert(name, *it); } bool ok; - QString name = KInputDialog::getItem(i18n("Delete Template"), + TQString name = KInputDialog::getItem(i18n("Delete Template"), i18n("Select template to delete:"), nameFileMap.keys(), 0, false, &ok, this); if(ok && !name.isEmpty()) { - QString file = nameFileMap[name]; - NewStuff::Manager man(this); + TQString file = nameFileMap[name]; + NewStuff::Manager man(TQT_TQOBJECT(this)); man.removeTemplate(file); loadTemplateList(); } |