diff -r 7a96bd401351 -r 5c5b4464b24f exports.h --- a/exports.h Sun Jan 30 12:58:47 2005 +0000 +++ b/exports.h Fri Mar 05 20:16:46 2010 +0000 @@ -6,29 +6,118 @@ #include #include "mapcenterobj.h" +#include "settings.h" +#include "vymmodel.h" -using namespace std; -///////////////////////////////////////////////////////////////////////////// -class Export +/*! \brief Base class for all exports +*/ + +/////////////////////////////////////////////////////////////////////// + +class ExportBase { public: - Export(); - bool setOutputDir (QString); - void setPath(const QString &); - void setMapCenter (MapCenterObj*); - void setIndentPerDepth (QString); - void exportMap(); - void exportAsHTML(); + ExportBase(); + virtual ~ExportBase(); + virtual void setDir(const QDir&); + virtual void setFile(const QString &); + virtual QString getFile (); + virtual void setModel (VymModel *m); + virtual void setCaption(const QString &); + virtual void addFilter (const QString &); + virtual bool execDialog(); + virtual bool canceled(); protected: - QString getSectionString (BranchObj*); - void write (QString); + VymModel *model; + virtual QString getSectionString (BranchObj*); -private: - QDir outdir; - QString filepath; - MapCenterObj *mapCenter; + QDir tmpDir; + QDir outDir; + QString outputFile; QString indentPerDepth; + QString caption; + QString filter; + bool cancelFlag; }; +/////////////////////////////////////////////////////////////////////// +class ExportASCII:public ExportBase +{ +public: + ExportASCII(); + virtual void doExport(); + virtual QString underline (const QString &text, const QString &line); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportCSV:public ExportBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportXMLBase:public ExportBase +{ +}; + +/////////////////////////////////////////////////////////////////////// +class ExportKDE3Bookmarks:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportKDE4Bookmarks:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportFirefoxBookmarks:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportTaskjuggler:public ExportXMLBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportLaTeX:public ExportBase +{ +public: + virtual void doExport(); +}; + +/////////////////////////////////////////////////////////////////////// +class ExportOO:public ExportBase +{ +public: + ExportOO(); + ~ExportOO(); + void exportPresentation(); + bool setConfigFile (const QString &); +private: + QString buildList (BranchObj*); + bool useSections; + QString configFile; + QString configDir; + QString templateDir; + QString content; + QString contentTemplate; + QString contentTemplateFile; + QString contentFile; + QString pageTemplate; + QString pageTemplateFile; + QString sectionTemplate; + QString sectionTemplateFile; +}; #endif