plugin.h

Go to the documentation of this file.
00001 /* ============================================================
00002  * File   : plugin.h
00003  * Authors: KIPI team developers (see AUTHORS files for details)
00004  *          
00005  * Date   : 2004-02
00006  * Description :
00007  *
00008  * Copyright 2004 by the KIPI team
00009  * 
00010  * This program is free software; you can redistribute it
00011  * and/or modify it under the terms of the GNU Library General
00012  * Public License as published by the Free Software Foundation;
00013  * either version 2, or (at your option)
00014  * any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Library General Public License for more details.
00020  *
00021  * ============================================================ */
00022 
00023 #ifndef KIPI_PLUGIN_H
00024 #define KIPI_PLUGIN_H
00025 
00026 // Qt includes.
00027 
00028 #include <qobject.h>
00029 
00030 // KDE includes.
00031 
00032 #include <kaction.h>
00033 
00034 // Lib KIPI includes.
00035 
00036 #include "libkipi/interface.h"
00037 
00038 #include "libkipi/libkipi_export.h"
00039 
00040 class KInstance;
00041 
00043 namespace KIPI
00044 {
00045     enum Category 
00046        {
00047        IMAGESPLUGIN = 0,
00048        EFFECTSPLUGIN,
00049        TOOLSPLUGIN,
00050        IMPORTPLUGIN,
00051        EXPORTPLUGIN,
00052        BATCHPLUGIN,
00053        COLLECTIONSPLUGIN
00054        };
00055 
00056     class LIBKIPI_EXPORT Plugin : public QObject
00057     {
00058     public:
00059         Plugin( KInstance* instance, QObject *parent, const char* name);
00060         virtual ~Plugin();
00061 
00062         virtual void setup( QWidget* widget ) = 0;
00063         KActionPtrList actions( QWidget* parent = 0 );
00064         KActionCollection* actionCollection( QWidget* parent = 0 );
00065         virtual Category category( KAction* action ) const = 0;
00066 
00067     protected:
00068         void addAction( KAction* action );
00069 
00070     private:
00071         struct Private;
00072         Private* d;
00073     };
00074 }
00075 
00076 #endif  // KIPI_PLUGIN_H 

Generated on Tue Sep 25 22:34:22 2007 for libKipi by  doxygen 1.5.3