3 * Siraj Razick <siraj@kdemail.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Library General Public License version 2 as
8 * published by the Free Software Foundation
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details
15 * You should have received a copy of the GNU Library General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "raptordatasourcegroup.h"
23 RaptorDataSourceGroup::RaptorDataSourceGroup()
25 m_name
= "Uknown Group";
29 RaptorDataSourceGroup::~RaptorDataSourceGroup()
32 for ( it
= m_data
.begin();it
!=m_data
.end();++it
)
35 // m_data.remove ( it );
42 RaptorDataSourceGroup::Data
43 RaptorDataSourceGroup::lookup ( QString str
)
45 //static RaptorDataSourceGroup * _matching = new RaptorDataSourceGroup();
46 RaptorDataSourceGroup::Data _matching
;
48 for ( it
= m_data
.begin();it
!=m_data
.end();++it
)
50 if ( ( *it
)->lookup ( str
) == true )
52 // _matching.prepend ( * ( *it ) );
53 _matching
[(*it
)->name()] = *it
;
61 RaptorDataSourceGroup::addItem ( RaptorDataSource
* item
)
65 m_data
[item
->name() ] = item
;
66 m_index
[m_count
] = item
;
69 // qDebug("RaptorDataSourceGroup.cpp::addItem("+item->name()+")");
73 RaptorDataSourceGroup::itemAt(int index
)
75 if ( index
< 0 || index
> m_count
)
78 return m_index
[index
];
83 RaptorDataSourceGroup::getItem ( QString name
)
88 RaptorDataSourceGroup::Data
89 RaptorDataSourceGroup::getData()