summaryrefslogtreecommitdiffstats
path: root/kpilot/kpilot/addressWidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kpilot/kpilot/addressWidget.cc')
-rw-r--r--kpilot/kpilot/addressWidget.cc130
1 files changed, 65 insertions, 65 deletions
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,