karbon

shadoweffectplugin.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002, 2003, The Karbon Developers
00003 
00004    This library 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 library 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 library; see the file COPYING.LIB.  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 __SHADOWEFFECTPLUGIN_H__
00021 #define __SHADOWEFFECTPLUGIN_H__
00022 
00023 #include <kparts/plugin.h>
00024 #include <kdialogbase.h>
00025 #include <commands/vcommand.h>
00026 
00027 class KarbonView;
00028 class VSelection;
00029 class VShadowEffectDlg;
00030 
00031 class ShadowEffectPlugin : public KParts::Plugin
00032 {
00033     Q_OBJECT
00034 public:
00035     ShadowEffectPlugin( KarbonView *parent, const char* name, const QStringList & );
00036     virtual ~ShadowEffectPlugin() {}
00037 
00038 private slots:
00039     void slotShadowEffect();
00040 
00041 private:
00042     VShadowEffectDlg    *m_shadowEffectDlg;
00043 };
00044 
00045 class KIntNumInput;
00046 
00047 class VShadowEffectDlg : public KDialogBase
00048 {
00049     Q_OBJECT
00050 
00051 public:
00052     VShadowEffectDlg( QWidget* parent = 0L, const char* name = 0L );
00053 
00054     void setAngle( int );
00055     void setDistance( int );
00056     void setOpacity( int );
00057 
00058     int angle() const;
00059     int distance() const;
00060     int opacity() const;
00061 
00062 private:
00063     KIntNumInput    *m_angle;
00064     KIntNumInput    *m_distance;
00065     KIntNumInput    *m_opacity;
00066 };
00067 
00068 class VCreateShadowCmd : public VCommand
00069 {
00070 public:
00071     VCreateShadowCmd( VDocument* doc, int distance, int angle, float opacity );
00072     virtual ~VCreateShadowCmd();
00073 
00074     virtual void execute();
00075     virtual void unexecute();
00076     virtual bool changesSelection() const { return true; }
00077 private:
00078     VSelection  *m_oldObjects;
00079     VSelection  *m_newObjects;
00080     int         m_distance;
00081     int         m_angle;
00082     float       m_opacity;
00083 };
00084 
00085 #endif
00086 
KDE Home | KDE Accessibility Home | Description of Access Keys