kexi

kexiimagecontextmenu.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2006 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 KexiImageContextMenu_H
00021 #define KexiImageContextMenu_H
00022 
00023 #include <kpopupmenu.h>
00024 #include <kurl.h>
00025 
00026 class KActionCollection;
00027 class KexiDataItemInterface;
00028 
00030 
00037 class KEXIGUIUTILS_EXPORT KexiImageContextMenu : public KPopupMenu
00038 {
00039     Q_OBJECT
00040 
00041     public:
00042         KexiImageContextMenu(QWidget *parent);
00043         virtual ~KexiImageContextMenu();
00044 
00045         KActionCollection* actionCollection() const;
00046 
00050         static bool updateTitle(QPopupMenu *menu, const QString& title, const QString& icon = QString::null);
00051 
00052     public slots:
00053         void updateActionsAvailability();
00054 
00055         virtual void insertFromFile();
00056         virtual void saveAs();
00057         virtual void cut();
00058         virtual void copy();
00059         virtual void paste();
00060         virtual void clear();
00061         virtual void showProperties();
00062 
00063     signals:
00066         void updateActionsAvailabilityRequested(bool& valueIsNull, bool& valueIsReadOnly);
00067 
00069         void insertFromFileRequested(const KURL &url);
00070 
00074         void aboutToSaveAsRequested(QString& origFilename, QString& fileExtension, bool& dataIsEmpty);
00075 
00077         void saveAsRequested(const QString& fileName);
00078 
00080         void cutRequested();
00081 
00083         void copyRequested();
00084 
00086         void pasteRequested();
00087 
00089         void clearRequested();
00090 
00092         void showPropertiesRequested();
00093 
00094     protected:
00095         class Private;
00096         Private *d;
00097 };
00098 
00099 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys