You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef SCOPEITEM_H
|
|
|
|
#define SCOPEITEM_H
|
|
|
|
|
|
|
|
#include <tqlistview.h>
|
|
|
|
|
|
|
|
#include "docmetainfo.h"
|
|
|
|
|
|
|
|
namespace KHC {
|
|
|
|
|
|
|
|
class ScopeItem : public QCheckListItem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ScopeItem( TQListView *parent, DocEntry *entry )
|
|
|
|
: TQCheckListItem( parent, entry->name(), TQCheckListItem::CheckBox ),
|
|
|
|
mEntry( entry ), mObserver( 0 ) {}
|
|
|
|
|
|
|
|
ScopeItem( TQListViewItem *parent, DocEntry *entry )
|
|
|
|
: TQCheckListItem( parent, entry->name(), TQCheckListItem::CheckBox ),
|
|
|
|
mEntry( entry ), mObserver( 0 ) {}
|
|
|
|
|
|
|
|
DocEntry *entry()const { return mEntry; }
|
|
|
|
|
|
|
|
int rtti() const { return rttiId(); }
|
|
|
|
|
|
|
|
static int rttiId() { return 734678; }
|
|
|
|
|
|
|
|
class Observer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void scopeItemChanged( ScopeItem * ) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
void setObserver( Observer *o ) { mObserver = o; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void stateChange ( bool )
|
|
|
|
{
|
|
|
|
if ( mObserver ) mObserver->scopeItemChanged( this );
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
DocEntry *mEntry;
|
|
|
|
|
|
|
|
Observer *mObserver;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// vim:ts=2:sw=2:et
|