summaryrefslogtreecommitdiffstats
path: root/kpilot/kpilot/todoWidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kpilot/kpilot/todoWidget.cc')
-rw-r--r--kpilot/kpilot/todoWidget.cc118
1 files changed, 59 insertions, 59 deletions
diff --git a/kpilot/kpilot/todoWidget.cc b/kpilot/kpilot/todoWidget.cc
index 7f2ec137d..4e0e93944 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;