Ran am2cmake.
[basket4.git] / src / htmlexporter.h
blob545e41c05e3a8b3ec2349691f6e8c746d38fe25d
1 /***************************************************************************
2 * Copyright (C) 2003 by Sébastien Laoût *
3 * slaout@linux62.org *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef HTMLEXPORTER_H
22 #define HTMLEXPORTER_H
24 #include <qstring.h>
25 #include <q3textstream.h>
27 class KProgress;
29 class Basket;
30 class Note;
32 /**
33 * @author Sébastien Laoût <slaout@linux62.org>
35 class HTMLExporter
37 public:
38 HTMLExporter(Basket *basket);
39 ~HTMLExporter();
40 private:
41 void prepareExport(Basket *basket, const QString &fullPath);
42 void exportBasket(Basket *basket, bool isSubBasket);
43 void exportNote(Note *note, int indent);
44 void writeBasketTree(Basket *currentBasket);
45 void writeBasketTree(Basket *currentBasket, Basket *basket, int indent);
47 public:
48 QString copyIcon(const QString &iconName, int size);
49 QString copyFile(const QString &srcPath, bool createIt);
51 public:
52 // Absolute path of the file name the user choosen:
53 QString filePath; // eg.: "/home/seb/foo.html"
54 QString fileName; // eg.: "foo.html"
56 // Absolute & relative paths for the current basket to be exported:
57 QString basketFilePath; // eg.: "/home/seb/foo.html" or "/home/seb/foo.html_files/baskets/basketN.html"
58 QString filesFolderPath; // eg.: "/home/seb/foo.html_files/"
59 QString filesFolderName; // eg.: "foo.html_files/" or "../"
60 QString iconsFolderPath; // eg.: "/home/seb/foo.html_files/icons/"
61 QString iconsFolderName; // eg.: "foo.html_files/icons/" or "../icons/"
62 QString imagesFolderPath; // eg.: "/home/seb/foo.html_files/images/"
63 QString imagesFolderName; // eg.: "foo.html_files/images/" or "../images/"
64 QString dataFolderPath; // eg.: "/home/seb/foo.html_files/data/" or "/home/seb/foo.html_files/baskets/basketN-data/"
65 QString dataFolderName; // eg.: "foo.html_files/data/" or "basketN-data/"
66 QString basketsFolderPath; // eg.: "/home/seb/foo.html_files/baskets/"
67 QString basketsFolderName; // eg.: "foo.html_files/baskets/" or ""
69 // Various properties of the currently exporting basket:
70 QString backgroundColorName;
72 // Variables used by every export methods:
73 Q3TextStream stream;
74 Basket *exportedBasket;
75 bool withBasketTree;
76 KProgress *progress;
79 #endif // HTMLEXPORTER_H