1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef _SCRIBUS_SHORTPARSE_H_
8 #define _SCRIBUS_SHORTPARSE_H_
9 
10 #include "shortwords.h"
11 
12 #include <QObject>
13 
14 class PageItem;
15 
16 /*! \brief This is the Scribus Short Words plugin main mechanism.
17 
18 It walks trough the user specified objects and apply the spaces.
19 This code is based on the Scribus-Vlna plug in rewritten for
20 international use.
21 
22 \author Petr Vanek <petr@yarpen.cz> with contributors.
23 */
24 class SWParse : public QObject
25 {
26 	Q_OBJECT
27 
28 public:
29 	/*! \brief lightweight constructor */
30 	SWParse();
31 	/*! \brief nothing here to do */
~SWParse()32 	~SWParse(){};
33 
34 	/*! \brief count of the changes (one frame = one change) */
35 	uint modify;
36 
37 	//! language of the frame used
38 	QString lang;
39 
40 	/*! \brief process one frame - base method!
41 	Replacing strings via regular expressions. See detailed
42 	description in the code of this method.
43 	\param aFrame pointer to the existing text frame */
44 	void parseItem(PageItem *aFrame);
45 	/*! \brief selcted frames on the page */
46 	void parseSelection(ScribusDoc* doc);
47 	/*! \brief one page - using actual page */
48 	void parsePage(ScribusDoc* doc);
49 	/*! \brief one page
50 	\param page page number*/
51 	void parsePage(ScribusDoc* doc, int page);
52 	/*! \brief all pages in the document */
53 	void parseAll(ScribusDoc* doc);
54 };
55 
56 #endif
57