1 /* This file is part of the KDE project
2 Copyright 2002 Cornelius Schumacher <schumacher@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License version 2 or at your option version 3 as published
7 by the Free Software Foundation.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
23 #include <Qt3Support/Q3CheckListItem>
25 #include "docmetainfo.h"
29 class ScopeItem
: public Q3CheckListItem
32 ScopeItem( Q3ListView
*parent
, DocEntry
*entry
)
33 : Q3CheckListItem( parent
, entry
->name(), Q3CheckListItem::CheckBox
),
34 mEntry( entry
), mObserver( 0 ) {}
36 ScopeItem( Q3ListViewItem
*parent
, DocEntry
*entry
)
37 : Q3CheckListItem( parent
, entry
->name(), Q3CheckListItem::CheckBox
),
38 mEntry( entry
), mObserver( 0 ) {}
40 DocEntry
*entry()const { return mEntry
; }
42 int rtti() const { return rttiId(); }
44 static int rttiId() { return 734678; }
49 virtual ~Observer() {}
50 virtual void scopeItemChanged( ScopeItem
* ) = 0;
53 void setObserver( Observer
*o
) { mObserver
= o
; }
56 void stateChange ( bool )
58 if ( mObserver
) mObserver
->scopeItemChanged( this );