kexi

kexiframe.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2005-2007 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 KexiFrame_H
00021 #define KexiFrame_H
00022 
00023 #include <qframe.h>
00024 
00026 class KEXIFORMUTILS_EXPORT KexiFrame : public QFrame
00027 {
00028     Q_OBJECT
00029 //todo  Q_ENUMS( Shape Shadow )
00030     Q_PROPERTY( QColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
00031 //todo  Q_OVERRIDE( Shape frameShape READ frameShape WRITE setFrameShape )
00032 //todo  Q_OVERRIDE( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
00033 
00034     public:
00035         KexiFrame( QWidget * parent, const char * name = 0, WFlags f = 0 );
00036         virtual ~KexiFrame();
00037 
00038         virtual const QColor& frameColor() const;
00039 
00040 #if 0
00042         enum Shadow {
00043             NoShadow = QFrame::Plain,
00044             Raised = QFrame::Raised,
00045             Sunken = QFrame::Sunken
00046         };
00048         enum Shape { NoFrame = QFrame::NoFrame, 
00049             Box = QFrame::Box,                  
00050             Panel = QFrame::Panel,              
00051             StyledPanel = QFrame::StyledPanel,  
00052             GroupBoxPanel = QFrame::GroupBoxPanel 
00053         };
00054         Shape frameShape() const;
00055         void setFrameShape( KexiFrame::Shape shape );
00056         Shadow frameShadow() const;
00057         void setFrameShadow( KexiFrame::Shadow shadow );
00058 #endif
00059 
00061         virtual void dragMoveEvent( QDragMoveEvent *e );
00062 
00064         virtual void dropEvent( QDropEvent *e );
00065 
00066     public slots:
00067         virtual void setPalette( const QPalette &pal );
00068         virtual void setFrameColor(const QColor& color);
00069 
00070     signals:
00072         void handleDragMoveEvent(QDragMoveEvent *e);
00073 
00075         void handleDropEvent(QDropEvent *e);
00076 
00077     protected:
00078         virtual void drawFrame( QPainter * );
00079 
00080         class Private;
00081         Private *d;
00082 };
00083 
00084 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys