kexi

widgetwithsubpropertiesinterface.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2006 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This program is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef WIDGETWITHSUBPROPERTIESINTERFACE_H
00021 #define WIDGETWITHSUBPROPERTIESINTERFACE_H
00022 
00023 #include <qcstring.h>
00024 #include <qvaluelist.h>
00025 #include <qwidget.h>
00026 #include <qguardedptr.h>
00027 #include <qvariant.h>
00028 
00029 namespace KFormDesigner {
00030 
00032 
00036 class KFORMEDITOR_EXPORT WidgetWithSubpropertiesInterface
00037 {
00038     public:
00039         WidgetWithSubpropertiesInterface();
00040         virtual ~WidgetWithSubpropertiesInterface();
00041 
00044         void setSubwidget(QWidget *widget);
00045 
00047         QWidget* subwidget() const;
00048 
00051         QValueList<QCString> subproperies() const;
00052 
00055         const QMetaProperty *findMetaSubproperty(const char * name) const;
00056 
00059         QVariant subproperty( const char * name, bool &ok  ) const;
00060 
00064         bool setSubproperty( const char * name, const QVariant & value );
00065 
00066     protected:
00067         QGuardedPtr<QWidget> m_subwidget;
00068         QValueList<QCString> m_subproperies;
00069 };
00070 }
00071 
00072 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys