summaryrefslogtreecommitdiffstats
path: root/akregator/src/mk4storage/metakit/src/custom.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /akregator/src/mk4storage/metakit/src/custom.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'akregator/src/mk4storage/metakit/src/custom.cpp')
-rw-r--r--akregator/src/mk4storage/metakit/src/custom.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/akregator/src/mk4storage/metakit/src/custom.cpp b/akregator/src/mk4storage/metakit/src/custom.cpp
index a6275cea..6ed1d5ab 100644
--- a/akregator/src/mk4storage/metakit/src/custom.cpp
+++ b/akregator/src/mk4storage/metakit/src/custom.cpp
@@ -233,7 +233,7 @@ bool c4_CustomViewer::RemoveRows(int, int)
class c4_SliceViewer : public c4_CustomViewer
{
- c4_View _parent;
+ c4_View _tqparent;
int _first, _limit, _step;
public:
@@ -249,7 +249,7 @@ public:
};
c4_SliceViewer::c4_SliceViewer (c4_Sequence& seq_, int first_, int limit_, int step_)
- : _parent (&seq_), _first (first_), _limit (limit_), _step (step_)
+ : _tqparent (&seq_), _first (first_), _limit (limit_), _step (step_)
{
d4_assert(_step != 0);
}
@@ -260,12 +260,12 @@ c4_SliceViewer::~c4_SliceViewer ()
c4_View c4_SliceViewer::GetTemplate()
{
- return _parent.Clone(); // could probably return _parent just as well
+ return _tqparent.Clone(); // could probably return _tqparent just as well
}
int c4_SliceViewer::GetSize()
{
- int n = _limit >= 0 ? _limit : _parent.GetSize();
+ int n = _limit >= 0 ? _limit : _tqparent.GetSize();
if (n < _first)
n = _first;
@@ -277,14 +277,14 @@ bool c4_SliceViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
row_ = _first + _step * (_step > 0 ? row_ : row_ - GetSize() + 1);
- return _parent.GetItem(row_, col_, buf_);
+ return _tqparent.GetItem(row_, col_, buf_);
}
bool c4_SliceViewer::SetItem(int row_, int col_, const c4_Bytes& buf_)
{
row_ = _first + _step * (_step > 0 ? row_ : row_ - GetSize() + 1);
- _parent.SetItem(row_, col_, buf_);
+ _tqparent.SetItem(row_, col_, buf_);
return true;
}
@@ -297,7 +297,7 @@ bool c4_SliceViewer::InsertRows(int pos_, c4_Cursor value_, int count_)
if (_limit >= 0)
_limit += count_;
- _parent.InsertAt(pos_, *value_, count_);
+ _tqparent.InsertAt(pos_, *value_, count_);
return true;
}
@@ -310,7 +310,7 @@ bool c4_SliceViewer::RemoveRows(int pos_, int count_)
if (_limit >= 0)
_limit -= count_;
- _parent.RemoveAt(pos_, count_);
+ _tqparent.RemoveAt(pos_, count_);
return true;
}
@@ -323,7 +323,7 @@ c4_CustomViewer* f4_CustSlice(c4_Sequence& seq_, int first_, int limit_, int ste
class c4_ProductViewer : public c4_CustomViewer
{
- c4_View _parent, _argView, _template;
+ c4_View _tqparent, _argView, _template;
public:
c4_ProductViewer (c4_Sequence& seq_, const c4_View& view_);
@@ -335,7 +335,7 @@ public:
};
c4_ProductViewer::c4_ProductViewer (c4_Sequence& seq_, const c4_View& view_)
- : _parent (&seq_), _argView (view_), _template (_parent.Clone())
+ : _tqparent (&seq_), _argView (view_), _template (_tqparent.Clone())
{
for (int i = 0; i < _argView.NumProperties(); ++i)
_template.AddProperty(_argView.NthProperty(i));
@@ -352,12 +352,12 @@ c4_View c4_ProductViewer::GetTemplate()
int c4_ProductViewer::GetSize()
{
- return _parent.GetSize() * _argView.GetSize();
+ return _tqparent.GetSize() * _argView.GetSize();
}
bool c4_ProductViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
if (col_ < v.NumProperties())
{
@@ -384,7 +384,7 @@ c4_CustomViewer* f4_CustProduct(c4_Sequence& seq_, const c4_View& view_)
class c4_RemapWithViewer : public c4_CustomViewer
{
- c4_View _parent, _argView;
+ c4_View _tqparent, _argView;
public:
c4_RemapWithViewer (c4_Sequence& seq_, const c4_View& view_);
@@ -397,7 +397,7 @@ public:
};
c4_RemapWithViewer::c4_RemapWithViewer (c4_Sequence& seq_, const c4_View& view_)
- : _parent (&seq_), _argView (view_)
+ : _tqparent (&seq_), _argView (view_)
{
}
@@ -407,7 +407,7 @@ c4_RemapWithViewer::~c4_RemapWithViewer ()
c4_View c4_RemapWithViewer::GetTemplate()
{
- return _parent.Clone(); // could probably return _parent just as well
+ return _tqparent.Clone(); // could probably return _tqparent just as well
}
int c4_RemapWithViewer::GetSize()
@@ -422,7 +422,7 @@ bool c4_RemapWithViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
row_ = ((const c4_IntProp&) map) (_argView[row_]);
- return _parent.GetItem(row_, col_, buf_);
+ return _tqparent.GetItem(row_, col_, buf_);
}
bool c4_RemapWithViewer::SetItem(int row_, int col_, const c4_Bytes& buf_)
@@ -432,7 +432,7 @@ bool c4_RemapWithViewer::SetItem(int row_, int col_, const c4_Bytes& buf_)
row_ = ((const c4_IntProp&) map) (_argView[row_]);
- _parent.SetItem(row_, col_, buf_);
+ _tqparent.SetItem(row_, col_, buf_);
return true;
}
@@ -445,7 +445,7 @@ c4_CustomViewer* f4_CustRemapWith(c4_Sequence& seq_, const c4_View& view_)
class c4_PairViewer : public c4_CustomViewer
{
- c4_View _parent, _argView, _template;
+ c4_View _tqparent, _argView, _template;
public:
c4_PairViewer (c4_Sequence& seq_, const c4_View& view_);
@@ -460,7 +460,7 @@ public:
};
c4_PairViewer::c4_PairViewer (c4_Sequence& seq_, const c4_View& view_)
- : _parent (&seq_), _argView (view_), _template (_parent.Clone())
+ : _tqparent (&seq_), _argView (view_), _template (_tqparent.Clone())
{
for (int i = 0; i < _argView.NumProperties(); ++i)
_template.AddProperty(_argView.NthProperty(i));
@@ -477,12 +477,12 @@ c4_View c4_PairViewer::GetTemplate()
int c4_PairViewer::GetSize()
{
- return _parent.GetSize();
+ return _tqparent.GetSize();
}
bool c4_PairViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
if (col_ >= v.NumProperties())
{
@@ -496,7 +496,7 @@ bool c4_PairViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
bool c4_PairViewer::SetItem(int row_, int col_, const c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
if (col_ >= v.NumProperties())
{
@@ -511,14 +511,14 @@ bool c4_PairViewer::SetItem(int row_, int col_, const c4_Bytes& buf_)
bool c4_PairViewer::InsertRows(int pos_, c4_Cursor value_, int count_)
{
- _parent.InsertAt(pos_, *value_, count_);
+ _tqparent.InsertAt(pos_, *value_, count_);
_argView.InsertAt(pos_, *value_, count_);
return true;
}
bool c4_PairViewer::RemoveRows(int pos_, int count_)
{
- _parent.RemoveAt(pos_, count_);
+ _tqparent.RemoveAt(pos_, count_);
_argView.RemoveAt(pos_, count_);
return true;
}
@@ -532,7 +532,7 @@ c4_CustomViewer* f4_CustPair(c4_Sequence& seq_, const c4_View& view_)
class c4_ConcatViewer : public c4_CustomViewer
{
- c4_View _parent, _argView;
+ c4_View _tqparent, _argView;
public:
c4_ConcatViewer (c4_Sequence& seq_, const c4_View& view_);
@@ -545,7 +545,7 @@ public:
};
c4_ConcatViewer::c4_ConcatViewer (c4_Sequence& seq_, const c4_View& view_)
- : _parent (&seq_), _argView (view_)
+ : _tqparent (&seq_), _argView (view_)
{
}
@@ -555,23 +555,23 @@ c4_ConcatViewer::~c4_ConcatViewer ()
c4_View c4_ConcatViewer::GetTemplate()
{
- return _parent.Clone(); // could probably return _parent just as well
+ return _tqparent.Clone(); // could probably return _tqparent just as well
}
int c4_ConcatViewer::GetSize()
{
- return _parent.GetSize() + _argView.GetSize();
+ return _tqparent.GetSize() + _argView.GetSize();
}
bool c4_ConcatViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
- if (row_ >= _parent.GetSize())
+ if (row_ >= _tqparent.GetSize())
{
v = _argView;
- row_ -= _parent.GetSize();
- col_ = v.FindProperty(_parent.NthProperty(col_).GetId());
+ row_ -= _tqparent.GetSize();
+ col_ = v.FindProperty(_tqparent.NthProperty(col_).GetId());
if (col_ < 0)
return false;
@@ -582,13 +582,13 @@ bool c4_ConcatViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
bool c4_ConcatViewer::SetItem(int row_, int col_, const c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
- if (row_ >= _parent.GetSize())
+ if (row_ >= _tqparent.GetSize())
{
v = _argView;
- row_ -= _parent.GetSize();
- col_ = v.FindProperty(_parent.NthProperty(col_).GetId());
+ row_ -= _tqparent.GetSize();
+ col_ = v.FindProperty(_tqparent.NthProperty(col_).GetId());
d4_assert(col_ >= 0);
}
@@ -605,7 +605,7 @@ c4_CustomViewer* f4_CustConcat(c4_Sequence& seq_, const c4_View& view_)
class c4_RenameViewer : public c4_CustomViewer
{
- c4_View _parent, _template;
+ c4_View _tqparent, _template;
public:
c4_RenameViewer (c4_Sequence& seq_, const c4_Property& old_,
@@ -622,11 +622,11 @@ public:
c4_RenameViewer::c4_RenameViewer (c4_Sequence& seq_, const c4_Property& old_,
const c4_Property& new_)
- : _parent (&seq_)
+ : _tqparent (&seq_)
{
- for (int i = 0; i < _parent.NumProperties(); ++i)
+ for (int i = 0; i < _tqparent.NumProperties(); ++i)
{
- const c4_Property& prop = _parent.NthProperty(i);
+ const c4_Property& prop = _tqparent.NthProperty(i);
_template.AddProperty(prop.GetId() == old_.GetId() ? new_ : prop);
}
}
@@ -642,17 +642,17 @@ c4_View c4_RenameViewer::GetTemplate()
int c4_RenameViewer::GetSize()
{
- return _parent.GetSize();
+ return _tqparent.GetSize();
}
bool c4_RenameViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
- return _parent.GetItem(row_, col_, buf_);
+ return _tqparent.GetItem(row_, col_, buf_);
}
bool c4_RenameViewer::SetItem(int row_, int col_, const c4_Bytes& buf_)
{
- _parent.SetItem(row_, col_, buf_);
+ _tqparent.SetItem(row_, col_, buf_);
return true;
}
@@ -666,7 +666,7 @@ c4_CustomViewer* f4_CustRename(c4_Sequence& seq_, const c4_Property& old_,
class c4_GroupByViewer : public c4_CustomViewer
{
- c4_View _parent, _keys, _sorted, _temp;
+ c4_View _tqparent, _keys, _sorted, _temp;
c4_Property _result;
c4_DWordArray _map;
@@ -685,9 +685,9 @@ public:
c4_GroupByViewer::c4_GroupByViewer (c4_Sequence& seq_, const c4_View& keys_,
const c4_Property& result_)
- : _parent (&seq_), _keys (keys_), _result (result_)
+ : _tqparent (&seq_), _keys (keys_), _result (result_)
{
- _sorted = _parent.SortOn(_keys);
+ _sorted = _tqparent.SortOn(_keys);
int n = _sorted.GetSize();
c4_Bytes temp;
@@ -804,7 +804,7 @@ c4_CustomViewer* f4_CustGroupBy(c4_Sequence& seq_, const c4_View& template_,
class c4_JoinPropViewer : public c4_CustomViewer
{
- c4_View _parent, _template;
+ c4_View _tqparent, _template;
c4_ViewProp _sub;
int _subPos, _subWidth;
c4_DWordArray _base, _offset;
@@ -820,20 +820,20 @@ public:
c4_JoinPropViewer::c4_JoinPropViewer (c4_Sequence& seq_,
const c4_ViewProp& sub_, bool outer_)
- : _parent (&seq_),
- _sub (sub_), _subPos (_parent.FindProperty(sub_.GetId())), _subWidth (0)
+ : _tqparent (&seq_),
+ _sub (sub_), _subPos (_tqparent.FindProperty(sub_.GetId())), _subWidth (0)
{
d4_assert(_subPos >= 0);
- for (int k = 0; k < _parent.NumProperties(); ++k)
+ for (int k = 0; k < _tqparent.NumProperties(); ++k)
{
if (k != _subPos)
- _template.AddProperty(_parent.NthProperty(k));
+ _template.AddProperty(_tqparent.NthProperty(k));
else // if there are no rows, then this join does very little anyway
//! OOPS: if this is an unattached view, then the subviews can differ
- if (_parent.GetSize() > 0)
+ if (_tqparent.GetSize() > 0)
{
- c4_View view = sub_ (_parent[0]);
+ c4_View view = sub_ (_tqparent[0]);
for (int l = 0; l < view.NumProperties(); ++l)
{
_template.AddProperty(view.NthProperty(l));
@@ -845,9 +845,9 @@ c4_JoinPropViewer::c4_JoinPropViewer (c4_Sequence& seq_,
_base.SetSize(0, 5);
_offset.SetSize(0, 5);
- for (int i = 0; i < _parent.GetSize(); ++i)
+ for (int i = 0; i < _tqparent.GetSize(); ++i)
{
- c4_View v = _sub (_parent[i]);
+ c4_View v = _sub (_tqparent[i]);
int n = v.GetSize();
if (n == 0 && outer_)
@@ -880,7 +880,7 @@ int c4_JoinPropViewer::GetSize()
bool c4_JoinPropViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
int r = _base.GetAt(row_);
if (col_ >= _subPos)
@@ -890,7 +890,7 @@ bool c4_JoinPropViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
}
else
{
- v = _sub (_parent[r]);
+ v = _sub (_tqparent[r]);
r = _offset.GetAt(row_);
if (r < 0)
return false; // if this is a null row in an outer join
@@ -913,7 +913,7 @@ c4_CustomViewer* f4_CustJoinProp(c4_Sequence& seq_,
class c4_JoinViewer : public c4_CustomViewer
{
- c4_View _parent, _argView, _template;
+ c4_View _tqparent, _argView, _template;
c4_DWordArray _base, _offset;
public:
@@ -928,14 +928,14 @@ public:
c4_JoinViewer::c4_JoinViewer (c4_Sequence& seq_,const c4_View& keys_,
const c4_View& view_, bool outer_)
- : _parent (&seq_), _argView (view_.SortOn(keys_))
+ : _tqparent (&seq_), _argView (view_.SortOn(keys_))
{
// why not in GetTemplate, since we don't need to know this...
- _template = _parent.Clone();
+ _template = _tqparent.Clone();
for (int l = 0; l < _argView.NumProperties(); ++l)
_template.AddProperty(_argView.NthProperty(l));
- c4_View sorted = _parent.SortOn(keys_).Project(keys_);
+ c4_View sorted = _tqparent.SortOn(keys_).Project(keys_);
c4_View temp = _argView.Project(keys_);
_base.SetSize(0, 5);
@@ -945,7 +945,7 @@ c4_JoinViewer::c4_JoinViewer (c4_Sequence& seq_,const c4_View& keys_,
for (int i = 0; i < sorted.GetSize(); ++i)
{
- int orig = _parent.GetIndexOf(sorted[i]);
+ int orig = _tqparent.GetIndexOf(sorted[i]);
d4_assert(orig >= 0);
if (i > 0 && sorted[i] == sorted[i-1])
@@ -1009,7 +1009,7 @@ int c4_JoinViewer::GetSize()
bool c4_JoinViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
int r = _base.GetAt(row_);
if (col_ >= v.NumProperties())
@@ -1030,7 +1030,7 @@ bool c4_JoinViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
#if 0
bool c4_JoinViewer::GetItem(int row_, int col_, c4_Bytes& buf_)
{
- c4_View v = _parent;
+ c4_View v = _tqparent;
int o = 0;
int r = _offset.GetAt(row_);