shadoweffectplugin.h
1/* This file is part of the KDE project
2 Copyright (C) 2002, 2003, The Karbon Developers
3
4 This library 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 library 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 library; see the file COPYING.LIB. 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 __SHADOWEFFECTPLUGIN_H__
21#define __SHADOWEFFECTPLUGIN_H__
22
23#include <tdeparts/plugin.h>
24#include <kdialogbase.h>
25#include <commands/vcommand.h>
26
27class KarbonView;
28class VSelection;
29class VShadowEffectDlg;
30
31class ShadowEffectPlugin : public KParts::Plugin
32{
33 TQ_OBJECT
34
35public:
36 ShadowEffectPlugin( KarbonView *parent, const char* name, const TQStringList & );
37 virtual ~ShadowEffectPlugin() {}
38
39private slots:
40 void slotShadowEffect();
41
42private:
43 VShadowEffectDlg *m_shadowEffectDlg;
44};
45
46class KIntNumInput;
47
48class VShadowEffectDlg : public KDialogBase
49{
50 TQ_OBJECT
51
52
53public:
54 VShadowEffectDlg( TQWidget* parent = 0L, const char* name = 0L );
55
56 void setAngle( int );
57 void setDistance( int );
58 void setOpacity( int );
59
60 int angle() const;
61 int distance() const;
62 int opacity() const;
63
64private:
65 KIntNumInput *m_angle;
66 KIntNumInput *m_distance;
67 KIntNumInput *m_opacity;
68};
69
70class VCreateShadowCmd : public VCommand
71{
72public:
73 VCreateShadowCmd( VDocument* doc, int distance, int angle, float opacity );
74 virtual ~VCreateShadowCmd();
75
76 virtual void execute();
77 virtual void unexecute();
78 virtual bool changesSelection() const { return true; }
79private:
80 VSelection *m_oldObjects;
81 VSelection *m_newObjects;
82 int m_distance;
83 int m_angle;
84 float m_opacity;
85};
86
87#endif
88
The base class for all karbon commands.
Definition vcommand.h:42
virtual void unexecute()
Unexecutes the command.
Definition vcommand.h:75
virtual bool changesSelection() const
Returns if the command changes the actual document selection.
Definition vcommand.h:84
virtual void execute()=0
Executes the command.
All non-visual, static doc info is in here.
Definition vdocument.h:53
VSelection manages a set of selected vobjects.
Definition vselection.h:62