diff options
Diffstat (limited to 'kpilot/kpilot')
61 files changed, 1448 insertions, 1448 deletions
diff --git a/kpilot/kpilot/addressEditor.cc b/kpilot/kpilot/addressEditor.cc index 0ea0032b..cfab322e 100644 --- a/kpilot/kpilot/addressEditor.cc +++ b/kpilot/kpilot/addressEditor.cc @@ -33,13 +33,13 @@ #endif #ifndef QLINEEDIT_H -#include <qlineedit.h> +#include <tqlineedit.h> #endif #ifndef QLAYOUT_H -#include <qlayout.h> +#include <tqlayout.h> #endif #ifndef QLABEL_H -#include <qlabel.h> +#include <tqlabel.h> #endif #ifndef _KDEBUG_H #include <kdebug.h> @@ -54,7 +54,7 @@ AddressEditor::AddressEditor(PilotAddress * p, PilotAddressInfo *appInfo, - QWidget * parent, + TQWidget * parent, const char *name) : KDialogBase(KDialogBase::Plain, i18n("Address Editor"), @@ -69,8 +69,8 @@ AddressEditor::AddressEditor(PilotAddress * p, initLayout(); fillFields(); - connect(parent, SIGNAL(recordChanged(PilotAddress *)), - this, SLOT(updateRecord(PilotAddress *))); + connect(parent, TQT_SIGNAL(recordChanged(PilotAddress *)), + this, TQT_SLOT(updateRecord(PilotAddress *))); } @@ -100,7 +100,7 @@ AddressEditor::~AddressEditor() /* * Return phone label from AddressAppInfo + some sanity checking */ -QString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i) +TQString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i) { FUNCTIONSETUP; if (!addr) @@ -109,7 +109,7 @@ QString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i) } PilotAddressInfo::EPhoneType idx = addr->getPhoneType(i); - QString ret = fAppInfo->phoneLabel(idx) + CSL1(":"); + TQString ret = fAppInfo->phoneLabel(idx) + CSL1(":"); return ret; } @@ -154,16 +154,16 @@ void AddressEditor::fillFields() #define MakeField(text,field,row,column) \ - t=new QLabel(text,p); \ - field = new QLineEdit(p); \ + t=new TQLabel(text,p); \ + field = new TQLineEdit(p); \ field->setMinimumWidth(20*SPACING); \ t->setBuddy(field); \ grid->addWidget(t,row,column); \ grid->addWidget(field,row,column+1); #define MakeFieldL(text,label,field,row,column) \ - label = new QLabel(text,p); \ - field = new QLineEdit(p); \ + label = new TQLabel(text,p); \ + field = new TQLineEdit(p); \ field->setMinimumWidth(20*SPACING); \ label->setBuddy(field); \ grid->addWidget(label,row,column); \ @@ -173,10 +173,10 @@ void AddressEditor::initLayout() { FUNCTIONSETUP; - QFrame *p = plainPage(); - QGridLayout *grid = new QGridLayout(p, 10, 5, 0, SPACING); + TQFrame *p = plainPage(); + TQGridLayout *grid = new TQGridLayout(p, 10, 5, 0, SPACING); - QLabel *t; + TQLabel *t; MakeField(i18n("Last name:"), fLastNameField, 0, 0); MakeField(i18n("First name:"), fFirstNameField, 1, 0); diff --git a/kpilot/kpilot/addressEditor.h b/kpilot/kpilot/addressEditor.h index 67132b10..5e676c4c 100644 --- a/kpilot/kpilot/addressEditor.h +++ b/kpilot/kpilot/addressEditor.h @@ -44,7 +44,7 @@ class AddressEditor : public KDialogBase public: AddressEditor(PilotAddress *address, PilotAddressInfo *appInfo, - QWidget *parent, const char *name=0L); + TQWidget *parent, const char *name=0L); ~AddressEditor(); @@ -62,26 +62,26 @@ private: PilotAddress* fAddress; PilotAddressInfo *fAppInfo; // entry fields - QLineEdit *fCustom4Field; - QLineEdit *fCustom3Field; - QLineEdit *fCustom2Field; - QLineEdit *fCustom1Field; - QLineEdit *fCountryField; - QLineEdit *fZipField; - QLineEdit *fStateField; - QLineEdit *fCityField; - QLineEdit *fAddressField; - QLineEdit *fPhoneField[5]; - QLineEdit *fCompanyField; - QLineEdit *fTitleField; - QLineEdit *fFirstNameField; - QLineEdit *fLastNameField; + TQLineEdit *fCustom4Field; + TQLineEdit *fCustom3Field; + TQLineEdit *fCustom2Field; + TQLineEdit *fCustom1Field; + TQLineEdit *fCountryField; + TQLineEdit *fZipField; + TQLineEdit *fStateField; + TQLineEdit *fCityField; + TQLineEdit *fAddressField; + TQLineEdit *fPhoneField[5]; + TQLineEdit *fCompanyField; + TQLineEdit *fTitleField; + TQLineEdit *fFirstNameField; + TQLineEdit *fLastNameField; // phone labels (changing!) - QLabel *m_phoneLabel[5]; + TQLabel *m_phoneLabel[5]; void initLayout(); void fillFields(); - QString phoneLabelText(PilotAddress *, const PhoneSlot &i); + TQString phoneLabelText(PilotAddress *, const PhoneSlot &i); }; #endif diff --git a/kpilot/kpilot/addressWidget.cc b/kpilot/kpilot/addressWidget.cc index 4b900abb..e72b33ab 100644 --- a/kpilot/kpilot/addressWidget.cc +++ b/kpilot/kpilot/addressWidget.cc @@ -38,19 +38,19 @@ #include <cstring> #include <cstdlib> -#include <qptrlist.h> -#include <qlistbox.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qtextstream.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qmultilineedit.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qtextview.h> -#include <qtextcodec.h> -#include <qregexp.h> +#include <tqptrlist.h> +#include <tqlistbox.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqtextstream.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqmultilineedit.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqtextview.h> +#include <tqtextcodec.h> +#include <tqregexp.h> #include <kapplication.h> #include <kmessagebox.h> @@ -65,8 +65,8 @@ #include "addressWidget.moc" -AddressWidget::AddressWidget(QWidget * parent, - const QString & path) : +AddressWidget::AddressWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_address", path), fAddrInfo(0L), fAddressAppInfo(0L), @@ -170,7 +170,7 @@ void AddressWidget::hideComponent() } } -/* virtual */ bool AddressWidget::preHotSync(QString &s) +/* virtual */ bool AddressWidget::preHotSync(TQString &s) { FUNCTIONSETUP; @@ -185,7 +185,7 @@ void AddressWidget::hideComponent() #if KDE_VERSION<220 s = i18n("There are still %1 address editing windows open.") - .arg(QString::number(fPendingAddresses)); + .arg(TQString::number(fPendingAddresses)); #else s = i18n("There is still an address editing window open.", "There are still %n address editing windows open.", @@ -213,74 +213,74 @@ void AddressWidget::setupWidget() { FUNCTIONSETUP; - QLabel *label; - QGridLayout *grid = new QGridLayout(this, 6, 4, SPACING); + TQLabel *label; + TQGridLayout *grid = new TQGridLayout(this, 6, 4, SPACING); - fCatList = new QComboBox(this); + fCatList = new TQComboBox(this); grid->addWidget(fCatList, 0, 1); - connect(fCatList, SIGNAL(activated(int)), - this, SLOT(slotSetCategory(int))); - QWhatsThis::add(fCatList, + connect(fCatList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetCategory(int))); + TQWhatsThis::add(fCatList, i18n("<qt>Select the category of addresses to display here.</qt>")); - label = new QLabel(i18n("Category:"), this); + label = new TQLabel(i18n("Category:"), this); label->setBuddy(fCatList); grid->addWidget(label, 0, 0); - fListBox = new QListBox(this); + fListBox = new TQListBox(this); grid->addMultiCellWidget(fListBox, 1, 1, 0, 1); - connect(fListBox, SIGNAL(highlighted(int)), - this, SLOT(slotShowAddress(int))); - connect(fListBox, SIGNAL(selected(int)), - this, SLOT(slotEditRecord())); - QWhatsThis::add(fListBox, + connect(fListBox, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotShowAddress(int))); + connect(fListBox, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(slotEditRecord())); + TQWhatsThis::add(fListBox, i18n("<qt>This list displays all the addresses " "in the selected category. Click on " "one to display it to the right.</qt>")); - label = new QLabel(i18n("Address info:"), this); + label = new TQLabel(i18n("Address info:"), this); grid->addWidget(label, 0, 2); // address info text view - fAddrInfo = new QTextView(this); + fAddrInfo = new TQTextView(this); grid->addMultiCellWidget(fAddrInfo, 1, 4, 2, 2); - QPushButton *button; - QString wt; + TQPushButton *button; + TQString wt; - fEditButton = new QPushButton(i18n("Edit Record..."), this); + fEditButton = new TQPushButton(i18n("Edit Record..."), this); grid->addWidget(fEditButton, 2, 0); - connect(fEditButton, SIGNAL(clicked()), this, SLOT(slotEditRecord())); + connect(fEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>You can edit an address when it is selected.</qt>") : i18n("<qt><i>Editing is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(fEditButton,wt); + TQWhatsThis::add(fEditButton,wt); - button = new QPushButton(i18n("New Record..."), this); + button = new TQPushButton(i18n("New Record..."), this); grid->addWidget(button, 2, 1); - connect(button, SIGNAL(clicked()), this, SLOT(slotCreateNewRecord())); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNewRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Add a new address to the address book.</qt>") : i18n("<qt><i>Adding is disabled by the 'internal editors' setting.</i></qt>") ; - QWhatsThis::add(button, wt); + TQWhatsThis::add(button, wt); button->setEnabled(KPilotSettings::internalEditors()); - fDeleteButton = new QPushButton(i18n("Delete Record"), this); + fDeleteButton = new TQPushButton(i18n("Delete Record"), this); grid->addWidget(fDeleteButton, 3, 0); - connect(fDeleteButton, SIGNAL(clicked()), - this, SLOT(slotDeleteRecord())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Delete the selected address from the address book.</qt>") : i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ; - button = new QPushButton(i18n("Export addresses to file","Export..."), this); + button = new TQPushButton(i18n("Export addresses to file","Export..."), this); grid->addWidget(button, 3,1); - connect(button, SIGNAL(clicked()), this, SLOT(slotExport())); - QWhatsThis::add(button, + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExport())); + TQWhatsThis::add(button, i18n("<qt>Export all addresses in the selected category to CSV format.</qt>") ); - QWhatsThis::add(fDeleteButton,wt); + TQWhatsThis::add(fDeleteButton,wt); } void AddressWidget::updateWidget() @@ -313,12 +313,12 @@ void AddressWidget::updateWidget() if ((currentCatID == -1) || (fAddressList.current()->category() == currentCatID)) { - QString title = createTitle(fAddressList.current(), + TQString title = createTitle(fAddressList.current(), addressDisplayMode); if (!title.isEmpty()) { - title.remove(QRegExp(CSL1("\n.*"))); + title.remove(TQRegExp(CSL1("\n.*"))); PilotListItem *p = new PilotListItem(title, listIndex, fAddressList.current()); @@ -340,11 +340,11 @@ void AddressWidget::updateWidget() -QString AddressWidget::createTitle(PilotAddress * address, int displayMode) +TQString AddressWidget::createTitle(PilotAddress * address, int displayMode) { // FUNCTIONSETUP; - QString title; + TQString title; switch (displayMode) { @@ -441,10 +441,10 @@ void AddressWidget::slotEditRecord() AddressEditor *editor = new AddressEditor(selectedRecord, fAddressAppInfo, this); - connect(editor, SIGNAL(recordChangeComplete(PilotAddress *)), - this, SLOT(slotUpdateRecord(PilotAddress *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotAddress *)), + this, TQT_SLOT(slotUpdateRecord(PilotAddress *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingAddresses++; @@ -491,10 +491,10 @@ void AddressWidget::slotCreateNewRecord() AddressEditor *editor = new AddressEditor(0L, fAddressAppInfo, this); - connect(editor, SIGNAL(recordChangeComplete(PilotAddress *)), - this, SLOT(slotAddRecord(PilotAddress *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotAddress *)), + this, TQT_SLOT(slotAddRecord(PilotAddress *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingAddresses++; @@ -605,7 +605,7 @@ void AddressWidget::slotShowAddress(int which) << endl; #endif - QString text(CSL1("<qt>")); + TQString text(CSL1("<qt>")); text += addr->getTextRepresentation(fAddressAppInfo,Qt::RichText); text += CSL1("</qt>\n"); fAddrInfo->setText(text); @@ -673,13 +673,13 @@ void AddressWidget::slotExport() int currentCatID = findSelectedCategory(fCatList, fAddressAppInfo->categoryInfo()); - QString prompt = (currentCatID==-1) ? + TQString prompt = (currentCatID==-1) ? i18n("Export All Addresses") : i18n("Export Address Category %1").arg(fAddressAppInfo->categoryName(currentCatID)) ; - QString saveFile = KFileDialog::getSaveFileName( - QString::null, + TQString saveFile = KFileDialog::getSaveFileName( + TQString::null, CSL1("*.csv|Comma Separated Values"), this, prompt @@ -691,7 +691,7 @@ void AddressWidget::slotExport() #endif return; } - if (QFile::exists(saveFile) && + if (TQFile::exists(saveFile) && KMessageBox::warningContinueCancel(this, i18n("The file <i>%1</i> exists. Overwrite?").arg(saveFile), i18n("Overwrite File?"), @@ -703,7 +703,7 @@ void AddressWidget::slotExport() return; } - FILE *f = fopen(QFile::encodeName(saveFile),"w"); + FILE *f = fopen(TQFile::encodeName(saveFile),"w"); if (!f) { KMessageBox::sorry(this, diff --git a/kpilot/kpilot/addressWidget.h b/kpilot/kpilot/addressWidget.h index 289b49e3..1fa172b8 100644 --- a/kpilot/kpilot/addressWidget.h +++ b/kpilot/kpilot/addressWidget.h @@ -46,13 +46,13 @@ class AddressWidget : public PilotComponent Q_OBJECT public: - AddressWidget(QWidget* parent,const QString& dbpath); + AddressWidget(TQWidget* parent,const TQString& dbpath); ~AddressWidget(); // Pilot Component Methods: virtual void showComponent(); virtual void hideComponent(); - virtual bool preHotSync(QString &); + virtual bool preHotSync(TQString &); virtual void postHotSync(); public slots: @@ -107,13 +107,13 @@ private: * Create a sensible "title" for an address, composed * of first + last name if possible. */ - QString createTitle(PilotAddress *,int displayMode); + TQString createTitle(PilotAddress *,int displayMode); /** - * We use a QComboBox fCatList to hold the user-visible names - * of all the categories. The QTextView fAddrInfo is for + * We use a TQComboBox fCatList to hold the user-visible names + * of all the categories. The TQTextView fAddrInfo is for * displaying the currently selected address, if any. - * The QListBox fListBox lists all the addresses in the + * The TQListBox fListBox lists all the addresses in the * currently selected category. * * The entire address database is read into memory in the @@ -123,11 +123,11 @@ private: * * The two buttons should speak for themselves. */ - QComboBox *fCatList; - QTextView *fAddrInfo; + TQComboBox *fCatList; + TQTextView *fAddrInfo; PilotAddressInfo *fAddressAppInfo; - QPtrList<PilotAddress> fAddressList; - QListBox *fListBox; + TQPtrList<PilotAddress> fAddressList; + TQListBox *fListBox; QPushButton *fEditButton,*fDeleteButton; protected: diff --git a/kpilot/kpilot/conduitConfigDialog.cc b/kpilot/kpilot/conduitConfigDialog.cc index 6e4f0fc9..3ea444d3 100644 --- a/kpilot/kpilot/conduitConfigDialog.cc +++ b/kpilot/kpilot/conduitConfigDialog.cc @@ -30,18 +30,18 @@ #include "options.h" -#include <qlistview.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qwidgetstack.h> -#include <qvbox.h> -#include <qsplitter.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqlistview.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> +#include <tqvbox.h> +#include <tqsplitter.h> +#include <tqheader.h> +#include <tqtimer.h> #include <kservice.h> #include <kservicetype.h> @@ -72,13 +72,13 @@ extern "C" { - KDE_EXPORT KCModule *create_kpilotconfig( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kpilotconfig( TQWidget *parent, const char * ) { FUNCTIONSETUP; return new ConduitConfigWidget( parent, "kcmkpilotconfig" ); } - KDE_EXPORT ConfigWizard *create_wizard(QWidget *parent, int m) + KDE_EXPORT ConfigWizard *create_wizard(TQWidget *parent, int m) { FUNCTIONSETUP; return new ConfigWizard(parent,"Wizard", m); @@ -89,18 +89,18 @@ extern "C" class ConduitTip : public QToolTip { public: - ConduitTip(QListView *parent); + ConduitTip(TQListView *parent); virtual ~ConduitTip(); protected: - virtual void maybeTip(const QPoint &); + virtual void maybeTip(const TQPoint &); - QListView *fListView; + TQListView *fListView; } ; -ConduitTip::ConduitTip(QListView *p) : - QToolTip(p->viewport(),0L), +ConduitTip::ConduitTip(TQListView *p) : + TQToolTip(p->viewport(),0L), fListView(p) { FUNCTIONSETUP; @@ -111,11 +111,11 @@ ConduitTip::~ConduitTip() FUNCTIONSETUP; } -/* virtual */ void ConduitTip::maybeTip(const QPoint &p) +/* virtual */ void ConduitTip::maybeTip(const TQPoint &p) { FUNCTIONSETUP; - QListViewItem *l = fListView->itemAt(p); + TQListViewItem *l = fListView->itemAt(p); if (!l) return; @@ -130,7 +130,7 @@ ConduitTip::~ConduitTip() << endl; #endif - QString s = l->text(CONDUIT_COMMENT); + TQString s = l->text(CONDUIT_COMMENT); if (s.isEmpty()) return; if (s.find(CSL1("<qt>"),0,false) == -1) @@ -148,7 +148,7 @@ ConduitTip::~ConduitTip() class KPilotCheckListItem : public QCheckListItem { public: - KPilotCheckListItem ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController ) : QCheckListItem(parent, text, tt),mOriginalState(false) {} + KPilotCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) : TQCheckListItem(parent, text, tt),mOriginalState(false) {} ~KPilotCheckListItem() {} void setOriginalState(bool state) { mOriginalState=state; setOn(state);} @@ -174,23 +174,23 @@ protected: ** Create a page in the widget stack @p parent on page @p pageno, ** bearing the given @p text. The remainder of the parameters are ** for esoteric things like: -** @p buttons set to non-null to include (and return) a QHBox suitable +** @p buttons set to non-null to include (and return) a TQHBox suitable ** for displaying a row of buttons in on the page. -** @p label set to non-null to return the QLabel used to display @p text. +** @p label set to non-null to return the TQLabel used to display @p text. */ -static void addDescriptionPage(QWidgetStack *parent, +static void addDescriptionPage(TQWidgetStack *parent, int pageno, - const QString &text, - QHBox **buttons = 0L, - QLabel **label = 0L) + const TQString &text, + TQHBox **buttons = 0L, + TQLabel **label = 0L) { - QVBox *v = new QVBox(parent); - QLabel *l = 0L; + TQVBox *v = new TQVBox(parent); + TQLabel *l = 0L; - v->setFrameShape(QLabel::NoFrame); + v->setFrameShape(TQLabel::NoFrame); v->setMargin(SPACING); - l = new QLabel(v); + l = new TQLabel(v); l->setText(text); l->setAlignment(Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak); @@ -198,15 +198,15 @@ static void addDescriptionPage(QWidgetStack *parent, if (buttons) { - *buttons = new QHBox(v); - l = new QLabel(v); + *buttons = new TQHBox(v); + l = new TQLabel(v); } parent->addWidget(v,pageno); } -ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) : +ConduitConfigWidgetBase::ConduitConfigWidgetBase(TQWidget *parent, const char *n) : KCModule(parent, n), fConduitList(0L), fStack(0L), @@ -217,32 +217,32 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) { FUNCTIONSETUP; - QWidget *w = 0L; // For spacing purposes only. - QHBox *btns = 0L; + TQWidget *w = 0L; // For spacing purposes only. + TQHBox *btns = 0L; - QHBoxLayout *mainLayout = new QHBoxLayout(this); + TQHBoxLayout *mainLayout = new TQHBoxLayout(this); mainLayout->setSpacing(10); // Create the left hand column - fConduitList = new QListView(this ,"ConduitList"); - fConduitList->addColumn(QString::null); + fConduitList = new TQListView(this ,"ConduitList"); + fConduitList->addColumn(TQString::null); fConduitList->header()->hide(); fConduitList->setSizePolicy( - QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred)); + TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); mainLayout->addWidget(fConduitList); // Create the title - QVBoxLayout *vbox = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *vbox = new TQVBoxLayout(this, 0, KDialog::spacingHint()); // String below is just to make space; no need to translate. - fTitleText = new QLabel(CSL1("Conduit Setup - Addressbook"), this); - QFont titleFont(fTitleText->font()); + fTitleText = new TQLabel(CSL1("Conduit Setup - Addressbook"), this); + TQFont titleFont(fTitleText->font()); titleFont.setBold(true); fTitleText->setFont(titleFont); vbox->addWidget(fTitleText, 0, AlignLeft); - vbox->addWidget(new KSeparator(QFrame::HLine|QFrame::Plain, this)); + vbox->addWidget(new KSeparator(TQFrame::HLine|TQFrame::Plain, this)); // Right hand column - fStack = new QWidgetStack(this, "RightPart"); + fStack = new TQWidgetStack(this, "RightPart"); vbox->addWidget(fStack, 10); mainLayout->addLayout(vbox); @@ -258,16 +258,16 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) // addDescriptionPage(fStack,OLD_CONDUIT, i18n("<qt>This is an old-style conduit.</qt>"),&btns); - w = new QWidget(btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); - fConfigureButton = new QPushButton(btns); + fConfigureButton = new TQPushButton(btns); fConfigureButton->setText(i18n("Configure...")); - w = new QWidget(btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); // Page 3 addDescriptionPage(fStack,INTERNAL_CONDUIT, - QString::null,0L,&fActionDescription); + TQString::null,0L,&fActionDescription); // Page 5 - explanation about conduits addDescriptionPage(fStack,CONDUIT_EXPLN, @@ -290,17 +290,17 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) "Checked conduits will be run during a HotSync. " "Select a conduit to configure it.</p>" "</qt>"),&btns); - w = new QWidget(btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); - fConfigureWizard = new QPushButton(i18n("Configuration Wizard"),btns); - w = new QWidget(btns); + fConfigureWizard = new TQPushButton(i18n("Configuration Wizard"),btns); + w = new TQWidget(btns); btns->setStretchFactor(w,50); fStack->addWidget(ConduitConfigBase::aboutPage(fStack,0L),GENERAL_ABOUT); } -ConduitConfigWidget::ConduitConfigWidget(QWidget *parent, const char *n, +ConduitConfigWidget::ConduitConfigWidget(TQWidget *parent, const char *n, bool) : ConduitConfigWidgetBase(parent,n), fConfigure(0L), @@ -319,25 +319,25 @@ ConduitConfigWidget::ConduitConfigWidget(QWidget *parent, const char *n, fConduitList->resize(fConduitList->sizeHint()); fConduitList->setMinimumSize(fConduitList->sizeHint()); fConduitList->setColumnWidth(0, fConduitList->sizeHint().width()); - fConduitList->setResizeMode(QListView::AllColumns); + fConduitList->setResizeMode(TQListView::AllColumns); - fStack->resize(fStack->sizeHint()+QSize(10,40)); - fStack->setMinimumSize(fStack->sizeHint()+QSize(10,40)); + fStack->resize(fStack->sizeHint()+TQSize(10,40)); + fStack->setMinimumSize(fStack->sizeHint()+TQSize(10,40)); - QObject::connect(fConduitList, - SIGNAL(selectionChanged(QListViewItem *)), - this,SLOT(selected(QListViewItem *))); - QObject::connect(fConduitList, - SIGNAL(clicked(QListViewItem*)), - this, SLOT(conduitsChanged(QListViewItem*))); + TQObject::connect(fConduitList, + TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this,TQT_SLOT(selected(TQListViewItem *))); + TQObject::connect(fConduitList, + TQT_SIGNAL(clicked(TQListViewItem*)), + this, TQT_SLOT(conduitsChanged(TQListViewItem*))); // Deprecated? - QObject::connect(fConfigureButton, - SIGNAL(clicked()), - this,SLOT(configure())); + TQObject::connect(fConfigureButton, + TQT_SIGNAL(clicked()), + this,TQT_SLOT(configure())); - QObject::connect(fConfigureWizard,SIGNAL(clicked()), - this,SLOT(configureWizard())); + TQObject::connect(fConfigureWizard,TQT_SIGNAL(clicked()), + this,TQT_SLOT(configureWizard())); fGeneralPage->setSelected(true); fConduitList->setCurrentItem(fGeneralPage); @@ -359,19 +359,19 @@ void ConduitConfigWidget::fillLists() FUNCTIONSETUP; // 3 QListViewItems for the three headings in the list - QListViewItem *general,*conduits; + TQListViewItem *general,*conduits; // And two generic pointers for the rest. - QListViewItem *q = 0L; + TQListViewItem *q = 0L; KPilotCheckListItem *p = 0L; - q = new QListViewItem(fConduitList, i18n("About")); + q = new TQListViewItem(fConduitList, i18n("About")); q->setText(CONDUIT_COMMENT, i18n("About KPilot. Credits.")); q->setText(CONDUIT_LIBRARY, CSL1("general_about")); - conduits = new QListViewItem(fConduitList, i18n("Conduits")); + conduits = new TQListViewItem(fConduitList, i18n("Conduits")); - general = new QListViewItem( fConduitList, i18n("General Setup" ) ); + general = new TQListViewItem( fConduitList, i18n("General Setup" ) ); fGeneralPage = general; // Give them identifiers so they can be handled specially when selected. @@ -388,7 +388,7 @@ void ConduitConfigWidget::fillLists() // Create entries under general. -#define CE(a,b,c) q = new QListViewItem(general,a) ; \ +#define CE(a,b,c) q = new TQListViewItem(general,a) ; \ q->setText(CONDUIT_COMMENT,b) ; \ q->setText(CONDUIT_LIBRARY,c) ; @@ -402,13 +402,13 @@ void ConduitConfigWidget::fillLists() // List of installed (enabled) actions and conduits. - QStringList potentiallyInstalled = KPilotSettings::installedConduits(); + TQStringList potentiallyInstalled = KPilotSettings::installedConduits(); // Create internal conduits. // // -#define IC(a,b,c) p = new KPilotCheckListItem(conduits,i18n(a),QCheckListItem::CheckBox); \ +#define IC(a,b,c) p = new KPilotCheckListItem(conduits,i18n(a),TQCheckListItem::CheckBox); \ p->setText(CONDUIT_COMMENT,i18n(c)); \ p->setText(CONDUIT_LIBRARY,CSL1("internal_" b)); \ p->setText(CONDUIT_DESKTOP,CSL1("internal_" b)); \ @@ -424,7 +424,7 @@ void ConduitConfigWidget::fillLists() KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(CSL1("KPilotConduit")); - QValueListIterator < KServiceOffer > availList(offers.begin()); + TQValueListIterator < KServiceOffer > availList(offers.begin()); while (availList != offers.end()) { KSharedPtr < KService > o = (*availList).service(); @@ -444,7 +444,7 @@ void ConduitConfigWidget::fillLists() p = new KPilotCheckListItem(conduits, o->name(), - QCheckListItem::CheckBox); + TQCheckListItem::CheckBox); p->setMultiLinesEnabled(true); p->setText(CONDUIT_COMMENT,o->comment()); p->setText(CONDUIT_DESKTOP,o->desktopEntryName()); @@ -472,11 +472,11 @@ static void dumpConduitInfo(const KLibrary *lib) #endif } -static ConduitConfigBase *handleGeneralPages(QWidget *w, QListViewItem *p) +static ConduitConfigBase *handleGeneralPages(TQWidget *w, TQListViewItem *p) { ConduitConfigBase *o = 0L; - QString s = p->text(CONDUIT_LIBRARY) ; + TQString s = p->text(CONDUIT_LIBRARY) ; if (s.startsWith(CSL1("general_setup"))) { @@ -502,7 +502,7 @@ static ConduitConfigBase *handleGeneralPages(QWidget *w, QListViewItem *p) return o; } -void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) +void ConduitConfigWidget::loadAndConfigure(TQListViewItem *p) // ,bool exec) { FUNCTIONSETUP; @@ -517,7 +517,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) return; } - QString libraryName = p->text(CONDUIT_LIBRARY); + TQString libraryName = p->text(CONDUIT_LIBRARY); #ifdef DEBUG DEBUGKPILOT << fname @@ -563,7 +563,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) return; } - QObject *o = 0L; + TQObject *o = 0L; // Page 4: General setup if (libraryName.startsWith(CSL1("general_"))) @@ -572,7 +572,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) } else { - QCString library = QFile::encodeName(libraryName); + TQCString library = TQFile::encodeName(libraryName); KLibFactory *f = KLibLoader::self()->factory(library); if (!f) @@ -593,7 +593,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) dumpConduitInfo(KLibLoader::self()->library(library)); - QStringList a; + TQStringList a; a.append(CSL1("modal")); o = f->create(fStack, 0L, "ConduitConfigBase", a); @@ -629,7 +629,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) } // Remove the config widget from the stack before we can add the new one - QWidget *oldConfigWidget = fStack->widget( NEW_CONDUIT ); + TQWidget *oldConfigWidget = fStack->widget( NEW_CONDUIT ); if ( oldConfigWidget ) { fStack->removeWidget( oldConfigWidget ); @@ -651,7 +651,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec) fCurrentConfig=d; // make sure the changed signal is propagated to the KCM*Dialog // and the apply button is enabled correspondingly. - connect(d, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect(d, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); } } @@ -668,7 +668,7 @@ bool ConduitConfigWidget::release() if (fCurrentConduit) { KLibLoader::self()->unloadLibrary( - QFile::encodeName(fCurrentConduit->text(CONDUIT_LIBRARY))); + TQFile::encodeName(fCurrentConduit->text(CONDUIT_LIBRARY))); } fCurrentConduit=0L; fCurrentConfig=0L; @@ -681,7 +681,7 @@ void ConduitConfigWidget::unselect() fConduitList->setCurrentItem( fCurrentConduit ); } -void ConduitConfigWidget::selected(QListViewItem *p) +void ConduitConfigWidget::selected(TQListViewItem *p) { FUNCTIONSETUP; #ifdef DEBUG @@ -694,7 +694,7 @@ void ConduitConfigWidget::selected(QListViewItem *p) if (!release()) { fConduitList->blockSignals(true); - QTimer::singleShot(1,this,SLOT(unselect())); + TQTimer::singleShot(1,this,TQT_SLOT(unselect())); return; } } @@ -716,9 +716,9 @@ void ConduitConfigWidget::selected(QListViewItem *p) #endif // set the dialog title to the selected item - QListViewItem *pParent = p->parent(); - QString title; - title = pParent ? pParent->text(CONDUIT_NAME) + CSL1(" - ") : QString() ; + TQListViewItem *pParent = p->parent(); + TQString title; + title = pParent ? pParent->text(CONDUIT_NAME) + CSL1(" - ") : TQString() ; title += p ? p->text(CONDUIT_NAME) : i18n("KPilot Setup"); fTitleText->setText(title); } @@ -728,11 +728,11 @@ void ConduitConfigWidget::configure() loadAndConfigure(fConduitList->selectedItem()); } -void ConduitConfigWidget::warnNoExec(const QListViewItem * p) +void ConduitConfigWidget::warnNoExec(const TQListViewItem * p) { FUNCTIONSETUP; - QString msg = i18n("<qt>No library could be " + TQString msg = i18n("<qt>No library could be " "found for the conduit %1. This means that the " "conduit was not installed properly.</qt>") .arg(p->text(CONDUIT_NAME)); @@ -745,11 +745,11 @@ void ConduitConfigWidget::warnNoExec(const QListViewItem * p) KMessageBox::error(this, msg, i18n("Conduit Error")); } -void ConduitConfigWidget::warnNoLibrary(const QListViewItem *p) +void ConduitConfigWidget::warnNoLibrary(const TQListViewItem *p) { FUNCTIONSETUP; - QString msg = i18n("<qt>There was a problem loading the library " + TQString msg = i18n("<qt>There was a problem loading the library " "for the conduit %1. This means that the " "conduit was not installed properly.</qt>") .arg(p->text(CONDUIT_NAME)); @@ -773,8 +773,8 @@ void ConduitConfigWidget::save() if (fCurrentConfig) fCurrentConfig->commit(); } - QStringList activeConduits; - QListViewItemIterator it( fConduitList ); + TQStringList activeConduits; + TQListViewItemIterator it( fConduitList ); while ( it.current() ) { KPilotCheckListItem*p = dynamic_cast<KPilotCheckListItem*>(it.current()); if ( p ) @@ -795,14 +795,14 @@ void ConduitConfigWidget::load() FUNCTIONSETUP; KPilotSettings::self()->readConfig(); - QStringList potentiallyInstalled = KPilotSettings::installedConduits(); - QListViewItem*p = fConduitList->firstChild(); + TQStringList potentiallyInstalled = KPilotSettings::installedConduits(); + TQListViewItem*p = fConduitList->firstChild(); while (p) { - QListViewItem*q = p->firstChild(); + TQListViewItem*q = p->firstChild(); while (q) { - QCheckListItem*qq=dynamic_cast<QCheckListItem*>(q); + TQCheckListItem*qq=dynamic_cast<TQCheckListItem*>(q); if (qq) { qq->setOn(! (potentiallyInstalled.findIndex(qq->text(CONDUIT_DESKTOP))<0) ); @@ -822,7 +822,7 @@ void ConduitConfigWidget::load() } -void ConduitConfigWidget::conduitsChanged(QListViewItem*item) +void ConduitConfigWidget::conduitsChanged(TQListViewItem*item) { KPilotCheckListItem*i=dynamic_cast<KPilotCheckListItem*>(item); if (i) @@ -831,7 +831,7 @@ void ConduitConfigWidget::conduitsChanged(QListViewItem*item) } } -void ConduitConfigWidget::reopenItem(QListViewItem *i) +void ConduitConfigWidget::reopenItem(TQListViewItem *i) { i->setOpen(true); } diff --git a/kpilot/kpilot/conduitConfigDialog.h b/kpilot/kpilot/conduitConfigDialog.h index 697251fa..549f4983 100644 --- a/kpilot/kpilot/conduitConfigDialog.h +++ b/kpilot/kpilot/conduitConfigDialog.h @@ -46,31 +46,31 @@ class ConduitConfigWidgetBase : public KCModule { Q_OBJECT public: - ConduitConfigWidgetBase(QWidget *p=0L,const char *n=0L); - - QListView *fConduitList; - QWidgetStack *fStack; - QPushButton *fConfigureButton; - QPushButton *fConfigureWizard,*fConfigureKontact; - QLabel *fActionDescription; - QLabel *fTitleText; // Dialog title above fStack + ConduitConfigWidgetBase(TQWidget *p=0L,const char *n=0L); + + TQListView *fConduitList; + TQWidgetStack *fStack; + TQPushButton *fConfigureButton; + TQPushButton *fConfigureWizard,*fConfigureKontact; + TQLabel *fActionDescription; + TQLabel *fTitleText; // Dialog title above fStack } ; class ConduitConfigWidget : public ConduitConfigWidgetBase { Q_OBJECT public: - ConduitConfigWidget(QWidget *, + ConduitConfigWidget(TQWidget *, const char *name=0L, bool ownButtons=false); virtual ~ConduitConfigWidget(); protected: void fillLists(); - void warnNoExec(const QListViewItem *); - void warnNoLibrary(const QListViewItem *); + void warnNoExec(const TQListViewItem *); + void warnNoLibrary(const TQListViewItem *); - void loadAndConfigure(QListViewItem *); // ,bool); + void loadAndConfigure(TQListViewItem *); // ,bool); public: /** @@ -90,7 +90,7 @@ public slots: // void slotApply(); signals: - void selectionChanged(QListViewItem *); + void selectionChanged(TQListViewItem *); void sizeChanged(); protected slots: @@ -98,14 +98,14 @@ protected slots: void configureWizard(); void unselect(); // Helper slot when cancelling a change in selection - void selected(QListViewItem *); - void conduitsChanged(QListViewItem*); - void reopenItem(QListViewItem *); + void selected(TQListViewItem *); + void conduitsChanged(TQListViewItem*); + void reopenItem(TQListViewItem *); private: - QPushButton *fConfigure; - QListViewItem *fCurrentConduit; - QListViewItem *fGeneralPage; + TQPushButton *fConfigure; + TQListViewItem *fCurrentConduit; + TQListViewItem *fGeneralPage; ConduitConfigBase *fCurrentConfig; }; diff --git a/kpilot/kpilot/datebookWidget.cc b/kpilot/kpilot/datebookWidget.cc index 64888560..bc2dff5e 100644 --- a/kpilot/kpilot/datebookWidget.cc +++ b/kpilot/kpilot/datebookWidget.cc @@ -31,9 +31,9 @@ #include "options.h" -#include <qlayout.h> -#include <qdir.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqpushbutton.h> #include <klistview.h> #include <kdatepicker.h> @@ -41,27 +41,27 @@ #include "datebookWidget.moc" -DatebookWidget::DatebookWidget(QWidget *parent, const QString &dbpath) : +DatebookWidget::DatebookWidget(TQWidget *parent, const TQString &dbpath) : PilotComponent(parent,"component_generic",dbpath) { FUNCTIONSETUP; - QGridLayout *g = new QGridLayout(this,1,1,SPACING); + TQGridLayout *g = new TQGridLayout(this,1,1,SPACING); fDatePicker = new KDatePicker( this, "fDatePicker" ); - fDatePicker->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, fDatePicker->sizePolicy().hasHeightForWidth() ) ); + fDatePicker->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, fDatePicker->sizePolicy().hasHeightForWidth() ) ); g->addMultiCellWidget(fDatePicker,0,0,0,2); - QSpacerItem* spacer = new QSpacerItem( 20, 180, QSizePolicy::Minimum, QSizePolicy::Expanding ); + TQSpacerItem* spacer = new TQSpacerItem( 20, 180, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); g->addItem( spacer, 1, 1 ); - fAddButton = new QPushButton( i18n( "&Add..." ), this, "pushButton1" ); + fAddButton = new TQPushButton( i18n( "&Add..." ), this, "pushButton1" ); g->addWidget( fAddButton, 2, 0 ); - fEditButton = new QPushButton( i18n( "&Edit..." ), this, "pushButton2" ); + fEditButton = new TQPushButton( i18n( "&Edit..." ), this, "pushButton2" ); g->addWidget( fEditButton, 2, 1 ); - fDeleteButton = new QPushButton( i18n( "&Delete..." ), this, "pushButton3" ); + fDeleteButton = new TQPushButton( i18n( "&Delete..." ), this, "pushButton3" ); g->addWidget( fDeleteButton, 2, 2 ); fEventList = new KListView( this, "kListView1" ); @@ -69,18 +69,18 @@ DatebookWidget::DatebookWidget(QWidget *parent, const QString &dbpath) : fEventList->addColumn( i18n( "Al" ) ); fEventList->addColumn( i18n( "Rec" ) ); fEventList->addColumn( i18n( "Description" ) ); -// fEventList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, fEventList->sizePolicy().hasHeightForWidth() ) ); +// fEventList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, fEventList->sizePolicy().hasHeightForWidth() ) ); fEventList->setAllColumnsShowFocus( TRUE ); fEventList->setShowSortIndicator( TRUE ); fEventList->setResizeMode( KListView::/*LastColumn*/AllColumns ); fEventList->setFullWidth( TRUE ); -// fEventList->setAlternateBackground( QColor( 221, 146, 240 ) ); +// fEventList->setAlternateBackground( TQColor( 221, 146, 240 ) ); g->addMultiCellWidget(fEventList, 0, 2, 3, 3); - connect(fDatePicker, SIGNAL(dateChanged()), SLOT(slotDayChanged())); - connect(fAddButton, SIGNAL(clicked()), SLOT(slotAddEvent())); - connect(fEditButton, SIGNAL(clicked()), SLOT(slotEditEvent())); - connect(fDeleteButton, SIGNAL(clicked()), SLOT(slotDeleteEvent())); + connect(fDatePicker, TQT_SIGNAL(dateChanged()), TQT_SLOT(slotDayChanged())); + connect(fAddButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddEvent())); + connect(fEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditEvent())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDeleteEvent())); } DatebookWidget::~DatebookWidget() diff --git a/kpilot/kpilot/datebookWidget.h b/kpilot/kpilot/datebookWidget.h index 28ff0799..9a144cc3 100644 --- a/kpilot/kpilot/datebookWidget.h +++ b/kpilot/kpilot/datebookWidget.h @@ -41,7 +41,7 @@ class DatebookWidget : public PilotComponent Q_OBJECT public: - DatebookWidget(QWidget* parent, const QString& dbpath); + DatebookWidget(TQWidget* parent, const TQString& dbpath); virtual ~DatebookWidget(); // Pilot component methods @@ -56,9 +56,9 @@ protected slots: private: KDatePicker*fDatePicker; - QPushButton*fAddButton; - QPushButton*fEditButton; - QPushButton*fDeleteButton; + TQPushButton*fAddButton; + TQPushButton*fEditButton; + TQPushButton*fDeleteButton; KListView*fEventList; }; diff --git a/kpilot/kpilot/dbAppInfoEditor.cc b/kpilot/kpilot/dbAppInfoEditor.cc index ab5516fc..2e9e4b5f 100644 --- a/kpilot/kpilot/dbAppInfoEditor.cc +++ b/kpilot/kpilot/dbAppInfoEditor.cc @@ -27,8 +27,8 @@ #include "options.h" -#include <qtextedit.h> -#include <qlabel.h> +#include <tqtextedit.h> +#include <tqlabel.h> #include <kdialogbase.h> #include <kmessagebox.h> @@ -41,7 +41,7 @@ using namespace KHE; /************************************************* **************************************************/ -DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, QWidget *parent) : +DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, TQWidget *parent) : KDialogBase(parent, "AppBlock Editor",false, i18n("Edit AppInfo Block"), Ok|Cancel), @@ -65,11 +65,11 @@ DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, QWidget *parent) : } else { - QLabel*tmpW = new QLabel( i18n("To view the Application info block data, please install a hex editor (e.g. khexedit from kdeutils)."), this ); + TQLabel*tmpW = new TQLabel( i18n("To view the Application info block data, please install a hex editor (e.g. khexedit from kdeutils)."), this ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); fAppInfoEdit = tmpW; } setMainWidget( fAppInfoEdit ); diff --git a/kpilot/kpilot/dbAppInfoEditor.h b/kpilot/kpilot/dbAppInfoEditor.h index 5a0896d8..692cd251 100644 --- a/kpilot/kpilot/dbAppInfoEditor.h +++ b/kpilot/kpilot/dbAppInfoEditor.h @@ -36,13 +36,13 @@ class DBAppInfoEditor : public KDialogBase { Q_OBJECT public: - DBAppInfoEditor(char*appInfoData, int l, QWidget *parent = 0); + DBAppInfoEditor(char*appInfoData, int l, TQWidget *parent = 0); ~DBAppInfoEditor(); char*appInfo; int len; protected: void fillWidgets(); - QWidget*fAppInfoEdit; + TQWidget*fAppInfoEdit; protected slots: virtual void slotOk(); }; diff --git a/kpilot/kpilot/dbFlagsEditor.cc b/kpilot/kpilot/dbFlagsEditor.cc index 0d6adeb9..89f14d03 100644 --- a/kpilot/kpilot/dbFlagsEditor.cc +++ b/kpilot/kpilot/dbFlagsEditor.cc @@ -29,8 +29,8 @@ #include <pi-dlp.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kdatewidget.h> #include <ktimewidget.h> #include <kmessagebox.h> @@ -40,7 +40,7 @@ #include "dbFlagsEditor_base.h" -DBFlagsEditor::DBFlagsEditor(DBInfo*dbinfo, QWidget *parent) : +DBFlagsEditor::DBFlagsEditor(DBInfo*dbinfo, TQWidget *parent) : KDialogBase(parent, "FlagsEditor",false, i18n("Edit Database Flags"), Ok|Cancel), dbi(dbinfo) @@ -83,7 +83,7 @@ void DBFlagsEditor::slotOk() dbi->miscFlags |= dlpDBMiscFlagExcludeFromSync; else dbi->miscFlags &= ~dlpDBMiscFlagExcludeFromSync; - QDateTime ttime; + TQDateTime ttime; ttime.setDate(widget->fCreationDate->date()); #if KDE_IS_VERSION(3,1,9) ttime.setTime(widget->fCreationTime->time()); @@ -115,15 +115,15 @@ void DBFlagsEditor::fillWidgets() { // FUNCTIONSETUP - widget->fDBName->setText(QString::fromLatin1(dbi->name)); + widget->fDBName->setText(TQString::fromLatin1(dbi->name)); char buff[5]; set_long(buff, dbi->type); buff[4]='\0'; - widget->fType->setText(QString::fromLatin1(buff)); + widget->fType->setText(TQString::fromLatin1(buff)); set_long(buff, dbi->creator); buff[4]='\0'; - widget->fCreator->setText(QString::fromLatin1(buff)); + widget->fCreator->setText(TQString::fromLatin1(buff)); widget->fRessourceDB->setChecked(dbi->flags & dlpDBFlagResource); widget->fReadOnly->setChecked(dbi->flags & dlpDBFlagReadOnly); @@ -133,7 +133,7 @@ void DBFlagsEditor::fillWidgets() widget->fReset->setChecked(dbi->flags & dlpDBFlagReset); widget->fExcludeDB->setChecked(dbi->miscFlags & dlpDBMiscFlagExcludeFromSync); - QDateTime ttime; + TQDateTime ttime; ttime.setTime_t(dbi->createDate); widget->fCreationDate->setDate(ttime.date()); #if KDE_IS_VERSION(3,1,9) diff --git a/kpilot/kpilot/dbFlagsEditor.h b/kpilot/kpilot/dbFlagsEditor.h index d4c7c694..c5ad3c08 100644 --- a/kpilot/kpilot/dbFlagsEditor.h +++ b/kpilot/kpilot/dbFlagsEditor.h @@ -39,7 +39,7 @@ class DBFlagsEditor : public KDialogBase { Q_OBJECT public: - DBFlagsEditor(DBInfo*dbinfo=0L, QWidget *parent = 0); + DBFlagsEditor(DBInfo*dbinfo=0L, TQWidget *parent = 0); ~DBFlagsEditor(); protected: diff --git a/kpilot/kpilot/dbFlagsEditor_base.ui.h b/kpilot/kpilot/dbFlagsEditor_base.ui.h index 0186648c..189f09d1 100644 --- a/kpilot/kpilot/dbFlagsEditor_base.ui.h +++ b/kpilot/kpilot/dbFlagsEditor_base.ui.h @@ -17,7 +17,7 @@ class KTimeWidget : public QWidget { public: - KTimeWidget(QWidget *p, const char *n) : QWidget(p,n) {}; + KTimeWidget(TQWidget *p, const char *n) : TQWidget(p,n) {}; } ; diff --git a/kpilot/kpilot/dbRecordEditor.cc b/kpilot/kpilot/dbRecordEditor.cc index 2b2d5b39..b3dfd8f7 100644 --- a/kpilot/kpilot/dbRecordEditor.cc +++ b/kpilot/kpilot/dbRecordEditor.cc @@ -27,14 +27,14 @@ #include "options.h" -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> #include <kmessagebox.h> @@ -49,12 +49,12 @@ using namespace KHE; -DBRecordEditor::DBRecordEditor(PilotRecord*r, int n, QWidget *parent) +DBRecordEditor::DBRecordEditor(PilotRecord*r, int n, TQWidget *parent) : KDialogBase(parent, "RecordEditor",false,i18n("Edit Record"), Ok|Cancel), rec(r), nr(n) { // fWidget=new DBRecordEditorBase(this); - fWidget=new QWidget(this); + fWidget=new TQWidget(this); setMainWidget(fWidget); fBuffer = new char[4096]; @@ -119,46 +119,46 @@ void DBRecordEditor::initWidgets() { // FUNCTIONSETUP - DBRecordEditorBaseLayout = new QGridLayout( fWidget, 1, 1, 11, 6, "DBRecordEditorBaseLayout"); + DBRecordEditorBaseLayout = new TQGridLayout( fWidget, 1, 1, 11, 6, "DBRecordEditorBaseLayout"); - fRecordIndexLabel = new QLabel( fWidget, "fRecordIndexLabel" ); + fRecordIndexLabel = new TQLabel( fWidget, "fRecordIndexLabel" ); DBRecordEditorBaseLayout->addWidget( fRecordIndexLabel, 0, 0 ); - fRecordIDLabel = new QLabel( fWidget, "fRecordIDLabel" ); + fRecordIDLabel = new TQLabel( fWidget, "fRecordIDLabel" ); DBRecordEditorBaseLayout->addWidget( fRecordIDLabel, 0, 2 ); - fRecordIndex = new QLineEdit( fWidget, "fRecordIndex" ); + fRecordIndex = new TQLineEdit( fWidget, "fRecordIndex" ); fRecordIndex->setReadOnly( TRUE ); DBRecordEditorBaseLayout->addWidget( fRecordIndex, 0, 1 ); - fRecordID = new QLineEdit( fWidget, "fRecordID" ); + fRecordID = new TQLineEdit( fWidget, "fRecordID" ); fRecordID->setReadOnly( TRUE ); DBRecordEditorBaseLayout->addWidget( fRecordID, 0, 3 ); - fFlagsGroup = new QButtonGroup( fWidget, "fFlagsGroup" ); - fFlagsGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, - (QSizePolicy::SizeType)4, 0, 0, fFlagsGroup->sizePolicy().hasHeightForWidth() ) ); + fFlagsGroup = new TQButtonGroup( fWidget, "fFlagsGroup" ); + fFlagsGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, + (TQSizePolicy::SizeType)4, 0, 0, fFlagsGroup->sizePolicy().hasHeightForWidth() ) ); fFlagsGroup->setColumnLayout(0, Qt::Vertical ); fFlagsGroup->layout()->setSpacing( 6 ); fFlagsGroup->layout()->setMargin( 11 ); - fFlagsGroupLayout = new QGridLayout( fFlagsGroup->layout() ); + fFlagsGroupLayout = new TQGridLayout( fFlagsGroup->layout() ); fFlagsGroupLayout->setAlignment( Qt::AlignTop ); - fDirty = new QCheckBox( fFlagsGroup, "fDirty" ); + fDirty = new TQCheckBox( fFlagsGroup, "fDirty" ); fFlagsGroupLayout->addWidget( fDirty, 0, 0 ); - fDeleted = new QCheckBox( fFlagsGroup, "fDeleted" ); + fDeleted = new TQCheckBox( fFlagsGroup, "fDeleted" ); fFlagsGroupLayout->addWidget( fDeleted, 1, 0 ); - fBusy = new QCheckBox( fFlagsGroup, "fBusy" ); + fBusy = new TQCheckBox( fFlagsGroup, "fBusy" ); fFlagsGroupLayout->addWidget( fBusy, 0, 1 ); - fSecret = new QCheckBox( fFlagsGroup, "fSecret" ); + fSecret = new TQCheckBox( fFlagsGroup, "fSecret" ); fFlagsGroupLayout->addMultiCellWidget( fSecret, 1, 1, 1, 2 ); - fArchived = new QCheckBox( fFlagsGroup, "fArchived" ); + fArchived = new TQCheckBox( fFlagsGroup, "fArchived" ); fFlagsGroupLayout->addWidget( fArchived, 0, 2 ); DBRecordEditorBaseLayout->addMultiCellWidget( fFlagsGroup, 1, 1, 0, 3 ); @@ -190,11 +190,11 @@ void DBRecordEditor::initWidgets() } else { - QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. kbytesedit from kdeutils)."), fWidget ); + TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. kbytesedit from kdeutils)."), fWidget ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); fRecordData = tmpW; fRecordDataIf = 0; } @@ -202,15 +202,15 @@ void DBRecordEditor::initWidgets() DBRecordEditorBaseLayout->addMultiCellWidget( fRecordData, 2, 2, 0, 3 ); languageChange(); - resize( QSize(600, 561).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 561).expandedTo(minimumSizeHint()) ); } void DBRecordEditor::fillWidgets() { // FUNCTIONSETUP - fRecordIndex->setText(QString::number(nr)); - fRecordID->setText(QString::number(rec->id())); + fRecordIndex->setText(TQString::number(nr)); + fRecordID->setText(TQString::number(rec->id())); int att=rec->attributes(); fDirty->setChecked(att & dlpRecAttrDirty); diff --git a/kpilot/kpilot/dbRecordEditor.h b/kpilot/kpilot/dbRecordEditor.h index 97bea4ed..a6c3ff55 100644 --- a/kpilot/kpilot/dbRecordEditor.h +++ b/kpilot/kpilot/dbRecordEditor.h @@ -54,30 +54,30 @@ class DBRecordEditor : public KDialogBase { Q_OBJECT public: - DBRecordEditor(PilotRecord*r=0L, int n=-1, QWidget *parent = 0); + DBRecordEditor(PilotRecord*r=0L, int n=-1, TQWidget *parent = 0); ~DBRecordEditor(); protected: - QLabel* fRecordIndexLabel; - QLabel* fRecordIDLabel; - QLineEdit* fRecordIndex; - QLineEdit* fRecordID; - QButtonGroup* fFlagsGroup; - QCheckBox* fDirty; - QCheckBox* fDeleted; - QCheckBox* fBusy; - QCheckBox* fSecret; - QCheckBox* fArchived; - QWidget* fRecordData; + TQLabel* fRecordIndexLabel; + TQLabel* fRecordIDLabel; + TQLineEdit* fRecordIndex; + TQLineEdit* fRecordID; + TQButtonGroup* fFlagsGroup; + TQCheckBox* fDirty; + TQCheckBox* fDeleted; + TQCheckBox* fBusy; + TQCheckBox* fSecret; + TQCheckBox* fArchived; + TQWidget* fRecordData; KHE::BytesEditInterface*fRecordDataIf; protected: - QGridLayout* DBRecordEditorBaseLayout; - QGridLayout* fFlagsGroupLayout; + TQGridLayout* DBRecordEditorBaseLayout; + TQGridLayout* fFlagsGroupLayout; protected: // DBRecordEditorBase*fWidget; - QWidget*fWidget; + TQWidget*fWidget; char*fBuffer; protected slots: virtual void languageChange(); diff --git a/kpilot/kpilot/dbSelectionDialog.cc b/kpilot/kpilot/dbSelectionDialog.cc index 7a875515..683b8a8c 100644 --- a/kpilot/kpilot/dbSelectionDialog.cc +++ b/kpilot/kpilot/dbSelectionDialog.cc @@ -30,8 +30,8 @@ #include "options.h" -#include <qlistview.h> -#include <qpushbutton.h> +#include <tqlistview.h> +#include <tqpushbutton.h> #include <klistview.h> #include <kmessagebox.h> #include <kpushbutton.h> @@ -41,9 +41,9 @@ #include "dbSelectionDialog.moc" -KPilotDBSelectionDialog::KPilotDBSelectionDialog(QStringList &selectedDBs, QStringList &deviceDBs, - QStringList &addedDBs, QWidget *w, const char *n) : - KDialogBase(w, n, true, QString::null, KDialogBase::Ok | KDialogBase::Cancel, +KPilotDBSelectionDialog::KPilotDBSelectionDialog(TQStringList &selectedDBs, TQStringList &deviceDBs, + TQStringList &addedDBs, TQWidget *w, const char *n) : + KDialogBase(w, n, true, TQString::null, KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, false), fSelectedDBs(selectedDBs), fAddedDBs(addedDBs), @@ -55,27 +55,27 @@ KPilotDBSelectionDialog::KPilotDBSelectionDialog(QStringList &selectedDBs, QStri setMainWidget(fSelectionWidget); // Fill the encodings list - QStringList items(deviceDBs); - for ( QStringList::Iterator it = fAddedDBs.begin(); it != fAddedDBs.end(); ++it ) { + TQStringList items(deviceDBs); + for ( TQStringList::Iterator it = fAddedDBs.begin(); it != fAddedDBs.end(); ++it ) { if (items.contains(*it)==0) items << (*it); } - for ( QStringList::Iterator it = fSelectedDBs.begin(); it != fSelectedDBs.end(); ++it ) { + for ( TQStringList::Iterator it = fSelectedDBs.begin(); it != fSelectedDBs.end(); ++it ) { if (items.contains(*it)==0) items << (*it); } items.sort(); - for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) { - QCheckListItem*checkitem=new QCheckListItem(fSelectionWidget->fDatabaseList, - *it, QCheckListItem::CheckBox); + for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) { + TQCheckListItem*checkitem=new TQCheckListItem(fSelectionWidget->fDatabaseList, + *it, TQCheckListItem::CheckBox); if (fSelectedDBs.contains(*it)) checkitem->setOn(true); } - connect(fSelectionWidget->fNameEdit, SIGNAL(textChanged( const QString & )), - this, SLOT(slotTextChanged( const QString &))); - connect(fSelectionWidget->fAddButton, SIGNAL(clicked()), - this, SLOT(addDB())); - connect(fSelectionWidget->fRemoveButton, SIGNAL(clicked()), - this, SLOT(removeDB())); + connect(fSelectionWidget->fNameEdit, TQT_SIGNAL(textChanged( const TQString & )), + this, TQT_SLOT(slotTextChanged( const TQString &))); + connect(fSelectionWidget->fAddButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(addDB())); + connect(fSelectionWidget->fRemoveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeDB())); } KPilotDBSelectionDialog::~KPilotDBSelectionDialog() @@ -86,12 +86,12 @@ KPilotDBSelectionDialog::~KPilotDBSelectionDialog() void KPilotDBSelectionDialog::addDB() { FUNCTIONSETUP; - QString dbname(fSelectionWidget->fNameEdit->text()); + TQString dbname(fSelectionWidget->fNameEdit->text()); if (!dbname.isEmpty()) { fSelectionWidget->fNameEdit->clear(); - new QCheckListItem(fSelectionWidget->fDatabaseList, dbname, - QCheckListItem::CheckBox); + new TQCheckListItem(fSelectionWidget->fDatabaseList, dbname, + TQCheckListItem::CheckBox); fAddedDBs << dbname; } } @@ -99,10 +99,10 @@ void KPilotDBSelectionDialog::addDB() void KPilotDBSelectionDialog::removeDB() { FUNCTIONSETUP; - QListViewItem*item(fSelectionWidget->fDatabaseList->selectedItem()); + TQListViewItem*item(fSelectionWidget->fDatabaseList->selectedItem()); if (item) { - QString dbname=item->text(0); + TQString dbname=item->text(0); if (fDeviceDBs.contains(dbname)) { KMessageBox::error(this, i18n("This is a database that exists on the device. It was not added manually, so it can not removed from the list."), i18n("Database on Device")); @@ -120,14 +120,14 @@ void KPilotDBSelectionDialog::removeDB() } } -QStringList KPilotDBSelectionDialog::getSelectedDBs() +TQStringList KPilotDBSelectionDialog::getSelectedDBs() { fSelectedDBs.clear(); // update the list of selected databases - QListViewItemIterator it( fSelectionWidget->fDatabaseList ); + TQListViewItemIterator it( fSelectionWidget->fDatabaseList ); while ( it.current() ) { - QCheckListItem *item = dynamic_cast<QCheckListItem*>(it.current()); + TQCheckListItem *item = dynamic_cast<TQCheckListItem*>(it.current()); ++it; if ( item && item->isOn() ) @@ -137,7 +137,7 @@ QStringList KPilotDBSelectionDialog::getSelectedDBs() return fSelectedDBs; } -void KPilotDBSelectionDialog::slotTextChanged( const QString& dbname) +void KPilotDBSelectionDialog::slotTextChanged( const TQString& dbname) { FUNCTIONSETUP; fSelectionWidget->fAddButton->setDisabled(dbname.isEmpty()); diff --git a/kpilot/kpilot/dbSelectionDialog.h b/kpilot/kpilot/dbSelectionDialog.h index 5be8a85b..ee0df63d 100644 --- a/kpilot/kpilot/dbSelectionDialog.h +++ b/kpilot/kpilot/dbSelectionDialog.h @@ -38,20 +38,20 @@ class KPilotDBSelectionDialog : public KDialogBase { Q_OBJECT public: - KPilotDBSelectionDialog(QStringList &selectedDBs, QStringList &deviceDBs, - QStringList &addedDBs, QWidget *, const char *); + KPilotDBSelectionDialog(TQStringList &selectedDBs, TQStringList &deviceDBs, + TQStringList &addedDBs, TQWidget *, const char *); virtual ~KPilotDBSelectionDialog(); - QStringList getSelectedDBs(); - QStringList getAddedDBs() const {return fAddedDBs; }; + TQStringList getSelectedDBs(); + TQStringList getAddedDBs() const {return fAddedDBs; }; private: - QStringList fSelectedDBs; - QStringList fAddedDBs; - QStringList fDeviceDBs; + TQStringList fSelectedDBs; + TQStringList fAddedDBs; + TQStringList fDeviceDBs; protected slots: void addDB(); void removeDB(); - void slotTextChanged( const QString& dbname); + void slotTextChanged( const TQString& dbname); private: KPilotDBSelectionWidget *fSelectionWidget; diff --git a/kpilot/kpilot/dbviewerWidget.cc b/kpilot/kpilot/dbviewerWidget.cc index fa7a5ab2..b5f04632 100644 --- a/kpilot/kpilot/dbviewerWidget.cc +++ b/kpilot/kpilot/dbviewerWidget.cc @@ -37,10 +37,10 @@ #include <pi-file.h> #include <pi-dlp.h> -#include <qlayout.h> -#include <qdir.h> -#include <qregexp.h> -#include <qlistview.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqlistview.h> #include <klistbox.h> #include <ktextedit.h> @@ -64,7 +64,7 @@ #include "dbviewerWidget.moc" -GenericDBWidget::GenericDBWidget(QWidget *parent, const QString &dbpath) : +GenericDBWidget::GenericDBWidget(TQWidget *parent, const TQString &dbpath) : PilotComponent(parent,"component_generic",dbpath), fDB(0L) { FUNCTIONSETUP; @@ -75,7 +75,7 @@ GenericDBWidget::GenericDBWidget(QWidget *parent, const QString &dbpath) : void GenericDBWidget::setupWidget() { - QGridLayout *g = new QGridLayout( this, 1, 1, SPACING); + TQGridLayout *g = new TQGridLayout( this, 1, 1, SPACING); fDBList = new KListBox( this ); g->addWidget( fDBList, 0, 0 ); @@ -85,9 +85,9 @@ void GenericDBWidget::setupWidget() fDBType->insertItem( i18n( "Only Applications (*.prc)" ) ); fDBType->insertItem( i18n( "Only Databases (*.pdb)" ) ); - QGridLayout *g1 = new QGridLayout( 0, 1, 1); + TQGridLayout *g1 = new TQGridLayout( 0, 1, 1); fDBInfo = new KTextEdit( this ); - fDBInfo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, fDBInfo->sizePolicy().hasHeightForWidth() ) ); + fDBInfo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, fDBInfo->sizePolicy().hasHeightForWidth() ) ); fDBInfo->setReadOnly( TRUE ); g1->addWidget( fDBInfo, 0, 0 ); fDBInfoButton = new KPushButton( i18n( "General Database &Information" ), this ); @@ -95,7 +95,7 @@ void GenericDBWidget::setupWidget() fAppInfoButton = new KPushButton( i18n( "&Application Info Block (Categories etc.)" ), this ); g1->addWidget( fAppInfoButton, 2, 0 ); - QGridLayout *g2 = new QGridLayout( 0, 1, 1); + TQGridLayout *g2 = new TQGridLayout( 0, 1, 1); fRecordList = new KListView( this ); g2->addMultiCellWidget( fRecordList, 0, 0, 0, 2 ); fRecordList->addColumn(i18n("Rec. Nr.")); @@ -117,24 +117,24 @@ void GenericDBWidget::setupWidget() g->addMultiCellLayout( g1, 0, 1, 1, 1 ); - resize( QSize(682, 661).expandedTo(minimumSizeHint()) ); - - connect(fDBList, SIGNAL(highlighted(const QString &)), - this, SLOT(slotSelected(const QString &))); - connect(fDBType, SIGNAL(activated(int)), - this, SLOT(slotDBType(int))); - connect(fDBInfoButton, SIGNAL(clicked()), - this, SLOT(slotShowDBInfo())); - connect(fAppInfoButton, SIGNAL(clicked()), - this, SLOT(slotShowAppInfo())); - connect(fAddRecord, SIGNAL(clicked()), - this, SLOT(slotAddRecord())); - connect(fEditRecord, SIGNAL(clicked()), - this, SLOT(slotEditRecord())); - connect(fDeleteRecord, SIGNAL(clicked()), - this, SLOT(slotDeleteRecord())); - connect(fRecordList, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotEditRecord(QListViewItem*))); + resize( TQSize(682, 661).expandedTo(minimumSizeHint()) ); + + connect(fDBList, TQT_SIGNAL(highlighted(const TQString &)), + this, TQT_SLOT(slotSelected(const TQString &))); + connect(fDBType, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotDBType(int))); + connect(fDBInfoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotShowDBInfo())); + connect(fAppInfoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotShowAppInfo())); + connect(fAddRecord, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddRecord())); + connect(fEditRecord, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditRecord())); + connect(fDeleteRecord, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteRecord())); + connect(fRecordList, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotEditRecord(TQListViewItem*))); } @@ -148,7 +148,7 @@ GenericDBWidget::~GenericDBWidget() void GenericDBWidget::showComponent() { FUNCTIONSETUP; - fDBInfo->setText(QString::null); + fDBInfo->setText(TQString::null); slotDBType(0); fDBList->show(); @@ -160,14 +160,14 @@ void GenericDBWidget::hideComponent() reset(); } -void GenericDBWidget::slotSelected(const QString &dbname) +void GenericDBWidget::slotSelected(const TQString &dbname) { FUNCTIONSETUP; #ifdef DEBUG DEBUGKPILOT << fname << ": Selected DB " << dbname << endl; #endif struct DBInfo dbinfo; - QString display; + TQString display; fRecList.clear(); fRecordList->clear(); @@ -181,7 +181,7 @@ void GenericDBWidget::slotSelected(const QString &dbname) // We are dealing with a database currentDBtype=eDatabase; - currentDB.remove( QRegExp(CSL1(".(pdb|PDB)$")) ); + currentDB.remove( TQRegExp(CSL1(".(pdb|PDB)$")) ); fDB=new PilotLocalDatabase(dbPath(), currentDB, false); if (!fDB || !fDB->isOpen()) @@ -192,14 +192,14 @@ void GenericDBWidget::slotSelected(const QString &dbname) } dbinfo=fDB->getDBInfo(); display.append(i18n("<B>Database:</B> %1, %2 records<BR>") - .arg(QString::fromLatin1(dbinfo.name)).arg(fDB->recordCount())); + .arg(TQString::fromLatin1(dbinfo.name)).arg(fDB->recordCount())); char buff[5]; set_long(buff, dbinfo.type); buff[4]='\0'; - QString tp = QString::fromLatin1(buff); + TQString tp = TQString::fromLatin1(buff); set_long(buff, dbinfo.creator); buff[4]='\0'; - QString cr = QString::fromLatin1(buff); + TQString cr = TQString::fromLatin1(buff); display.append(i18n("<B>Type:</B> %1, <B>Creator:</B> %2<br><br>").arg(tp).arg(cr)); int currentRecord = 0; @@ -214,9 +214,9 @@ void GenericDBWidget::slotSelected(const QString &dbname) // if (!(pilotRec->isDeleted()) ) { PilotListViewItem*item=new PilotListViewItem(fRecordList, - QString::number(currentRecord), QString::number(pilotRec->size()), - QString::number(pilotRec->id()), - QString::null, + TQString::number(currentRecord), TQString::number(pilotRec->size()), + TQString::number(pilotRec->id()), + TQString::null, pilotRec->id(), pilotRec); item->setNumericCol(0, true); item->setNumericCol(1, true); @@ -238,7 +238,7 @@ void GenericDBWidget::slotSelected(const QString &dbname) // we are dealing with an application currentDBtype=eApplication; - QCString filename = QFile::encodeName(dbPath() + CSL1("/") + dbname); + TQCString filename = TQFile::encodeName(dbPath() + CSL1("/") + dbname); const char *s = filename; struct pi_file *pf = pi_file_open(const_cast<char *>(s)); if (!pf) @@ -261,7 +261,7 @@ void GenericDBWidget::slotSelected(const QString &dbname) } enableWidgets(currentDBtype==eDatabase); - QDateTime ttime; + TQDateTime ttime; ttime.setTime_t(dbinfo.createDate); display.append(i18n("Created: %1<BR>").arg(ttime.toString())); @@ -282,7 +282,7 @@ void GenericDBWidget::slotDBType(int mode) reset(); - QDir dir(dbPath()); + TQDir dir(dbPath()); switch (mode) { case 1: @@ -293,7 +293,7 @@ void GenericDBWidget::slotDBType(int mode) default: dir.setNameFilter(CSL1("*.pdb;*.prc")); break; } - QStringList l = dir.entryList(); + TQStringList l = dir.entryList(); fDBList->insertStringList(l); } @@ -304,7 +304,7 @@ void GenericDBWidget::reset() fDBInfo->clear(); fRecordList->clear(); if (fDB) KPILOT_DELETE(fDB); - currentDB=QString::null; + currentDB=TQString::null; } void GenericDBWidget::slotAddRecord() @@ -313,8 +313,8 @@ void GenericDBWidget::slotAddRecord() pi_buffer_t *b = pi_buffer_new(0); PilotRecord *rec=new PilotRecord(b, 0, 0, 0); PilotListViewItem*item=new PilotListViewItem(fRecordList, - QString::number(-1), QString::number(rec->size()), - QString::number(rec->id()), QString::null, + TQString::number(-1), TQString::number(rec->size()), + TQString::number(rec->id()), TQString::null, rec->id(), rec); if (slotEditRecord(item)) { @@ -327,7 +327,7 @@ void GenericDBWidget::slotAddRecord() } } -bool GenericDBWidget::slotEditRecord(QListViewItem*item) +bool GenericDBWidget::slotEditRecord(TQListViewItem*item) { FUNCTIONSETUP; PilotListViewItem*currRecItem=dynamic_cast<PilotListViewItem*>(item); @@ -338,8 +338,8 @@ bool GenericDBWidget::slotEditRecord(QListViewItem*item) DBRecordEditor*dlg=new DBRecordEditor(rec, nr, this); if (dlg->exec()) { - currRecItem->setText(1, QString::number(rec->size())); - currRecItem->setText(2, QString::number(rec->id())); + currRecItem->setText(1, TQString::number(rec->size())); + currRecItem->setText(2, TQString::number(rec->id())); fRecordList->triggerUpdate(); writeRecord(rec); KPILOT_DELETE(dlg); diff --git a/kpilot/kpilot/dbviewerWidget.h b/kpilot/kpilot/dbviewerWidget.h index 9ef3ad8d..877a8699 100644 --- a/kpilot/kpilot/dbviewerWidget.h +++ b/kpilot/kpilot/dbviewerWidget.h @@ -45,24 +45,24 @@ class GenericDBWidget : public PilotComponent Q_OBJECT public: - GenericDBWidget(QWidget* parent, const QString& dbpath); + GenericDBWidget(TQWidget* parent, const TQString& dbpath); virtual ~GenericDBWidget(); // Pilot component methods /* virtual */ void showComponent(); /* virtual */ void hideComponent(); - QString getCurrentDB() const { return currentDB; } + TQString getCurrentDB() const { return currentDB; } protected: void setupWidget(); protected slots: - void slotSelected(const QString &dbname); + void slotSelected(const TQString &dbname); void slotDBType(int mode); void reset(); void slotAddRecord(); void slotEditRecord(); - bool slotEditRecord(QListViewItem*); + bool slotEditRecord(TQListViewItem*); void slotDeleteRecord(); void slotShowAppInfo(); void slotShowDBInfo(); @@ -83,8 +83,8 @@ private: } currentDBtype; PilotLocalDatabase*fDB; - QString currentDB; - QPtrList<PilotRecord> fRecList; + TQString currentDB; + TQPtrList<PilotRecord> fRecList; }; diff --git a/kpilot/kpilot/fileInstallWidget.cc b/kpilot/kpilot/fileInstallWidget.cc index e8111ce8..69909302 100644 --- a/kpilot/kpilot/fileInstallWidget.cc +++ b/kpilot/kpilot/fileInstallWidget.cc @@ -35,15 +35,15 @@ #include <unistd.h> -#include <qlistbox.h> -#include <qstring.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qmultilineedit.h> -#include <qpixmap.h> -#include <qpopupmenu.h> +#include <tqlistbox.h> +#include <tqstring.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqmultilineedit.h> +#include <tqpixmap.h> +#include <tqpopupmenu.h> #include <kfiledialog.h> #include <kurldrag.h> @@ -58,43 +58,43 @@ #include "fileInstallWidget.moc" -FileInstallWidget::FileInstallWidget(QWidget * parent, - const QString & path) : +FileInstallWidget::FileInstallWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_files", path), fSaveFileList(false), fInstaller(0L) { FUNCTIONSETUP; - QGridLayout *grid = new QGridLayout(this, 5, 5, SPACING); + TQGridLayout *grid = new TQGridLayout(this, 5, 5, SPACING); - QLabel *label = new QLabel(i18n("Files to install:"), this); + TQLabel *label = new TQLabel(i18n("Files to install:"), this); grid->addWidget(label, 1, 1); - QPushButton *abutton; + TQPushButton *abutton; - abutton = addButton = new QPushButton(i18n("Add File..."), this); - connect(abutton, SIGNAL(clicked()), this, SLOT(slotAddFile())); + abutton = addButton = new TQPushButton(i18n("Add File..."), this); + connect(abutton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddFile())); grid->addWidget(abutton, 3, 1); - QWhatsThis::add(abutton, + TQWhatsThis::add(abutton, i18n("<qt>Choose a file to add to the list of files to install.</qt>")); - abutton = clearButton= new QPushButton(i18n("Clear List"), this); - connect(abutton, SIGNAL(clicked()), this, SLOT(slotClearButton())); + abutton = clearButton= new TQPushButton(i18n("Clear List"), this); + connect(abutton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearButton())); grid->addWidget(abutton, 4, 1); - QWhatsThis::add(abutton, + TQWhatsThis::add(abutton, i18n("<qt>Clear the list of files to install. No files will be installed.</qt>")); fIconView = new KIconView(this); - connect(fIconView, SIGNAL(dropped(QDropEvent *, const QValueList<QIconDragItem> &)), - this, SLOT(slotDropEvent(QDropEvent *, const QValueList<QIconDragItem> &))); + connect(fIconView, TQT_SIGNAL(dropped(TQDropEvent *, const TQValueList<TQIconDragItem> &)), + this, TQT_SLOT(slotDropEvent(TQDropEvent *, const TQValueList<TQIconDragItem> &))); grid->addMultiCellWidget(fIconView, 1, 4, 2, 3); - QWhatsThis::add(fIconView, + TQWhatsThis::add(fIconView, i18n ("<qt>This lists files that will be installed on the Pilot during the next HotSync. Drag files here or use the Add button.</qt>")); fIconView->setAcceptDrops(true); - fIconView->setSelectionMode(QIconView::Extended); + fIconView->setSelectionMode(TQIconView::Extended); fIconView->viewport()->installEventFilter(this); grid->setRowStretch(2, 100); @@ -104,8 +104,8 @@ FileInstallWidget::FileInstallWidget(QWidget * parent, grid->addRowSpacing(5, SPACING); fInstaller = new FileInstaller; - connect(fInstaller, SIGNAL(filesChanged()), - this, SLOT(refreshFileInstallList())); + connect(fInstaller, TQT_SIGNAL(filesChanged()), + this, TQT_SLOT(refreshFileInstallList())); } @@ -114,12 +114,12 @@ FileInstallWidget::~FileInstallWidget() KPILOT_DELETE(fInstaller); } -static inline bool pdbOrPrc(const QString &s) +static inline bool pdbOrPrc(const TQString &s) { return s.endsWith(CSL1(".pdb"),false) || s.endsWith(CSL1(".prc"),false) ; } -void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event) +void FileInstallWidget::dragEnterEvent(TQDragEnterEvent *event) { FUNCTIONSETUP; @@ -130,7 +130,7 @@ void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event) } KURL::List::const_iterator it; - QString filename; + TQString filename; for ( it = urls.begin(); it != urls.end(); ++it ) { filename = (*it).fileName(); if(!pdbOrPrc(filename)) { @@ -141,32 +141,32 @@ void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event) event->accept(true); } -bool FileInstallWidget::eventFilter(QObject *watched, QEvent *event) +bool FileInstallWidget::eventFilter(TQObject *watched, TQEvent *event) { FUNCTIONSETUP; if(watched == fIconView->viewport()) { - if(event->type() == QEvent::DragEnter) { - dragEnterEvent(static_cast<QDragEnterEvent*>(event)); + if(event->type() == TQEvent::DragEnter) { + dragEnterEvent(static_cast<TQDragEnterEvent*>(event)); return true; } // We have to skip the DragMove event, because it seems to override the // accept state, when it is set to false by dragEnterEvent() (event->accept(false);) - if(event->type() == QEvent::DragMove) { + if(event->type() == TQEvent::DragMove) { return true; } - if(event->type() == QEvent::MouseButtonPress) { - contextMenu(static_cast<QMouseEvent*>(event)); + if(event->type() == TQEvent::MouseButtonPress) { + contextMenu(static_cast<TQMouseEvent*>(event)); } } return false; } -void FileInstallWidget::dropEvent(QDropEvent * drop) +void FileInstallWidget::dropEvent(TQDropEvent * drop) { FUNCTIONSETUP; if (!shown) return; @@ -180,7 +180,7 @@ void FileInstallWidget::dropEvent(QDropEvent * drop) DEBUGKPILOT << ": Got " << list.first().prettyURL() << endl; #endif - QStringList files; + TQStringList files; for(KURL::List::ConstIterator it = list.begin(); it != list.end(); ++it) { if ((*it).isLocalFile()) @@ -190,7 +190,7 @@ void FileInstallWidget::dropEvent(QDropEvent * drop) fInstaller->addFiles(files, this ); } -void FileInstallWidget::slotDropEvent(QDropEvent * drop, const QValueList<QIconDragItem> & /*lst*/) +void FileInstallWidget::slotDropEvent(TQDropEvent * drop, const TQValueList<TQIconDragItem> & /*lst*/) { FUNCTIONSETUP; dropEvent(drop); @@ -213,16 +213,16 @@ void FileInstallWidget::slotAddFile() FUNCTIONSETUP; if (!shown) return; - QStringList fileNames = KFileDialog::getOpenFileNames( - QString::null, i18n("*.pdb *.prc|PalmOS Databases (*.pdb *.prc)")); + TQStringList fileNames = KFileDialog::getOpenFileNames( + TQString::null, i18n("*.pdb *.prc|PalmOS Databases (*.pdb *.prc)")); - for (QStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) + for (TQStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) { fInstaller->addFile(*fileName, this ); } } -bool FileInstallWidget::preHotSync(QString &) +bool FileInstallWidget::preHotSync(TQString &) { FUNCTIONSETUP; @@ -250,12 +250,12 @@ void FileInstallWidget::refreshFileInstallList() { FUNCTIONSETUP; - QStringList fileNames = fInstaller->fileNames(); - QPixmap kpilotIcon = KGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop); + TQStringList fileNames = fInstaller->fileNames(); + TQPixmap kpilotIcon = KGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop); fIconView->clear(); - for (QStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) + for (TQStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName) { if(pdbOrPrc(*fileName)) { @@ -268,22 +268,22 @@ void FileInstallWidget::refreshFileInstallList() } } -void FileInstallWidget::contextMenu(QMouseEvent *event) +void FileInstallWidget::contextMenu(TQMouseEvent *event) { FUNCTIONSETUP; if(event->button() == Qt::LeftButton) return; - QIconViewItem *item; - QStringList files; + TQIconViewItem *item; + TQStringList files; for(item = fIconView->firstItem(); item; item = item->nextItem()) { if(item->isSelected()) files.append(item->text()); } - QPopupMenu popup(fIconView); + TQPopupMenu popup(fIconView); item = fIconView->findItem(event->pos()); if(item) { diff --git a/kpilot/kpilot/fileInstallWidget.h b/kpilot/kpilot/fileInstallWidget.h index b4bd205c..6fff2c02 100644 --- a/kpilot/kpilot/fileInstallWidget.h +++ b/kpilot/kpilot/fileInstallWidget.h @@ -47,12 +47,12 @@ class FileInstallWidget : public PilotComponent Q_OBJECT public: - FileInstallWidget(QWidget* parent, const QString& dbPath); + FileInstallWidget(TQWidget* parent, const TQString& dbPath); virtual ~FileInstallWidget(); // Pilot Component Methods: void showComponent(); - bool preHotSync(QString &); + bool preHotSync(TQString &); void postHotSync(); @@ -63,11 +63,11 @@ protected: void setSaveFileList(bool saveIt) { fSaveFileList = saveIt; } bool getSaveFileList() { return fSaveFileList; } - /* virtual */ void dragEnterEvent(QDragEnterEvent* event); - /* virtual */ void dropEvent(QDropEvent* drop); - /* virtual */ bool eventFilter (QObject *watched, QEvent *event ); + /* virtual */ void dragEnterEvent(TQDragEnterEvent* event); + /* virtual */ void dropEvent(TQDropEvent* drop); + /* virtual */ bool eventFilter (TQObject *watched, TQEvent *event ); - void contextMenu(QMouseEvent *event); + void contextMenu(TQMouseEvent *event); KPilotInstaller* getPilotInstallerApp() { return fKPilotInstaller; } @@ -77,13 +77,13 @@ private: KPilotInstaller* fKPilotInstaller; FileInstaller *fInstaller; - QPushButton *clearButton,*addButton; + TQPushButton *clearButton,*addButton; protected slots: void slotClearButton(); void slotAddFile(); - void slotDropEvent(QDropEvent * drop, const QValueList<QIconDragItem> & lst); + void slotDropEvent(TQDropEvent * drop, const TQValueList<TQIconDragItem> & lst); public slots: void refreshFileInstallList(); diff --git a/kpilot/kpilot/fileInstaller.cc b/kpilot/kpilot/fileInstaller.cc index 6c26a79f..d46c67d2 100644 --- a/kpilot/kpilot/fileInstaller.cc +++ b/kpilot/kpilot/fileInstaller.cc @@ -34,9 +34,9 @@ #include <unistd.h> -#include <qstring.h> -#include <qstrlist.h> -#include <qdir.h> +#include <tqstring.h> +#include <tqstrlist.h> +#include <tqdir.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -69,13 +69,13 @@ void FileInstaller::clearPending() unsigned int i; - QDir installDir(fDirName); + TQDir installDir(fDirName); // Start from 2 to skip . and .. // for (i = 2; i < installDir.count(); i++) { - QFile::remove(fDirName + installDir[i]); + TQFile::remove(fDirName + installDir[i]); } if (i > 2) @@ -84,24 +84,24 @@ void FileInstaller::clearPending() } } -void FileInstaller::deleteFile(const QString &file) +void FileInstaller::deleteFile(const TQString &file) { - QFile::remove(fDirName + file); + TQFile::remove(fDirName + file); emit filesChanged(); } -void FileInstaller::deleteFiles(const QStringList &files) +void FileInstaller::deleteFiles(const TQStringList &files) { if(files.empty()) return; - for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) - QFile::remove(fDirName + *it); + for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) + TQFile::remove(fDirName + *it); emit filesChanged(); } -/* virtual */ bool FileInstaller::runCopy(const QString & s, QWidget* w ) +/* virtual */ bool FileInstaller::runCopy(const TQString & s, TQWidget* w ) { FUNCTIONSETUP; @@ -127,7 +127,7 @@ void FileInstaller::deleteFiles(const QStringList &files) } -void FileInstaller::addFiles(const QStringList & fileList, QWidget* w) +void FileInstaller::addFiles(const TQStringList & fileList, TQWidget* w) { FUNCTIONSETUP; @@ -135,7 +135,7 @@ void FileInstaller::addFiles(const QStringList & fileList, QWidget* w) unsigned int succ = 0; - for(QStringList::ConstIterator it = fileList.begin(); + for(TQStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it) { if (runCopy( *it, w )) @@ -148,7 +148,7 @@ void FileInstaller::addFiles(const QStringList & fileList, QWidget* w) } } -void FileInstaller::addFile( const QString & file, QWidget* w ) +void FileInstaller::addFile( const TQString & file, TQWidget* w ) { FUNCTIONSETUP; @@ -165,14 +165,14 @@ void FileInstaller::addFile( const QString & file, QWidget* w ) FUNCTIONSETUP; } -const QStringList FileInstaller::fileNames() const +const TQStringList FileInstaller::fileNames() const { FUNCTIONSETUP; - QDir installDir(fDirName); + TQDir installDir(fDirName); - return installDir.entryList(QDir::Files | - QDir::NoSymLinks | QDir::Readable); + return installDir.entryList(TQDir::Files | + TQDir::NoSymLinks | TQDir::Readable); } /* slot */ void FileInstaller::setEnabled(bool b) diff --git a/kpilot/kpilot/fileInstaller.h b/kpilot/kpilot/fileInstaller.h index 3c23f571..367a6a2b 100644 --- a/kpilot/kpilot/fileInstaller.h +++ b/kpilot/kpilot/fileInstaller.h @@ -33,7 +33,7 @@ #ifndef _KPILOT_FILEINSTALLER_H #define _KPILOT_FILEINSTALLER_H -#include <qobject.h> +#include <tqobject.h> class QStringList; @@ -48,24 +48,24 @@ public: void clearPending(); - void addFiles( const QStringList&, QWidget* w ); - void addFile( const QString&, QWidget* w ); + void addFiles( const TQStringList&, TQWidget* w ); + void addFile( const TQString&, TQWidget* w ); - void deleteFile(const QString &); - void deleteFiles(const QStringList &); + void deleteFile(const TQString &); + void deleteFiles(const TQStringList &); /** * Returns information about this installer. Note particularly * that fileNames() returns only filenames, not paths. In particular, * you'll need to prepend dir()+"/" to get pathnames. */ - const QString &dir() const { return fDirName; } ; - const QStringList fileNames() const ; + const TQString &dir() const { return fDirName; } ; + const TQStringList fileNames() const ; protected: - virtual bool runCopy( const QString &src, QWidget*w ); + virtual bool runCopy( const TQString &src, TQWidget*w ); public slots: void copyCompleted(); @@ -74,7 +74,7 @@ public slots: signals: void filesChanged(); private: - QString fDirName; + TQString fDirName; int fPendingCopies; bool enabled; } ; diff --git a/kpilot/kpilot/hotSync.cc b/kpilot/kpilot/hotSync.cc index 60bb9356..7a4d3e44 100644 --- a/kpilot/kpilot/hotSync.cc +++ b/kpilot/kpilot/hotSync.cc @@ -41,14 +41,14 @@ #include <pi-file.h> #include <pi-util.h> -#include <qtimer.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qvaluelist.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qthread.h> +#include <tqtimer.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqvaluelist.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqthread.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -70,11 +70,11 @@ class BackupAction::Thread : public QThread public: Thread( BackupAction *parent, KPilotLink *link, - const QString &filename, + const TQString &filename, const DBInfo *info ); enum { - TerminateOK = QEvent::User, + TerminateOK = TQEvent::User, TerminateFailure } ; @@ -83,7 +83,7 @@ protected: private: BackupAction *fParent; KPilotLink *fLink; - QString fFilename; + TQString fFilename; struct DBInfo fDBInfo; } ; @@ -91,16 +91,16 @@ class BackupAction::Private { public: bool fFullBackup; ///< Is this a full backup (all DBs, not just changed ones)? - QStringList fNoBackupDBs; - QValueList<unsigned long> fNoBackupCreators; - QStringList fDeviceDBs; + TQStringList fNoBackupDBs; + TQValueList<unsigned long> fNoBackupCreators; + TQStringList fDeviceDBs; - QString fPreferBackupDir; ///< Directory to write backup in, overrides default + TQString fPreferBackupDir; ///< Directory to write backup in, overrides default // Remainder is used to hand around info during sync int fDBIndex; ///< Database number we're now doing - QString fBackupDir; ///< Directory to write backup in. + TQString fBackupDir; ///< Directory to write backup in. /** * Add the database described by the info block to the list of @@ -117,9 +117,9 @@ public: set_long( &buff[1], info->creator ); buff[5] = ']'; buff[6] = '\0'; - QString creator = QString::fromLatin1( buff ); + TQString creator = TQString::fromLatin1( buff ); - QString dbname = Pilot::fromPilot( info->name, 32 ); + TQString dbname = Pilot::fromPilot( info->name, 32 ); if ( !fDeviceDBs.contains( creator ) ) { @@ -157,11 +157,11 @@ public: } // Now take wildcards into account - QString db = Pilot::fromPilot(info->name); - for (QStringList::const_iterator i = fNoBackupDBs.begin(); + TQString db = Pilot::fromPilot(info->name); + for (TQStringList::const_iterator i = fNoBackupDBs.begin(); i != fNoBackupDBs.end(); ++i) { - QRegExp re(*i,true,true); // Wildcard match + TQRegExp re(*i,true,true); // Wildcard match if (re.exactMatch(db)) { return false; @@ -182,10 +182,10 @@ BackupAction::BackupAction(KPilotLink * p, bool full) : fP->fFullBackup = full; } -/* virtual */ QString BackupAction::statusString() const +/* virtual */ TQString BackupAction::statusString() const { FUNCTIONSETUP; - QString s(CSL1("BackupAction=")); + TQString s(CSL1("BackupAction=")); switch (status()) { @@ -212,14 +212,14 @@ BackupAction::BackupAction(KPilotLink * p, bool full) : break; default: s.append(CSL1("(unknown ")); - s.append(QString::number(status())); + s.append(TQString::number(status())); s.append(CSL1(")")); } return s; } -void BackupAction::setDirectory( const QString &p ) +void BackupAction::setDirectory( const TQString &p ) { fP->fPreferBackupDir = p; if (!p.endsWith(CSL1("/"))) @@ -228,19 +228,19 @@ void BackupAction::setDirectory( const QString &p ) } } -static inline void initNoBackup(QStringList &dbnames, - QValueList<unsigned long> &dbcreators) +static inline void initNoBackup(TQStringList &dbnames, + TQValueList<unsigned long> &dbcreators) { FUNCTIONSETUP; dbnames.clear(); dbcreators.clear(); - QStringList configuredSkip = KPilotSettings::skipBackupDB(); - QStringList::const_iterator e = configuredSkip.end(); - for (QStringList::const_iterator i = configuredSkip.begin(); + TQStringList configuredSkip = KPilotSettings::skipBackupDB(); + TQStringList::const_iterator e = configuredSkip.end(); + for (TQStringList::const_iterator i = configuredSkip.begin(); i!= e; ++i) { - QString s = *i; + TQString s = *i; if (s.startsWith(CSL1("[")) && s.endsWith(CSL1("]"))) { if (s.length() != 6) @@ -249,7 +249,7 @@ static inline void initNoBackup(QStringList &dbnames, } else { - QCString data = s.mid(1,4).latin1(); + TQCString data = s.mid(1,4).latin1(); unsigned long creator = pi_mktag(data[0],data[1],data[2],data[3]); dbcreators.append(creator); } @@ -262,9 +262,9 @@ static inline void initNoBackup(QStringList &dbnames, DEBUGKPILOT << fname << ": Will skip databases " << dbnames.join(CSL1(",")) << endl; - QString creatorids; + TQString creatorids; char buf[5]; - for (QValueList<unsigned long>::const_iterator i = dbcreators.begin(); + for (TQValueList<unsigned long>::const_iterator i = dbcreators.begin(); i != dbcreators.end(); ++i) { unsigned long tag = *i; @@ -280,10 +280,10 @@ static inline void initNoBackup(QStringList &dbnames, * if this is not the case. This method will try * to create the directory if it doesn't exist yet. */ -static inline bool checkBackupDirectory( const QString &backupDir ) +static inline bool checkBackupDirectory( const TQString &backupDir ) { FUNCTIONSETUP; - QFileInfo fi(backupDir); + TQFileInfo fi(backupDir); if (fi.exists() && fi.isDir()) { @@ -313,7 +313,7 @@ static inline bool checkBackupDirectory( const QString &backupDir ) KStandardDirs::makeDir( backupDir ); - fi = QFileInfo(backupDir); + fi = TQFileInfo(backupDir); return fi.exists() && fi.isDir(); } @@ -369,7 +369,7 @@ static inline bool checkBackupDirectory( const QString &backupDir ) initNoBackup( fP->fNoBackupDBs, fP->fNoBackupCreators ); fP->fDBIndex = 0; - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); return true; } @@ -380,7 +380,7 @@ static inline bool checkBackupDirectory( const QString &backupDir ) struct DBInfo info; // TODO: make the progress reporting more accurate - emit logProgress(QString::null, fP->fDBIndex); + emit logProgress(TQString::null, fP->fDBIndex); if (openConduit() < 0) { @@ -444,11 +444,11 @@ static inline bool checkBackupDirectory( const QString &backupDir ) { DEBUGKPILOT << fname << ": Skipping database <" << info.name << "> (no-backup list)" << endl; - QString s = i18n("Skipping %1") + TQString s = i18n("Skipping %1") .arg(Pilot::fromPilot(info.name)); addSyncLogEntry(s); } - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); } /** @@ -500,10 +500,10 @@ bool BackupAction::startBackupThread(DBInfo *info) // if we're here then we are going to back this database up. do some basic sanity // checks and proceed.... - QString databaseName(Pilot::fromPilot(info->name)); + TQString databaseName(Pilot::fromPilot(info->name)); databaseName.replace('/', '_'); - QString fullBackupName = fP->fBackupDir + databaseName; + TQString fullBackupName = fP->fBackupDir + databaseName; if (PilotDatabase::isResource(info)) { @@ -531,22 +531,22 @@ bool BackupAction::startBackupThread(DBInfo *info) return true; } -/* virtual */ bool BackupAction::event( QEvent *e ) +/* virtual */ bool BackupAction::event( TQEvent *e ) { - if (e->type() == (QEvent::Type)Thread::TerminateOK) + if (e->type() == (TQEvent::Type)Thread::TerminateOK) { KPILOT_DELETE(fBackupThread); // This was a successful termination. addSyncLogEntry( i18n("... OK.\n"), false ); - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); return true; } - if (e->type() == (QEvent::Type)Thread::TerminateFailure) + if (e->type() == (TQEvent::Type)Thread::TerminateFailure) { KPILOT_DELETE(fBackupThread); // Unsuccessful termination. addSyncLogEntry( i18n("Backup failed.") ); - QTimer::singleShot(0,this,SLOT(backupOneDB())); + TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); return true; } return SyncAction::event(e); @@ -559,8 +559,8 @@ void BackupAction::endBackup() fP->fDBIndex = (-1); fActionStatus = BackupEnded; fP->fDeviceDBs.sort(); - QString old( QString::null ); - QStringList::Iterator itr = fP->fDeviceDBs.begin(); + TQString old( TQString::null ); + TQStringList::Iterator itr = fP->fDeviceDBs.begin(); while ( itr != fP->fDeviceDBs.end() ) { if ( old == *itr ) { itr = fP->fDeviceDBs.remove( itr ); @@ -575,7 +575,7 @@ void BackupAction::endBackup() } FileInstallAction::FileInstallAction(KPilotLink * p, - const QString & d) : + const TQString & d) : SyncAction(p, "fileInstall"), fDBIndex(-1), fTimer(0L), @@ -595,9 +595,9 @@ FileInstallAction::~FileInstallAction() { FUNCTIONSETUP; - QDir installDir(fDir); - fList = installDir.entryList(QDir::Files | - QDir::NoSymLinks | QDir::Readable); + TQDir installDir(fDir); + fList = installDir.entryList(TQDir::Files | + TQDir::NoSymLinks | TQDir::Readable); #ifdef DEBUG DEBUGKPILOT << fname << ": Installing " << fList.count() << " files" << endl; @@ -614,9 +614,9 @@ FileInstallAction::~FileInstallAction() return true; } - fTimer = new QTimer(this); - QObject::connect(fTimer, SIGNAL(timeout()), - this, SLOT(installNextFile())); + fTimer = new TQTimer(this); + TQObject::connect(fTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(installNextFile())); fTimer->start(0, false); @@ -651,8 +651,8 @@ FileInstallAction::~FileInstallAction() return; } - const QString filePath = fDir + fList[fDBIndex]; - const QString fileName = fList[fDBIndex]; + const TQString filePath = fDir + fList[fDBIndex]; + const TQString fileName = fList[fDBIndex]; fDBIndex++; @@ -660,7 +660,7 @@ FileInstallAction::~FileInstallAction() DEBUGKPILOT << fname << ": Installing file " << filePath << endl; #endif - QString m = i18n("Installing %1").arg(fileName); + TQString m = i18n("Installing %1").arg(fileName); emit logProgress(m,(100 * fDBIndex) / (fList.count()+1)); m+=CSL1("\n"); emit addSyncLogEntry(m,false /* Don't print in KPilot's log. */ ); @@ -671,7 +671,7 @@ FileInstallAction::~FileInstallAction() if (!resourceOK(fileName,filePath)) goto nextFile; f = pi_file_open(const_cast <char *> - ((const char *) QFile::encodeName(filePath))); + ((const char *) TQFile::encodeName(filePath))); #if PILOT_LINK_NUMBER < PILOT_LINK_0_12_0 @@ -688,7 +688,7 @@ FileInstallAction::~FileInstallAction() } else { - QFile::remove(filePath); + TQFile::remove(filePath); } @@ -704,11 +704,11 @@ nextFile: // Check that the given file path is a good resource // file - in particular that the resource name is ok. -bool FileInstallAction::resourceOK(const QString &fileName, const QString &filePath) +bool FileInstallAction::resourceOK(const TQString &fileName, const TQString &filePath) { FUNCTIONSETUP; - if (!QFile::exists(filePath)) + if (!TQFile::exists(filePath)) { emit logError(i18n("Unable to open file "%1"."). arg(fileName)); @@ -716,7 +716,7 @@ bool FileInstallAction::resourceOK(const QString &fileName, const QString &fileP } struct pi_file *f = pi_file_open(const_cast <char *> - ((const char *) QFile::encodeName(filePath))); + ((const char *) TQFile::encodeName(filePath))); if (!f) { @@ -754,27 +754,27 @@ bool FileInstallAction::resourceOK(const QString &fileName, const QString &fileP return r; } -/* virtual */ QString FileInstallAction::statusString() const +/* virtual */ TQString FileInstallAction::statusString() const { FUNCTIONSETUP; if (fDBIndex < 0) { - return QString(CSL1("Idle")); + return TQString(CSL1("Idle")); } else { if ((unsigned) fDBIndex >= fList.count()) { - return QString(CSL1("Index out of range")); + return TQString(CSL1("Index out of range")); } else { - return QString(CSL1("Installing %1")).arg(fList[fDBIndex]); + return TQString(CSL1("Installing %1")).arg(fList[fDBIndex]); } } } -CheckUser::CheckUser(KPilotLink * p, QWidget * vp): +CheckUser::CheckUser(KPilotLink * p, TQWidget * vp): SyncAction(p, vp, "userCheck") { FUNCTIONSETUP; @@ -790,8 +790,8 @@ CheckUser::~CheckUser() { FUNCTIONSETUP; - QString guiUserName = KPilotSettings::userName(); - QString pilotUserName = fHandle->getPilotUser().name(); + TQString guiUserName = KPilotSettings::userName(); + TQString pilotUserName = fHandle->getPilotUser().name(); bool pilotUserEmpty = pilotUserName.isEmpty(); // 4 cases to handle: // guiUserName empty / not empty @@ -802,10 +802,10 @@ CheckUser::~CheckUser() { if (pilotUserEmpty) { - QString defaultUserName = + TQString defaultUserName = i18n("A common name", "John Doe"); - QString q = i18n("<qt>Neither KPilot nor the " + TQString q = i18n("<qt>Neither KPilot nor the " "handheld have a username set. " "They <i>should</i> be set. " "Should KPilot set them to a default value " @@ -823,7 +823,7 @@ CheckUser::~CheckUser() } else { - QString q = i18n("<qt>The handheld has a username set " + TQString q = i18n("<qt>The handheld has a username set " "(<i>%1</i>) but KPilot does not. Should " "KPilot use this username in future?</qt>"). arg(pilotUserName); @@ -840,7 +840,7 @@ CheckUser::~CheckUser() { if (pilotUserEmpty) { - QString q = CSL1("<qt>"); + TQString q = CSL1("<qt>"); q += i18n("KPilot has a username set " "(<i>%1</i>) but the handheld does not. " "Should KPilot's username be set in the " @@ -874,7 +874,7 @@ CheckUser::~CheckUser() { if (guiUserName != pilotUserName) { - QString q = i18n("<qt>The handheld thinks that " + TQString q = i18n("<qt>The handheld thinks that " "the username is %1; " "however, KPilot says you are %2." "Which of these is the correct name?\n" @@ -885,7 +885,7 @@ CheckUser::~CheckUser() int r = questionYesNoCancel(q, i18n("User Mismatch"), - QString::null, + TQString::null, 20, i18n("Use KPilot Name"), i18n("Use Handheld Name")); @@ -923,7 +923,7 @@ CheckUser::~CheckUser() // fix the database location for local databases. // // - QString pathName = KGlobal::dirs()->saveLocation("data", + TQString pathName = KGlobal::dirs()->saveLocation("data", CSL1("kpilot/DBBackup/")); if (!guiUserName.isEmpty()) { @@ -940,22 +940,22 @@ class RestoreInfo { public: struct DBInfo DBInfo; - QString path; + TQString path; } ; class RestoreAction::Private { public: - QString fPreferRestoreDir; /**< Preference setting where to get data from. */ + TQString fPreferRestoreDir; /**< Preference setting where to get data from. */ - QValueList<RestoreInfo> fDBList; - QTimer fTimer; - QValueList<RestoreInfo>::ConstIterator fDBIterator; + TQValueList<RestoreInfo> fDBList; + TQTimer fTimer; + TQValueList<RestoreInfo>::ConstIterator fDBIterator; int fDBIndex; }; -RestoreAction::RestoreAction(KPilotLink * p, QWidget * visible ) : +RestoreAction::RestoreAction(KPilotLink * p, TQWidget * visible ) : SyncAction(p, visible, "restoreAction") { FUNCTIONSETUP; @@ -963,7 +963,7 @@ RestoreAction::RestoreAction(KPilotLink * p, QWidget * visible ) : fP = new Private; } -void RestoreAction::setDirectory( const QString &path ) +void RestoreAction::setDirectory( const TQString &path ) { fP->fPreferRestoreDir = path; } @@ -972,7 +972,7 @@ void RestoreAction::setDirectory( const QString &path ) { FUNCTIONSETUP; - QString dirname; + TQString dirname; if (fP->fPreferRestoreDir.isEmpty()) { dirname = PilotLocalDatabase::getDBPath(); @@ -986,8 +986,8 @@ void RestoreAction::setDirectory( const QString &path ) DEBUGKPILOT << fname << ": Restoring user " << dirname << endl; #endif - QDir dir(dirname, QString::null, QDir::Name, - QDir::Files | QDir::Readable | QDir::NoSymLinks); + TQDir dir(dirname, TQString::null, TQDir::Name, + TQDir::Files | TQDir::Readable | TQDir::NoSymLinks); if (!dir.exists()) { @@ -1021,14 +1021,14 @@ void RestoreAction::setDirectory( const QString &path ) } - emit logProgress(i18n("Restoring %1...").arg(QString::null),1); + emit logProgress(i18n("Restoring %1...").arg(TQString::null),1); for (unsigned int i = 0; i < dir.count(); i++) { - QString s; + TQString s; RestoreInfo info; - s = dirname + QDir::separator() + dir[i]; + s = dirname + TQDir::separator() + dir[i]; DEBUGKPILOT << fname << ": Adding " << s << " to restore list." << endl; @@ -1049,8 +1049,8 @@ void RestoreAction::setDirectory( const QString &path ) fP->fDBIterator = fP->fDBList.begin(); fActionStatus = InstallingFiles; - QObject::connect(&(fP->fTimer), SIGNAL(timeout()), - this, SLOT(installNextFile())); + TQObject::connect(&(fP->fTimer), TQT_SIGNAL(timeout()), + this, TQT_SLOT(installNextFile())); fP->fTimer.start(0, false); return true; @@ -1089,7 +1089,7 @@ void RestoreAction::setDirectory( const QString &path ) return; } - QFileInfo databaseInfo(dbi.path); + TQFileInfo databaseInfo(dbi.path); addSyncLogEntry(databaseInfo.fileName()); emit logProgress(i18n("Restoring %1...").arg(databaseInfo.fileName()), (100*fP->fDBIndex) / (fP->fDBList.count()+1)) ; @@ -1102,21 +1102,21 @@ void RestoreAction::setDirectory( const QString &path ) } } -/* virtual */ QString RestoreAction::statusString() const +/* virtual */ TQString RestoreAction::statusString() const { FUNCTIONSETUP; - QString s; + TQString s; switch (status()) { case InstallingFiles: s.append(CSL1("Installing Files (")); - s.append(QString::number(fP->fDBIndex)); + s.append(TQString::number(fP->fDBIndex)); s.append(CSL1(")")); break; case GettingFileInfo: s.append(CSL1("Getting File Info (")); - s.append(QString::number(fP->fDBIndex)); + s.append(TQString::number(fP->fDBIndex)); s.append(CSL1(")")); break; default: @@ -1130,7 +1130,7 @@ void RestoreAction::setDirectory( const QString &path ) BackupAction::Thread::Thread( BackupAction *parent, KPilotLink *link, - const QString &filename, + const TQString &filename, const DBInfo *info ) { fParent = parent; @@ -1144,12 +1144,12 @@ void BackupAction::Thread::run() if (fLink->retrieveDatabase(fFilename,&fDBInfo)) { // Successful. - QApplication::postEvent( fParent, new QEvent( (QEvent::Type)TerminateOK ) ); + TQApplication::postEvent( fParent, new TQEvent( (TQEvent::Type)TerminateOK ) ); } else { // Failed - QApplication::postEvent( fParent, new QEvent( (QEvent::Type)TerminateFailure ) ); + TQApplication::postEvent( fParent, new TQEvent( (TQEvent::Type)TerminateFailure ) ); } } diff --git a/kpilot/kpilot/hotSync.h b/kpilot/kpilot/hotSync.h index 580c2d61..33ef5531 100644 --- a/kpilot/kpilot/hotSync.h +++ b/kpilot/kpilot/hotSync.h @@ -41,7 +41,7 @@ class QTimer; class CheckUser : public SyncAction { public: - CheckUser(KPilotLink *p,QWidget *w=0L); + CheckUser(KPilotLink *p,TQWidget *w=0L); virtual ~CheckUser(); protected: @@ -72,7 +72,7 @@ public: BackupEnded, BackupComplete } ; - virtual QString statusString() const; + virtual TQString statusString() const; /** By default, a path based on the user name (either * on the handheld or set in KPilot) is used to @@ -83,10 +83,10 @@ public: * @p path to restore the default behavior of using * the username. */ - void setDirectory( const QString &path ); + void setDirectory( const TQString &path ); // Reimplemented to support threaded backup. - virtual bool event( QEvent *e ); + virtual bool event( TQEvent *e ); protected: virtual bool exec(); @@ -119,10 +119,10 @@ class FileInstallAction : public SyncAction Q_OBJECT public: FileInstallAction(KPilotLink *, - const QString &fileDir); + const TQString &fileDir); virtual ~FileInstallAction(); - virtual QString statusString() const; + virtual TQString statusString() const; protected: virtual bool exec(); @@ -132,23 +132,23 @@ protected slots: private: int fDBIndex; - QTimer *fTimer; - QString fDir; - QStringList fList; + TQTimer *fTimer; + TQString fDir; + TQStringList fList; // TODO: not const because it calls logError(), which is // non-const (but might be - can signals be const, anyway?) - bool resourceOK(const QString &, const QString &) /* const */ ; + bool resourceOK(const TQString &, const TQString &) /* const */ ; } ; class RestoreAction : public SyncAction { Q_OBJECT public: - RestoreAction(KPilotLink *,QWidget *w=0L); + RestoreAction(KPilotLink *,TQWidget *w=0L); typedef enum { InstallingFiles, GettingFileInfo,Done } Status; - virtual QString statusString() const; + virtual TQString statusString() const; /** By default, a path based on the user name (either * on the handheld or set in KPilot) is used to @@ -159,7 +159,7 @@ public: * @p path to restore the default behavior of using * the username. */ - void setDirectory( const QString &path ); + void setDirectory( const TQString &path ); protected: virtual bool exec(); diff --git a/kpilot/kpilot/internalEditorAction.cc b/kpilot/kpilot/internalEditorAction.cc index cee58ba2..bc4bdb3e 100644 --- a/kpilot/kpilot/internalEditorAction.cc +++ b/kpilot/kpilot/internalEditorAction.cc @@ -27,9 +27,9 @@ #include <options.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kmessagebox.h> #include <kdialog.h> #include <ktextedit.h> @@ -61,7 +61,7 @@ bool InternalEditorAction::exec() FUNCTIONSETUP; emit logMessage(i18n("[Internal Editors]")); fInternalEditorSyncStatus=eSyncStarted; - QTimer::singleShot(0, this, SLOT(syncDirtyDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncDirtyDB())); return true; } @@ -82,9 +82,9 @@ void InternalEditorAction::syncDirtyDB() } if (dbIter==dirtyDBs.end()) { - KPilotSettings::setDirtyDatabases(QStringList()); + KPilotSettings::setDirtyDatabases(TQStringList()); KPilotConfig::sync(); - QTimer::singleShot(0, this, SLOT(syncFlagsChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncFlagsChangedDB())); return; } #ifdef DEBUG @@ -146,14 +146,14 @@ nextDB: localDB->resetSyncFlags(); KPILOT_DELETE(localDB); KPILOT_DELETE(serialDB); - QTimer::singleShot(0, this, SLOT(syncDirtyDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncDirtyDB())); } -bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db) +bool InternalEditorAction::queryUseKPilotChanges(TQString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db) { FUNCTIONSETUP; bool knownDB=true; - QString localEntry, serialEntry, recType(i18n("record")); + TQString localEntry, serialEntry, recType(i18n("record")); if (dbName==CSL1("AddressDB") && db) { @@ -201,7 +201,7 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, knownDB=false; } - QString dialogText(i18n("The %1 with ID %2 of the database \"%3\" was changed " + TQString dialogText(i18n("The %1 with ID %2 of the database \"%3\" was changed " "on the handheld and in the internal editor. Shall the changes in KPilot be copied to the handheld, and so override the changes there?"). arg(recType).arg(id).arg(dbName)); @@ -212,40 +212,40 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, resdlg->setButtonText(KDialogBase::Ok, i18n("Use &KPilot")); resdlg->setButtonText(KDialogBase::Cancel, i18n("Use &Handheld")); - QWidget*page=new QWidget(resdlg); + TQWidget*page=new TQWidget(resdlg); resdlg->setMainWidget(page); - QGridLayout*layout = new QGridLayout( page, 1, 1); + TQGridLayout*layout = new TQGridLayout( page, 1, 1); - QLabel *label=new QLabel(dialogText, page); - label->setAlignment( QLabel::WordBreak ); + TQLabel *label=new TQLabel(dialogText, page); + label->setAlignment( TQLabel::WordBreak ); layout->addMultiCellWidget( label, 0,0, 0,1 ); - layout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Minimum, - QSizePolicy::Fixed ), 1, 0 ); + layout->addItem( new TQSpacerItem( 20, 10, TQSizePolicy::Minimum, + TQSizePolicy::Fixed ), 1, 0 ); if (knownDB) { - label=new QLabel(i18n("Entry in KPilot"), page); + label=new TQLabel(i18n("Entry in KPilot"), page); layout->addWidget( label, 2,0); - KTextEdit*textBrowser = new KTextEdit(CSL1("<qt>")+localEntry+CSL1("</qt>"), QString::null, page); + KTextEdit*textBrowser = new KTextEdit(CSL1("<qt>")+localEntry+CSL1("</qt>"), TQString::null, page); textBrowser->setReadOnly(true); layout->addWidget( textBrowser, 3,0); - label=new QLabel(i18n("Entry on Handheld"), page); + label=new TQLabel(i18n("Entry on Handheld"), page); layout->addWidget( label, 2,1); - textBrowser = new KTextEdit(CSL1("<qt>")+serialEntry+CSL1("</qt>"), QString::null, page); + textBrowser = new KTextEdit(CSL1("<qt>")+serialEntry+CSL1("</qt>"), TQString::null, page); textBrowser->setReadOnly(true); layout->addWidget( textBrowser, 3,1); } else { - label=new QLabel(i18n("Entry in KPilot"), page); + label=new TQLabel(i18n("Entry in KPilot"), page); layout->addMultiCellWidget( label, 2,2,0,1); // directly display the record's data: - QWidget *hexEdit = KHE::createBytesEditWidget( page, "LocalBufferEdit" ); + TQWidget *hexEdit = KHE::createBytesEditWidget( page, "LocalBufferEdit" ); if( hexEdit ) { KHE::BytesEditInterface* hexEditIf = KHE::bytesEditInterface( hexEdit ); @@ -260,16 +260,16 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, } else { - QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); + TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); hexEdit = tmpW; } layout->addMultiCellWidget( hexEdit, 3,3,0,1); - label=new QLabel(i18n("Entry on Handheld"), page); + label=new TQLabel(i18n("Entry on Handheld"), page); layout->addMultiCellWidget( label, 4,4,0,1); // directly display the record's data: @@ -288,11 +288,11 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, } else { - QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); + TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page ); tmpW->setBackgroundMode( Qt::PaletteMid ); tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak); - tmpW->setFrameShape( QFrame::Panel ); - tmpW->setFrameShadow( QFrame::Sunken ); + tmpW->setFrameShape( TQFrame::Panel ); + tmpW->setFrameShadow( TQFrame::Sunken ); hexEdit = tmpW; } layout->addMultiCellWidget( hexEdit, 5,5,0,1); @@ -321,9 +321,9 @@ void InternalEditorAction::syncFlagsChangedDB() } if (dbIter==dirtyDBs.end()) { - KPilotSettings::setFlagsChangedDatabases(QStringList()); + KPilotSettings::setFlagsChangedDatabases(TQStringList()); KPilotConfig::sync(); - QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); return; } @@ -331,7 +331,7 @@ void InternalEditorAction::syncFlagsChangedDB() DEBUGKPILOT<<"syncFlagsChangedDB for DB "<<(*dbIter)<<endl; #endif emit logError(i18n("Setting the database flags on the handheld is not yet supported.")); -QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); +TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); return; PilotLocalDatabase*localDB=new PilotLocalDatabase(*dbIter, false); @@ -343,7 +343,7 @@ return; KPILOT_DELETE(localDB); KPILOT_DELETE(serialDB); - QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); } void InternalEditorAction::syncAppBlockChangedDB() @@ -362,9 +362,9 @@ void InternalEditorAction::syncAppBlockChangedDB() } if (dbIter==dirtyDBs.end()) { - KPilotSettings::setAppBlockChangedDatabases(QStringList()); + KPilotSettings::setAppBlockChangedDatabases(TQStringList()); KPilotConfig::sync(); - QTimer::singleShot(0, this, SLOT(cleanup())); + TQTimer::singleShot(0, this, TQT_SLOT(cleanup())); return; } #ifdef DEBUG @@ -381,7 +381,7 @@ void InternalEditorAction::syncAppBlockChangedDB() KPILOT_DELETE(localDB); KPILOT_DELETE(serialDB); - QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB())); + TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB())); } void InternalEditorAction::cleanup() diff --git a/kpilot/kpilot/internalEditorAction.h b/kpilot/kpilot/internalEditorAction.h index 8e988348..ed26cb35 100644 --- a/kpilot/kpilot/internalEditorAction.h +++ b/kpilot/kpilot/internalEditorAction.h @@ -28,7 +28,7 @@ */ -#include <qstringlist.h> +#include <tqstringlist.h> #include "syncAction.h" @@ -52,10 +52,10 @@ private slots: void cleanup(); private: - bool queryUseKPilotChanges(QString dbName, recordid_t id, + bool queryUseKPilotChanges(TQString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db); - QStringList dirtyDBs; - QStringList::Iterator dbIter; + TQStringList dirtyDBs; + TQStringList::Iterator dbIter; enum eInternalEditorSyncStatus { eSyncStarted, eSyncDirtyDB, diff --git a/kpilot/kpilot/kpilot.cc b/kpilot/kpilot/kpilot.cc index 9207db02..4b38c509 100644 --- a/kpilot/kpilot/kpilot.cc +++ b/kpilot/kpilot/kpilot.cc @@ -31,11 +31,11 @@ #include "options.h" -#include <qfile.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qvbox.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqtimer.h> #include <kjanuswidget.h> #include <kurl.h> @@ -86,7 +86,7 @@ class KPilotInstaller::KPilotPrivate { public: - typedef QPtrList<PilotComponent> ComponentList; + typedef TQPtrList<PilotComponent> ComponentList; private: ComponentList fPilotComponentList; @@ -145,11 +145,11 @@ void KPilotInstaller::startDaemonIfNeeded() fAppStatus=WaitingForDaemon; - QString daemonError; - QCString daemonDCOP; + TQString daemonError; + TQCString daemonDCOP; int daemonPID; - QString s = getDaemon().statusString(); + TQString s = getDaemon().statusString(); DEBUGKPILOT << fname << ": Daemon status is " << ( s.isEmpty() ? CSL1("<none>") : s ) << endl; @@ -169,7 +169,7 @@ void KPilotInstaller::startDaemonIfNeeded() if (!fDaemonWasRunning && KApplication::startServiceByDesktopName( CSL1("kpilotdaemon"), - QString::null, &daemonError, &daemonDCOP, &daemonPID + TQString::null, &daemonError, &daemonDCOP, &daemonPID , "0" /* no notify */ )) { @@ -231,14 +231,14 @@ void KPilotInstaller::setupWidget() fManagingWidget->setMinimumSize(fManagingWidget->sizeHint()); fManagingWidget->show(); setCentralWidget(fManagingWidget); - connect( fManagingWidget, SIGNAL( aboutToShowPage ( QWidget* ) ), - this, SLOT( slotAboutToShowComponent( QWidget* ) ) ); + connect( fManagingWidget, TQT_SIGNAL( aboutToShowPage ( TQWidget* ) ), + this, TQT_SLOT( slotAboutToShowComponent( TQWidget* ) ) ); initIcons(); initMenu(); initComponents(); - setMinimumSize(sizeHint() + QSize(10,60)); + setMinimumSize(sizeHint() + TQSize(10,60)); createGUI(CSL1("kpilotui.rc"), false); setAutoSaveSettings(); @@ -248,15 +248,15 @@ void KPilotInstaller::initComponents() { FUNCTIONSETUP; - QString defaultDBPath = KPilotConfig::getDefaultDBPath(); + TQString defaultDBPath = KPilotConfig::getDefaultDBPath(); - QPixmap pixmap; - QString pixfile; - QWidget *w; + TQPixmap pixmap; + TQString pixfile; + TQWidget *w; #define ADDICONPAGE(a,b) \ pixmap = KGlobal::iconLoader()->loadIcon(b, KIcon::Desktop, 64); \ - w = getManagingWidget()->addVBoxPage(a,QString::null, pixmap) ; + w = getManagingWidget()->addVBoxPage(a,TQString::null, pixmap) ; ADDICONPAGE(i18n("HotSync"),CSL1("kpilotbhotsync")); fLogWidget = new LogWidget(w); @@ -286,7 +286,7 @@ void KPilotInstaller::initComponents() #undef ADDICONPAGE - QTimer::singleShot(500,this,SLOT(initializeComponents())); + TQTimer::singleShot(500,this,TQT_SLOT(initializeComponents())); } @@ -299,7 +299,7 @@ void KPilotInstaller::initIcons() -void KPilotInstaller::slotAboutToShowComponent( QWidget *c ) +void KPilotInstaller::slotAboutToShowComponent( TQWidget *c ) { FUNCTIONSETUP; int ix = fManagingWidget->pageIndex( c ); @@ -320,14 +320,14 @@ void KPilotInstaller::slotSelectComponent(PilotComponent *c) return; } - QObject *o = c->parent(); + TQObject *o = c->parent(); if (!o) { WARNINGKPILOT << "Widget has no parent." << endl; return; } - QWidget *parent = dynamic_cast<QWidget *>(o); + TQWidget *parent = dynamic_cast<TQWidget *>(o); if (!parent) { WARNINGKPILOT << "Widget's parent is not a widget." << endl; @@ -446,8 +446,8 @@ bool KPilotInstaller::componentPreSync() { FUNCTIONSETUP; - QString reason; - QString rprefix(i18n("Cannot start a Sync now. %1")); + TQString reason; + TQString rprefix(i18n("Cannot start a Sync now. %1")); for (fP->list().first(); fP->list().current(); fP->list().next()) @@ -477,7 +477,7 @@ void KPilotInstaller::componentPostSync() } } -void KPilotInstaller::setupSync(int kind, const QString & message) +void KPilotInstaller::setupSync(int kind, const TQString & message) { FUNCTIONSETUP; @@ -487,7 +487,7 @@ void KPilotInstaller::setupSync(int kind, const QString & message) } if (!message.isEmpty()) { - QString m(message); + TQString m(message); if (fLogWidget) { fLogWidget->logMessage(m); @@ -496,7 +496,7 @@ void KPilotInstaller::setupSync(int kind, const QString & message) getDaemon().requestSync(kind); } -void KPilotInstaller::closeEvent(QCloseEvent * e) +void KPilotInstaller::closeEvent(TQCloseEvent * e) { FUNCTIONSETUP; @@ -518,12 +518,12 @@ void KPilotInstaller::initMenu() syncPopup->setWhatsThis(i18n("Select the kind of HotSync to perform next. " "This applies only to the next HotSync; to change the default, use " "the configuration dialog.")); - connect(syncPopup, SIGNAL(activated()), - this, SLOT(slotHotSyncRequested())); + connect(syncPopup, TQT_SIGNAL(activated()), + this, TQT_SLOT(slotHotSyncRequested())); // File actions, keep this list synced with kpilotui.rc and pilotDaemon.cc a = new KAction(i18n("&HotSync"), CSL1("hotsync"), 0, - this, SLOT(slotHotSyncRequested()), + this, TQT_SLOT(slotHotSyncRequested()), actionCollection(), "file_hotsync"); a->setToolTip(i18n("Next HotSync will be normal HotSync.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -531,7 +531,7 @@ void KPilotInstaller::initMenu() syncPopup->insert(a); a = new KAction(i18n("Full&Sync"), CSL1("fullsync"), 0, - this, SLOT(slotFullSyncRequested()), + this, TQT_SLOT(slotFullSyncRequested()), actionCollection(), "file_fullsync"); a->setToolTip(i18n("Next HotSync will be a FullSync.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -539,7 +539,7 @@ void KPilotInstaller::initMenu() syncPopup->insert(a); a = new KAction(i18n("&Backup"), CSL1("backup"), 0, - this, SLOT(slotBackupRequested()), + this, TQT_SLOT(slotBackupRequested()), actionCollection(), "file_backup"); a->setToolTip(i18n("Next HotSync will be backup.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -547,15 +547,15 @@ void KPilotInstaller::initMenu() syncPopup->insert(a); a = new KAction(i18n("&Restore"), CSL1("restore"), 0, - this, SLOT(slotRestoreRequested()), + this, TQT_SLOT(slotRestoreRequested()), actionCollection(), "file_restore"); a->setToolTip(i18n("Next HotSync will be restore.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " "should restore the Handheld from data on the PC.")); syncPopup->insert(a); - a = new KAction(i18n("Copy Handheld to PC"), QString::null, 0, - this, SLOT(slotHHtoPCRequested()), + a = new KAction(i18n("Copy Handheld to PC"), TQString::null, 0, + this, TQT_SLOT(slotHHtoPCRequested()), actionCollection(), "file_HHtoPC"); a->setToolTip(i18n("Next HotSync will be backup.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -563,8 +563,8 @@ void KPilotInstaller::initMenu() "overwriting entries on the PC.")); syncPopup->insert(a); - a = new KAction(i18n("Copy PC to Handheld"), QString::null, 0, - this, SLOT(slotPCtoHHRequested()), + a = new KAction(i18n("Copy PC to Handheld"), TQString::null, 0, + this, TQT_SLOT(slotPCtoHHRequested()), actionCollection(), "file_PCtoHH"); a->setToolTip(i18n("Next HotSync will copy PC to Handheld.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -575,7 +575,7 @@ void KPilotInstaller::initMenu() #if 0 a = new KAction(i18n("&List Only"),CSL1("listsync"),0, - this,SLOT(slotTestSyncRequested()), + this,TQT_SLOT(slotTestSyncRequested()), actionCollection(), "file_list"); a->setToolTip(i18n("Next HotSync will list databases.")); a->setWhatsThis(i18n("Tell the daemon that the next HotSync " @@ -586,14 +586,14 @@ void KPilotInstaller::initMenu() a = new KAction(i18n("Rese&t Link"),CSL1("reload"), 0, - this, SLOT(slotResetLink()), + this, TQT_SLOT(slotResetLink()), actionCollection(),"file_reload"); a->setToolTip(i18n("Reset the device connection.")); a->setWhatsThis(i18n("Try to reset the daemon and its connection " "to the Handheld.")); - a = KStdAction::quit(this, SLOT(quit()), actionCollection()); + a = KStdAction::quit(this, TQT_SLOT(quit()), actionCollection()); a->setWhatsThis(i18n("Quit KPilot, (and stop the daemon " "if configured that way).")); @@ -603,15 +603,15 @@ void KPilotInstaller::initMenu() createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); - (void) KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), + (void) KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); - (void) KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), + (void) KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - (void) KStdAction::preferences(this, SLOT(configure()), + (void) KStdAction::preferences(this, TQT_SLOT(configure()), actionCollection()); a = new KAction(i18n("Configuration &Wizard..."), CSL1("wizard"), 0, - this, SLOT(configureWizard()), + this, TQT_SLOT(configureWizard()), actionCollection(), "options_configure_wizard"); a->setWhatsThis(i18n("Configure KPilot using the configuration wizard.")); @@ -629,7 +629,7 @@ void KPilotInstaller::quit() for (fP->list().first(); fP->list().current(); fP->list().next()) { - QString reason; + TQString reason; if (!fP->list().current()->preHotSync(reason)) { WARNINGKPILOT @@ -644,7 +644,7 @@ void KPilotInstaller::quit() } void KPilotInstaller::addComponentPage(PilotComponent * p, - const QString & name) + const TQString & name) { FUNCTIONSETUP; @@ -685,13 +685,13 @@ void KPilotInstaller::addComponentPage(PilotComponent * p, KToggleAction *pt = new KToggleAction(name, /* "kpilot" -- component icon, */ 0, - p, SLOT(slotShowComponent()), + p, TQT_SLOT(slotShowComponent()), actionCollection(), actionname); pt->setExclusiveGroup(CSL1("view_menu")); - connect(p, SIGNAL(showComponent(PilotComponent *)), - this, SLOT(slotSelectComponent(PilotComponent *))); + connect(p, TQT_SIGNAL(showComponent(PilotComponent *)), + this, TQT_SLOT(slotSelectComponent(PilotComponent *))); } /* slot */ void KPilotInstaller::initializeComponents() @@ -719,7 +719,7 @@ void KPilotInstaller::optionsConfigureToolbars() // This was added in KDE 3.1 saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } @@ -741,7 +741,7 @@ void KPilotInstaller::slotResetLink() /* ** Can't be a member function because it needs to be called even with no KPilotInstaller. */ -static bool runConfigure(PilotDaemonDCOP_stub &daemon,QWidget *parent) +static bool runConfigure(PilotDaemonDCOP_stub &daemon,TQWidget *parent) { FUNCTIONSETUP; bool ret = false; @@ -796,7 +796,7 @@ static bool runConfigure(PilotDaemonDCOP_stub &daemon,QWidget *parent) * canceled, though). */ typedef enum { Failed, OK, Cancel } WizardResult; -static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent) +static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,TQWidget *parent) { FUNCTIONSETUP; WizardResult ret = Failed ; @@ -805,7 +805,7 @@ static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent) KPilotSettings::self()->readConfig(); // Declarations at top because of goto's in this function - ConfigWizard *(* f) (QWidget *, int) = 0L ; + ConfigWizard *(* f) (TQWidget *, int) = 0L ; ConfigWizard *w = 0L; KLibrary *l = KLibLoader::self()->library("kcm_kpilot"); @@ -817,7 +817,7 @@ static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent) if (l->hasSymbol("create_wizard")) { - f = ( ConfigWizard * (*) (QWidget *, int) ) (l->symbol("create_wizard")) ; + f = ( ConfigWizard * (*) (TQWidget *, int) ) (l->symbol("create_wizard")) ; } if (!f) @@ -869,7 +869,7 @@ void KPilotInstaller::componentUpdate() { FUNCTIONSETUP; - QString defaultDBPath = KPilotConfig::getDefaultDBPath(); + TQString defaultDBPath = KPilotConfig::getDefaultDBPath(); bool dbPathChanged = false; for (fP->list().first(); @@ -1124,7 +1124,7 @@ int main(int argc, char **argv) return 1; } - QTimer::singleShot(0,tp,SLOT(startDaemonIfNeeded())); + TQTimer::singleShot(0,tp,TQT_SLOT(startDaemonIfNeeded())); KGlobal::dirs()->addResourceType("pilotdbs", CSL1("share/apps/kpilot/DBBackup")); diff --git a/kpilot/kpilot/kpilot.h b/kpilot/kpilot/kpilot.h index 64bc770c..998e087d 100644 --- a/kpilot/kpilot/kpilot.h +++ b/kpilot/kpilot/kpilot.h @@ -54,7 +54,7 @@ Q_OBJECT public: KPilotInstaller(); - KPilotInstaller(QStrList& fileList); + KPilotInstaller(TQStrList& fileList); ~KPilotInstaller(); /** @@ -67,14 +67,14 @@ public: // Adds 'name' to the pull down menu of components - void addComponentPage(PilotComponent *, const QString &name); + void addComponentPage(PilotComponent *, const TQString &name); KPilotStatus status() const { return fAppStatus; } ; protected: - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); KJanusWidget *getManagingWidget() { return fManagingWidget; } /** @@ -141,7 +141,7 @@ protected: * Run all the internal conduits' presync functions. */ bool componentPreSync(); - void setupSync(int kind,const QString& msg); + void setupSync(int kind,const TQString& msg); void componentPostSync(); /** * Run after a configuration change to force @@ -196,7 +196,7 @@ protected slots: * or activated through the signal mechanism. * */ void slotSelectComponent( PilotComponent *c ); - void slotAboutToShowComponent( QWidget *c ); + void slotAboutToShowComponent( TQWidget *c ); /** * Delayed initialization of the components. diff --git a/kpilot/kpilot/kpilotConfig.cc b/kpilot/kpilot/kpilotConfig.cc index 72acdb9b..28589026 100644 --- a/kpilot/kpilot/kpilotConfig.cc +++ b/kpilot/kpilot/kpilotConfig.cc @@ -31,9 +31,9 @@ #include <stdlib.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kstandarddirs.h> #include <kconfig.h> @@ -83,12 +83,12 @@ KPilotSettings::setConfigVersion( ConfigurationVersion ); } -/* static */ QString KPilotConfig::getDefaultDBPath() +/* static */ TQString KPilotConfig::getDefaultDBPath() { FUNCTIONSETUP; - QString lastUser = KPilotSettings::userName(); - QString dbsubpath = CSL1("kpilot/DBBackup/"); - QString defaultDBPath = KGlobal::dirs()-> + TQString lastUser = KPilotSettings::userName(); + TQString dbsubpath = CSL1("kpilot/DBBackup/"); + TQString defaultDBPath = KGlobal::dirs()-> saveLocation("data", dbsubpath + lastUser + CSL1("/")); return defaultDBPath; } @@ -108,23 +108,23 @@ return debug_level; } -static QFont *thefont = 0L; +static TQFont *thefont = 0L; -/* static */ const QFont & KPilotConfig::fixed() +/* static */ const TQFont & KPilotConfig::fixed() { FUNCTIONSETUP; if (!thefont) - thefont = new QFont(KGlobalSettings::fixedFont()); + thefont = new TQFont(KGlobalSettings::fixedFont()); return *thefont; } -void KPilotConfig::addDirtyDatabase(QString db) +void KPilotConfig::addDirtyDatabase(TQString db) { FUNCTIONSETUP; - QStringList l(KPilotSettings::dirtyDatabases()); + TQStringList l(KPilotSettings::dirtyDatabases()); if (!l.contains(db)) { l.append(db); @@ -133,9 +133,9 @@ void KPilotConfig::addDirtyDatabase(QString db) } -void KPilotConfig::addAppBlockChangedDatabase(QString db) +void KPilotConfig::addAppBlockChangedDatabase(TQString db) { - QStringList l(KPilotSettings::appBlockChangedDatabases()); + TQStringList l(KPilotSettings::appBlockChangedDatabases()); if (!l.contains(db)) { l.append(db); @@ -143,9 +143,9 @@ void KPilotConfig::addAppBlockChangedDatabase(QString db) } } -void KPilotConfig::addFlagsChangedDatabase(QString db) +void KPilotConfig::addFlagsChangedDatabase(TQString db) { - QStringList l(KPilotSettings::flagsChangedDatabases()); + TQStringList l(KPilotSettings::flagsChangedDatabases()); if (!l.contains(db)) { l.append(db); @@ -156,10 +156,10 @@ void KPilotConfig::addFlagsChangedDatabase(QString db) -/* static */ QString KPilotConfig::versionDetails(int fileversion, bool run) +/* static */ TQString KPilotConfig::versionDetails(int fileversion, bool run) { FUNCTIONSETUP; - QString s = CSL1("<qt><p>"); + TQString s = CSL1("<qt><p>"); s += i18n("The configuration file is outdated."); s += ' '; s += i18n("The configuration file has version %1, while KPilot " @@ -206,10 +206,10 @@ static void update440() { // Try to update conduit list { - QStringList conduits( KPilotSettings::installedConduits() ); + TQStringList conduits( KPilotSettings::installedConduits() ); KConfig*c = KPilotSettings::self()->config(); /// c->resetGroup(); - c->setGroup( QString::null ); + c->setGroup( TQString::null ); bool installFiles = c->readBoolEntry("SyncFiles",true); if (installFiles) conduits.append( CSL1("internal_fileinstall") ); c->deleteEntry("SyncFiles"); @@ -228,14 +228,14 @@ static void update440() // Search for old conduit libraries. { - QStringList foundlibs ; + TQStringList foundlibs ; static const char *oldconduits[] = { "null", "address", "doc", "knotes", "sysinfo", "time", "todo", "vcal", 0L } ; const char **s = oldconduits; while (*s) { - QString libname = CSL1("kde3/lib%1conduit.so").arg(QString::fromLatin1(*s)); - QString foundlib = ::locate("lib",libname); + TQString libname = CSL1("kde3/lib%1conduit.so").arg(TQString::fromLatin1(*s)); + TQString foundlib = ::locate("lib",libname); if (!foundlib.isEmpty()) { foundlibs.append(foundlib); @@ -258,15 +258,15 @@ static void update443() { FUNCTIONSETUP; - QStringList skip = KPilotSettings::skipBackupDB(); - QStringList fixSkip; + TQStringList skip = KPilotSettings::skipBackupDB(); + TQStringList fixSkip; bool fixedSome = false; #ifdef DEBUG DEBUGKPILOT << fname << ": Skip databases are: " << skip.join(CSL1(",")) << endl; #endif - for (QStringList::const_iterator i = skip.begin(); i!=skip.end(); ++i) + for (TQStringList::const_iterator i = skip.begin(); i!=skip.end(); ++i) { if ((*i).length()==4) { diff --git a/kpilot/kpilot/kpilotConfig.h b/kpilot/kpilot/kpilotConfig.h index 6b260bf7..bc15c0ac 100644 --- a/kpilot/kpilot/kpilotConfig.h +++ b/kpilot/kpilot/kpilotConfig.h @@ -50,16 +50,16 @@ public: } RunMode; /** - * @return QString of default path for the BackupDB files + * @return TQString of default path for the BackupDB files * are located */ - static QString getDefaultDBPath(); + static TQString getDefaultDBPath(); // Conduit configuration information - static void addDirtyDatabase(QString db); - static void addAppBlockChangedDatabase(QString db); - static void addFlagsChangedDatabase(QString db); + static void addDirtyDatabase(TQString db); + static void addAppBlockChangedDatabase(TQString db); + static void addFlagsChangedDatabase(TQString db); /** * This number can be changed every time a new @@ -89,7 +89,7 @@ public: * admonition to run kpilot in config mode to fix this. * sorryVersionOutdated() uses KMessageBox to display it. */ - static QString versionDetails(int fileversion, bool run); + static TQString versionDetails(int fileversion, bool run); static void sorryVersionOutdated(int fileversion); /** * Update the config file as best we can, and inform the user. @@ -116,7 +116,7 @@ public: * Returns the user's preference for the system-wide * fixed font. */ - static const QFont& fixed() ; + static const TQFont& fixed() ; static void sync(); } ; diff --git a/kpilot/kpilot/kpilotConfigDialog.cc b/kpilot/kpilot/kpilotConfigDialog.cc index 1cb12c16..34cf8247 100644 --- a/kpilot/kpilot/kpilotConfigDialog.cc +++ b/kpilot/kpilot/kpilotConfigDialog.cc @@ -34,15 +34,15 @@ #include <pi-version.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qlineedit.h> -#include <qtabwidget.h> -#include <qspinbox.h> -#include <qfile.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqlineedit.h> +#include <tqtabwidget.h> +#include <tqspinbox.h> +#include <tqfile.h> #include <kmessagebox.h> #include <kcharsets.h> @@ -63,21 +63,21 @@ #include "syncAction.h" #include "dbSelectionDialog.h" -/* virtual */ QString ConfigPage::maybeSaveText() const +/* virtual */ TQString ConfigPage::maybeSaveText() const { return i18n("<qt>The settings for configuration page <i>%1</i> have been changed. Do you " "want to save the changes before continuing?</qt>").arg(this->conduitName()); } -DeviceConfigPage::DeviceConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +DeviceConfigPage::DeviceConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; fConfigWidget = new DeviceConfigWidget( w ); // Fill the encodings list { - QStringList l = KGlobal::charsets()->descriptiveEncodingNames(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) + TQStringList l = KGlobal::charsets()->descriptiveEncodingNames(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { fConfigWidget->fPilotEncoding->insertItem(*it); } @@ -91,12 +91,12 @@ DeviceConfigPage::DeviceConfigPage(QWidget * w, const char *n ) : ConfigPage( w, #endif -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fPilotDevice, SIGNAL(textChanged(const QString &))); - CM(fPilotSpeed, SIGNAL(activated(int))); - CM(fPilotEncoding, SIGNAL(textChanged(const QString &))); - CM(fUserName, SIGNAL(textChanged(const QString &))); - CM(fWorkaround, SIGNAL(activated(int))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fPilotDevice, TQT_SIGNAL(textChanged(const TQString &))); + CM(fPilotSpeed, TQT_SIGNAL(activated(int))); + CM(fPilotEncoding, TQT_SIGNAL(textChanged(const TQString &))); + CM(fUserName, TQT_SIGNAL(textChanged(const TQString &))); + CM(fWorkaround, TQT_SIGNAL(activated(int))); #undef CM fConduitName = i18n("Device"); @@ -136,7 +136,7 @@ void DeviceConfigPage::load() int r = KMessageBox::Yes; #if PILOT_LINK_NUMBER < PILOT_LINK_0_10_0 - QString d = fConfigWidget->fPilotDevice->text(); + TQString d = fConfigWidget->fPilotDevice->text(); if (d.length() > 13) { @@ -202,7 +202,7 @@ void DeviceConfigPage::load() void DeviceConfigPage::getEncoding() { FUNCTIONSETUP; - QString e = KPilotSettings::encoding(); + TQString e = KPilotSettings::encoding(); if (e.isEmpty()) fConfigWidget->fPilotEncoding->setCurrentText(CSL1("ISO8859-15")); else @@ -213,7 +213,7 @@ void DeviceConfigPage::setEncoding() { FUNCTIONSETUP; - QString enc = fConfigWidget->fPilotEncoding->currentText(); + TQString enc = fConfigWidget->fPilotEncoding->currentText(); if (enc.isEmpty()) { WARNINGKPILOT << "Empty encoding. Will ignore it." << endl; @@ -224,7 +224,7 @@ void DeviceConfigPage::setEncoding() } } -SyncConfigPage::SyncConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +SyncConfigPage::SyncConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -232,11 +232,11 @@ SyncConfigPage::SyncConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fSpecialSync, SIGNAL(activated(int))); - CM(fFullSyncCheck, SIGNAL(toggled(bool))); - CM(fScreenlockSecure, SIGNAL(toggled(bool))); - CM(fConflictResolution, SIGNAL(activated(int))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fSpecialSync, TQT_SIGNAL(activated(int))); + CM(fFullSyncCheck, TQT_SIGNAL(toggled(bool))); + CM(fScreenlockSecure, TQT_SIGNAL(toggled(bool))); + CM(fConflictResolution, TQT_SIGNAL(activated(int))); #undef CM fConduitName = i18n("HotSync"); @@ -306,7 +306,7 @@ void SyncConfigPage::load() } -BackupConfigPage::BackupConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +BackupConfigPage::BackupConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -314,15 +314,15 @@ BackupConfigPage::BackupConfigPage(QWidget * w, const char *n ) : ConfigPage( w, fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; - connect(fConfigWidget->fBackupOnlyChooser, SIGNAL( clicked() ), - SLOT( slotSelectNoBackupDBs() ) ); - connect(fConfigWidget->fSkipDBChooser, SIGNAL(clicked()), - SLOT(slotSelectNoRestoreDBs())); + connect(fConfigWidget->fBackupOnlyChooser, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotSelectNoBackupDBs() ) ); + connect(fConfigWidget->fSkipDBChooser, TQT_SIGNAL(clicked()), + TQT_SLOT(slotSelectNoRestoreDBs())); -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fBackupOnly, SIGNAL(textChanged(const QString &))); - CM(fSkipDB, SIGNAL(textChanged(const QString &))); - CM(fBackupFrequency, SIGNAL(activated(int))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fBackupOnly, TQT_SIGNAL(textChanged(const TQString &))); + CM(fSkipDB, TQT_SIGNAL(textChanged(const TQString &))); + CM(fBackupFrequency, TQT_SIGNAL(activated(int))); #undef CM fConduitName = i18n("Backup"); @@ -351,9 +351,9 @@ void BackupConfigPage::load() /* Backup tab */ KPilotSettings::setSkipBackupDB( - QStringList::split(CSL1(","),fConfigWidget->fBackupOnly->text())); + TQStringList::split(CSL1(","),fConfigWidget->fBackupOnly->text())); KPilotSettings::setSkipRestoreDB( - QStringList::split(CSL1(","),fConfigWidget->fSkipDB->text())); + TQStringList::split(CSL1(","),fConfigWidget->fSkipDB->text())); KPilotSettings::setRunConduitsWithBackup(fConfigWidget->fRunConduitsWithBackup->isChecked()); KPilotSettings::setBackupFrequency(fConfigWidget->fBackupFrequency->currentItem()); @@ -366,12 +366,12 @@ void BackupConfigPage::slotSelectNoBackupDBs() { FUNCTIONSETUP; - QStringList selectedDBs(QStringList::split(',', fConfigWidget->fBackupOnly->text() )); + TQStringList selectedDBs(TQStringList::split(',', fConfigWidget->fBackupOnly->text() )); - QStringList deviceDBs=KPilotSettings::deviceDBs(); - QStringList addedDBs=KPilotSettings::addedDBs(); + TQStringList deviceDBs=KPilotSettings::deviceDBs(); + TQStringList addedDBs=KPilotSettings::addedDBs(); KPilotDBSelectionDialog*dlg=new KPilotDBSelectionDialog(selectedDBs, deviceDBs, addedDBs, 0, "NoBackupDBs"); - if (dlg && (dlg->exec()==QDialog::Accepted) ) + if (dlg && (dlg->exec()==TQDialog::Accepted) ) { fConfigWidget->fBackupOnly->setText( dlg->getSelectedDBs().join(CSL1(","))); @@ -384,12 +384,12 @@ void BackupConfigPage::slotSelectNoRestoreDBs() { FUNCTIONSETUP; - QStringList selectedDBs(QStringList::split(',', fConfigWidget->fSkipDB->text() )); + TQStringList selectedDBs(TQStringList::split(',', fConfigWidget->fSkipDB->text() )); - QStringList deviceDBs=KPilotSettings::deviceDBs(); - QStringList addedDBs=KPilotSettings::addedDBs(); + TQStringList deviceDBs=KPilotSettings::deviceDBs(); + TQStringList addedDBs=KPilotSettings::addedDBs(); KPilotDBSelectionDialog*dlg=new KPilotDBSelectionDialog(selectedDBs, deviceDBs, addedDBs, 0, "NoRestoreDBs"); - if (dlg && (dlg->exec()==QDialog::Accepted) ) + if (dlg && (dlg->exec()==TQDialog::Accepted) ) { fConfigWidget->fSkipDB->setText( dlg->getSelectedDBs().join(CSL1(","))); @@ -400,7 +400,7 @@ void BackupConfigPage::slotSelectNoRestoreDBs() -ViewersConfigPage::ViewersConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +ViewersConfigPage::ViewersConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -408,11 +408,11 @@ ViewersConfigPage::ViewersConfigPage(QWidget * w, const char *n ) : ConfigPage( fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fInternalEditors, SIGNAL(toggled(bool))); - CM(fUseSecret, SIGNAL(toggled(bool))); - CM(fAddressGroup, SIGNAL(clicked(int))); - CM(fUseKeyField, SIGNAL(toggled(bool))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fInternalEditors, TQT_SIGNAL(toggled(bool))); + CM(fUseSecret, TQT_SIGNAL(toggled(bool))); + CM(fAddressGroup, TQT_SIGNAL(clicked(int))); + CM(fUseKeyField, TQT_SIGNAL(toggled(bool))); #undef CM fConduitName = i18n("Viewers"); @@ -452,7 +452,7 @@ void ViewersConfigPage::load() -StartExitConfigPage::StartExitConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n ) +StartExitConfigPage::StartExitConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n ) { FUNCTIONSETUP; @@ -460,11 +460,11 @@ StartExitConfigPage::StartExitConfigPage(QWidget * w, const char *n ) : ConfigPa fConfigWidget->resize(fConfigWidget->size()); fWidget = fConfigWidget; -#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified())); - CM(fStartDaemonAtLogin, SIGNAL(toggled(bool))); - CM(fKillDaemonOnExit, SIGNAL(toggled(bool))); - CM(fDockDaemon, SIGNAL(toggled(bool))); - CM(fQuitAfterSync, SIGNAL(toggled(bool))); +#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified())); + CM(fStartDaemonAtLogin, TQT_SIGNAL(toggled(bool))); + CM(fKillDaemonOnExit, TQT_SIGNAL(toggled(bool))); + CM(fDockDaemon, TQT_SIGNAL(toggled(bool))); + CM(fQuitAfterSync, TQT_SIGNAL(toggled(bool))); #undef CM fConduitName = i18n("Startup and Exit"); @@ -487,10 +487,10 @@ void StartExitConfigPage::load() { FUNCTIONSETUP; - QString autostart = KGlobalSettings::autostartPath(); - QString desktopfile = CSL1("kpilotdaemon.desktop"); - QString desktopcategory = CSL1("kde/"); - QString location = KGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile); + TQString autostart = KGlobalSettings::autostartPath(); + TQString desktopfile = CSL1("kpilotdaemon.desktop"); + TQString desktopcategory = CSL1("kde/"); + TQString location = KGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile); if (location.isEmpty()) // Fallback to KDE 3.0? { location = KGlobal::dirs()->findResource("apps",desktopfile); @@ -516,7 +516,7 @@ void StartExitConfigPage::load() } else { - QFile::remove(autostart+desktopfile); + TQFile::remove(autostart+desktopfile); } KPilotSettings::setDockDaemon(fConfigWidget->fDockDaemon->isChecked()); KPilotSettings::setKillDaemonAtExit(fConfigWidget->fKillDaemonOnExit->isChecked()); diff --git a/kpilot/kpilot/kpilotConfigDialog.h b/kpilot/kpilot/kpilotConfigDialog.h index 50a182df..11960f8d 100644 --- a/kpilot/kpilot/kpilotConfigDialog.h +++ b/kpilot/kpilot/kpilotConfigDialog.h @@ -44,17 +44,17 @@ class BackupConfigWidget; class ConfigPage : public ConduitConfigBase { public: - ConfigPage( QWidget *w, const char *n ) : ConduitConfigBase(w,n) { } ; + ConfigPage( TQWidget *w, const char *n ) : ConduitConfigBase(w,n) { } ; protected: // Override base class virtual function. - virtual QString maybeSaveText() const; + virtual TQString maybeSaveText() const; } ; class DeviceConfigPage : public ConfigPage { Q_OBJECT public: - DeviceConfigPage( QWidget *, const char * ); + DeviceConfigPage( TQWidget *, const char * ); protected: virtual bool validate(); @@ -77,7 +77,7 @@ private: class KDE_EXPORT SyncConfigPage : public ConfigPage { public: - SyncConfigPage( QWidget *, const char * ); + SyncConfigPage( TQWidget *, const char * ); protected: virtual void load(); @@ -91,7 +91,7 @@ class BackupConfigPage : public ConfigPage { Q_OBJECT public: - BackupConfigPage( QWidget *, const char * ); + BackupConfigPage( TQWidget *, const char * ); protected: virtual void load(); @@ -108,7 +108,7 @@ private: class StartExitConfigPage : public ConfigPage { public: - StartExitConfigPage( QWidget *, const char * ); + StartExitConfigPage( TQWidget *, const char * ); protected: virtual void load(); @@ -121,7 +121,7 @@ private: class ViewersConfigPage : public ConfigPage { public: - ViewersConfigPage( QWidget *, const char * ); + ViewersConfigPage( TQWidget *, const char * ); protected: virtual void load(); diff --git a/kpilot/kpilot/kpilotConfigWizard.cc b/kpilot/kpilot/kpilotConfigWizard.cc index d21ec5d8..9df81b41 100644 --- a/kpilot/kpilot/kpilotConfigWizard.cc +++ b/kpilot/kpilot/kpilotConfigWizard.cc @@ -28,10 +28,10 @@ //#include "options.h" -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlineedit.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> #include <kmessagebox.h> #include <kglobal.h> @@ -52,7 +52,7 @@ #include "kpilotProbeDialog.h" -ConfigWizard::ConfigWizard(QWidget *parent, const char *n, int m) : +ConfigWizard::ConfigWizard(TQWidget *parent, const char *n, int m) : KWizard(parent, n), fMode((Mode)m) { @@ -67,8 +67,8 @@ ConfigWizard::ConfigWizard(QWidget *parent, const char *n, int m) : setHelpEnabled( page2, false ); setHelpEnabled( page3, false ); - connect( page2->fProbeButton, SIGNAL( pressed() ), - this, SLOT( probeHandheld() ) ); + connect( page2->fProbeButton, TQT_SIGNAL( pressed() ), + this, TQT_SLOT( probeHandheld() ) ); KPilotSettings::self()->readConfig(); page2->fUserName->setText( KPilotSettings::userName() ); @@ -84,8 +84,8 @@ ConfigWizard::~ConfigWizard() void ConfigWizard::accept() { FUNCTIONSETUP; - QString username( page2->fUserName->text() ); - QString devicename( page2->fDeviceName->text() ); + TQString username( page2->fUserName->text() ); + TQString devicename( page2->fDeviceName->text() ); // int devicetype( page1->fConnectionType->selectedId() ); enum eSyncApp { eAppKDE=0, @@ -121,10 +121,10 @@ void ConfigWizard::accept() todoConfig->readConfig(); calendarConfig->readConfig(); - QStringList conduits = KPilotSettings::installedConduits(); + TQStringList conduits = KPilotSettings::installedConduits(); int version(0); #define APPEND_CONDUIT(a) if (!conduits.contains(a)) conduits.append(a) - QString applicationName(i18n("general KDE-PIM")); + TQString applicationName(i18n("general KDE-PIM")); APPEND_CONDUIT("internal_fileinstall"); APPEND_CONDUIT("todo-conduit"); APPEND_CONDUIT("vcal-conduit"); @@ -197,7 +197,7 @@ void ConfigWizard::accept() KPilotSettings::setInstalledConduits( conduits ); #undef APPEND_CONDUIT - QString finishMessage = i18n("KPilot is now configured to sync with %1.").arg(applicationName); + TQString finishMessage = i18n("KPilot is now configured to sync with %1.").arg(applicationName); if (fMode == InDialog) { finishMessage.append(CSL1("\n")); @@ -209,7 +209,7 @@ void ConfigWizard::accept() KMessageBox::information(this, finishMessage, i18n("Automatic Configuration Finished")); KPilotSettings::self()->writeConfig(); - QDialog::accept(); + TQDialog::accept(); } void ConfigWizard::probeHandheld() diff --git a/kpilot/kpilot/kpilotConfigWizard.h b/kpilot/kpilot/kpilotConfigWizard.h index 3a448c4f..742df392 100644 --- a/kpilot/kpilot/kpilotConfigWizard.h +++ b/kpilot/kpilot/kpilotConfigWizard.h @@ -40,7 +40,7 @@ Q_OBJECT public: enum Mode { InDialog=0, Standalone=1 } ; - ConfigWizard(QWidget *p=0L,const char *n=0L, int mode=(int)InDialog); + ConfigWizard(TQWidget *p=0L,const char *n=0L, int mode=(int)InDialog); ~ConfigWizard(); protected slots: @@ -52,7 +52,7 @@ protected: ConfigWizard_base3 *page3; Mode fMode; - QStringList mDBs; + TQStringList mDBs; } ; #endif diff --git a/kpilot/kpilot/kpilotProbeDialog.cc b/kpilot/kpilot/kpilotProbeDialog.cc index f7e04268..fd7fcb3c 100644 --- a/kpilot/kpilot/kpilotProbeDialog.cc +++ b/kpilot/kpilot/kpilotProbeDialog.cc @@ -28,14 +28,14 @@ #include "options.h" -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qtimer.h> -#include <qptrlist.h> -#include <qmap.h> -#include <qvaluelist.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqmap.h> +#include <tqvaluelist.h> #include <kmessagebox.h> #include <kglobal.h> @@ -86,23 +86,23 @@ and the module can't be unloaded. */ -ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : +ProbeDialog::ProbeDialog(TQWidget *parent, const char *n) : KDialogBase(parent, n, true, i18n("Autodetecting Your Handheld"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Cancel, true, i18n("Restart Detection")), mDetected(false), mUserName(), mDevice() { FUNCTIONSETUP; - QVBox *mainWidget = makeVBoxMainWidget(); + TQVBox *mainWidget = makeVBoxMainWidget(); - fInfoText = new QLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" ); - fInfoText->setAlignment( QLabel::WordBreak ); + fInfoText = new TQLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" ); + fInfoText->setAlignment( TQLabel::WordBreak ); - fStatusGroup = new QGroupBox( i18n("Status"), mainWidget, "fStatusGroup" ); + fStatusGroup = new TQGroupBox( i18n("Status"), mainWidget, "fStatusGroup" ); fStatusGroup->setColumnLayout(0, Qt::Vertical ); - fStatusGroupLayout = new QGridLayout( fStatusGroup->layout() ); + fStatusGroupLayout = new TQGridLayout( fStatusGroup->layout() ); - fStatus = new QLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" ); - fStatus->setAlignment( QLabel::WordBreak ); + fStatus = new TQLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" ); + fStatus->setAlignment( TQLabel::WordBreak ); fStatusGroupLayout->addWidget( fStatus, 0, 0 ); fProgress = new KProgress( 100, fStatusGroup, "fProgress" ); @@ -110,27 +110,27 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : - fResultsGroup = new QGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" ); + fResultsGroup = new TQGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" ); fResultsGroup->setEnabled( FALSE ); fResultsGroup->setColumnLayout(0, Qt::Vertical ); - fResultsGroupLayout = new QGridLayout( fResultsGroup->layout() ); + fResultsGroupLayout = new TQGridLayout( fResultsGroup->layout() ); fResultsGroupLayout->setAlignment( Qt::AlignTop ); - fUserLabel = new QLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" ); - fUserLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) ); + fUserLabel = new TQLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" ); + fUserLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) ); fResultsGroupLayout->addWidget( fUserLabel, 0, 0 ); - fDeviceLabel = new QLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" ); + fDeviceLabel = new TQLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" ); fResultsGroupLayout->addWidget( fDeviceLabel, 1, 0 ); - fUser = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" ); + fUser = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" ); fResultsGroupLayout->addWidget( fUser, 0, 1 ); - fDevice = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" ); + fDevice = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" ); fResultsGroupLayout->addWidget( fDevice, 1, 1 ); - resize( QSize(459, 298).expandedTo(minimumSizeHint()) ); + resize( TQSize(459, 298).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); enableButtonOK(false); @@ -150,15 +150,15 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) : <<"/dev/cuad1"<<"/dev/cuad3" <<"/dev/ucom1"<<"/dev/ucom3"; - fProcessEventsTimer = new QTimer( this ); - fTimeoutTimer = new QTimer( this ); - fProgressTimer = new QTimer( this ); - fRotateLinksTimer = new QTimer( this ); - connect( fProcessEventsTimer, SIGNAL(timeout()), this, SLOT(processEvents()) ); - connect( fTimeoutTimer, SIGNAL(timeout()), this, SLOT(timeout()) ); - connect( fProgressTimer, SIGNAL(timeout()), this, SLOT( progress()) ); - connect( fRotateLinksTimer, SIGNAL(timeout()), this, SLOT( detect()) ); - connect( this, SIGNAL(finished()), this, SLOT(disconnectDevices()) ); + fProcessEventsTimer = new TQTimer( this ); + fTimeoutTimer = new TQTimer( this ); + fProgressTimer = new TQTimer( this ); + fRotateLinksTimer = new TQTimer( this ); + connect( fProcessEventsTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processEvents()) ); + connect( fTimeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); + connect( fProgressTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( progress()) ); + connect( fRotateLinksTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( detect()) ); + connect( this, TQT_SIGNAL(finished()), this, TQT_SLOT(disconnectDevices()) ); } ProbeDialog::~ProbeDialog() @@ -180,9 +180,9 @@ void ProbeDialog::progress() int ProbeDialog::exec() { mDetected = false; - mUserName = QString(); - mDevice = QString(); - QTimer::singleShot( 0, this, SLOT( startDetection() ) ); + mUserName = TQString(); + mDevice = TQString(); + TQTimer::singleShot( 0, this, TQT_SLOT( startDetection() ) ); return KDialogBase::exec(); } @@ -193,7 +193,7 @@ void ProbeDialog::startDetection() disconnectDevices(); fProgress->setProgress(0); fStatus->setText( i18n("Starting detection...") ); - QTimer::singleShot(0, this, SLOT(processEvents()) ); + TQTimer::singleShot(0, this, TQT_SLOT(processEvents()) ); processEvents(); PilotDaemonDCOP_stub *daemonStub = new PilotDaemonDCOP_stub("kpilotDaemon", "KPilotDaemonIface"); if (daemonStub) { @@ -217,8 +217,8 @@ void ProbeDialog::startDetection() KPilotDeviceLink*link; for (int i=0; i<3; i++) { - QStringList::iterator end(mDevicesToProbe[i].end()); - for (QStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it) + TQStringList::iterator end(mDevicesToProbe[i].end()); + for (TQStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it) { link = new KPilotDeviceLink(); link->setDevice((*it)); @@ -226,7 +226,7 @@ void ProbeDialog::startDetection() DEBUGKPILOT<<"new kpilotDeviceLink for "<<(*it)<<endl; #endif mDeviceLinks[i].append( link ); - connect( link, SIGNAL(deviceReady(KPilotDeviceLink*)), this, SLOT(connection(KPilotDeviceLink*)) ); + connect( link, TQT_SIGNAL(deviceReady(KPilotDeviceLink*)), this, TQT_SLOT(connection(KPilotDeviceLink*)) ); processEvents(); } } @@ -293,7 +293,7 @@ void ProbeDialog::connection( KPilotDeviceLink*lnk) fResultsGroup->setEnabled( true ); enableButtonOK(true); - QTimer::singleShot(0, this, SLOT(retrieveDBList())); + TQTimer::singleShot(0, this, TQT_SLOT(retrieveDBList())); } void ProbeDialog::retrieveDBList() @@ -309,14 +309,14 @@ void ProbeDialog::retrieveDBList() set_long( &buff[1], (*i).creator ); buff[5] = ']'; buff[6] = '\0'; - QString cr( buff ); + TQString cr( buff ); mDBs << cr; - mDBs << QString( (*i).name ); + mDBs << TQString( (*i).name ); } mDBs.sort(); - QString old( QString::null ); - QStringList::Iterator itr = mDBs.begin(); + TQString old( TQString::null ); + TQStringList::Iterator itr = mDBs.begin(); while ( itr != mDBs.end() ) { if ( old == *itr ) { itr = mDBs.remove( itr ); @@ -329,7 +329,7 @@ void ProbeDialog::retrieveDBList() // End sync gracefully, but don't change settings on the handheld. mActiveLink->endSync( KPilotLink::NoUpdate ); - QTimer::singleShot(0, this, SLOT(disconnectDevices())); + TQTimer::singleShot(0, this, TQT_SLOT(disconnectDevices())); } void ProbeDialog::disconnectDevices() { diff --git a/kpilot/kpilot/kpilotProbeDialog.h b/kpilot/kpilot/kpilotProbeDialog.h index be02dff6..ccfa7fee 100644 --- a/kpilot/kpilot/kpilotProbeDialog.h +++ b/kpilot/kpilot/kpilotProbeDialog.h @@ -39,21 +39,21 @@ class QGridLayout; template <class T> class QValueList; template<class Key, class T> class QMap; -typedef QValueList<KPilotDeviceLink*> PilotLinkList; +typedef TQValueList<KPilotDeviceLink*> PilotLinkList; -typedef QMap<QString, KPilotDeviceLink*> PilotLinkMap; +typedef TQMap<TQString, KPilotDeviceLink*> PilotLinkMap; class ProbeDialog : public KDialogBase { Q_OBJECT public: - ProbeDialog(QWidget *p=0L,const char *n=0L); + ProbeDialog(TQWidget *p=0L,const char *n=0L); ~ProbeDialog(); bool detected() const { return mDetected; } - QString userName() const { return mUserName; } - QString device() const { return mDevice; } - QStringList dbs() const { return mDBs; } + TQString userName() const { return mUserName; } + TQString device() const { return mDevice; } + TQStringList dbs() const { return mDBs; } protected slots: @@ -70,33 +70,33 @@ public slots: int exec(); void slotUser1 () { startDetection(); } protected: - QLabel* fInfoText; - QGroupBox* fResultsGroup; - QLabel* fUserLabel; - QLabel* fDeviceLabel; - QLabel* fUser; - QLabel* fDevice; - QGroupBox* fStatusGroup; - QLabel* fStatus; + TQLabel* fInfoText; + TQGroupBox* fResultsGroup; + TQLabel* fUserLabel; + TQLabel* fDeviceLabel; + TQLabel* fUser; + TQLabel* fDevice; + TQGroupBox* fStatusGroup; + TQLabel* fStatus; KProgress* fProgress; - QTimer* fProcessEventsTimer; - QTimer* fTimeoutTimer; - QTimer* fProgressTimer; - QTimer* fRotateLinksTimer; + TQTimer* fProcessEventsTimer; + TQTimer* fTimeoutTimer; + TQTimer* fProgressTimer; + TQTimer* fRotateLinksTimer; protected: - QGridLayout* fResultsGroupLayout; - QGridLayout* fStatusGroupLayout; + TQGridLayout* fResultsGroupLayout; + TQGridLayout* fStatusGroupLayout; - QStringList mDevicesToProbe[3]; + TQStringList mDevicesToProbe[3]; PilotLinkList mDeviceLinks[3]; int mProbeDevicesIndex; KPilotDeviceLink *mActiveLink; bool mDetected; - QString mUserName; - QString mDevice; - QStringList mDBs; + TQString mUserName; + TQString mDevice; + TQStringList mDBs; } ; #endif diff --git a/kpilot/kpilot/kroupware.cc b/kpilot/kpilot/kroupware.cc index fc57b4b5..212df17d 100644 --- a/kpilot/kpilot/kroupware.cc +++ b/kpilot/kpilot/kroupware.cc @@ -30,7 +30,7 @@ #include "options.h" -#include <qfile.h> +#include <tqfile.h> #include <dcopclient.h> #include <ktempfile.h> @@ -71,7 +71,7 @@ void KroupwareSync::cleanupConfig() KConfig* c = KPilotSettings::self()->config(); c->setGroup("todoOptions"); if ( c->hasKey( "CalFileBackup") ) { - QString fn = c->readPathEntry( "CalFileBackup" ); + TQString fn = c->readPathEntry( "CalFileBackup" ); if ( fn != CSL1("empty") ) { c->writePathEntry( "CalFile" ,fn ); c->writeEntry( "CalFileBackup" , "empty" ); @@ -79,7 +79,7 @@ void KroupwareSync::cleanupConfig() } c->setGroup("vcalOptions"); if ( c->hasKey( "CalFileBackup") ) { - QString fn = c->readPathEntry( "CalFileBackup" ); + TQString fn = c->readPathEntry( "CalFileBackup" ); if ( fn != CSL1("empty") ) { c->writePathEntry( "CalFile" ,fn ); c->writeEntry( "CalFileBackup" , "empty" ); @@ -103,14 +103,14 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos ) KConfig*c = KPilotSettings::self()->config(); DCOPClient *client = kapp->dcopClient(); KTempFile tempfile; - QString filename = tempfile.name(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQString filename = tempfile.name(); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; if (!client->call( "kmail" , "KOrganizerSyncIface", - "pullSyncData(QString)", + "pullSyncData(TQString)", data, reply_type, reply_data)) { @@ -125,7 +125,7 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos ) if ( todos ) { logMessage( i18n("Syncing to-dos with KMail" )); c->setGroup("todoOptions"); - QString fn = c->readPathEntry( "CalFile" ); + TQString fn = c->readPathEntry( "CalFile" ); c->writePathEntry( "CalFileBackup" ,fn ); c->writePathEntry( "CalFile" ,filename ); } @@ -134,7 +134,7 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos ) if ( cal ) { logMessage( i18n("Syncing calendar with KMail" )); c->setGroup("vcalOptions"); - QString fn = c->readPathEntry( "CalFile" ); + TQString fn = c->readPathEntry( "CalFile" ); c->writePathEntry( "CalFileBackup" ,fn ); c->writePathEntry( "CalFile" ,filename ); } @@ -149,14 +149,14 @@ void KroupwareSync::start_syncAddWithKMail() logMessage( CSL1("Syncing Addresses with KMail" )); DCOPClient *client = kapp->dcopClient(); KTempFile tempfile; - QString filename = tempfile.name(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQString filename = tempfile.name(); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; if (!client->call( "kmail" , "KMailIface", - "requestAddresses(QString)", + "requestAddresses(TQString)", data, reply_type, reply_data)) { @@ -182,7 +182,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) { if ( !cal && ! todos ) return; - QString filename; + TQString filename; KConfig*c=KPilotSettings::self()->config(); if ( todos ) { logMessage( i18n("Rewriting to-dos to KMail..." )); @@ -195,7 +195,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) logMessage( i18n("Rewriting Calendar to KMail" )); c->setGroup("vcalOptions"); filename = c->readPathEntry( "CalFile" ); - QString tf = c->readPathEntry( "CalFileBackup" ) ; + TQString tf = c->readPathEntry( "CalFileBackup" ) ; c->writePathEntry( "CalFile" , tf ); c->writeEntry( "CalFileBackup" ,"empty"); } @@ -204,13 +204,13 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) logMessage(CSL1("Try to call KMail via DCOP to finish sync...")); // try DCOP connection to KMail DCOPClient *client = kapp->dcopClient(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; if (!client->call( "kmail" /*"korganizer" kmdcop */, "KOrganizerSyncIface", - "pushSyncData(QString)", + "pushSyncData(TQString)", data, reply_type, reply_data)) { @@ -222,7 +222,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos) logMessage(CSL1("Calling over DCOP succeeded")); logMessage(CSL1("Sync to KMail has finished successfully")); } - QFile::remove( filename ); + TQFile::remove( filename ); } } void KroupwareSync::end_syncAddWithKMail() @@ -232,17 +232,17 @@ void KroupwareSync::end_syncAddWithKMail() // TODO!! better config handling (KConfig XT) KConfig*c = KPilotSettings::self()->config(); c->setGroup("Abbrowser-conduit"); - QString filename = c->readPathEntry( "KMailTempFile" ); + TQString filename = c->readPathEntry( "KMailTempFile" ); c->writeEntry( "KMailTempFile" , "empty" ); KPilotSettings::writeConfig(); - QByteArray data, reply_data; - QCString reply_type; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, reply_data; + TQCString reply_type; + TQDataStream arg(data, IO_WriteOnly); arg << filename; - arg << QStringList(); + arg << TQStringList(); if (!client->call( "kmail" , "KMailIface", - "storeAddresses(QString, QStringList)", + "storeAddresses(TQString, TQStringList)", data, reply_type, reply_data)) { @@ -252,7 +252,7 @@ void KroupwareSync::end_syncAddWithKMail() else { logMessage(CSL1("Calling store addresses over DCOP succeeded")); } - //QFile::remove( filename ); + //TQFile::remove( filename ); } void KroupwareSync::end_syncNotesWithKMail() { @@ -262,16 +262,16 @@ void KroupwareSync::end_syncNotesWithKMail() -/* static */ bool KroupwareSync::startKMail(QString *error) +/* static */ bool KroupwareSync::startKMail(TQString *error) { FUNCTIONSETUP; - QCString kmdcop; - QString mess; + TQCString kmdcop; + TQString mess; int pid; return KApplication::startServiceByDesktopName(CSL1("kmail"), - QString::null, + TQString::null, error, &kmdcop, &pid diff --git a/kpilot/kpilot/kroupware.h b/kpilot/kpilot/kroupware.h index 8cce32ea..f7be7180 100644 --- a/kpilot/kpilot/kroupware.h +++ b/kpilot/kpilot/kroupware.h @@ -80,7 +80,7 @@ private: public: /* Try to start KMail. Returns true on success. */ - static bool startKMail(QString *errormessage); + static bool startKMail(TQString *errormessage); } ; #endif diff --git a/kpilot/kpilot/listCat.cc b/kpilot/kpilot/listCat.cc index 281bfe00..6faa3efa 100644 --- a/kpilot/kpilot/listCat.cc +++ b/kpilot/kpilot/listCat.cc @@ -30,13 +30,13 @@ #include "options.h" -#include <qpainter.h> +#include <tqpainter.h> #include <klocale.h> #include "listCat.moc" -ListCategorizer::ListCategorizer(QWidget * parent, +ListCategorizer::ListCategorizer(TQWidget * parent, const char *name) : KListView(parent, name), fStartOpen(false) @@ -45,9 +45,9 @@ ListCategorizer::ListCategorizer(QWidget * parent, setupWidget(); } -ListCategorizer::ListCategorizer(const QStringList & i, +ListCategorizer::ListCategorizer(const TQStringList & i, bool startOpen, - QWidget * parent, + TQWidget * parent, const char *name) : KListView(parent, name), fStartOpen(startOpen) @@ -56,10 +56,10 @@ ListCategorizer::ListCategorizer(const QStringList & i, addCategories(i); } -void ListCategorizer::addCategories(const QStringList & l) +void ListCategorizer::addCategories(const TQStringList & l) { FUNCTIONSETUP; - QStringList::ConstIterator i; + TQStringList::ConstIterator i; for (i = l.begin(); i != l.end(); ++i) { @@ -67,11 +67,11 @@ void ListCategorizer::addCategories(const QStringList & l) } } -QListViewItem *ListCategorizer::addCategory(const QString & name, - const QString & desc) +TQListViewItem *ListCategorizer::addCategory(const TQString & name, + const TQString & desc) { FUNCTIONSETUP; - QListViewItem *m = new QListViewItem(this, name, desc); + TQListViewItem *m = new TQListViewItem(this, name, desc); m->setSelectable(false); m->setOpen(fStartOpen); @@ -90,12 +90,12 @@ void ListCategorizer::setupWidget() setRootIsDecorated(true); } -/* virtual */ bool ListCategorizer::acceptDrag(QDropEvent * event) const +/* virtual */ bool ListCategorizer::acceptDrag(TQDropEvent * event) const { FUNCTIONSETUP; if (!(event->source())) return false; - QListViewItem *p = itemAt(event->pos()); + TQListViewItem *p = itemAt(event->pos()); if (!p) return false; @@ -103,7 +103,7 @@ void ListCategorizer::setupWidget() return true; } -/* virtual */ void ListCategorizer::contentsDropEvent(QDropEvent * e) +/* virtual */ void ListCategorizer::contentsDropEvent(TQDropEvent * e) { FUNCTIONSETUP; cleanDropVisualizer(); @@ -112,8 +112,8 @@ void ListCategorizer::setupWidget() return; e->accept(); - QListViewItem *p = itemAt(e->pos()); - QListViewItem *selection = currentItem(); + TQListViewItem *p = itemAt(e->pos()); + TQListViewItem *selection = currentItem(); if (!p) { @@ -121,7 +121,7 @@ void ListCategorizer::setupWidget() return; } - QListViewItem *category = p->parent(); + TQListViewItem *category = p->parent(); if (!category) { @@ -134,7 +134,7 @@ void ListCategorizer::setupWidget() /* virtual */ void ListCategorizer::startDrag() { FUNCTIONSETUP; - QListViewItem *p = currentItem(); + TQListViewItem *p = currentItem(); if (!p || !p->parent()) return; @@ -142,10 +142,10 @@ void ListCategorizer::setupWidget() KListView::startDrag(); } -QStringList ListCategorizer::listSiblings(const QListViewItem * p, int column) const +TQStringList ListCategorizer::listSiblings(const TQListViewItem * p, int column) const { FUNCTIONSETUP; - QStringList l; + TQStringList l; while (p) { @@ -156,10 +156,10 @@ QStringList ListCategorizer::listSiblings(const QListViewItem * p, int column) c return l; } -QListViewItem *ListCategorizer::findCategory(const QString & category) const +TQListViewItem *ListCategorizer::findCategory(const TQString & category) const { FUNCTIONSETUP; - QListViewItem *p = firstChild(); + TQListViewItem *p = firstChild(); while (p) { @@ -171,24 +171,24 @@ QListViewItem *ListCategorizer::findCategory(const QString & category) const return 0L; } -QListViewItem *ListCategorizer::addItem(const QString & category, - const QString & name, const QString & description) +TQListViewItem *ListCategorizer::addItem(const TQString & category, + const TQString & name, const TQString & description) { FUNCTIONSETUP; - QListViewItem *p = findCategory(category); + TQListViewItem *p = findCategory(category); if (!p) return 0L; - return new QListViewItem(p, name, description); + return new TQListViewItem(p, name, description); } #define RVPAD (4) -RichListViewItem::RichListViewItem(QListViewItem *p, - QString l, +RichListViewItem::RichListViewItem(TQListViewItem *p, + TQString l, int c) : - QListViewItem(p,l) + TQListViewItem(p,l) { FUNCTIONSETUP; @@ -216,7 +216,7 @@ void RichListViewItem::computeHeight(int c) if (!fIsRich[c]) return; - QListView *v = listView(); + TQListView *v = listView(); fRect[c] = v->fontMetrics().boundingRect(v->itemMargin()+RVPAD,0+RVPAD, v->columnWidth(c)-v->itemMargin()-RVPAD,300, @@ -229,7 +229,7 @@ void RichListViewItem::computeHeight(int c) { FUNCTIONSETUP; - QListViewItem::setup(); + TQListViewItem::setup(); int h = height(); @@ -243,8 +243,8 @@ void RichListViewItem::computeHeight(int c) } -/* virtual */ void RichListViewItem::paintCell(QPainter *p, - const QColorGroup &gc, +/* virtual */ void RichListViewItem::paintCell(TQPainter *p, + const TQColorGroup &gc, int column, int width, int alignment) @@ -253,11 +253,11 @@ void RichListViewItem::computeHeight(int c) if ((!column) || (!fIsRich[column])) { - QListViewItem::paintCell(p,gc,column,width,alignment); + TQListViewItem::paintCell(p,gc,column,width,alignment); return; } - QListView *v = listView(); + TQListView *v = listView(); p->eraseRect(0,0,width,height()); p->setBackgroundColor(gc.background()); diff --git a/kpilot/kpilot/listCat.h b/kpilot/kpilot/listCat.h index fd53413b..e2063303 100644 --- a/kpilot/kpilot/listCat.h +++ b/kpilot/kpilot/listCat.h @@ -51,8 +51,8 @@ class QStringList; * ListCategorizer *lc = new ListCategorizer(this,colors); * lc->setColumnText(0,i18n("Color")); * lc->setColumnText(1,i18n("HTML")); - * QListViewItem *stdKDE = lc->addCategory(i18n("Standard KDE")); - * (void) new QListViewItem(stdKDE,i18n("red"),"#FF0000"); + * TQListViewItem *stdKDE = lc->addCategory(i18n("Standard KDE")); + * (void) new TQListViewItem(stdKDE,i18n("red"),"#FF0000"); * @endcode * to set sensible column headers for a list of colors * and their HTML equivalents (although why you would want @@ -73,7 +73,7 @@ public: * startOpen set to false. The parameters * @p parent and @p name are the usual Qt ones. */ - ListCategorizer(QWidget *parent, + ListCategorizer(TQWidget *parent, const char *name = 0); /** * Constructor. @@ -82,9 +82,9 @@ public: * already inserted. In addition, this constructor lets you * specify whether or not startOpen is set. */ - ListCategorizer(const QStringList& categories, + ListCategorizer(const TQStringList& categories, bool startOpen, - QWidget *parent, + TQWidget *parent, const char *name = 0); /** @@ -92,7 +92,7 @@ public: * All the categories are added without descriptions; * use addCategory on a per-category basis for that. */ - void addCategories(const QStringList&); + void addCategories(const TQStringList&); /** * Add a category with name @p name and optional * @p description. This can be useful if you want @@ -100,15 +100,15 @@ public: * refer to this category in the future without * using findCategory(). * - * @return the QListViewItem created for the category + * @return the TQListViewItem created for the category */ - QListViewItem *addCategory(const QString& name, - const QString& description = QString::null); + TQListViewItem *addCategory(const TQString& name, + const TQString& description = TQString::null); /** * Returns the list of names of the categories in * the ListCategorizer. */ - QStringList categories() const + TQStringList categories() const { return listSiblings(firstChild()); } ; @@ -121,18 +121,18 @@ public: * constructor. That way you can also hide more data in * the remaining columns. */ - QListViewItem *addItem(const QString& category, - const QString& name, - const QString& description = QString::null); + TQListViewItem *addItem(const TQString& category, + const TQString& name, + const TQString& description = TQString::null); /** * Returns the list of strings in column @p column under * category @p category. You can do this to get, for example * the names of all the items categorized under a given * category, or, more usefully, set @p column to something * other that 0 (name) or 1 (description) to return the - * QStringList hidden in the non-visible columns. + * TQStringList hidden in the non-visible columns. */ - QStringList items(const QString& category,int column=0) const + TQStringList items(const TQString& category,int column=0) const { return listSiblings(findCategory(category),column); } @@ -143,18 +143,18 @@ public: * since just remembering the pointer addCategory gives * you is faster and uses hardly any memory. */ - QListViewItem *findCategory(const QString& categoryName) const; + TQListViewItem *findCategory(const TQString& categoryName) const; /** * Return the list of strings in column @p column of all siblings * of the given item @p p. If you remembered a pointer to a * category, you can use * @code - * QStringList l = lc->listSiblings(stdKDE->firstChild(),2); + * TQStringList l = lc->listSiblings(stdKDE->firstChild(),2); * @endcode * to get the list of strings in hidden column 2 under * the category you remembered. */ - QStringList listSiblings(const QListViewItem *p,int column=0) const; + TQStringList listSiblings(const TQListViewItem *p,int column=0) const; /** * @return whether new categories are inserted in an @@ -174,7 +174,7 @@ protected: /** * Reimplemented to prevent categories from being dragged. */ - virtual bool acceptDrag (QDropEvent* event) const; + virtual bool acceptDrag (TQDropEvent* event) const; /** * Reimplemented to prevent categories from being dragged. */ @@ -182,7 +182,7 @@ protected: /** * Reimplemented to prevent categories from being dragged. */ - virtual void contentsDropEvent (QDropEvent*); + virtual void contentsDropEvent (TQDropEvent*); @@ -200,13 +200,13 @@ private: class RichListViewItem : public QListViewItem { public: - RichListViewItem(QListViewItem *parent, - QString, + RichListViewItem(TQListViewItem *parent, + TQString, int); virtual ~RichListViewItem(); - virtual void paintCell(QPainter *, - const QColorGroup &, + virtual void paintCell(TQPainter *, + const TQColorGroup &, int column, int width, int alignment); @@ -221,7 +221,7 @@ protected: protected: bool *fIsRich; - QRect *fRect; + TQRect *fRect; int fColumns; } ; diff --git a/kpilot/kpilot/listItems.cc b/kpilot/kpilot/listItems.cc index 1c8315b8..9984f004 100644 --- a/kpilot/kpilot/listItems.cc +++ b/kpilot/kpilot/listItems.cc @@ -30,9 +30,9 @@ #include "options.h" -#include <qstring.h> -#include <qlistbox.h> -#include <qlistview.h> +#include <tqstring.h> +#include <tqlistbox.h> +#include <tqlistview.h> #ifndef _KPILOT_LISTITEMS_H @@ -52,9 +52,9 @@ } #endif -PilotListItem::PilotListItem(const QString & text, +PilotListItem::PilotListItem(const TQString & text, recordid_t pilotid, void *r) : - QListBoxText(text), + TQListBoxText(text), fid(pilotid), fr(r) { @@ -94,8 +94,8 @@ PilotListItem::~PilotListItem() } #endif -PilotCheckListItem::PilotCheckListItem(QListView * parent, const QString & text, recordid_t pilotid, void *r) : - QCheckListItem(parent, text, QCheckListItem::CheckBox), +PilotCheckListItem::PilotCheckListItem(TQListView * parent, const TQString & text, recordid_t pilotid, void *r) : + TQCheckListItem(parent, text, TQCheckListItem::CheckBox), fid(pilotid), fr(r) { @@ -122,7 +122,7 @@ PilotCheckListItem::~PilotCheckListItem() void PilotCheckListItem::stateChange ( bool on) { // FUNCTIONSETUP; - QCheckListItem::stateChange(on); + TQCheckListItem::stateChange(on); } @@ -142,11 +142,11 @@ void PilotCheckListItem::stateChange ( bool on) } #endif -PilotListViewItem::PilotListViewItem( QListView * parent, - QString label1, QString label2, QString label3, QString label4, +PilotListViewItem::PilotListViewItem( TQListView * parent, + TQString label1, TQString label2, TQString label3, TQString label4, recordid_t pilotid, void *r): - QListViewItem(parent, label1, label2, label3, label4, - QString::null, QString::null, QString::null, QString::null), + TQListViewItem(parent, label1, label2, label3, label4, + TQString::null, TQString::null, TQString::null, TQString::null), fid(pilotid), fr(r), d(new PilotListViewItemData) @@ -204,7 +204,7 @@ unsigned long PilotListViewItem::colValue(int col, bool *ok) const return d->val; } -int PilotListViewItem::compare( QListViewItem *i, int col, bool ascending ) const +int PilotListViewItem::compare( TQListViewItem *i, int col, bool ascending ) const { // FUNCTIONSETUP; PilotListViewItem*item=dynamic_cast<PilotListViewItem*>(i); @@ -237,6 +237,6 @@ int PilotListViewItem::compare( QListViewItem *i, int col, bool ascending ) cons return res; } } - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } diff --git a/kpilot/kpilot/listItems.h b/kpilot/kpilot/listItems.h index 914d4b00..4987219f 100644 --- a/kpilot/kpilot/listItems.h +++ b/kpilot/kpilot/listItems.h @@ -3,7 +3,7 @@ ** Copyright (C) 1998-2001 by Dan Pilone ** Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> ** -** This file defines a subclasse of QListBoxText that carries +** This file defines a subclasse of TQListBoxText that carries ** additional information useful for Pilot records. In particular it ** carries an int (for the pilot's uid?) and a void * (for pilotrecord?) */ @@ -32,13 +32,13 @@ #ifndef _KPILOT_LISTITEMS_H #define _KPILOT_LISTITEMS_H -#include <qlistview.h> +#include <tqlistview.h> #include <pi-dlp.h> class PilotListItem : public QListBoxText { public: - PilotListItem(const QString &text, recordid_t pilotid=0, void *r=0); + PilotListItem(const TQString &text, recordid_t pilotid=0, void *r=0); virtual ~PilotListItem(); recordid_t id() const {return fid;}; const void *rec() const {return fr;}; @@ -59,7 +59,7 @@ private: class PilotCheckListItem : public QCheckListItem { public: - PilotCheckListItem( QListView * parent, const QString & text, recordid_t pilotid=0, void *r=0); + PilotCheckListItem( TQListView * parent, const TQString & text, recordid_t pilotid=0, void *r=0); virtual ~PilotCheckListItem(); recordid_t id() const {return fid;}; const void *rec() const {return fr;}; @@ -85,18 +85,18 @@ struct PilotListViewItemData class PilotListViewItem : public QListViewItem { public: - PilotListViewItem( QListView * parent, - QString label1, QString label2 = QString::null, - QString label3 = QString::null, QString label4 = QString::null, + PilotListViewItem( TQListView * parent, + TQString label1, TQString label2 = TQString::null, + TQString label3 = TQString::null, TQString label4 = TQString::null, recordid_t pilotid=0, void *r=0); virtual ~PilotListViewItem(); recordid_t id() const {return fid;}; const void *rec() const {return fr;}; public: void setNumericCol(int col, bool numeric); - int compare( QListViewItem *i, int col, bool ascending ) const; + int compare( TQListViewItem *i, int col, bool ascending ) const; protected: - QValueList<int> numericCols; + TQValueList<int> numericCols; recordid_t fid; void *fr; // Caching to make sorting faster: diff --git a/kpilot/kpilot/logFile.cc b/kpilot/kpilot/logFile.cc index b93b060c..b7868bfd 100644 --- a/kpilot/kpilot/logFile.cc +++ b/kpilot/kpilot/logFile.cc @@ -30,9 +30,9 @@ #include "options.h" -#include <qfile.h> -#include <qtextstream.h> -#include <qdatetime.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqdatetime.h> #include <pi-version.h> @@ -45,7 +45,7 @@ #include "logFile.moc" -LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(false) +LogFile::LogFile() : DCOPObject("LogIface"), TQObject(), fOutfile(0L), fSyncing(false) { FUNCTIONSETUP; } @@ -57,7 +57,7 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f // If a sync is already running (something went wrong then!), close that old log if (fSyncing) logEndSync(); - fOutfile = new QFile(KPilotSettings::logFileName()); + fOutfile = new TQFile(KPilotSettings::logFileName()); if (!fOutfile || !fOutfile->open(IO_WriteOnly)) { @@ -70,21 +70,21 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f fSyncing = true; fLogStream.setDevice(fOutfile); - fLogStream<<(CSL1("KPilot HotSync log, %1").arg(QDateTime::currentDateTime().toString()))<<endl<<endl<<endl; - fLogStream<<(CSL1("Version: KPilot %1").arg(QString::fromLatin1(KPILOT_VERSION)))<<endl; + fLogStream<<(CSL1("KPilot HotSync log, %1").arg(TQDateTime::currentDateTime().toString()))<<endl<<endl<<endl; + fLogStream<<(CSL1("Version: KPilot %1").arg(TQString::fromLatin1(KPILOT_VERSION)))<<endl; fLogStream<<(CSL1("Version: pilot-link %1.%2.%3%4" ) .arg(PILOT_LINK_VERSION).arg(PILOT_LINK_MAJOR).arg(PILOT_LINK_MINOR) #ifdef PILOT_LINK_PATCH - .arg(QString::fromLatin1(PILOT_LINK_PATCH)) + .arg(TQString::fromLatin1(PILOT_LINK_PATCH)) #else - .arg(QString()) + .arg(TQString()) #endif )<<endl; #ifdef KDE_VERSION_STRING - fLogStream<<(CSL1("Version: KDE %1" ).arg(QString::fromLatin1(KDE_VERSION_STRING)) )<<endl; + fLogStream<<(CSL1("Version: KDE %1" ).arg(TQString::fromLatin1(KDE_VERSION_STRING)) )<<endl; #endif #ifdef QT_VERSION_STR - fLogStream<<(CSL1("Version: Qt %1" ).arg(QString::fromLatin1(QT_VERSION_STR)) )<<endl; + fLogStream<<(CSL1("Version: Qt %1" ).arg(TQString::fromLatin1(QT_VERSION_STR)) )<<endl; #endif fLogStream<<endl<<endl; @@ -102,27 +102,27 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f } } -/* DCOP */ ASYNC LogFile::logMessage(QString s) +/* DCOP */ ASYNC LogFile::logMessage(TQString s) { addMessage(s); } -/* DCOP */ ASYNC LogFile::logError(QString s) +/* DCOP */ ASYNC LogFile::logError(TQString s) { addMessage(s); } -/* DCOP */ ASYNC LogFile::logProgress(QString, int) +/* DCOP */ ASYNC LogFile::logProgress(TQString, int) { } -void LogFile::addMessage(const QString & s) +void LogFile::addMessage(const TQString & s) { FUNCTIONSETUP; if ( fSyncing && !s.isEmpty() ) { - fLogStream<<QTime::currentTime().toString()<<" "<<s<<endl; + fLogStream<<TQTime::currentTime().toString()<<" "<<s<<endl; } } diff --git a/kpilot/kpilot/logFile.h b/kpilot/kpilot/logFile.h index 5ed93d43..d710d779 100644 --- a/kpilot/kpilot/logFile.h +++ b/kpilot/kpilot/logFile.h @@ -31,12 +31,12 @@ */ #include "loggerDCOP.h" -#include "qobject.h" +#include "tqobject.h" class QFile; class QTextStream; -class LogFile : public QObject, public LoggerDCOP +class LogFile : public TQObject, public LoggerDCOP { Q_OBJECT @@ -49,16 +49,16 @@ public: */ virtual ASYNC logStartSync(); virtual ASYNC logEndSync(); - virtual ASYNC logError(QString); - virtual ASYNC logMessage(QString); - virtual ASYNC logProgress(QString,int); + virtual ASYNC logError(TQString); + virtual ASYNC logMessage(TQString); + virtual ASYNC logProgress(TQString,int); - void addMessage(const QString &); + void addMessage(const TQString &); private: - QFile*fOutfile; + TQFile*fOutfile; bool fSyncing; - QTextStream fLogStream; + TQTextStream fLogStream; } ; #endif diff --git a/kpilot/kpilot/logWidget.cc b/kpilot/kpilot/logWidget.cc index b64ed4a8..c7bddb61 100644 --- a/kpilot/kpilot/logWidget.cc +++ b/kpilot/kpilot/logWidget.cc @@ -29,18 +29,18 @@ #include "options.h" -#include <qfile.h> -#include <qlayout.h> -#include <qtextedit.h> -#include <qwhatsthis.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qhbox.h> -#include <qtextstream.h> -#include <qpainter.h> +#include <tqfile.h> +#include <tqlayout.h> +#include <tqtextedit.h> +#include <tqwhatsthis.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqhbox.h> +#include <tqtextstream.h> +#include <tqpainter.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -63,9 +63,9 @@ #endif -LogWidget::LogWidget(QWidget * parent) : +LogWidget::LogWidget(TQWidget * parent) : DCOPObject("LogIface"), - PilotComponent(parent, "component_log", QString::null), + PilotComponent(parent, "component_log", TQString::null), fLog(0L), fShowTime(false), fSplash(0L), @@ -74,7 +74,7 @@ LogWidget::LogWidget(QWidget * parent) : fButtonBox(0L) { FUNCTIONSETUP; - QGridLayout *grid = new QGridLayout(this, 4, 4, SPACING); + TQGridLayout *grid = new TQGridLayout(this, 4, 4, SPACING); grid->addRowSpacing(0, SPACING); grid->addRowSpacing(1, 100); @@ -85,42 +85,42 @@ LogWidget::LogWidget(QWidget * parent) : grid->setRowStretch(1, 50); grid->setColStretch(2, 50); - fLog = new QTextEdit(this); + fLog = new TQTextEdit(this); fLog->setReadOnly(true); - fLog->setWordWrap(QTextEdit::WidgetWidth); - fLog->setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary); + fLog->setWordWrap(TQTextEdit::WidgetWidth); + fLog->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); #if QT_VERSION < 0x030100 /* nothing, use AutoText */ #else fLog->setTextFormat(Qt::LogText); #endif - QWhatsThis::add(fLog, i18n("<qt>This lists all the messages received " + TQWhatsThis::add(fLog, i18n("<qt>This lists all the messages received " "during the current HotSync</qt>")); grid->addMultiCellWidget(fLog, 1, 1,1,2); - QString initialText ; + TQString initialText ; initialText.append(CSL1("<b>Version:</b> KPilot %1" TE_EOL) - .arg(QString::fromLatin1(KPILOT_VERSION))); + .arg(TQString::fromLatin1(KPILOT_VERSION))); initialText.append(CSL1("<b>Version:</b> pilot-link %1.%2.%3%4" TE_EOL) .arg(PILOT_LINK_VERSION) .arg(PILOT_LINK_MAJOR) .arg(PILOT_LINK_MINOR) #ifdef PILOT_LINK_PATCH - .arg(QString::fromLatin1(PILOT_LINK_PATCH)) + .arg(TQString::fromLatin1(PILOT_LINK_PATCH)) #else - .arg(QString()) + .arg(TQString()) #endif ); #ifdef KDE_VERSION_STRING initialText.append(CSL1("<b>Version:</b> KDE %1" TE_EOL) - .arg(QString::fromLatin1(KDE_VERSION_STRING))); + .arg(TQString::fromLatin1(KDE_VERSION_STRING))); #endif #ifdef QT_VERSION_STR initialText.append(CSL1("<b>Version:</b> Qt %1" TE_EOL) - .arg(QString::fromLatin1(QT_VERSION_STR))); + .arg(TQString::fromLatin1(QT_VERSION_STR))); #endif initialText.append(CSL1(TE_EOL)); @@ -136,51 +136,51 @@ LogWidget::LogWidget(QWidget * parent) : fLog->setText(initialText); fLog->scrollToBottom(); - QHBox *h = new QHBox(this); + TQHBox *h = new TQHBox(this); h->setSpacing(SPACING); - QPushButton *b = new QPushButton( + TQPushButton *b = new TQPushButton( i18n("Clear the text of HotSync messages","Clear Log"), h); - QWhatsThis::add(b,i18n("<qt>Clears the list of messages from the " + TQWhatsThis::add(b,i18n("<qt>Clears the list of messages from the " "current HotSync.</qt>")); - connect(b,SIGNAL(clicked()),this,SLOT(clearLog())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearLog())); - b = new QPushButton(i18n("Save Log..."),h); - QWhatsThis::add(b,i18n("<qt>You can save the list of messages received " + b = new TQPushButton(i18n("Save Log..."),h); + TQWhatsThis::add(b,i18n("<qt>You can save the list of messages received " "during this HotSync to a file (for example for use in a " "bug report) by clicking here.</qt>")); - connect(b,SIGNAL(clicked()),this,SLOT(saveLog())); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(saveLog())); fButtonBox = h; grid->addMultiCellWidget(h,2,2,1,2); - fLabel = new QLabel(i18n("Sync progress:"),this); + fLabel = new TQLabel(i18n("Sync progress:"),this); grid->addWidget(fLabel,3,1); fProgress = new KProgress(this); - QWhatsThis::add(fProgress,i18n("<qt>The (estimated) percentage " + TQWhatsThis::add(fProgress,i18n("<qt>The (estimated) percentage " "completed in the current HotSync.</qt>")); grid->addWidget(fProgress,3,2); - QString splashPath = + TQString splashPath = KGlobal::dirs()->findResource("data", CSL1("kpilot/kpilot-splash.png")); - if (!splashPath.isEmpty() && QFile::exists(splashPath)) + if (!splashPath.isEmpty() && TQFile::exists(splashPath)) { fLog->hide(); fLabel->hide(); fProgress->hide(); - QPixmap splash(splashPath); - QPainter painter(&splash); - painter.setPen(QColor(0, 255, 0)); + TQPixmap splash(splashPath); + TQPainter painter(&splash); + painter.setPen(TQColor(0, 255, 0)); // This latin1() is ok; KPILOT_VERSION is a #define // of a constant string. int textWidth =fontMetrics().width( - QString::fromLatin1(KPILOT_VERSION)) ; + TQString::fromLatin1(KPILOT_VERSION)) ; int textHeight = fontMetrics().height(); #ifdef DEBUG @@ -197,11 +197,11 @@ LogWidget::LogWidget(QWidget * parent) : black); painter.drawText(splash.width() - 25 - textWidth, splash.height() - 8, - QString::fromLatin1(KPILOT_VERSION)); - fSplash = new QLabel(this); + TQString::fromLatin1(KPILOT_VERSION)); + fSplash = new TQLabel(this); fSplash->setPixmap(splash); fSplash->setAlignment(AlignCenter); - QTimer::singleShot(3000,this,SLOT(hideSplash())); + TQTimer::singleShot(3000,this,TQT_SLOT(hideSplash())); grid->addMultiCellWidget(fSplash,1,3,1,2); grid->addColSpacing(0,10); grid->setColStretch(1,50); @@ -211,18 +211,18 @@ LogWidget::LogWidget(QWidget * parent) : } -void LogWidget::addMessage(const QString & s) +void LogWidget::addMessage(const TQString & s) { FUNCTIONSETUP; if (s.isEmpty()) return; if (!fLog) return; - QString t; + TQString t; if (fShowTime) { t.append(CSL1("<b>")); - t.append(QTime::currentTime().toString()); + t.append(TQTime::currentTime().toString()); t.append(CSL1("</b> ")); } @@ -237,7 +237,7 @@ void LogWidget::addMessage(const QString & s) fLog->scrollToBottom(); } -void LogWidget::addError(const QString & s) +void LogWidget::addError(const TQString & s) { FUNCTIONSETUP; @@ -247,7 +247,7 @@ void LogWidget::addError(const QString & s) if (!fLog) return; - QString t; + TQString t; t.append(CSL1("<i>")); t.append(s); @@ -256,7 +256,7 @@ void LogWidget::addError(const QString & s) addMessage(t); } -void LogWidget::addProgress(const QString &s,int i) +void LogWidget::addProgress(const TQString &s,int i) { FUNCTIONSETUP; @@ -299,17 +299,17 @@ void LogWidget::hideSplash() } -/* DCOP */ ASYNC LogWidget::logMessage(QString s) +/* DCOP */ ASYNC LogWidget::logMessage(TQString s) { addMessage(s); } -/* DCOP */ ASYNC LogWidget::logError(QString s) +/* DCOP */ ASYNC LogWidget::logError(TQString s) { addError(s); } -/* DCOP */ ASYNC LogWidget::logProgress(QString s, int i) +/* DCOP */ ASYNC LogWidget::logProgress(TQString s, int i) { addProgress(s,i); } @@ -328,7 +328,7 @@ void LogWidget::hideSplash() if (fLog) { - fLog->setText(QString::null); + fLog->setText(TQString::null); } } @@ -340,14 +340,14 @@ void LogWidget::hideSplash() while (!finished) { - QString saveFileName = KFileDialog::getSaveFileName( - QString::null, /* default */ + TQString saveFileName = KFileDialog::getSaveFileName( + TQString::null, /* default */ CSL1("*.log"), /* show log files by default */ this, i18n("Save Log")); if (saveFileName.isEmpty()) return; - if (QFile::exists(saveFileName)) + if (TQFile::exists(saveFileName)) { int r = KMessageBox::warningYesNoCancel( this, @@ -369,11 +369,11 @@ void LogWidget::hideSplash() } -bool LogWidget::saveFile(const QString &saveFileName) +bool LogWidget::saveFile(const TQString &saveFileName) { FUNCTIONSETUP; - QFile f(saveFileName); + TQFile f(saveFileName); if (!f.open(IO_WriteOnly)) { int r = KMessageBox::questionYesNo(this, @@ -386,7 +386,7 @@ bool LogWidget::saveFile(const QString &saveFileName) } else { - QTextStream t(&f); + TQTextStream t(&f); t << fLog->text(); } diff --git a/kpilot/kpilot/logWidget.h b/kpilot/kpilot/logWidget.h index 4c89c718..9d99ab53 100644 --- a/kpilot/kpilot/logWidget.h +++ b/kpilot/kpilot/logWidget.h @@ -42,7 +42,7 @@ class LogWidget : public PilotComponent , public LoggerDCOP Q_OBJECT public: - LogWidget(QWidget *); + LogWidget(TQWidget *); ~LogWidget() { } ; // Pilot Component Methods: @@ -53,21 +53,21 @@ public: /** * DCOP interface. */ - virtual ASYNC logError(QString); - virtual ASYNC logMessage(QString); - virtual ASYNC logProgress(QString,int); + virtual ASYNC logError(TQString); + virtual ASYNC logMessage(TQString); + virtual ASYNC logProgress(TQString,int); virtual ASYNC logStartSync(); virtual ASYNC logEndSync(); // GUI customization hooks // // - QHBox *buttonBox() const { return fButtonBox; } ; + TQHBox *buttonBox() const { return fButtonBox; } ; public slots: - void addMessage(const QString &); - void addError(const QString &); - void addProgress(const QString &,int); + void addMessage(const TQString &); + void addError(const TQString &); + void addProgress(const TQString &,int); void syncDone(); private slots: @@ -76,15 +76,15 @@ private slots: void saveLog(); private: - bool saveFile(const QString &); + bool saveFile(const TQString &); private: - QTextEdit *fLog; + TQTextEdit *fLog; bool fShowTime; - QLabel *fSplash; - QLabel *fLabel; + TQLabel *fSplash; + TQLabel *fLabel; KProgress *fProgress; - QHBox *fButtonBox; + TQHBox *fButtonBox; } ; #endif diff --git a/kpilot/kpilot/loggerDCOP.h b/kpilot/kpilot/loggerDCOP.h index 9d846234..3ea3101d 100644 --- a/kpilot/kpilot/loggerDCOP.h +++ b/kpilot/kpilot/loggerDCOP.h @@ -44,13 +44,13 @@ k_dcop: virtual ASYNC logEndSync() = 0 ; // Adds a single message to the log, with formatting // showing it's an error message. - virtual ASYNC logError(QString) = 0 ; + virtual ASYNC logError(TQString) = 0 ; // Adds a regular message. - virtual ASYNC logMessage(QString) = 0 ; + virtual ASYNC logMessage(TQString) = 0 ; // Adds a message if the string is non-null, and // sets the progress bar to @p n%. Limit @p n // to the range 0 .. 100. - virtual ASYNC logProgress(QString,int n) = 0 ; + virtual ASYNC logProgress(TQString,int n) = 0 ; } ; diff --git a/kpilot/kpilot/main-test.cc b/kpilot/kpilot/main-test.cc index ad57bdab..f9c9fe80 100644 --- a/kpilot/kpilot/main-test.cc +++ b/kpilot/kpilot/main-test.cc @@ -36,9 +36,9 @@ #include <time.h> #include <iostream> -#include <qpushbutton.h> -#include <qhbox.h> -#include <qtimer.h> +#include <tqpushbutton.h> +#include <tqhbox.h> +#include <tqtimer.h> #include <kapplication.h> #include <klocale.h> @@ -137,32 +137,32 @@ void connectStack( KPilotLink *l, ActionQueue *a, bool loop = false ) if (l && a) { - QObject::connect(a, SIGNAL(syncDone(SyncAction *)), - l, SLOT(close())); + TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)), + l, TQT_SLOT(close())); if (!loop) { - QObject::connect(a, SIGNAL(syncDone(SyncAction *)), - kapp, SLOT(quit())); + TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)), + kapp, TQT_SLOT(quit())); } else { - QObject::connect(a, SIGNAL(syncDone(SyncAction *)), - l, SLOT(reset())); + TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)), + l, TQT_SLOT(reset())); } - QObject::connect(l, SIGNAL(deviceReady(KPilotLink*)), - a, SLOT(execConduit())); + TQObject::connect(l, TQT_SIGNAL(deviceReady(KPilotLink*)), + a, TQT_SLOT(execConduit())); } } -int exec(const QString &device, const QString &what, KCmdLineArgs *p) +int exec(const TQString &device, const TQString &what, KCmdLineArgs *p) { FUNCTIONSETUP; // get --exec-conduit value if (what.isEmpty()) return 1; - QStringList l; + TQStringList l; l.append(what); SyncAction::SyncMode::Mode syncMode = SyncAction::SyncMode::eHotSync; @@ -181,7 +181,7 @@ int exec(const QString &device, const QString &what, KCmdLineArgs *p) return kapp->exec(); } -int backup(const QString &device, const QString &what, KCmdLineArgs *p) +int backup(const TQString &device, const TQString &what, KCmdLineArgs *p) { FUNCTIONSETUP; KPilotLink *link = createLink( p->isSet("local") ); @@ -196,7 +196,7 @@ int backup(const QString &device, const QString &what, KCmdLineArgs *p) return kapp->exec(); } -int restore(const QString &device, const QString &what, KCmdLineArgs *p) +int restore(const TQString &device, const TQString &what, KCmdLineArgs *p) { FUNCTIONSETUP; KPilotLink *link = createLink( p->isSet("local") ); @@ -211,7 +211,7 @@ int restore(const QString &device, const QString &what, KCmdLineArgs *p) return kapp->exec(); } -int listDB(const QString &device, KCmdLineArgs *p) +int listDB(const TQString &device, KCmdLineArgs *p) { FUNCTIONSETUP; KPilotLink *link = createLink( p->isSet("local") ); @@ -224,7 +224,7 @@ int listDB(const QString &device, KCmdLineArgs *p) return kapp->exec(); } -int check( const QString &device, const QString &what, KCmdLineArgs *p ) +int check( const TQString &device, const TQString &what, KCmdLineArgs *p ) { FUNCTIONSETUP; @@ -265,7 +265,7 @@ void listConduits() // sure that nothing gets listed in both. // // - QValueListIterator < KServiceOffer > availList(offers.begin()); + TQValueListIterator < KServiceOffer > availList(offers.begin()); while (availList != offers.end()) { KSharedPtr < KService > o = (*availList).service(); @@ -283,7 +283,7 @@ void listConduits() } } -int show( const QString &what ) +int show( const TQString &what ) { FUNCTIONSETUP; @@ -377,7 +377,7 @@ int main(int argc, char **argv) Pilot::setupPilotCodec(KPilotSettings::encoding()); - QString device( "/dev/pilot" ); + TQString device( "/dev/pilot" ); if ( p->isSet("port") ) { diff --git a/kpilot/kpilot/memoWidget.cc b/kpilot/kpilot/memoWidget.cc index 0b5e16b4..143167ae 100644 --- a/kpilot/kpilot/memoWidget.cc +++ b/kpilot/kpilot/memoWidget.cc @@ -35,18 +35,18 @@ #include <pi-macros.h> #include <pi-dlp.h> -#include <qdir.h> -#include <qptrlist.h> -#include <qlistbox.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qdom.h> -#include <qtextstream.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qdatetime.h> -#include <qptrlist.h> +#include <tqdir.h> +#include <tqptrlist.h> +#include <tqlistbox.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqdom.h> +#include <tqtextstream.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqdatetime.h> +#include <tqptrlist.h> #include <kapplication.h> #include <kmessagebox.h> @@ -70,12 +70,12 @@ public: ~Private() { KPILOT_DELETE(fMemoAppInfo); } ; PilotMemoInfo *fMemoAppInfo; - QPtrList<PilotMemo> fMemoList; + TQPtrList<PilotMemo> fMemoList; } ; -MemoWidget::MemoWidget(QWidget * parent, - const QString & path) : +MemoWidget::MemoWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_memo", path), fTextWidget(0L), d(new Private()), @@ -221,74 +221,74 @@ void MemoWidget::setupWidget() { FUNCTIONSETUP; - QLabel *label = NULL; - QPushButton *button = NULL; - QGridLayout *grid = new QGridLayout(this, 5, 4, SPACING); - QString wt; + TQLabel *label = NULL; + TQPushButton *button = NULL; + TQGridLayout *grid = new TQGridLayout(this, 5, 4, SPACING); + TQString wt; - fCatList = new QComboBox(this); + fCatList = new TQComboBox(this); grid->addWidget(fCatList, 0, 1); - connect(fCatList, SIGNAL(activated(int)), - this, SLOT(slotSetCategory(int))); - QWhatsThis::add(fCatList, + connect(fCatList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetCategory(int))); + TQWhatsThis::add(fCatList, i18n("Select the category of addresses\n" "to display here.")); (void) i18n("Memos:"); - label = new QLabel(i18n("Category:"), this); + label = new TQLabel(i18n("Category:"), this); label->setBuddy(fCatList); grid->addWidget(label, 0, 0); - fListBox = new QListBox(this); + fListBox = new TQListBox(this); grid->addMultiCellWidget(fListBox, 1, 1, 0, 1); - connect(fListBox, SIGNAL(highlighted(int)), - this, SLOT(slotShowMemo(int))); - connect(fListBox, SIGNAL(selectionChanged()), - this,SLOT(slotUpdateButtons())); - QWhatsThis::add(fListBox, + connect(fListBox, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotShowMemo(int))); + connect(fListBox, TQT_SIGNAL(selectionChanged()), + this,TQT_SLOT(slotUpdateButtons())); + TQWhatsThis::add(fListBox, i18n("This list displays all the memos\n" "in the selected category. Click on\n" "one to display it to the right.")); - label = new QLabel(i18n("Memo text:"), this); + label = new TQLabel(i18n("Memo text:"), this); grid->addWidget(label, 0, 2); fTextWidget = new KTextEdit(this, "textArea"); fTextWidget->setWordWrap(KTextEdit::WidgetWidth); fTextWidget->setTextFormat(Qt::PlainText); grid->addMultiCellWidget(fTextWidget, 1, 4, 2, 2); - QWhatsThis::add(fTextWidget, + TQWhatsThis::add(fTextWidget, i18n("The text of the selected memo appears here.")); fTextWidget->setReadOnly(!KPilotSettings::internalEditors()); - button = new QPushButton(i18n("Import Memo..."), this); + button = new TQPushButton(i18n("Import Memo..."), this); grid->addWidget(button, 2, 0); - connect(button, SIGNAL(clicked()), this, SLOT(slotImportMemo())); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotImportMemo())); wt = KPilotSettings::internalEditors() ? i18n ("Read a text file and add it to the Pilot's memo database.") : i18n("<qt><i>Import is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(button,wt); + TQWhatsThis::add(button,wt); - fExportButton = new QPushButton(i18n("Export Memo..."), this); + fExportButton = new TQPushButton(i18n("Export Memo..."), this); grid->addWidget(fExportButton, 2, 1); - connect(fExportButton, SIGNAL(clicked()), this, - SLOT(slotExportMemo())); - QWhatsThis::add(fExportButton, + connect(fExportButton, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotExportMemo())); + TQWhatsThis::add(fExportButton, i18n("Write the selected memo to a file.")); - fDeleteButton = new QPushButton(i18n("Delete Memo"), this); + fDeleteButton = new TQPushButton(i18n("Delete Memo"), this); grid->addWidget(fDeleteButton, 3, 1); - connect(fDeleteButton, SIGNAL(clicked()), this, - SLOT(slotDeleteMemo())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotDeleteMemo())); wt = KPilotSettings::internalEditors() ? i18n("Delete the selected memo.") : i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ; - QWhatsThis::add(fDeleteButton, wt); + TQWhatsThis::add(fDeleteButton, wt); - button = new QPushButton(i18n("Add Memo"), this); + button = new TQPushButton(i18n("Add Memo"), this); grid->addWidget(button, 3, 0); - connect(button, SIGNAL(clicked()), this, SLOT(slotAddMemo())); - QWhatsThis::add(button,i18n("Add a new memo to the database.")); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddMemo())); + TQWhatsThis::add(button,i18n("Add a new memo to the database.")); } void MemoWidget::slotUpdateButtons() @@ -552,14 +552,14 @@ void MemoWidget::saveChangedMemo() writeMemo(currentMemo); } -/* virtual */ bool MemoWidget::preHotSync(QString &) +/* virtual */ bool MemoWidget::preHotSync(TQString &) { FUNCTIONSETUP; saveChangedMemo(); return true; } -bool MemoWidget::addMemo(const QString &s, int category) +bool MemoWidget::addMemo(const TQString &s, int category) { FUNCTIONSETUP; @@ -591,7 +591,7 @@ void MemoWidget::slotAddMemo() FUNCTIONSETUP; int currentCatID = findSelectedCategory(fCatList, d->fMemoAppInfo->categoryInfo(), true); - addMemo(QDateTime::currentDateTime().toString(), currentCatID); + addMemo(TQDateTime::currentDateTime().toString(), currentCatID); } void MemoWidget::slotImportMemo() @@ -602,11 +602,11 @@ void MemoWidget::slotImportMemo() int currentCatID = findSelectedCategory(fCatList, d->fMemoAppInfo->categoryInfo(), true); - QString fileName = KFileDialog::getOpenFileName(); + TQString fileName = KFileDialog::getOpenFileName(); if (!fileName.isEmpty()) { - QFile importFile(fileName); + TQFile importFile(fileName); if (importFile.open(IO_ReadOnly) == FALSE) { @@ -620,8 +620,8 @@ void MemoWidget::slotImportMemo() return; } - QTextStream stream(&importFile); - QString memoText = stream.read(); + TQTextStream stream(&importFile); + TQString memoText = stream.read(); addMemo(memoText, currentCatID); } } @@ -635,22 +635,22 @@ void MemoWidget::slotExportMemo() if (index == 0) return; - QString data; + TQString data; - const QString filter = CSL1("*|Plain text output\n*.xml|XML output"); - QString fileName; + const TQString filter = CSL1("*|Plain text output\n*.xml|XML output"); + TQString fileName; - KFileDialog kfile( QString::null , filter, fExportButton , "memoSave" , true ); + KFileDialog kfile( TQString::null , filter, fExportButton , "memoSave" , true ); kfile.setOperationMode( KFileDialog::Saving ); - if ( kfile.exec() == QDialog::Accepted ) { + if ( kfile.exec() == TQDialog::Accepted ) { fileName = kfile.selectedFile(); } if (fileName.isEmpty()) return; - QPtrList<PilotListItem> menu_items; + TQPtrList<PilotListItem> menu_items; for (int x = 0; x < index; x++){ if (fListBox->item(x)->isSelected()){ @@ -671,12 +671,12 @@ void MemoWidget::slotExportMemo() return; } -bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem> &memo_list) +bool MemoWidget::saveAsText(const TQString &fileName,const TQPtrList<PilotListItem> &memo_list) { - QFile f( fileName ); - QTextStream stream(&f); + TQFile f( fileName ); + TQTextStream stream(&f); - if ( QFile::exists( fileName ) ) + if ( TQFile::exists( fileName ) ) { if( !f.open(IO_ReadWrite | IO_Append) ) { @@ -691,7 +691,7 @@ bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem } } - QPtrListIterator<PilotListItem> it(memo_list); + TQPtrListIterator<PilotListItem> it(memo_list); for ( ; it.current(); ++it ) { PilotListItem *p = it.current(); @@ -703,12 +703,12 @@ bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem return true; } -bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &memo_list) +bool MemoWidget::saveAsXML(const TQString &fileName,const TQPtrList<PilotListItem> &memo_list) { - QDomDocument doc( CSL1("kpilotmemos") ); - QFile f( fileName ); - QTextStream stream( &f ); - QDomElement memos; + TQDomDocument doc( CSL1("kpilotmemos") ); + TQFile f( fileName ); + TQTextStream stream( &f ); + TQDomElement memos; int append = 0; @@ -755,7 +755,7 @@ bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem> f.close(); // These are temporary, and should be retrieved from the pilot stuff - QString mpilotid; + TQString mpilotid; mpilotid = "1"; // End of temp variables @@ -769,31 +769,31 @@ bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem> doc.appendChild ( memos ); } - QPtrListIterator<PilotListItem> it(memo_list); + TQPtrListIterator<PilotListItem> it(memo_list); for ( ; it.current(); ++it ) { PilotListItem *p = it.current(); PilotMemo *theMemo = (PilotMemo *) p->rec(); - QDomElement memo = doc.createElement( CSL1("memo") ); + TQDomElement memo = doc.createElement( CSL1("memo") ); memo.setAttribute ( CSL1("pilotid") , mpilotid ); memos.appendChild ( memo ); - //QDomElement category = doc.createElement( "category" ); + //TQDomElement category = doc.createElement( "category" ); //head.appendChild ( category ); // - //QDomText categorytext = doc.createTextNode( memo->category() ); + //TQDomText categorytext = doc.createTextNode( memo->category() ); //category.appendChild ( categorytext ); //FIXME - QDomElement title = doc.createElement(CSL1("title" )); + TQDomElement title = doc.createElement(CSL1("title" )); memo.appendChild ( title ); - QDomText titletext = doc.createTextNode( theMemo->shortTitle() ); + TQDomText titletext = doc.createTextNode( theMemo->shortTitle() ); title.appendChild ( titletext ); - QDomText body = doc.createTextNode( theMemo->text() ); + TQDomText body = doc.createTextNode( theMemo->text() ); memo.appendChild ( body ); } if ( !f.open(IO_WriteOnly ) ) return false; diff --git a/kpilot/kpilot/memoWidget.h b/kpilot/kpilot/memoWidget.h index 837d25cd..99657df8 100644 --- a/kpilot/kpilot/memoWidget.h +++ b/kpilot/kpilot/memoWidget.h @@ -44,18 +44,18 @@ class MemoWidget : public PilotComponent Q_OBJECT public: - MemoWidget(QWidget* parent, const QString& dbpath); + MemoWidget(TQWidget* parent, const TQString& dbpath); virtual ~MemoWidget(); // Pilot Component Methods: /* virtual */ void showComponent(); /* virtual */ void hideComponent(); - /* virtual */ bool preHotSync(QString &); + /* virtual */ bool preHotSync(TQString &); /* virtual */ void postHotSync(); // Added by David Bishop, please move to correct location! - bool saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &menu_item ); - bool saveAsText(const QString &fileName,const QPtrList<PilotListItem> &menu_item ); + bool saveAsXML(const TQString &fileName,const TQPtrList<PilotListItem> &menu_item ); + bool saveAsText(const TQString &fileName,const TQPtrList<PilotListItem> &menu_item ); typedef enum { MAX_MEMO_LEN = 8192 @@ -67,7 +67,7 @@ protected: void saveChangedMemo(); - bool addMemo(const QString &text, int category); + bool addMemo(const TQString &text, int category); public slots: /** @@ -97,13 +97,13 @@ private: class Private; - QComboBox* fCatList; + TQComboBox* fCatList; KTextEdit* fTextWidget; Private *d; - QListBox* fListBox; + TQListBox* fListBox; - QPushButton *fExportButton,*fDeleteButton; + TQPushButton *fExportButton,*fDeleteButton; int lastSelectedMemo; }; diff --git a/kpilot/kpilot/pilotComponent.cc b/kpilot/kpilot/pilotComponent.cc index 414db70e..0172a44e 100644 --- a/kpilot/kpilot/pilotComponent.cc +++ b/kpilot/kpilot/pilotComponent.cc @@ -35,8 +35,8 @@ #include <pi-appinfo.h> -#include <qwidget.h> -#include <qcombobox.h> +#include <tqwidget.h> +#include <tqcombobox.h> #include <kdebug.h> @@ -46,10 +46,10 @@ #include "pilotComponent.moc" -PilotComponent::PilotComponent(QWidget * parent, +PilotComponent::PilotComponent(TQWidget * parent, const char *id, - const QString & path) : - QWidget(parent, id), + const TQString & path) : + TQWidget(parent, id), fDBPath(path), shown(false) { @@ -65,7 +65,7 @@ PilotComponent::PilotComponent(QWidget * parent, -int PilotComponent::findSelectedCategory(QComboBox * fCatList, +int PilotComponent::findSelectedCategory(TQComboBox * fCatList, struct CategoryAppInfo *info, bool AllIsUnfiled) { FUNCTIONSETUP; @@ -101,7 +101,7 @@ int PilotComponent::findSelectedCategory(QComboBox * fCatList, } else { - QString selectedCategory = + TQString selectedCategory = fCatList->text(fCatList->currentItem()); currentCatID = Pilot::findCategory(info, selectedCategory, AllIsUnfiled); } @@ -112,7 +112,7 @@ int PilotComponent::findSelectedCategory(QComboBox * fCatList, } -void PilotComponent::populateCategories(QComboBox * c, +void PilotComponent::populateCategories(TQComboBox * c, struct CategoryAppInfo *info) { FUNCTIONSETUP; @@ -165,14 +165,14 @@ void PilotComponent::slotShowComponent() emit showComponent(this); } -/* virtual */ bool PilotComponent::preHotSync(QString &) +/* virtual */ bool PilotComponent::preHotSync(TQString &) { FUNCTIONSETUP; return true; } -void PilotComponent::markDBDirty(const QString db) +void PilotComponent::markDBDirty(const TQString db) { FUNCTIONSETUP; KPilotConfig::addDirtyDatabase(db); diff --git a/kpilot/kpilot/pilotComponent.h b/kpilot/kpilot/pilotComponent.h index f96093a2..01c5a3f3 100644 --- a/kpilot/kpilot/pilotComponent.h +++ b/kpilot/kpilot/pilotComponent.h @@ -32,7 +32,7 @@ /** * Base class for any module to KPilot */ -#include <qwidget.h> +#include <tqwidget.h> struct CategoryAppInfo; class QComboBox; @@ -44,9 +44,9 @@ Q_OBJECT friend class KPilotInstaller; public: - PilotComponent(QWidget* parent, + PilotComponent(TQWidget* parent, const char *id, - const QString& dbPath); + const TQString& dbPath); /** * Called when the component is shown in kpilot. It should @@ -83,7 +83,7 @@ public: * "Can't start HotSync. %1" * where %1 is replaced by s. */ - virtual bool preHotSync(QString &s) ; + virtual bool preHotSync(TQString &s) ; /** * Reload data (possibly changed by the hotsync) etc. etc. @@ -105,7 +105,7 @@ protected: * selected, their ID is returned. If nothing is selected, * behave as if "All" is selected. */ - int findSelectedCategory(QComboBox *, + int findSelectedCategory(TQComboBox *, CategoryAppInfo *, bool AllIsUnfiled=false); @@ -119,12 +119,12 @@ protected: * * If info is a NULL pointer, just put "All" in the combo box. */ - void populateCategories(QComboBox *, + void populateCategories(TQComboBox *, CategoryAppInfo *info=0); - void setDBPath(const QString &path) { fDBPath = path; } ; - const QString& dbPath() const { return fDBPath; } ; - void markDBDirty(const QString db); + void setDBPath(const TQString &path) { fDBPath = path; } ; + const TQString& dbPath() const { return fDBPath; } ; + void markDBDirty(const TQString db); public slots: void slotShowComponent(); @@ -133,7 +133,7 @@ signals: void showComponent(PilotComponent *); private: - QString fDBPath; + TQString fDBPath; protected: bool shown; } ; diff --git a/kpilot/kpilot/pilotDaemon.cc b/kpilot/kpilot/pilotDaemon.cc index 6eea2f7e..6541365d 100644 --- a/kpilot/kpilot/pilotDaemon.cc +++ b/kpilot/kpilot/pilotDaemon.cc @@ -33,9 +33,9 @@ #include <stdlib.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qpixmap.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqpixmap.h> #include <kuniqueapplication.h> #include <kaboutapplication.h> @@ -89,13 +89,13 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : setAcceptDrops(true); } -/* virtual */ void PilotDaemonTray::dragEnterEvent(QDragEnterEvent * e) +/* virtual */ void PilotDaemonTray::dragEnterEvent(TQDragEnterEvent * e) { FUNCTIONSETUP; e->accept(KURLDrag::canDecode(e)); } -/* virtual */ void PilotDaemonTray::dropEvent(QDropEvent * e) +/* virtual */ void PilotDaemonTray::dropEvent(TQDropEvent * e) { FUNCTIONSETUP; @@ -103,7 +103,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : KURLDrag::decode(e, list); - QStringList files; + TQStringList files; for(KURL::List::ConstIterator it = list.begin(); it != list.end(); ++it) { if ((*it).isLocalFile()) @@ -113,7 +113,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : daemon->addInstallFiles(files); } -/* virtual */ void PilotDaemonTray::mousePressEvent(QMouseEvent * e) +/* virtual */ void PilotDaemonTray::mousePressEvent(TQMouseEvent * e) { FUNCTIONSETUP; @@ -134,7 +134,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) : } } -/* virtual */ void PilotDaemonTray::closeEvent(QCloseEvent *) +/* virtual */ void PilotDaemonTray::closeEvent(TQCloseEvent *) { FUNCTIONSETUP; daemon->quitNow(); @@ -150,18 +150,18 @@ void PilotDaemonTray::setupWidget() icons[NotListening] = loadIcon( CSL1("nosync") ); slotShowNotListening(); - QTimer::singleShot(2000,this,SLOT(slotShowNormal())); + TQTimer::singleShot(2000,this,TQT_SLOT(slotShowNormal())); KPopupMenu *menu = contextMenu(); menuKPilotItem = menu->insertItem(i18n("Start &KPilot"), daemon, - SLOT(slotRunKPilot())); + TQT_SLOT(slotRunKPilot())); menuConfigureConduitsItem = menu->insertItem(i18n("&Configure KPilot..."), - daemon, SLOT(slotRunConfig())); + daemon, TQT_SLOT(slotRunConfig())); menu->insertSeparator(); fSyncTypeMenu = new KPopupMenu(menu,"sync_type_menu"); - QString once = i18n("Appended to names of sync types to indicate the sync will happen just one time"," (once)"); + TQString once = i18n("Appended to names of sync types to indicate the sync will happen just one time"," (once)"); #define MI(a) fSyncTypeMenu->insertItem( \ SyncAction::SyncMode::name(SyncAction::SyncMode::a) + once, \ (int)(SyncAction::SyncMode::a)); @@ -181,7 +181,7 @@ void PilotDaemonTray::setupWidget() fSyncTypeMenu->setCheckable(true); fSyncTypeMenu->setItemChecked(0,true); #undef MI - connect(fSyncTypeMenu,SIGNAL(activated(int)),daemon,SLOT(requestSync(int))); + connect(fSyncTypeMenu,TQT_SIGNAL(activated(int)),daemon,TQT_SLOT(requestSync(int))); menu->insertItem(i18n("Next &Sync"),fSyncTypeMenu); KHelpMenu *help = new KHelpMenu(menu,aboutData); @@ -257,12 +257,12 @@ void PilotDaemonTray::startHotSync() changeIcon(Busy); if (!fBlinkTimer) { - fBlinkTimer = new QTimer(this,"blink timer"); + fBlinkTimer = new TQTimer(this,"blink timer"); } if (fBlinkTimer) { - connect(fBlinkTimer,SIGNAL(timeout()), - this,SLOT(slotBusyTimer())); + connect(fBlinkTimer,TQT_SIGNAL(timeout()), + this,TQT_SLOT(slotBusyTimer())); fBlinkTimer->start(750,false); } } @@ -290,7 +290,7 @@ PilotDaemon::PilotDaemon() : fLogStub(new LoggerDCOP_stub("kpilot", "LogIface")), fLogFileStub(new LoggerDCOP_stub("kpilotDaemon", "LogIface")), fKPilotStub(new KPilotDCOP_stub("kpilot", "KPilotIface")), - fTempDevice(QString::null) + fTempDevice(TQString::null) { FUNCTIONSETUP; @@ -305,8 +305,8 @@ PilotDaemon::PilotDaemon() : fInstaller = new FileInstaller; fLogFile = new LogFile; - connect(fInstaller, SIGNAL(filesChanged()), - this, SLOT(slotFilesChanged())); + connect(fInstaller, TQT_SIGNAL(filesChanged()), + this, TQT_SLOT(slotFilesChanged())); fNextSyncType.setMode( KPilotSettings::syncType() ); @@ -328,7 +328,7 @@ PilotDaemon::~PilotDaemon() (void) PilotDatabase::instanceCount(); } -void PilotDaemon::addInstallFiles(const QStringList &l) +void PilotDaemon::addInstallFiles(const TQStringList &l) { FUNCTIONSETUP; @@ -406,7 +406,7 @@ void PilotDaemon::showTray() updateTrayStatus(); } -/* DCOP ASYNC */ void PilotDaemon::setTempDevice(QString d) +/* DCOP ASYNC */ void PilotDaemon::setTempDevice(TQString d) { if ( !d.isEmpty() ){ fTempDevice = d; @@ -509,7 +509,7 @@ void PilotDaemon::showTray() } updateTrayStatus(); - logProgress(QString::null,0); + logProgress(TQString::null,0); } /* DCOP */ void PilotDaemon::stopListening() @@ -528,11 +528,11 @@ void PilotDaemon::showTray() fPilotLink->reset(); } -/* DCOP */ QString PilotDaemon::statusString() +/* DCOP */ TQString PilotDaemon::statusString() { FUNCTIONSETUP; - QString s = CSL1("PilotDaemon="); + TQString s = CSL1("PilotDaemon="); s.append(shortStatusString()); s.append(CSL1("; NextSync=")); @@ -548,9 +548,9 @@ void PilotDaemon::showTray() return s; } -/* DCOP */ QString PilotDaemon::shortStatusString() +/* DCOP */ TQString PilotDaemon::shortStatusString() { - QString s; + TQString s; switch (status()) { @@ -594,16 +594,16 @@ bool PilotDaemon::setupPilotLink() return false; } - QObject::connect(fPilotLink, SIGNAL(deviceReady(KPilotLink*)), - this, SLOT(startHotSync(KPilotLink*))); + TQObject::connect(fPilotLink, TQT_SIGNAL(deviceReady(KPilotLink*)), + this, TQT_SLOT(startHotSync(KPilotLink*))); // connect the signals emitted by the pilotDeviceLink - QObject::connect(fPilotLink, SIGNAL(logError(const QString &)), - this, SLOT(logError(const QString &))); - QObject::connect(fPilotLink, SIGNAL(logMessage(const QString &)), - this, SLOT(logMessage(const QString &))); - QObject::connect(fPilotLink, - SIGNAL(logProgress(const QString &,int)), - this, SLOT(logProgress(const QString &,int))); + TQObject::connect(fPilotLink, TQT_SIGNAL(logError(const TQString &)), + this, TQT_SLOT(logError(const TQString &))); + TQObject::connect(fPilotLink, TQT_SIGNAL(logMessage(const TQString &)), + this, TQT_SLOT(logMessage(const TQString &))); + TQObject::connect(fPilotLink, + TQT_SIGNAL(logProgress(const TQString &,int)), + this, TQT_SLOT(logProgress(const TQString &,int))); return true; @@ -631,7 +631,7 @@ bool PilotDaemon::setupPilotLink() fPostSyncAction |= Quit; break; } - emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() ); + emitDCOPSignal( "kpilotDaemonStatusChanged()", TQByteArray() ); } /* DCOP ASYNC */ void PilotDaemon::requestRegularSyncNext() @@ -671,7 +671,7 @@ bool PilotDaemon::setupPilotLink() i18n("Please press the HotSync button.")); } -/* DCOP ASYNC */ void PilotDaemon::requestSyncType(QString s) +/* DCOP ASYNC */ void PilotDaemon::requestSyncType(TQString s) { FUNCTIONSETUP; @@ -712,36 +712,36 @@ bool PilotDaemon::setupPilotLink() /** * DCOP Functions reporting some status data, e.g. for the kontact plugin. */ -QDateTime PilotDaemon::lastSyncDate() +TQDateTime PilotDaemon::lastSyncDate() { return KPilotSettings::lastSyncTime(); } -static QDict<QString> *conduitNameMap = 0L; +static TQDict<TQString> *conduitNameMap = 0L; static void fillConduitNameMap() { if ( !conduitNameMap ) { - conduitNameMap = new QDict<QString>; + conduitNameMap = new TQDict<TQString>; conduitNameMap->setAutoDelete(true); } conduitNameMap->clear(); - QStringList l = KPilotSettings::installedConduits(); + TQStringList l = KPilotSettings::installedConduits(); // Fill with internal settings. if ( l.find( CSL1("internal_fileinstall") ) != l.end() ) { conduitNameMap->insert( CSL1("internal_fileinstall"), - new QString(i18n("File Installer")) ); + new TQString(i18n("File Installer")) ); } - QStringList::ConstIterator end = l.end(); - for (QStringList::ConstIterator i = l.begin(); i != end; ++i) + TQStringList::ConstIterator end = l.end(); + for (TQStringList::ConstIterator i = l.begin(); i != end; ++i) { if (!conduitNameMap->find(*i)) { - QString readableName = CSL1("<unknown>"); + TQString readableName = CSL1("<unknown>"); KSharedPtr < KService > o = KService::serviceByDesktopName(*i); if (!o) { @@ -751,28 +751,28 @@ static void fillConduitNameMap() { readableName = o->name(); } - conduitNameMap->insert( *i, new QString(readableName) ); + conduitNameMap->insert( *i, new TQString(readableName) ); } } } -QStringList PilotDaemon::configuredConduitList() +TQStringList PilotDaemon::configuredConduitList() { fillConduitNameMap(); - QStringList keys; + TQStringList keys; - QDictIterator<QString> it(*conduitNameMap); + TQDictIterator<TQString> it(*conduitNameMap); for ( ; *it; ++it) { keys << it.currentKey(); } keys.sort(); - QStringList::ConstIterator end = keys.end(); - QStringList result; - for (QStringList::ConstIterator i = keys.begin(); i != end; ++i) + TQStringList::ConstIterator end = keys.end(); + TQStringList result; + for (TQStringList::ConstIterator i = keys.begin(); i != end; ++i) { result << *(conduitNameMap->find(*i)); } @@ -780,16 +780,16 @@ QStringList PilotDaemon::configuredConduitList() return result; } -QString PilotDaemon::logFileName() +TQString PilotDaemon::logFileName() { return KPilotSettings::logFileName(); } -QString PilotDaemon::userName() +TQString PilotDaemon::userName() { return KPilotSettings::userName(); } -QString PilotDaemon::pilotDevice() +TQString PilotDaemon::pilotDevice() { return KPilotSettings::pilotDevice(); } @@ -814,8 +814,8 @@ static KDesktopLockStatus isKDesktopLockRunning() return DCOPError; } - QByteArray data,returnValue; - QCString returnType; + TQByteArray data,returnValue; + TQCString returnType; if (!dcopptr->call("kdesktop","KScreensaverIface","isBlanked()", data,returnType,returnValue,true)) @@ -829,7 +829,7 @@ static KDesktopLockStatus isKDesktopLockRunning() if (returnType == "bool") { bool b; - QDataStream reply(returnValue,IO_ReadOnly); + TQDataStream reply(returnValue,IO_ReadOnly); reply >> b; return (b ? Locked : NotLocked); } @@ -918,7 +918,7 @@ static bool isSyncPossible(ActionQueue *fSyncStack, static void queueInstaller(ActionQueue *fSyncStack, KPilotLink *pilotLink, FileInstaller *fInstaller, - const QStringList &c) + const TQStringList &c) { if (c.findIndex(CSL1("internal_fileinstall")) >= 0) { @@ -935,13 +935,13 @@ static void queueEditors(ActionQueue *fSyncStack, KPilotLink *pilotLink) } static void queueConduits(ActionQueue *fSyncStack, - const QStringList &conduits, + const TQStringList &conduits, SyncAction::SyncMode e) { if (conduits.count() > 0) { fSyncStack->queueConduits(conduits,e); - // QString s = i18n("Conduit flags: "); + // TQString s = i18n("Conduit flags: "); // s.append(ConduitProxy::flagsForMode(e).join(CSL1(" "))); // logMessage(s); } @@ -992,8 +992,8 @@ bool PilotDaemon::shouldBackup() FUNCTIONSETUP; bool pcchanged=false; // If last PC to sync was a different one (implies full sync, normally) - QStringList conduits ; // list of conduits to run - QString s; // a generic string for stuff + TQStringList conduits ; // list of conduits to run + TQString s; // a generic string for stuff #ifdef DEBUG DEBUGKPILOT << fname @@ -1107,23 +1107,23 @@ bool PilotDaemon::shouldBackup() launch: fSyncStack->queueCleanup(); - QObject::connect(fSyncStack, SIGNAL(logError(const QString &)), - this, SLOT(logError(const QString &))); - QObject::connect(fSyncStack, SIGNAL(logMessage(const QString &)), - this, SLOT(logMessage(const QString &))); - QObject::connect(fSyncStack, - SIGNAL(logProgress(const QString &,int)), - this, SLOT(logProgress(const QString &,int))); + TQObject::connect(fSyncStack, TQT_SIGNAL(logError(const TQString &)), + this, TQT_SLOT(logError(const TQString &))); + TQObject::connect(fSyncStack, TQT_SIGNAL(logMessage(const TQString &)), + this, TQT_SLOT(logMessage(const TQString &))); + TQObject::connect(fSyncStack, + TQT_SIGNAL(logProgress(const TQString &,int)), + this, TQT_SLOT(logProgress(const TQString &,int))); - QObject::connect(fSyncStack, SIGNAL(syncDone(SyncAction *)), - this, SLOT(endHotSync())); + TQObject::connect(fSyncStack, TQT_SIGNAL(syncDone(SyncAction *)), + this, TQT_SLOT(endHotSync())); - QTimer::singleShot(0,fSyncStack,SLOT(execConduit())); + TQTimer::singleShot(0,fSyncStack,TQT_SLOT(execConduit())); updateTrayStatus(); } -/* slot */ void PilotDaemon::logMessage(const QString & s) +/* slot */ void PilotDaemon::logMessage(const TQString & s) { FUNCTIONSETUPL(2); @@ -1132,7 +1132,7 @@ launch: updateTrayStatus(s); } -/* slot */ void PilotDaemon::logError(const QString & s) +/* slot */ void PilotDaemon::logError(const TQString & s) { FUNCTIONSETUP; @@ -1141,7 +1141,7 @@ launch: updateTrayStatus(s); } -/* slot */ void PilotDaemon::logProgress(const QString & s, int i) +/* slot */ void PilotDaemon::logProgress(const TQString & s, int i) { FUNCTIONSETUPL(2); @@ -1167,7 +1167,7 @@ launch: getLogger().logEndSync(); getFileLogger().logEndSync(); getKPilot().daemonStatus(KPilotDCOP::EndOfHotSync); - KPilotSettings::setLastSyncTime(QDateTime::currentDateTime()); + KPilotSettings::setLastSyncTime(TQDateTime::currentDateTime()); KPilotSettings::self()->writeConfig(); fDaemonStatus = HOTSYNC_END; @@ -1183,7 +1183,7 @@ launch: } else { - QTimer::singleShot(10000,fPilotLink,SLOT(reset())); + TQTimer::singleShot(10000,fPilotLink,TQT_SLOT(reset())); } fPostSyncAction = None; @@ -1204,12 +1204,12 @@ void PilotDaemon::slotRunKPilot() { FUNCTIONSETUP; - QString kpilotError; - QCString kpilotDCOP; + TQString kpilotError; + TQCString kpilotDCOP; int kpilotPID; if (KApplication::startServiceByDesktopName(CSL1("kpilot"), - QString::null, &kpilotError, &kpilotDCOP, &kpilotPID + TQString::null, &kpilotError, &kpilotDCOP, &kpilotPID #if (KDE_VERSION >= 220) // Startup notification added in 2.2 , "" @@ -1251,8 +1251,8 @@ void PilotDaemon::slotRunConfig() if ( client->isApplicationRegistered( "kpilot" ) ) { - client->send("kpilot", "kpilot-mainwindow#1", "raise()",QString::null); - client->send("kpilot", "KPilotIface", "configure()", QString::null); + client->send("kpilot", "kpilot-mainwindow#1", "raise()",TQString::null); + client->send("kpilot", "KPilotIface", "configure()", TQString::null); } else { @@ -1264,23 +1264,23 @@ void PilotDaemon::slotRunConfig() } } -void PilotDaemon::updateTrayStatus(const QString &s) +void PilotDaemon::updateTrayStatus(const TQString &s) { if (!fTray) return; - QString tipText = CSL1("<qt>"); + TQString tipText = CSL1("<qt>"); tipText.append( s ); tipText.append( CSL1(" ") ); tipText.append( i18n("Next sync is %1.") .arg( fNextSyncType.name() ) ); tipText.append( CSL1("</qt>") ); - QToolTip::remove(fTray); - QToolTip::add(fTray,tipText); - emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() ); + TQToolTip::remove(fTray); + TQToolTip::add(fTray,tipText); + emitDCOPSignal( "kpilotDaemonStatusChanged()", TQByteArray() ); // emit the same dcop signal but including the information needed by Kontact to update its kpilot summary widget - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << lastSyncDate(); arg << shortStatusString(); arg << configuredConduitList(); @@ -1288,7 +1288,7 @@ void PilotDaemon::updateTrayStatus(const QString &s) arg << userName(); arg << pilotDevice(); arg << killDaemonOnExit(); - emitDCOPSignal( "kpilotDaemonStatusDetails(QDateTime,QString,QStringList,QString,QString,QString,bool)", data ); + emitDCOPSignal( "kpilotDaemonStatusDetails(TQDateTime,TQString,TQStringList,TQString,TQString,TQString,bool)", data ); } static KCmdLineOptions daemonoptions[] = { @@ -1342,12 +1342,12 @@ int main(int argc, char **argv) // tell the running kpilotDaemon to use // this device now DCOPClient d; - QString dev(p->getOption("device")); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQString dev(p->getOption("device")); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << dev; if (d.attach()){ - d.send("kpilotDaemon", "KPilotDaemonIface", "setTempDevice(QString)", data ); + d.send("kpilotDaemon", "KPilotDaemonIface", "setTempDevice(TQString)", data ); d.detach(); } } diff --git a/kpilot/kpilot/pilotDaemon.h b/kpilot/kpilot/pilotDaemon.h index c7ccd7ed..d50fa04c 100644 --- a/kpilot/kpilot/pilotDaemon.h +++ b/kpilot/kpilot/pilotDaemon.h @@ -65,8 +65,8 @@ public: void enableRunKPilot(bool); - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); protected: @@ -74,7 +74,7 @@ protected: /** * Menu of sync types. */ - QPopupMenu *fSyncTypeMenu; + TQPopupMenu *fSyncTypeMenu; protected slots: void slotShowAbout(); @@ -86,15 +86,15 @@ protected slots: // "Regular" QT actions // // - virtual void mousePressEvent(QMouseEvent* e); - virtual void closeEvent(QCloseEvent *e); + virtual void mousePressEvent(TQMouseEvent* e); + virtual void closeEvent(TQCloseEvent *e); protected: void startHotSync(); void endHotSync(); private: - QPixmap icons[((int) NotListening) + 1]; + TQPixmap icons[((int) NotListening) + 1]; IconShape fCurrentIcon; PilotDaemon *daemon; @@ -120,11 +120,11 @@ private: /** * Timer for blinking. */ - QTimer *fBlinkTimer; + TQTimer *fBlinkTimer; } ; -class PilotDaemon : public QObject, virtual public PilotDaemonDCOP +class PilotDaemon : public TQObject, virtual public PilotDaemonDCOP { Q_OBJECT @@ -148,8 +148,8 @@ public: }; DaemonStatus status() const { return fDaemonStatus; } ; - /* DCOP */ virtual QString statusString(); - /* DCOP */ virtual QString shortStatusString(); + /* DCOP */ virtual TQString statusString(); + /* DCOP */ virtual TQString shortStatusString(); /** * Display the daemon's system tray icon @@ -157,7 +157,7 @@ public: * setting in the config file) */ void showTray(); - virtual void addInstallFiles(const QStringList &); + virtual void addInstallFiles(const TQStringList &); // The next few functions are the DCOP interface. // Some are also slots. @@ -165,14 +165,14 @@ public: public slots: virtual ASYNC requestSync(int); public: - virtual ASYNC requestSyncType(QString); + virtual ASYNC requestSyncType(TQString); virtual ASYNC requestRegularSyncNext(); virtual int nextSyncType() const; virtual ASYNC requestSyncOptions(bool,bool); virtual ASYNC quitNow(); virtual ASYNC reloadSettings(); - virtual ASYNC setTempDevice(QString d); + virtual ASYNC setTempDevice(TQString d); virtual void stopListening(); virtual void startListening(); @@ -180,11 +180,11 @@ public: /** * Functions reporting same status data, e.g. for the kontact plugin. */ - virtual QDateTime lastSyncDate(); - virtual QStringList configuredConduitList(); - virtual QString logFileName(); - virtual QString userName(); - virtual QString pilotDevice(); + virtual TQDateTime lastSyncDate(); + virtual TQStringList configuredConduitList(); + virtual TQString logFileName(); + virtual TQString userName(); + virtual TQString pilotDevice(); virtual bool killDaemonOnExit(); protected: @@ -201,9 +201,9 @@ protected slots: void startHotSync( KPilotLink* lnk ); void endHotSync(); - void logMessage(const QString &); - void logError(const QString &); - void logProgress(const QString &,int); + void logMessage(const TQString &); + void logError(const TQString &); + void logProgress(const TQString &,int); private: int getPilotSpeed(); @@ -234,7 +234,7 @@ private: /** * Set or change the tooltip displayed by the tray icon. */ - void updateTrayStatus(const QString &s=QString::null); + void updateTrayStatus(const TQString &s=TQString::null); FileInstaller *fInstaller; @@ -272,7 +272,7 @@ private: LoggerDCOP_stub *fLogStub; LoggerDCOP_stub *fLogFileStub; KPilotDCOP_stub *fKPilotStub; - QString fTempDevice; + TQString fTempDevice; }; diff --git a/kpilot/kpilot/pilotDaemonDCOP.h b/kpilot/kpilot/pilotDaemonDCOP.h index 07f92bf6..b56a245b 100644 --- a/kpilot/kpilot/pilotDaemonDCOP.h +++ b/kpilot/kpilot/pilotDaemonDCOP.h @@ -33,8 +33,8 @@ #include <dcopobject.h> -#include <qdatetime.h> -#include <qstringlist.h> +#include <tqdatetime.h> +#include <tqstringlist.h> class PilotDaemonDCOP : virtual public DCOPObject { @@ -53,7 +53,7 @@ k_dcop: * Request a particular kind of sync next; pass in the name * of a sync type instead. */ - virtual ASYNC requestSyncType(QString) = 0; + virtual ASYNC requestSyncType(TQString) = 0; /** Shortcut for using requestSync(1) */ virtual ASYNC requestRegularSyncNext() = 0; /** Query what type is set most recently. */ @@ -67,7 +67,7 @@ k_dcop: */ virtual ASYNC quitNow() = 0; virtual ASYNC reloadSettings() = 0; // Indicate changed config file. - virtual ASYNC setTempDevice(QString d) =0; // use this device + virtual ASYNC setTempDevice(TQString d) =0; // use this device virtual void stopListening() = 0; virtual void startListening() = 0; virtual bool isListening() =0 ; @@ -75,29 +75,29 @@ k_dcop: /** * Functions requesting the status of the daemon. */ - virtual QString statusString() = 0; - virtual QString shortStatusString() = 0; + virtual TQString statusString() = 0; + virtual TQString shortStatusString() = 0; /** * Functions reporting same status data, e.g. for the kontact plugin. */ - virtual QDateTime lastSyncDate() = 0; - virtual QStringList configuredConduitList() = 0; - virtual QString logFileName() = 0; - virtual QString userName() = 0; - virtual QString pilotDevice() = 0; + virtual TQDateTime lastSyncDate() = 0; + virtual TQStringList configuredConduitList() = 0; + virtual TQString logFileName() = 0; + virtual TQString userName() = 0; + virtual TQString pilotDevice() = 0; virtual bool killDaemonOnExit() = 0; /** * Some other useful functionality */ - virtual void addInstallFiles(const QStringList &) = 0; + virtual void addInstallFiles(const TQStringList &) = 0; k_dcop_signals: void kpilotDaemonStatusChanged(); // used to push status information - void kpilotDaemonStatusDetails( QDateTime, QString, QStringList, QString, QString, QString, bool ); + void kpilotDaemonStatusDetails( TQDateTime, TQString, TQStringList, TQString, TQString, TQString, bool ); } ; #endif diff --git a/kpilot/kpilot/syncCalendar.cc b/kpilot/kpilot/syncCalendar.cc index 7587ddeb..802ee354 100644 --- a/kpilot/kpilot/syncCalendar.cc +++ b/kpilot/kpilot/syncCalendar.cc @@ -43,7 +43,7 @@ public: CalendarDumper() {} KCal::CalendarLocal *retrieve(int fd); - KCal::CalendarLocal *retrieve(const QString &filename); + KCal::CalendarLocal *retrieve(const TQString &filename); protected: KCal::CalendarLocal *retrieve(DatebookDB *db); @@ -58,7 +58,7 @@ KCal::CalendarLocal *CalendarDumper::retrieve(int fd) return retrieve(db); } -KCal::CalendarLocal *CalendarDumped::retrieve(const QString &fn) +KCal::CalendarLocal *CalendarDumped::retrieve(const TQString &fn) { PilotLocalDatabase ldb( fn ); DatebookDB db(&ldb); @@ -67,7 +67,7 @@ KCal::CalendarLocal *CalendarDumped::retrieve(const QString &fn) KCal::CalendarLocal *retrieve(DatebookDB *db) { - KCal::CalendarLocal *cal = new CalendarLocal( QString::null ); + KCal::CalendarLocal *cal = new CalendarLocal( TQString::null ); int count = db->db()->recordCount(); diff --git a/kpilot/kpilot/todoEditor.cc b/kpilot/kpilot/todoEditor.cc index 34a3b65d..d7017bb9 100644 --- a/kpilot/kpilot/todoEditor.cc +++ b/kpilot/kpilot/todoEditor.cc @@ -31,11 +31,11 @@ #include "options.h" -#include <qcombobox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtextedit.h> -#include <qcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtextedit.h> +#include <tqcheckbox.h> #include <kdatewidget.h> @@ -45,7 +45,7 @@ TodoEditor::TodoEditor(PilotTodoEntry * p, struct ToDoAppInfo *appInfo, - QWidget * parent, const char *name) : + TQWidget * parent, const char *name) : KDialogBase(parent, name, false, i18n("To-do Editor"), Ok|Cancel), fDeleteOnCancel(p == 0L), fTodo(p), @@ -57,8 +57,8 @@ TodoEditor::TodoEditor(PilotTodoEntry * p, struct ToDoAppInfo *appInfo, setMainWidget(fWidget); fillFields(); - connect(parent, SIGNAL(recordChanged(PilotTodoEntry *)), - this, SLOT(updateRecord(PilotTodoEntry *))); + connect(parent, TQT_SIGNAL(recordChanged(PilotTodoEntry *)), + this, TQT_SLOT(updateRecord(PilotTodoEntry *))); } diff --git a/kpilot/kpilot/todoEditor.h b/kpilot/kpilot/todoEditor.h index d982e3f5..4036ac9b 100644 --- a/kpilot/kpilot/todoEditor.h +++ b/kpilot/kpilot/todoEditor.h @@ -49,7 +49,7 @@ class TodoEditor : public KDialogBase public: TodoEditor(PilotTodoEntry *todo, struct ToDoAppInfo *appInfo, - QWidget *parent, const char *name=0L); + TQWidget *parent, const char *name=0L); ~TodoEditor(); diff --git a/kpilot/kpilot/todoWidget.cc b/kpilot/kpilot/todoWidget.cc index 7f2ec137..4e0e9394 100644 --- a/kpilot/kpilot/todoWidget.cc +++ b/kpilot/kpilot/todoWidget.cc @@ -29,15 +29,15 @@ #include "options.h" -#include <qptrlist.h> +#include <tqptrlist.h> #include <klistview.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtextview.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qtextcodec.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtextview.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqtextcodec.h> #include <kmessagebox.h> @@ -49,7 +49,7 @@ -TodoCheckListItem::TodoCheckListItem(QListView*parent, const QString&text, +TodoCheckListItem::TodoCheckListItem(TQListView*parent, const TQString&text, recordid_t pilotid, void*r):PilotCheckListItem(parent, text, pilotid, r) { @@ -63,8 +63,8 @@ void TodoCheckListItem::stateChange(bool state) -TodoWidget::TodoWidget(QWidget * parent, - const QString & path) : +TodoWidget::TodoWidget(TQWidget * parent, + const TQString & path) : PilotComponent(parent, "component_todo", path), fTodoInfo(0L), fTodoAppInfo(0L), @@ -157,7 +157,7 @@ void TodoWidget::showComponent() updateWidget(); } -/* virtual */ bool TodoWidget::preHotSync(QString &s) +/* virtual */ bool TodoWidget::preHotSync(TQString &s) { FUNCTIONSETUP; @@ -172,7 +172,7 @@ void TodoWidget::showComponent() #if KDE_VERSION<220 s = i18n("There are still %1 to-do editing windows open.") - .arg(QString::number(fPendingTodos)); + .arg(TQString::number(fPendingTodos)); #else s = i18n("There is still a to-do editing window open.", "There are still %n to-do editing windows open.", @@ -207,17 +207,17 @@ void TodoWidget::setupWidget() { FUNCTIONSETUP; - QLabel *label; - QGridLayout *grid = new QGridLayout(this, 6, 4, SPACING); + TQLabel *label; + TQGridLayout *grid = new TQGridLayout(this, 6, 4, SPACING); - fCatList = new QComboBox(this); + fCatList = new TQComboBox(this); grid->addWidget(fCatList, 0, 1); - connect(fCatList, SIGNAL(activated(int)), - this, SLOT(slotSetCategory(int))); - QWhatsThis::add(fCatList, + connect(fCatList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetCategory(int))); + TQWhatsThis::add(fCatList, i18n("<qt>Select the category of to-dos to display here.</qt>")); - label = new QLabel(i18n("Category:"), this); + label = new TQLabel(i18n("Category:"), this); label->setBuddy(fCatList); grid->addWidget(label, 0, 0); @@ -229,57 +229,57 @@ void TodoWidget::setupWidget() fListBox->setItemsMovable( FALSE ); fListBox->setItemsRenameable (TRUE); grid->addMultiCellWidget(fListBox, 1, 1, 0, 1); - connect(fListBox, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(slotShowTodo(QListViewItem*))); - connect(fListBox, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotEditRecord(QListViewItem*))); - connect(fListBox, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotEditRecord(QListViewItem*))); - connect(fListBox, SIGNAL(itemChecked(QCheckListItem*, bool)), - this, SLOT(slotItemChecked(QCheckListItem*, bool))); - connect(fListBox, SIGNAL(itemRenamed(QListViewItem*, const QString &, int)), - this, SLOT(slotItemRenamed(QListViewItem*, const QString &, int))); - QWhatsThis::add(fListBox, + connect(fListBox, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(slotShowTodo(TQListViewItem*))); + connect(fListBox, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotEditRecord(TQListViewItem*))); + connect(fListBox, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotEditRecord(TQListViewItem*))); + connect(fListBox, TQT_SIGNAL(itemChecked(TQCheckListItem*, bool)), + this, TQT_SLOT(slotItemChecked(TQCheckListItem*, bool))); + connect(fListBox, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)), + this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int))); + TQWhatsThis::add(fListBox, i18n("<qt>This list displays all the to-dos " "in the selected category. Click on " "one to display it to the right.</qt>")); - label = new QLabel(i18n("To-do info:"), this); + label = new TQLabel(i18n("To-do info:"), this); grid->addWidget(label, 0, 2); // todo info text view - fTodoInfo = new QTextView(this); + fTodoInfo = new TQTextView(this); grid->addMultiCellWidget(fTodoInfo, 1, 4, 2, 2); - QPushButton *button; - QString wt; + TQPushButton *button; + TQString wt; - fEditButton = new QPushButton(i18n("Edit Record..."), this); + fEditButton = new TQPushButton(i18n("Edit Record..."), this); grid->addWidget(fEditButton, 2, 0); - connect(fEditButton, SIGNAL(clicked()), this, SLOT(slotEditRecord())); + connect(fEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>You can edit a to-do when it is selected.</qt>") : i18n("<qt><i>Editing is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(fEditButton,wt); + TQWhatsThis::add(fEditButton,wt); - button = new QPushButton(i18n("New Record..."), this); + button = new TQPushButton(i18n("New Record..."), this); grid->addWidget(button, 2, 1); - connect(button, SIGNAL(clicked()), this, SLOT(slotCreateNewRecord())); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNewRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Add a new to-do to the to-do list.</qt>") : i18n("<qt><i>Adding new to-dos is disabled by the 'internal editors' setting.</i></qt>"); - QWhatsThis::add(button, wt); + TQWhatsThis::add(button, wt); button->setEnabled(KPilotSettings::internalEditors()); - fDeleteButton = new QPushButton(i18n("Delete Record"), this); + fDeleteButton = new TQPushButton(i18n("Delete Record"), this); grid->addWidget(fDeleteButton, 3, 0); - connect(fDeleteButton, SIGNAL(clicked()), - this, SLOT(slotDeleteRecord())); + connect(fDeleteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteRecord())); wt = KPilotSettings::internalEditors() ? i18n("<qt>Delete the selected to-do from the to-do list.</qt>") : i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ; - QWhatsThis::add(fDeleteButton,wt); + TQWhatsThis::add(fDeleteButton,wt); } void TodoWidget::updateWidget() @@ -306,7 +306,7 @@ void TodoWidget::updateWidget() if ((currentCatID == -1) || (todo->category() == currentCatID)) { - QString title = todo->getDescription(); + TQString title = todo->getDescription(); TodoCheckListItem*item=new TodoCheckListItem(fListBox, title, listIndex, todo); @@ -348,7 +348,7 @@ void TodoWidget::slotEditRecord() { slotEditRecord(fListBox->currentItem()); } -void TodoWidget::slotEditRecord(QListViewItem*item) +void TodoWidget::slotEditRecord(TQListViewItem*item) { FUNCTIONSETUP; if (!shown) return; @@ -369,10 +369,10 @@ void TodoWidget::slotEditRecord(QListViewItem*item) TodoEditor *editor = new TodoEditor(selectedRecord, fTodoAppInfo->info(), this); - connect(editor, SIGNAL(recordChangeComplete(PilotTodoEntry *)), - this, SLOT(slotUpdateRecord(PilotTodoEntry *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotTodoEntry *)), + this, TQT_SLOT(slotUpdateRecord(PilotTodoEntry *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingTodos++; @@ -419,10 +419,10 @@ void TodoWidget::slotCreateNewRecord() TodoEditor *editor = new TodoEditor(0L, fTodoAppInfo->info(), this); - connect(editor, SIGNAL(recordChangeComplete(PilotTodoEntry *)), - this, SLOT(slotAddRecord(PilotTodoEntry *))); - connect(editor, SIGNAL(cancelClicked()), - this, SLOT(slotEditCancelled())); + connect(editor, TQT_SIGNAL(recordChangeComplete(PilotTodoEntry *)), + this, TQT_SLOT(slotAddRecord(PilotTodoEntry *))); + connect(editor, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotEditCancelled())); editor->show(); fPendingTodos++; @@ -512,7 +512,7 @@ void TodoWidget::slotDeleteRecord() -void TodoWidget::slotShowTodo(QListViewItem*item) +void TodoWidget::slotShowTodo(TQListViewItem*item) { FUNCTIONSETUP; if (!shown) return; @@ -525,7 +525,7 @@ void TodoWidget::slotShowTodo(QListViewItem*item) DEBUGKPILOT << fname << ": Showing "<< todo->getDescription()<<endl; #endif - QString text(CSL1("<qt>")); + TQString text(CSL1("<qt>")); text += todo->getTextRepresentation(Qt::RichText); text += CSL1("</qt>\n"); fTodoInfo->setText(text); @@ -584,7 +584,7 @@ void TodoWidget::writeTodo(PilotTodoEntry * which, } } -void TodoWidget::slotItemChecked(QCheckListItem*item, bool on) +void TodoWidget::slotItemChecked(TQCheckListItem*item, bool on) { TodoCheckListItem*p = static_cast<TodoCheckListItem*>(item); if (!p) return; @@ -594,7 +594,7 @@ void TodoWidget::slotItemChecked(QCheckListItem*item, bool on) slotShowTodo(item); } -void TodoWidget::slotItemRenamed(QListViewItem*item, const QString &txt, int nr) +void TodoWidget::slotItemRenamed(TQListViewItem*item, const TQString &txt, int nr) { TodoCheckListItem*p = static_cast<TodoCheckListItem*>(item); if (!p) return; diff --git a/kpilot/kpilot/todoWidget.h b/kpilot/kpilot/todoWidget.h index 14a139e5..18ea1f6d 100644 --- a/kpilot/kpilot/todoWidget.h +++ b/kpilot/kpilot/todoWidget.h @@ -42,14 +42,14 @@ class TodoListView : public KListView { Q_OBJECT public: - TodoListView(QWidget * parent = 0, const char * name = 0 ):KListView(parent, name){}; + TodoListView(TQWidget * parent = 0, const char * name = 0 ):KListView(parent, name){}; ~TodoListView() {}; signals: - void itemChecked(QCheckListItem*item); - void itemChecked(QCheckListItem*item, bool on); + void itemChecked(TQCheckListItem*item); + void itemChecked(TQCheckListItem*item, bool on); //protected: public: - void itemWasChecked(QCheckListItem*item, bool on) { + void itemWasChecked(TQCheckListItem*item, bool on) { emit itemChecked(item); emit itemChecked(item, on); } @@ -58,7 +58,7 @@ public: class TodoCheckListItem : public PilotCheckListItem { public: - TodoCheckListItem(QListView*parent, const QString&text, recordid_t pilotid, void*r); + TodoCheckListItem(TQListView*parent, const TQString&text, recordid_t pilotid, void*r); ~TodoCheckListItem() {}; virtual void stateChange(bool state); }; @@ -68,11 +68,11 @@ class TodoWidget : public PilotComponent Q_OBJECT public: - TodoWidget(QWidget* parent,const QString& dbpath); + TodoWidget(TQWidget* parent,const TQString& dbpath); ~TodoWidget(); // Pilot Component Methods: - virtual bool preHotSync(QString &); + virtual bool preHotSync(TQString &); virtual void postHotSync(); virtual void showComponent(); virtual void hideComponent(); @@ -82,8 +82,8 @@ public slots: * Called when a particular todo is selected. This slot displays * it in the viewer widget. */ - void slotShowTodo(QListViewItem*); - void slotEditRecord(QListViewItem*item); + void slotShowTodo(TQListViewItem*); + void slotEditRecord(TQListViewItem*item); void slotEditRecord(); void slotCreateNewRecord(); void slotDeleteRecord(); @@ -113,8 +113,8 @@ protected slots: void slotSetCategory(int); - void slotItemChecked(QCheckListItem*item, bool on); - void slotItemRenamed(QListViewItem*item, const QString &txt, int nr); + void slotItemChecked(TQCheckListItem*item, bool on); + void slotItemRenamed(TQListViewItem*item, const TQString &txt, int nr); private: void setupWidget(); void updateWidget(); // Called with the lists have changed.. @@ -132,13 +132,13 @@ private: * Create a sensible "title" for an todo, composed * of first + last name if possible. */ - QString createTitle(PilotTodoEntry *,int displayMode); + TQString createTitle(PilotTodoEntry *,int displayMode); /** - * We use a QComboBox fCatList to hold the user-visible names - * of all the categories. The QTextView fTodoInfo is for + * We use a TQComboBox fCatList to hold the user-visible names + * of all the categories. The TQTextView fTodoInfo is for * displaying the currently selected todo, if any. - * The QListView fListBox lists all the todoes in the + * The TQListView fListBox lists all the todoes in the * currently selected category. * * The entire todo database is read into memory in the @@ -151,7 +151,7 @@ private: QComboBox *fCatList; QTextView *fTodoInfo; PilotToDoInfo *fTodoAppInfo; - QPtrList<PilotTodoEntry> fTodoList; + TQPtrList<PilotTodoEntry> fTodoList; TodoListView *fListBox; QPushButton *fEditButton,*fDeleteButton; PilotDatabase *fTodoDB; |