kexiframe.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2005-2007 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#include "kexiframe.h"
21
22#include <tqpainter.h>
23#include <tqdrawutil.h>
24#include <kexiutils/utils.h>
25
27class KexiFrame::Private
28{
29 public:
30 Private()
31 {
32 }
33 ~Private()
34 {
35 }
36 TQColor frameColor;
37#if 0
38//todo
39 KexiFrame::Shape frameShape;
40 KexiFrame::Shadow frameShadow;
41#endif
42};
43
44//=========================================================
45
46KexiFrame::KexiFrame( TQWidget * parent, const char * name, WFlags f )
47 : TQFrame(parent, name, f)
48 , d( new Private() )
49{
50 //defaults
51 d->frameColor = palette().active().foreground();
53 setLineWidth(2);
54 setFrameStyle(TQFrame::StyledPanel|TQFrame::Raised);
55}
56
57KexiFrame::~KexiFrame()
58{
59 delete d;
60}
61
62void KexiFrame::dragMoveEvent( TQDragMoveEvent *e )
63{
64 TQFrame::dragMoveEvent(e);
65 emit handleDragMoveEvent(e);
66}
67
68void KexiFrame::dropEvent( TQDropEvent *e )
69{
70 TQFrame::dropEvent(e);
71 emit handleDropEvent(e);
72}
73
74#define ClassName KexiFrame
75#define SuperClassName TQFrame
76#include "kexiframeutils_p.cpp"
77#include "kexiframe.moc"
virtual void dragMoveEvent(TQDragMoveEvent *e)
Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface.
Definition kexiframe.cpp:62
virtual void dropEvent(TQDropEvent *e)
Used to emit handleDropEvent() signal needed to control dropping on the container's surface.
Definition kexiframe.cpp:68
void handleDropEvent(TQDropEvent *e)
Needed to control dropping on the container's surface.
void handleDragMoveEvent(TQDragMoveEvent *e)
Needed to control dragging over the container's surface.
KexiFrame(TQWidget *parent, const char *name=0, WFlags f=0)
Definition kexiframe.cpp:46