kexi

widgetwithsubpropertiesinterface.h
1/* This file is part of the KDE project
2 Copyright (C) 2006 Jaroslaw Staniek <js@iidea.pl>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
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 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library 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.
18 */
19
20#ifndef WIDGETWITHSUBPROPERTIESINTERFACE_H
21#define WIDGETWITHSUBPROPERTIESINTERFACE_H
22
23#include <tqcstring.h>
24#include <tqvaluelist.h>
25#include <tqwidget.h>
26#include <tqguardedptr.h>
27#include <tqvariant.h>
28
29namespace KFormDesigner {
30
32
36class KFORMEDITOR_EXPORT WidgetWithSubpropertiesInterface
37{
38 public:
39 WidgetWithSubpropertiesInterface();
40 virtual ~WidgetWithSubpropertiesInterface();
41
44 void setSubwidget(TQWidget *widget);
45
47 TQWidget* subwidget() const;
48
51 TQValueList<TQCString> subproperies() const;
52
55 const TQMetaProperty *findMetaSubproperty(const char * name) const;
56
59 TQVariant subproperty( const char * name, bool &ok ) const;
60
64 bool setSubproperty( const char * name, const TQVariant & value );
65
66 protected:
67 TQGuardedPtr<TQWidget> m_subwidget;
68 TQValueList<TQCString> m_subproperies;
69};
70}
71
72#endif
bool setSubproperty(const char *name, const TQVariant &value)
const TQMetaProperty * findMetaSubproperty(const char *name) const
TQVariant subproperty(const char *name, bool &ok) const