Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scgtplugin.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 
00008 #ifndef SCGTPLUGIN_H
00009 #define SCGTPLUGIN_H
00010 
00011 #include "scribusapi.h"
00012 #include "scplugin.h"
00013 #include "customfdialog.h"
00014 
00015 class QString;
00016 class QCheckBox;
00017 class QStringList;
00018 class QDir;
00019 class QHBox;
00020 
00028 class SCRIBUS_API ScGTPlugin : public ScPlugin
00029 {
00030        Q_OBJECT
00031 public:
00032        ScGTPlugin();
00033        ~ScGTPlugin() {};
00034 
00040        virtual QString fileFormatName() const = 0;
00041 
00047        virtual QStringList fileExtensions() const = 0;
00048 
00060        virtual void run(const QString &filename, const QString &encoding = QString::null) {};
00061 
00069        virtual void run(const QString &text /*, insert style stuff here */) {};
00070 
00071 };
00072 
00073 /***************************************************************************************/
00074 /***************************************************************************************/
00075 
00085 class SCRIBUS_API ScGTPluginManager {
00086 public:
00087        static ScGTPluginManager* instance(); // singleton
00088        static void deleteInstance();
00089 
00090        void registerGTPlugin(ScGTPlugin *plugin);
00091        void unRegisterGTPlugin(ScGTPlugin *plugin);
00092 
00094        void run();
00095 
00096 private:
00097        static ScGTPluginManager *instance_;
00098 
00099        QPtrList<ScGTPlugin> plugins_;
00100 
00101        ScGTPluginManager();
00102        ~ScGTPluginManager();
00103 
00104        QString fileFilter();
00105 
00107        void options();
00108 };
00109 
00110 /***************************************************************************************/
00111 /***************************************************************************************/
00112 
00113 class SCRIBUS_API ScGTFileDialog : public CustomFDialog {
00114        Q_OBJECT
00115 public:
00116        ScGTFileDialog(const QString & dirName,
00117                       const QString & filters,
00118                       QWidget * parent = 0, const char * name = 0);
00119        ~ScGTFileDialog();
00120 
00121        bool showOptions() const;
00122        bool append() const;
00123 
00124 private:
00125        QHBox *diaExtension_;
00126        QCheckBox *showOptionsBox_;
00127        QCheckBox *appendBox_;
00128        void customize();
00129 };
00130 
00131 /***************************************************************************************/
00132 /***************************************************************************************/
00133 
00134 class SCRIBUS_API ScGTOptions {
00135        
00136 };
00137 
00138 /***************************************************************************************/
00139 /***************************************************************************************/
00140 
00141 class SCRIBUS_API ScGTOptionsWindow {
00142        
00143 };
00144 
00145 #endif