kexi

kexipropertyeditorview.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
00003    Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this program; see the file COPYING.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KEXIPROPERTYEDITORVIEW_H
00022 #define KEXIPROPERTYEDITORVIEW_H
00023 
00024 //#include "kexiviewbase.h"
00025 #include <qwidget.h>
00026 
00027 class QLabel;
00028 class KexiMainWindow;
00029 
00030 namespace KoProperty {
00031     class Editor;
00032     class Set;
00033 }
00034 
00036 
00047 class KEXIEXTWIDGETS_EXPORT KexiObjectInfoLabel : public QWidget
00048 {
00049     public:
00050         KexiObjectInfoLabel(QWidget* parent, const char* name = 0);
00051         ~KexiObjectInfoLabel();
00052 
00053         void setObjectClassIcon(const QString& name);
00054         QString objectClassIcon() const { return m_classIcon; }
00055         void setObjectClassName(const QString& name);
00056         QString objectClassName() const { return m_className; }
00057         void setObjectName(const QString& name);
00058         QString objectName() const { return m_objectName; }
00059         void setBuddy( QWidget * buddy );
00060     protected:
00061         void updateName();
00062 
00063         QString m_className;
00064         QString m_classIcon, m_objectName;
00065         QLabel *m_objectIconLabel, *m_objectNameLabel;
00066 };
00067 
00069 
00082 class KEXIEXTWIDGETS_EXPORT KexiPropertyEditorView : public QWidget //KexiViewBase
00083 {
00084     Q_OBJECT
00085 
00086     public:
00087         KexiPropertyEditorView(KexiMainWindow *mainWin, QWidget* parent);
00088         virtual ~KexiPropertyEditorView();
00089 
00097         static void updateInfoLabelForPropertySet(
00098             KexiObjectInfoLabel *infoLabel, KoProperty::Set* set, 
00099             const QString& textToDisplayForNullSet = QString::null);
00100 
00101         virtual QSize sizeHint() const;
00102         virtual QSize minimumSizeHint() const;
00103         KoProperty::Editor *editor() const;
00104 
00105 //  public slots:
00106 //      virtual void setGeometry( const QRect &r );
00107 //      virtual void resize( int w, int h );
00108 
00109     protected slots:
00110         void slotPropertySetChanged(KoProperty::Set* );
00111 
00112     protected:
00113         class Private;
00114         Private *d;
00115 };
00116 
00117 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys