summaryrefslogtreecommitdiffstats
path: root/kplato
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitb6edfe41c9395f2e20784cbf0e630af6426950a3 (patch)
tree56ed9b871d4296e6c15949c24e16420be1b28697 /kplato
parentef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff)
downloadkoffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz
koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kplato')
-rw-r--r--kplato/kptaccount.cc8
-rw-r--r--kplato/kptaccountspanel.cc2
-rw-r--r--kplato/kptcalendar.h6
-rw-r--r--kplato/kptcanvasitem.cc48
-rw-r--r--kplato/kptcanvasitem.h12
-rw-r--r--kplato/kptcommand.cc4
-rw-r--r--kplato/kptdatetable.cc22
-rw-r--r--kplato/kptdoublelistviewbase.cc4
-rw-r--r--kplato/kptdurationwidget.ui.h4
-rw-r--r--kplato/kpteffortcostmap.h6
-rw-r--r--kplato/kptmap.h18
-rw-r--r--kplato/kptnode.cc32
-rw-r--r--kplato/kptpertcanvas.cc6
-rw-r--r--kplato/kptproject.cc2
-rw-r--r--kplato/kptproject.h10
-rw-r--r--kplato/kptreportview.cc16
-rw-r--r--kplato/kptrequestresourcespanel.cc2
-rw-r--r--kplato/kptresource.cc14
-rw-r--r--kplato/kptresource.h8
-rw-r--r--kplato/kptresourcespanel.cc4
-rw-r--r--kplato/kptresourceview.cc8
-rw-r--r--kplato/kptschedule.cc4
-rw-r--r--kplato/kpttask.cc2
-rw-r--r--kplato/kptwbsdefinition.cc2
24 files changed, 122 insertions, 122 deletions
diff --git a/kplato/kptaccount.cc b/kplato/kptaccount.cc
index f166111c..074189d3 100644
--- a/kplato/kptaccount.cc
+++ b/kplato/kptaccount.cc
@@ -96,7 +96,7 @@ void Account::take(Account *account) {
return;
}
if (account->tqparent() == this) {
- m_accountList.take(m_accountList.tqfindRef(account));
+ m_accountList.take(m_accountList.findRef(account));
} else if (account->tqparent()) {
account->tqparent()->take(account);
} else {
@@ -387,7 +387,7 @@ void Accounts::take(Account *account){
account->tqparent()->take(account);
return;
}
- m_accountList.take(m_accountList.tqfindRef(account));
+ m_accountList.take(m_accountList.findRef(account));
//kdDebug()<<k_funcinfo<<account->name()<<endl;
}
@@ -477,12 +477,12 @@ Account *Accounts::findShutdownAccount(const Node &node) const {
}
Account *Accounts::findAccount(const TQString &id) const {
- return m_idDict.tqfind(id);
+ return m_idDict.find(id);
}
bool Accounts::insertId(const Account *account) {
Q_ASSERT(account);
- Account *a = m_idDict.tqfind(account->name());
+ Account *a = m_idDict.find(account->name());
if (a == 0) {
//kdDebug()<<k_funcinfo<<"'"<<account->name()<<"' inserted"<<endl;
m_idDict.insert(account->name(), account);
diff --git a/kplato/kptaccountspanel.cc b/kplato/kptaccountspanel.cc
index 1d38ac79..a27bd908 100644
--- a/kplato/kptaccountspanel.cc
+++ b/kplato/kptaccountspanel.cc
@@ -151,7 +151,7 @@ void AccountsPanel::addElement(const TQListViewItem *item) {
if (item->tqparent()) {
removeElement(item->tqparent());
}
- m_elements.tqreplace(item->text(0), item);
+ m_elements.replace(item->text(0), item);
//kdDebug()<<k_funcinfo<<item->text(0)<<endl;
refreshDefaultAccount();
}
diff --git a/kplato/kptcalendar.h b/kplato/kptcalendar.h
index 6607ea67..6e35622a 100644
--- a/kplato/kptcalendar.h
+++ b/kplato/kptcalendar.h
@@ -128,9 +128,9 @@ public:
*/
CalendarDay *weekday(int day) const;
CalendarDay *weekday(const TQDate &date) const { return weekday(date.dayOfWeek()-1); }
- CalendarDay *tqreplace(int weekday, CalendarDay *day) {
+ CalendarDay *replace(int weekday, CalendarDay *day) {
CalendarDay *d = m_weekdays.at(weekday);
- m_weekdays.tqreplace(weekday, day);
+ m_weekdays.replace(weekday, day);
return d;
}
IntMap map();
@@ -235,7 +235,7 @@ public:
CalendarDay *findDay(const TQDate &date, bool skipUndefined=false) const;
bool addDay(CalendarDay *day) { return m_days.insert(0, day); }
bool removeDay(CalendarDay *day) { return m_days.removeRef(day); }
- CalendarDay *takeDay(CalendarDay *day) { return m_days.take(m_days.tqfind(day)); }
+ CalendarDay *takeDay(CalendarDay *day) { return m_days.take(m_days.find(day)); }
const TQPtrList<CalendarDay> &days() const { return m_days; }
/**
diff --git a/kplato/kptcanvasitem.cc b/kplato/kptcanvasitem.cc
index bb3ab2ea..fb439945 100644
--- a/kplato/kptcanvasitem.cc
+++ b/kplato/kptcanvasitem.cc
@@ -703,7 +703,7 @@ void GanttViewSummaryItem::insertRelations(GanttView *view)
TQPtrListIterator<Relation> it(m_node->dependChildNodes());
for (; it.current(); ++it)
{
- KDGanttViewItem *child = tqfind(m_view->firstChild(), it.current()->child());
+ KDGanttViewItem *child = find(m_view->firstChild(), it.current()->child());
if (child)
{
KDGanttViewTaskLink *link = new KDGanttViewTaskLink(this, child, kdLinkType(it.current()->type()));
@@ -719,21 +719,21 @@ void GanttViewSummaryItem::insertRelations(GanttView *view)
}
}
-KDGanttViewItem *GanttViewSummaryItem::tqfind(Node *node)
+KDGanttViewItem *GanttViewSummaryItem::find(Node *node)
{
//kdDebug()<<k_funcinfo<<endl;
if (m_node == node)
return this;
- KDGanttViewItem *item = tqfind(firstChild(), node);
+ KDGanttViewItem *item = find(firstChild(), node);
if (item)
return item;
- return tqfind(nextSibling(), node);
+ return find(nextSibling(), node);
}
-KDGanttViewItem *GanttViewSummaryItem::tqfind(KDGanttViewItem *item, Node *node)
+KDGanttViewItem *GanttViewSummaryItem::find(KDGanttViewItem *item, Node *node)
{
if (!item)
return 0;
@@ -741,17 +741,17 @@ KDGanttViewItem *GanttViewSummaryItem::tqfind(KDGanttViewItem *item, Node *node)
if (item->type() == Event)
{
GanttViewEventItem *i = static_cast<GanttViewEventItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
else if (item->type() == Task)
{
GanttViewTaskItem *i = static_cast<GanttViewTaskItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
else if (item->type() == Summary)
{
GanttViewSummaryItem *i = static_cast<GanttViewSummaryItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
return 0;
}
@@ -784,7 +784,7 @@ void GanttViewTaskItem::insertRelations(GanttView *view)
TQPtrListIterator<Relation> it(m_task->dependChildNodes());
for (; it.current(); ++it)
{
- KDGanttViewItem *child = tqfind(m_view->firstChild(), it.current()->child());
+ KDGanttViewItem *child = find(m_view->firstChild(), it.current()->child());
if (child)
{
KDGanttViewTaskLink *link = new KDGanttViewTaskLink(this, child, kdLinkType(it.current()->type()));
@@ -800,21 +800,21 @@ void GanttViewTaskItem::insertRelations(GanttView *view)
}
}
-KDGanttViewItem *GanttViewTaskItem::tqfind(Node *node)
+KDGanttViewItem *GanttViewTaskItem::find(Node *node)
{
//kdDebug()<<k_funcinfo<<endl;
if (m_task == node)
return this;
- KDGanttViewItem *item = tqfind(firstChild(), node);
+ KDGanttViewItem *item = find(firstChild(), node);
if (item)
return item;
- return tqfind(nextSibling(), node);
+ return find(nextSibling(), node);
}
-KDGanttViewItem *GanttViewTaskItem::tqfind(KDGanttViewItem *item, Node *node)
+KDGanttViewItem *GanttViewTaskItem::find(KDGanttViewItem *item, Node *node)
{
if (!item)
return 0;
@@ -822,17 +822,17 @@ KDGanttViewItem *GanttViewTaskItem::tqfind(KDGanttViewItem *item, Node *node)
if (item->type() == Event)
{
GanttViewEventItem *i = static_cast<GanttViewEventItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
else if (item->type() == Task)
{
GanttViewTaskItem *i= static_cast<GanttViewTaskItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
else if (item->type() == Summary)
{
GanttViewSummaryItem *i = static_cast<GanttViewSummaryItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
return 0; // avoid warning
}
@@ -866,7 +866,7 @@ void GanttViewEventItem::insertRelations(GanttView *view)
TQPtrListIterator<Relation> it(m_task->dependChildNodes());
for (; it.current(); ++it)
{
- KDGanttViewItem *child = tqfind(m_view->firstChild(), it.current()->child());
+ KDGanttViewItem *child = find(m_view->firstChild(), it.current()->child());
if (child)
{
KDGanttViewTaskLink *link = new KDGanttViewTaskLink(this, child, kdLinkType(it.current()->type()));
@@ -882,21 +882,21 @@ void GanttViewEventItem::insertRelations(GanttView *view)
}
}
-KDGanttViewItem *GanttViewEventItem::tqfind(Node *node)
+KDGanttViewItem *GanttViewEventItem::find(Node *node)
{
//kdDebug()<<k_funcinfo<<endl;
if (m_task == node)
return this;
- KDGanttViewItem *item = tqfind(firstChild(), node);
+ KDGanttViewItem *item = find(firstChild(), node);
if (item)
return item;
- return tqfind(nextSibling(), node);
+ return find(nextSibling(), node);
}
-KDGanttViewItem *GanttViewEventItem::tqfind(KDGanttViewItem *item, Node *node)
+KDGanttViewItem *GanttViewEventItem::find(KDGanttViewItem *item, Node *node)
{
if (!item)
return 0;
@@ -904,17 +904,17 @@ KDGanttViewItem *GanttViewEventItem::tqfind(KDGanttViewItem *item, Node *node)
if (item->type() == Event)
{
GanttViewEventItem *i = static_cast<GanttViewEventItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
else if (item->type() == Task)
{
GanttViewTaskItem *i = static_cast<GanttViewTaskItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
else if (item->type() == Summary)
{
GanttViewSummaryItem *i = static_cast<GanttViewSummaryItem *>(item);
- return i->tqfind(node);
+ return i->find(node);
}
return 0;
}
diff --git a/kplato/kptcanvasitem.h b/kplato/kptcanvasitem.h
index 3ce3ec96..98d35158 100644
--- a/kplato/kptcanvasitem.h
+++ b/kplato/kptcanvasitem.h
@@ -227,8 +227,8 @@ public:
Node *getNode() { return m_node; }
void insertRelations(GanttView *view);
- KDGanttViewItem *tqfind(Node *node);
- KDGanttViewItem *tqfind(KDGanttViewItem *item, Node *node);
+ KDGanttViewItem *find(Node *node);
+ KDGanttViewItem *find(KDGanttViewItem *item, Node *node);
KDGanttView *ganttView() const { return m_view; }
bool isDrawn() const { return m_drawn; }
void setDrawn(bool drawn) { m_drawn = drawn; }
@@ -249,8 +249,8 @@ public:
KPlato::Task *getTask() const { return m_task; }
void insertRelations(GanttView *view);
- KDGanttViewItem *tqfind(Node *node);
- KDGanttViewItem *tqfind(KDGanttViewItem *item, Node *node);
+ KDGanttViewItem *find(Node *node);
+ KDGanttViewItem *find(KDGanttViewItem *item, Node *node);
KDGanttView *ganttView() const { return m_view; }
bool isDrawn() const { return m_drawn; }
void setDrawn(bool drawn) { m_drawn = drawn; }
@@ -271,8 +271,8 @@ public:
KPlato::Task *getTask() { return m_task; }
void insertRelations(GanttView *view);
- KDGanttViewItem *tqfind(Node *node);
- KDGanttViewItem *tqfind(KDGanttViewItem *item, Node *node);
+ KDGanttViewItem *find(Node *node);
+ KDGanttViewItem *find(KDGanttViewItem *item, Node *node);
KDGanttView *ganttView() const { return m_view; }
bool isDrawn() const { return m_drawn; }
void setDrawn(bool drawn) { m_drawn = drawn; }
diff --git a/kplato/kptcommand.cc b/kplato/kptcommand.cc
index 96efa2f7..364d552d 100644
--- a/kplato/kptcommand.cc
+++ b/kplato/kptcommand.cc
@@ -320,12 +320,12 @@ CalendarModifyWeekdayCmd::~CalendarModifyWeekdayCmd() {
}
void CalendarModifyWeekdayCmd::execute() {
- m_value = m_cal->weekdays()->tqreplace(m_weekday, m_value);
+ m_value = m_cal->weekdays()->replace(m_weekday, m_value);
setSchScheduled(false);
setCommandType(1);
}
void CalendarModifyWeekdayCmd::unexecute() {
- m_value = m_cal->weekdays()->tqreplace(m_weekday, m_value);
+ m_value = m_cal->weekdays()->replace(m_weekday, m_value);
setSchScheduled();
setCommandType(1);
}
diff --git a/kplato/kptdatetable.cc b/kplato/kptdatetable.cc
index 5b25c3a4..f552de26 100644
--- a/kplato/kptdatetable.cc
+++ b/kplato/kptdatetable.cc
@@ -142,7 +142,7 @@ void DateTable::paintWeekday(TQPainter *painter, int col) {
painter->drawRect(0, 0, w, h);
painter->setPen(colorTextHoliday);
}
- if (m_selectedWeekdays.tqcontains(day)) {
+ if (m_selectedWeekdays.contains(day)) {
painter->setPen(backgroundSelectColor);
painter->setBrush(backgroundSelectColor);
painter->drawRect(2, 2, w-4, h-4);
@@ -214,7 +214,7 @@ void DateTable::paintDay(TQPainter *painter, int row, int col) {
painter->setBrush(colorBackgroundWorkday);
painter->drawRect(0, 0, w, h);
}
- if(m_selectedDates.tqcontains(d)) {
+ if(m_selectedDates.contains(d)) {
//kdDebug()<<k_funcinfo<<"Selected: "<<d<<" row,col=("<<row<<","<<col<<")"<<endl;
painter->setPen(backgroundSelectColor);
painter->setBrush(backgroundSelectColor);
@@ -401,7 +401,7 @@ void DateTable::contentsMousePressEvent(TQMouseEvent *e) {
bool select = false;
for(int i=m_dateStartCol; i < col; ++i) {
//kdDebug()<<"Down["<<i<<"]: col="<<col<<" day="<<day<<" column(i)="<<column(i)<<endl;
- if (m_selectedWeekdays.tqcontains(weekday(i))) {
+ if (m_selectedWeekdays.contains(weekday(i))) {
select = true; // we have hit a selected day; select the rest
} else if (select) {
m_selectedWeekdays.toggle(weekday(i)); // select
@@ -411,14 +411,14 @@ void DateTable::contentsMousePressEvent(TQMouseEvent *e) {
select = false;
for(int i=7; i > col; --i) {
//kdDebug()<<"Up["<<i<<"]: col="<<col<<" day="<<day<<" column(i)="<<column(i)<<endl;
- if (m_selectedWeekdays.tqcontains(weekday(i))) {
+ if (m_selectedWeekdays.contains(weekday(i))) {
if (selected) m_selectedWeekdays.toggle(weekday(i)); // deselect
else select = true;
} else if (select) {
m_selectedWeekdays.toggle(weekday(i)); // select
}
}
- if (!m_selectedWeekdays.tqcontains(day)) {
+ if (!m_selectedWeekdays.contains(day)) {
m_selectedWeekdays.toggle(day); // always select
}
} else if (e->state() & ControlButton) {
@@ -556,7 +556,7 @@ bool DateTable::setDate(const TQDate& date_, bool tqrepaint) {
setWeekNumbers(d.addDays(d.daysInMonth()-1));
}
/* if (m_selectedWeekdays.isEmpty() &&
- !m_selectedDates.isEmpty() && !m_selectedDates.tqcontains(date))
+ !m_selectedDates.isEmpty() && !m_selectedDates.contains(date))
{
//kdDebug()<<k_funcinfo<<"date inserted"<<endl;
m_selectedDates.insert(date);
@@ -618,8 +618,8 @@ void DateTable::updateSelectedCells() {
TQDate dt(date.year(), date.month(), 1);
dt = dt.addDays(-firstday);
for (int pos=0; pos < 42; ++pos) {
- if (m_selectedDates.tqcontains(dt.addDays(pos)) ||
- m_selectedWeekdays.tqcontains(pos%7+1))
+ if (m_selectedDates.contains(dt.addDays(pos)) ||
+ m_selectedWeekdays.contains(pos%7+1))
{
updateCell(pos/7+1, pos%7+1);
//kdDebug()<<k_funcinfo<<" update cell ("<<pos/7+1<<","<<pos%7+1<<") date="<<dt.addDays(pos).toString()<<endl;
@@ -631,8 +631,8 @@ void DateTable::updateMarkedCells() {
TQDate dt(date.year(), date.month(), 1);
dt = dt.addDays(-firstday);
for (int pos=0; pos < 42; ++pos) {
- if (m_markedDates.tqcontains(dt.addDays(pos)) ||
- m_markedWeekdays.tqcontains(pos%7+1))
+ if (m_markedDates.contains(dt.addDays(pos)) ||
+ m_markedWeekdays.contains(pos%7+1))
{
updateCell(pos/7+1, pos%7+1);
//kdDebug()<<k_funcinfo<<" update cell ("<<pos/7+1<<","<<pos%7+1<<") date="<<dt.addDays(pos).toString()<<endl;
@@ -649,7 +649,7 @@ void DateTable::setMarkedWeekdays(const IntMap days) {
}
bool DateTable::weekdayMarked(int day) {
- return m_markedWeekdays.tqcontains(day);
+ return m_markedWeekdays.contains(day);
}
bool DateTable::dateMarked(TQDate date) {
diff --git a/kplato/kptdoublelistviewbase.cc b/kplato/kptdoublelistviewbase.cc
index 5a41776b..5eb411d8 100644
--- a/kplato/kptdoublelistviewbase.cc
+++ b/kplato/kptdoublelistviewbase.cc
@@ -130,7 +130,7 @@ void DoubleListViewBase::SlaveListItem::setColumn(int col, double value) {
if (col < listView()->columns()) {
//setText(col, TQString("%1").tqarg(value, m_fieldwidth, m_fmt, m_prec));
setText(col, KGlobal::locale()->formatNumber(value, m_prec));
- m_valueMap.tqreplace(col, value);
+ m_valueMap.replace(col, value);
//kdDebug()<<k_funcinfo<<m_masterItem->text(0)<<": column["<<col<<"]="<<value<<endl;
}
}
@@ -143,7 +143,7 @@ void DoubleListViewBase::SlaveListItem::paintCell(TQPainter *p, const TQColorGro
//kdDebug()<<k_funcinfo<<"c="<<column<<endl;
TQColorGroup g = cg;
if (m_highlight) {
- if (m_limitMap.tqcontains(column)) {
+ if (m_limitMap.contains(column)) {
if (m_valueMap[column] > m_limitMap[column]) {
g.setColor(TQColorGroup::Text, TQColor(red));
} else if (m_valueMap[column] < m_limitMap[column]) {
diff --git a/kplato/kptdurationwidget.ui.h b/kplato/kptdurationwidget.ui.h
index 2bf5b033..4380c92e 100644
--- a/kplato/kptdurationwidget.ui.h
+++ b/kplato/kptdurationwidget.ui.h
@@ -321,7 +321,7 @@ void DurationWidget::handleLostFocus(
v = v - (tmp.toUInt() * leftScale);
newValue = KGlobal::locale()->formatNumber(v);
}
- int point = newValue.tqfind(m_decimalPoint);
+ int point = newValue.find(m_decimalPoint);
if (point != -1)
{
//HACK doubles may be rounded(at fractions > 6 digits on my system)
@@ -437,7 +437,7 @@ double DurationWidget::power(double m, int e) {
}
double DurationWidget::fraction(TQString number, int *exp) {
- int point = number.tqfind(m_decimalPoint);
+ int point = number.find(m_decimalPoint);
if (point == -1) {
return 0.0;
}
diff --git a/kplato/kpteffortcostmap.h b/kplato/kpteffortcostmap.h
index 7910adb5..7936fb02 100644
--- a/kplato/kpteffortcostmap.h
+++ b/kplato/kpteffortcostmap.h
@@ -79,7 +79,7 @@ public:
kdError()<<k_funcinfo<<"Date not valid"<<endl;
return ec;
}
- EffortCostDayMap::const_iterator it = m_days.tqfind(date);
+ EffortCostDayMap::const_iterator it = m_days.find(date);
if (it != m_days.end())
ec = it.data();
return ec;
@@ -148,7 +148,7 @@ public:
kdError()<<k_funcinfo<<"Date not valid"<<endl;
return 0.0;
}
- if (m_days.tqcontains(date)) {
+ if (m_days.contains(date)) {
return m_days[date].cost();
}
return 0.0;
@@ -158,7 +158,7 @@ public:
kdError()<<k_funcinfo<<"Date not valid"<<endl;
return Duration::zeroDuration;
}
- if (m_days.tqcontains(date)) {
+ if (m_days.contains(date)) {
return m_days[date].effort();
}
return Duration::zeroDuration;
diff --git a/kplato/kptmap.h b/kplato/kptmap.h
index f21612c3..134eeac7 100644
--- a/kplato/kptmap.h
+++ b/kplato/kptmap.h
@@ -43,7 +43,7 @@ public:
DateMap() {}
virtual ~DateMap() {}
- virtual bool tqcontains(TQDate date) const { return DateMapType::tqcontains(date.toString(Qt::ISODate)); }
+ virtual bool contains(TQDate date) const { return DateMapType::contains(date.toString(Qt::ISODate)); }
void insert(TQString date, int state=Map::NonWorking) {
//kdDebug()<<k_funcinfo<<date<<"="<<state<<endl;
@@ -60,7 +60,7 @@ public:
}
int state(TQString date) {
- DateMapType::iterator it = tqfind(date);
+ DateMapType::iterator it = find(date);
if (it == end()) return 0;
else return it.data();
}
@@ -76,7 +76,7 @@ public:
// boolean use
void toggle(TQString date, int state=Map::NonWorking) {
//kdDebug()<<k_funcinfo<<date<<"="<<state<<endl;
- if (DateMapType::tqcontains(date))
+ if (DateMapType::contains(date))
DateMapType::remove(date);
else
DateMapType::insert(date, state);
@@ -84,7 +84,7 @@ public:
void toggle(TQDate date, int state=Map::NonWorking) { return toggle(date.toString(Qt::ISODate)); }
void toggleClear(TQString date, int state=Map::NonWorking) {
//kdDebug()<<k_funcinfo<<date<<"="<<state<<endl;
- bool s = DateMapType::tqcontains(date);
+ bool s = DateMapType::contains(date);
clear();
if (!s) insert(date, state);
}
@@ -105,7 +105,7 @@ public:
IntMapType::insert(key, state); }
virtual int state(int key) {
- IntMapType::iterator it = IntMapType::tqfind(key);
+ IntMapType::iterator it = IntMapType::find(key);
if (it == IntMapType::end()) return 0;
else return it.data();
}
@@ -118,9 +118,9 @@ public:
}
// boolean use
- void toggle(int key, int state=Map::NonWorking) { IntMapType::tqcontains(key) ? remove(key) : insert(key, state); }
+ void toggle(int key, int state=Map::NonWorking) { IntMapType::contains(key) ? remove(key) : insert(key, state); }
void toggleClear(int key, int state=Map::NonWorking) {
- bool s =tqcontains(key);
+ bool s =contains(key);
clear();
if (!s) insert(key, state);
}
@@ -129,8 +129,8 @@ public:
class WeekMap : public IntMap
{
public:
- bool tqcontains(int week, int year) { return IntMap::tqcontains(week*10000 + year); }
- bool tqcontains(TQPair<int,int> week) { return tqcontains(week.first, week.second); }
+ bool contains(int week, int year) { return IntMap::contains(week*10000 + year); }
+ bool contains(TQPair<int,int> week) { return contains(week.first, week.second); }
void insert(int week, int year, int state=Map::NonWorking) {
if (week < 1 || week > 53) { kdError()<<k_funcinfo<<"Illegal week number: "<<week<<endl; return; }
diff --git a/kplato/kptnode.cc b/kplato/kptnode.cc
index e8c25312..aaa770f0 100644
--- a/kplato/kptnode.cc
+++ b/kplato/kptnode.cc
@@ -118,8 +118,8 @@ Node *Node::projectNode() {
}
void Node::delChildNode( Node *node, bool remove) {
- //kdDebug()<<k_funcinfo<<"tqfind="<<m_nodes.tqfindRef(node)<<endl;
- if ( m_nodes.tqfindRef(node) != -1 ) {
+ //kdDebug()<<k_funcinfo<<"find="<<m_nodes.findRef(node)<<endl;
+ if ( m_nodes.findRef(node) != -1 ) {
if(remove)
m_nodes.remove();
else
@@ -149,7 +149,7 @@ void Node::insertChildNode( unsigned int index, Node *node) {
void Node::addChildNode( Node *node, Node *after) {
//kdDebug()<<k_funcinfo<<endl;
- int index = m_nodes.tqfindRef(after);
+ int index = m_nodes.findRef(after);
if (index == -1) {
//kdDebug()<<k_funcinfo<<"append id="<<node->id()<<": "<<node->name()<<endl;
m_nodes.append(node);
@@ -163,7 +163,7 @@ void Node::addChildNode( Node *node, Node *after) {
int Node::findChildNode( Node* node )
{
- return m_nodes.tqfindRef( node );
+ return m_nodes.findRef( node );
}
@@ -201,7 +201,7 @@ void Node::insertDependChildNode( unsigned int index, Node *node, Relation::Type
}
bool Node::addDependChildNode( Relation *relation) {
- if(m_dependChildNodes.tqfindRef(relation) != -1)
+ if(m_dependChildNodes.findRef(relation) != -1)
return false;
m_dependChildNodes.append(relation);
return true;
@@ -209,7 +209,7 @@ bool Node::addDependChildNode( Relation *relation) {
// These delDepend... methods look suspicious to me, can someone review?
void Node::delDependChildNode( Node *node, bool remove) {
- if ( m_nodes.tqfindRef(node) != -1 ) {
+ if ( m_nodes.findRef(node) != -1 ) {
if(remove)
m_dependChildNodes.remove();
else
@@ -218,7 +218,7 @@ void Node::delDependChildNode( Node *node, bool remove) {
}
void Node::delDependChildNode( Relation *rel, bool remove) {
- if ( m_dependChildNodes.tqfindRef(rel) != -1 ) {
+ if ( m_dependChildNodes.findRef(rel) != -1 ) {
if(remove)
m_dependChildNodes.remove();
else
@@ -234,7 +234,7 @@ void Node::delDependChildNode( int number, bool remove) {
}
void Node::takeDependChildNode(Relation *rel) {
- if (m_dependChildNodes.tqfindRef(rel) != -1) {
+ if (m_dependChildNodes.findRef(rel) != -1) {
m_dependChildNodes.take();
}
}
@@ -260,7 +260,7 @@ void Node::insertDependParentNode( unsigned int index, Node *node, Relation::Typ
}
bool Node::addDependParentNode( Relation *relation) {
- if(m_dependParentNodes.tqfindRef(relation) != -1)
+ if(m_dependParentNodes.findRef(relation) != -1)
return false;
m_dependParentNodes.append(relation);
return true;
@@ -268,7 +268,7 @@ bool Node::addDependParentNode( Relation *relation) {
// These delDepend... methods look suspicious to me, can someone review?
void Node::delDependParentNode( Node *node, bool remove) {
- if ( m_nodes.tqfindRef(node) != -1 ) {
+ if ( m_nodes.findRef(node) != -1 ) {
if(remove)
m_dependParentNodes.remove();
else
@@ -277,7 +277,7 @@ void Node::delDependParentNode( Node *node, bool remove) {
}
void Node::delDependParentNode( Relation *rel, bool remove) {
- if ( m_dependParentNodes.tqfindRef(rel) != -1 ) {
+ if ( m_dependParentNodes.findRef(rel) != -1 ) {
if(remove)
m_dependParentNodes.remove();
else
@@ -293,13 +293,13 @@ void Node::delDependParentNode( int number, bool remove) {
}
void Node::takeDependParentNode(Relation *rel) {
- if (m_dependParentNodes.tqfindRef(rel) != -1) {
+ if (m_dependParentNodes.findRef(rel) != -1) {
rel = m_dependParentNodes.take();
}
}
bool Node::isParentOf(Node *node) {
- if (m_nodes.tqfindRef(node) != -1)
+ if (m_nodes.findRef(node) != -1)
return true;
TQPtrListIterator<Node> nit(childNodeIterator());
@@ -504,7 +504,7 @@ Node *Node::siblingBefore() {
Node *Node::childBefore(Node *node) {
//kdDebug()<<k_funcinfo<<endl;
- int index = m_nodes.tqfindRef(node);
+ int index = m_nodes.findRef(node);
if (index > 0){
return m_nodes.at(index-1);
}
@@ -521,7 +521,7 @@ Node *Node::siblingAfter() {
Node *Node::childAfter(Node *node)
{
//kdDebug()<<k_funcinfo<<endl;
- uint index = m_nodes.tqfindRef(node);
+ uint index = m_nodes.findRef(node);
if (index < m_nodes.count()-1) {
return m_nodes.at(index+1); }
return 0;
@@ -668,7 +668,7 @@ void Node::takeSchedule(const Schedule *schedule) {
void Node::addSchedule(Schedule *schedule) {
if (schedule == 0)
return;
- m_schedules.tqreplace(schedule->id(), schedule);
+ m_schedules.replace(schedule->id(), schedule);
}
Schedule *Node::createSchedule(TQString name, Schedule::Type type, long id) {
diff --git a/kplato/kptpertcanvas.cc b/kplato/kptpertcanvas.cc
index 198d4593..e269c6ed 100644
--- a/kplato/kptpertcanvas.cc
+++ b/kplato/kptpertcanvas.cc
@@ -103,7 +103,7 @@ void PertCanvas::draw(Project& project)
PertNodeItem *PertCanvas::createNodeItem(Node *node)
{
- PertNodeItem *item = m_nodes.tqfind(node);
+ PertNodeItem *item = m_nodes.find(node);
if (!item)
{
if ( node->type() == Node::Type_Project)
@@ -153,8 +153,8 @@ void PertCanvas::drawRelations()
TQPtrListIterator<Relation> it(m_relations);
for (; it.current(); ++it)
{
- PertNodeItem *parentItem = m_nodes.tqfind(it.current()->tqparent());
- PertNodeItem *childItem = m_nodes.tqfind(it.current()->child());
+ PertNodeItem *parentItem = m_nodes.find(it.current()->tqparent());
+ PertNodeItem *childItem = m_nodes.find(it.current()->child());
if (parentItem && childItem)
{
PertRelationItem *item = new PertRelationItem(this, parentItem, childItem, it.current());
diff --git a/kplato/kptproject.cc b/kplato/kptproject.cc
index 3a15ce2f..d06c5e51 100644
--- a/kplato/kptproject.cc
+++ b/kplato/kptproject.cc
@@ -1060,7 +1060,7 @@ void Project::setCurrentSchedule(long id) {
MainSchedule *Project::createSchedule(TQString name, Schedule::Type type) {
//kdDebug()<<k_funcinfo<<"No of schedules: "<<m_schedules.count()<<endl;
long i=1;
- while (m_schedules.tqfind(i)) {
+ while (m_schedules.find(i)) {
++i;
}
MainSchedule *sch = new MainSchedule(this, name, type, i);
diff --git a/kplato/kptproject.h b/kplato/kptproject.h
index f9444d8b..edfa83d1 100644
--- a/kplato/kptproject.h
+++ b/kplato/kptproject.h
@@ -96,7 +96,7 @@ public:
void removeResourceGroup(ResourceGroup *resource);
void removeResourceGroup(int number);
ResourceGroup *takeResourceGroup(ResourceGroup *resource)
- { return m_resourceGroups.take(m_resourceGroups.tqfindRef(resource)); }
+ { return m_resourceGroups.take(m_resourceGroups.findRef(resource)); }
bool addTask( Node* task, Node* position );
bool addSubTask( Node* task, Node* position );
@@ -173,7 +173,7 @@ public:
/// Find the node with identity id
virtual Node *findNode(const TQString &id) const
- { return (m_parent ? m_parent->findNode(id) : nodeIdDict.tqfind(id)); }
+ { return (m_parent ? m_parent->findNode(id) : nodeIdDict.find(id)); }
/// Remove the node with identity id from the register
virtual bool removeId(const TQString &id);
/// Insert the node with identity id
@@ -184,7 +184,7 @@ public:
TQString uniqueNodeId(int seed=1);
ResourceGroup *findResourceGroup(const TQString &id) const
- { return resourceGroupIdDict.tqfind(id); }
+ { return resourceGroupIdDict.find(id); }
/// Remove the resourcegroup with identity id from the register
bool removeResourceGroupId(const TQString &id)
{ return resourceGroupIdDict.remove(id); }
@@ -193,7 +193,7 @@ public:
{ resourceGroupIdDict.insert(id, group); }
Resource *findResource(const TQString &id) const
- { return resourceIdDict.tqfind(id); }
+ { return resourceIdDict.find(id); }
/// Remove the resource with identity id from the register
bool removeResourceId(const TQString &id)
{ return resourceIdDict.remove(id); }
@@ -203,7 +203,7 @@ public:
/// Find the calendar with identity id
virtual Calendar *findCalendar(const TQString &id) const
- { return id.isEmpty() ? 0 : calendarIdDict.tqfind(id); }
+ { return id.isEmpty() ? 0 : calendarIdDict.find(id); }
/// Remove the calendar with identity id from the register
virtual bool removeCalendarId(const TQString &id);
/// Insert the calendar with identity id
diff --git a/kplato/kptreportview.cc b/kplato/kptreportview.cc
index abcf1904..3cecf3eb 100644
--- a/kplato/kptreportview.cc
+++ b/kplato/kptreportview.cc
@@ -71,7 +71,7 @@ public:
~ReportTagsPrivate() {}
TQString getData(TQString source, TQString tag) const {
- if (tag.tqcontains("."))
+ if (tag.contains("."))
return getData(tag);
return getData(source + "." + tag);
@@ -80,7 +80,7 @@ public:
TQString getData(TQString tag) const {
//kdDebug()<<k_funcinfo<<"tag="<<tag<<endl;
KLocale *l = KGlobal::locale();
- if (!tag.tqcontains('.')) {
+ if (!tag.contains('.')) {
// global tags
if (tag == "currentdate") {
return l->formatDate(TQDate::tqcurrentDate(), true);
@@ -227,7 +227,7 @@ void ReportView::initReportList() {
TQString url = file.readURL();
if (!url.isNull()) {
if (url.left(1) != "/" || url.left(6) != "file:/") {
- TQString path = (*it).left((*it).tqfindRev('/', -1)+1); // include '/'
+ TQString path = (*it).left((*it).findRev('/', -1)+1); // include '/'
url = path + url;
}
m_reportList->insertItem(new ReportItem(m_reportList, name, url));
@@ -407,9 +407,9 @@ TQString ReportView::setDetail(const TQString & source, TQStringList &properties
TQString data = m_reportTags->getData(source, properties[i].section('=', 1, 1));
if (data.isNull())
data = "";
- data = data.tqreplace('<', "&lt;");
- data = data.tqreplace('>', "&gt;");
- data = data.tqreplace('"', "&quot;");
+ data = data.replace('<', "&lt;");
+ data = data.replace('>', "&gt;");
+ data = data.replace('"', "&quot;");
s += "\"" + data + "\""; // Property
//kdDebug()<<k_funcinfo<<s<<endl;
@@ -541,10 +541,10 @@ void ReportView::handleHeader(TQDomNode &node) {
int i = 0, j = 0;
do {
i = j;
- if ( ((i = s.tqfind('[', i)) != -1) && ((j = s.tqfind(']', i+1)) != -1) ) {
+ if ( ((i = s.find('[', i)) != -1) && ((j = s.find(']', i+1)) != -1) ) {
TQString tag = s.mid(i, j-i+1);
TQString data = m_reportTags->getData(tag.mid(1, tag.length()-2));
- r = r.tqreplace(tag, data);
+ r = r.replace(tag, data);
}
} while (i != -1 && j != -1);
n.setNodeValue(r);
diff --git a/kplato/kptrequestresourcespanel.cc b/kplato/kptrequestresourcespanel.cc
index df6b4e2b..0b1f7740 100644
--- a/kplato/kptrequestresourcespanel.cc
+++ b/kplato/kptrequestresourcespanel.cc
@@ -86,7 +86,7 @@ GroupLVItem::GroupLVItem(TQListView *tqparent, ResourceGroup *group, Task &task)
//kdDebug()<<k_funcinfo<<"resource="<<it.current()->name()<<endl;
ResourceRequest *req=0;
if (m_request) {
- req = m_request->tqfind(it.current());
+ req = m_request->find(it.current());
}
m_resources.append(new ResourceTableItem(it.current(), req, (bool)req));
}
diff --git a/kplato/kptresource.cc b/kplato/kptresource.cc
index 78834b4a..1b732e87 100644
--- a/kplato/kptresource.cc
+++ b/kplato/kptresource.cc
@@ -106,7 +106,7 @@ void ResourceGroup::removeResource(Resource *resource) {
}
Resource *ResourceGroup::takeResource(Resource *resource) {
- return m_resources.take(m_resources.tqfindRef(resource));
+ return m_resources.take(m_resources.findRef(resource));
}
void ResourceGroup::removeResource(int) {
@@ -457,7 +457,7 @@ void Resource::takeSchedule(const Schedule *schedule) {
void Resource::addSchedule(Schedule *schedule) {
if (schedule == 0)
return;
- m_schedules.tqreplace(schedule->id(), schedule);
+ m_schedules.replace(schedule->id(), schedule);
}
ResourceSchedule *Resource::createSchedule(TQString name, int type, long id) {
@@ -791,10 +791,10 @@ void ResourceGroupRequest::addResourceRequest(ResourceRequest *request) {
ResourceRequest *ResourceGroupRequest::takeResourceRequest(ResourceRequest *request) {
if (request)
request->unregisterRequest();
- return m_resourceRequests.take(m_resourceRequests.tqfindRef(request));
+ return m_resourceRequests.take(m_resourceRequests.findRef(request));
}
-ResourceRequest *ResourceGroupRequest::tqfind(Resource *resource) const {
+ResourceRequest *ResourceGroupRequest::find(Resource *resource) const {
TQPtrListIterator<ResourceRequest> it(m_resourceRequests);
for (; it.current(); ++it)
if (it.current()->resource() == resource)
@@ -1075,7 +1075,7 @@ ResourceRequestCollection::~ResourceRequestCollection() {
m_requests.clear();
}
-ResourceGroupRequest *ResourceRequestCollection::tqfind(ResourceGroup *group) const {
+ResourceGroupRequest *ResourceRequestCollection::find(ResourceGroup *group) const {
TQPtrListIterator<ResourceGroupRequest> it(m_requests);
for (; it.current(); ++it) {
if (it.current()->group() == group)
@@ -1085,11 +1085,11 @@ ResourceGroupRequest *ResourceRequestCollection::tqfind(ResourceGroup *group) co
}
-ResourceRequest *ResourceRequestCollection::tqfind(Resource *resource) const {
+ResourceRequest *ResourceRequestCollection::find(Resource *resource) const {
ResourceRequest *req = 0;
TQPtrListIterator<ResourceGroupRequest> it(m_requests);
for (; !req && it.current(); ++it) {
- req = it.current()->tqfind(resource);
+ req = it.current()->find(resource);
}
return req;
}
diff --git a/kplato/kptresource.h b/kplato/kptresource.h
index be558d93..e298a022 100644
--- a/kplato/kptresource.h
+++ b/kplato/kptresource.h
@@ -446,7 +446,7 @@ class ResourceGroupRequest {
void addResourceRequest(ResourceRequest *request);
void removeResourceRequest(ResourceRequest *request) { m_resourceRequests.removeRef(request); }
ResourceRequest *takeResourceRequest(ResourceRequest *request);
- ResourceRequest *tqfind(Resource *resource) const;
+ ResourceRequest *find(Resource *resource) const;
bool load(TQDomElement &element, Project &project);
void save(TQDomElement &element) const;
@@ -515,9 +515,9 @@ public:
request->setParent(this);
}
void removeRequest(ResourceGroupRequest *request) { m_requests.removeRef(request); }
- void takeRequest(ResourceGroupRequest *request) { m_requests.take(m_requests.tqfindRef(request)); }
- ResourceGroupRequest *tqfind(ResourceGroup *resource) const;
- ResourceRequest *tqfind(Resource *resource) const;
+ void takeRequest(ResourceGroupRequest *request) { m_requests.take(m_requests.findRef(request)); }
+ ResourceGroupRequest *find(ResourceGroup *resource) const;
+ ResourceRequest *find(Resource *resource) const;
bool isEmpty() const;
//bool load(TQDomElement &element, Project &project);
diff --git a/kplato/kptresourcespanel.cc b/kplato/kptresourcespanel.cc
index cc645d42..29b1d4eb 100644
--- a/kplato/kptresourcespanel.cc
+++ b/kplato/kptresourcespanel.cc
@@ -152,7 +152,7 @@ public:
}
void deleteResource(ResourcesPanelResourceItem *item) {
//kdDebug()<<k_funcinfo<<" Deleted: "<<item->m_name<<" ("<<item<<")"<<endl;
- m_resourceItems.take(m_resourceItems.tqfindRef(item));
+ m_resourceItems.take(m_resourceItems.findRef(item));
if (item->m_state == ResourcesPanelResourceItem::New)
delete item;
else
@@ -302,7 +302,7 @@ void ResourcesPanel::slotDeleteGroup() {
listOfResources->clear();
listOfGroups->takeItem(groupLVItem); // remove from listbox
- m_groupItems.take(m_groupItems.tqfindRef(groupLVItem->m_group)); // remove GroupItem from active list
+ m_groupItems.take(m_groupItems.findRef(groupLVItem->m_group)); // remove GroupItem from active list
m_deletedGroupItems.append(groupLVItem->takeGroup()); // remove GroupItem from GroupLVItem and add to deleted list
//kdDebug()<<k_funcinfo<<" No of deleted groups="<<m_deletedGroupItems.count()<<", now "<<m_groupItems.count()<<" groups left"<<endl;
diff --git a/kplato/kptresourceview.cc b/kplato/kptresourceview.cc
index a0cdb552..13306105 100644
--- a/kplato/kptresourceview.cc
+++ b/kplato/kptresourceview.cc
@@ -317,23 +317,23 @@ public:
}
void setPriority(int col, int prio) {
- if (prioColors.tqcontains(prio)) {
+ if (prioColors.contains(prio)) {
columnPrio.insert(col, prio);
} else {
columnPrio.remove(col);
}
}
int priority(int col) {
- if (columnPrio.tqcontains(col)) {
+ if (columnPrio.contains(col)) {
return columnPrio[col];
}
return 0;
}
virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) {
- //kdDebug()<<k_funcinfo<<"c="<<column<<" prio="<<(columnPrio.tqcontains(column)?columnPrio[column]:0)<<endl;
+ //kdDebug()<<k_funcinfo<<"c="<<column<<" prio="<<(columnPrio.contains(column)?columnPrio[column]:0)<<endl;
TQColorGroup g = cg;
- if (columnPrio.tqcontains(column)) {
+ if (columnPrio.contains(column)) {
g.setColor(TQColorGroup::Base, prioColors[columnPrio[column]]);
}
KListViewItem::paintCell(p, g, column, width, align);
diff --git a/kplato/kptschedule.cc b/kplato/kptschedule.cc
index 84b2ddd3..3187a2e1 100644
--- a/kplato/kptschedule.cc
+++ b/kplato/kptschedule.cc
@@ -175,7 +175,7 @@ void Schedule::saveAppointments(TQDomElement &element) const {
}
bool Schedule::add(Appointment *appointment) {
- if (m_appointments.tqfindRef(appointment) != -1) {
+ if (m_appointments.findRef(appointment) != -1) {
kdError()<<k_funcinfo<<"Appointment allready exists"<<endl;
return false;
}
@@ -191,7 +191,7 @@ void Schedule::removeAppointment(Appointment *appointment) {
}
void Schedule::takeAppointment(Appointment *appointment) {
- int i = m_appointments.tqfindRef(appointment);
+ int i = m_appointments.findRef(appointment);
if (i != -1) {
m_appointments.take(i);
//kdDebug()<<k_funcinfo<<"Taken: "<<appointment<<endl;
diff --git a/kplato/kpttask.cc b/kplato/kpttask.cc
index 7b00740b..c8ecba3a 100644
--- a/kplato/kpttask.cc
+++ b/kplato/kpttask.cc
@@ -97,7 +97,7 @@ Duration *Task::getRandomDuration() {
ResourceGroupRequest *Task::resourceGroupRequest(ResourceGroup *group) const {
if (m_requests)
- return m_requests->tqfind(group);
+ return m_requests->find(group);
return 0;
}
diff --git a/kplato/kptwbsdefinition.cc b/kplato/kptwbsdefinition.cc
index d05b61d8..fd6b48aa 100644
--- a/kplato/kptwbsdefinition.cc
+++ b/kplato/kptwbsdefinition.cc
@@ -89,7 +89,7 @@ void WBSDefinition::setLevelsDef(TQMap<int, CodeDef> def) {
}
WBSDefinition::CodeDef WBSDefinition::levelsDef(int level) const {
- return m_levelsDef.tqcontains(level) ? m_levelsDef[level] : CodeDef();
+ return m_levelsDef.contains(level) ? m_levelsDef[level] : CodeDef();
}
void WBSDefinition::setLevelsDef(int level, CodeDef def) {