diff options
Diffstat (limited to 'kplato/kptrequestresourcespanel.cc')
-rw-r--r-- | kplato/kptrequestresourcespanel.cc | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/kplato/kptrequestresourcespanel.cc b/kplato/kptrequestresourcespanel.cc index 1996549f..df6b4e2b 100644 --- a/kplato/kptrequestresourcespanel.cc +++ b/kplato/kptrequestresourcespanel.cc @@ -28,15 +28,15 @@ #include <klocale.h> #include <kptcommand.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qstring.h> -#include <qspinbox.h> -#include <qvalidator.h> -#include <qcombobox.h> -#include <qdatetime.h> -#include <qdatetimeedit.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqstring.h> +#include <tqspinbox.h> +#include <tqvalidator.h> +#include <tqcombobox.h> +#include <tqdatetime.h> +#include <tqdatetimeedit.h> namespace KPlato { @@ -62,17 +62,17 @@ void ResourceTableItem::update() { //kdDebug()<<k_funcinfo<<m_resource->name()<<" checked="<<m_checked<<endl; } -void ResourceTableItem::insert(QTable *table, int row) { +void ResourceTableItem::insert(TQTable *table, int row) { //kdDebug()<<k_funcinfo<<endl; - m_checkitem = new QCheckTableItem(table, m_resource->name()); + m_checkitem = new TQCheckTableItem(table, m_resource->name()); m_checkitem->setChecked(m_checked); table->setItem(row, 0, m_checkitem); //kdDebug()<<k_funcinfo<<"Added: '"<<m_resource->name()<<"' checked="<<m_checked<<endl; } -GroupLVItem::GroupLVItem(QListView *parent, ResourceGroup *group, Task &task) - : QListViewItem(parent, group->name(), QString("%1").arg(group->units())), +GroupLVItem::GroupLVItem(TQListView *tqparent, ResourceGroup *group, Task &task) + : TQListViewItem(tqparent, group->name(), TQString("%1").tqarg(group->units())), m_group(group), m_units(0) { @@ -81,12 +81,12 @@ GroupLVItem::GroupLVItem(QListView *parent, ResourceGroup *group, Task &task) if (m_request) { m_units = m_request->units(); } - QPtrListIterator<Resource> it(group->resources()); + TQPtrListIterator<Resource> it(group->resources()); for (; it.current(); ++it) { //kdDebug()<<k_funcinfo<<"resource="<<it.current()->name()<<endl; ResourceRequest *req=0; if (m_request) { - req = m_request->find(it.current()); + req = m_request->tqfind(it.current()); } m_resources.append(new ResourceTableItem(it.current(), req, (bool)req)); } @@ -99,13 +99,13 @@ GroupLVItem::~GroupLVItem() { } void GroupLVItem::update() { - QPtrListIterator<ResourceTableItem> it(m_resources); + TQPtrListIterator<ResourceTableItem> it(m_resources); for (; it.current(); ++it) { it.current()->update(); } } -void GroupLVItem::insert(QTable *table) { +void GroupLVItem::insert(TQTable *table) { // clear the table, must be a better way! for (int i = table->numRows(); i > 0; --i) @@ -113,11 +113,11 @@ void GroupLVItem::insert(QTable *table) { if (m_group->numResources() == 0) { table->setNumRows(1); - table->setItem(0, 0, new QCheckTableItem(table,i18n("None"))); - table->setItem(0, 1, new QComboTableItem(table,i18n("None"))); + table->setItem(0, 0, new TQCheckTableItem(table,i18n("None"))); + table->setItem(0, 1, new TQComboTableItem(table,i18n("None"))); } else { table->setNumRows(m_group->numResources()); - QPtrListIterator<ResourceTableItem> it(m_resources); + TQPtrListIterator<ResourceTableItem> it(m_resources); for (int i = 0; it.current(); ++it, ++i) { it.current()->insert(table, i); } @@ -128,7 +128,7 @@ void GroupLVItem::insert(QTable *table) { int GroupLVItem::numRequests() { //kdDebug()<<k_funcinfo<<endl; int value = m_units; - QPtrListIterator<ResourceTableItem> it(m_resources); + TQPtrListIterator<ResourceTableItem> it(m_resources); for (; it.current(); ++it) { value += it.current()->numRequests(); } @@ -137,7 +137,7 @@ int GroupLVItem::numRequests() { bool GroupLVItem::isNull() const { //kdDebug()<<k_funcinfo<<endl; - QPtrListIterator<ResourceTableItem> it(m_resources); + TQPtrListIterator<ResourceTableItem> it(m_resources); for (; it.current(); ++it) { if (it.current()->isChecked()) return false; @@ -147,8 +147,8 @@ bool GroupLVItem::isNull() const { return true; } -RequestResourcesPanel::RequestResourcesPanel(QWidget *parent, Task &task, bool baseline) - : TaskResourcesPanelBase(parent), +RequestResourcesPanel::RequestResourcesPanel(TQWidget *tqparent, Task &task, bool baseline) + : TaskResourcesPanelBase(tqparent), m_task(task), m_worktime(0), selectedGroup(0), @@ -158,7 +158,7 @@ RequestResourcesPanel::RequestResourcesPanel(QWidget *parent, Task &task, bool b if (p) { m_worktime = p->standardWorktime(); - QPtrListIterator<ResourceGroup> git(p->resourceGroups()); + TQPtrListIterator<ResourceGroup> git(p->resourceGroups()); for(int i=0; git.current(); ++git, ++i) { ResourceGroup *grp = git.current(); GroupLVItem *grpitem = new GroupLVItem(groupList, grp, task); @@ -166,7 +166,7 @@ RequestResourcesPanel::RequestResourcesPanel(QWidget *parent, Task &task, bool b //kdDebug()<<k_funcinfo<<" Added group: "<<grp->name()<<endl; } } - QListViewItem *item = groupList->firstChild(); + TQListViewItem *item = groupList->firstChild(); if (item) { groupList->setSelected(item, true); groupChanged(item); @@ -174,13 +174,13 @@ RequestResourcesPanel::RequestResourcesPanel(QWidget *parent, Task &task, bool b resourceTable->setReadOnly(baseline); - connect(groupList, SIGNAL(selectionChanged(QListViewItem*)), SLOT(groupChanged(QListViewItem*))); - connect(resourceTable, SIGNAL(valueChanged(int, int)), SLOT(resourceChanged(int, int))); -// connect(numUnits, SIGNAL(valueChanged(int)), SLOT(unitsChanged(int))); + connect(groupList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(groupChanged(TQListViewItem*))); + connect(resourceTable, TQT_SIGNAL(valueChanged(int, int)), TQT_SLOT(resourceChanged(int, int))); +// connect(numUnits, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(unitsChanged(int))); } -void RequestResourcesPanel::groupChanged(QListViewItem *item) { +void RequestResourcesPanel::groupChanged(TQListViewItem *item) { //kdDebug()<<k_funcinfo<<endl; GroupLVItem *grp = dynamic_cast<GroupLVItem *>(item); if (grp == 0) @@ -217,10 +217,10 @@ KCommand *RequestResourcesPanel::buildCommand(Part *part) { if (selectedGroup) { selectedGroup->update(); } - QListViewItem *item = groupList->firstChild(); + TQListViewItem *item = groupList->firstChild(); for (; item; item = item->nextSibling()) { GroupLVItem *grp = static_cast<GroupLVItem*>(item); - QPtrListIterator<ResourceTableItem> it = grp->resources(); + TQPtrListIterator<ResourceTableItem> it = grp->resources(); for (; it.current(); ++it) { if (it.current()->isChecked() != it.current()->isOrigChecked()) { if (!cmd) cmd = new KMacroCommand(""); |