2#include <tdeapplication.h>
3#include <tdeaboutdata.h>
4#include <tdecmdlineargs.h>
18class TestSubResource :
public TestResource
21 TestSubResource() : TestResource() {}
25 kdDebug() <<
"TestSubResource" << endl;
30int main(
int argc,
char **argv )
32 TDEAboutData aboutData(
"testresources",
"Kresource Test",
"0" );
33 TDECmdLineArgs::init( argc, argv, &aboutData );
39 TestResource *resource1 =
new TestResource;
41 manager.add( resource1 );
43 TestResource *resource2 =
new TestSubResource;
45 manager.add( resource2 );
47 TestResource *resource3 =
new TestSubResource;
49 manager.add( resource3 );
51 kdDebug() <<
"LIST ALL:" << endl;
53 for( it = manager.begin(); it != manager.end(); ++it ) {
60 kdDebug() <<
"LIST ACTIVE" << endl;
62 for( it2 = manager.activeBegin(); it2 != manager.activeEnd(); ++it2 ) {
70 kdDebug() <<
"LIST ACTIVE" << endl;
71 for( it2 = manager.activeBegin(); it2 != manager.activeEnd(); ++it2 ) {
75 kdDebug() <<
"LIST ALL" << endl;
76 for( it = manager.begin(); it != manager.end(); ++it ) {
Iterator for iterations over only active resources managed by a manager.
Iterator for iterations over all resources managed by a manager.
This class provides a manager for resources of a specified family.
This class provides a resource which is managed in a general way.
virtual void dump() const
Print resource information as debug output.
virtual void setResourceName(const TQString &name)
Set the name of resource.
Resource(const TDEConfig *config)
Constructor.
void setActive(bool active)
Sets, if the resource is active.