Subversion Repositories Scribus


Rev 2621 | Rev 3987 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef HYPLUG_H
#define HYPLUG_H

#include <qobject.h>
#include <qtextcodec.h>

#include "scribusapi.h"
#include "hyphen.h"
class ScribusDoc;
class ScribusApp;
class PageItem;

This class is the core of the Scribus hyphenation system.

class SCRIBUS_API Hyphenator : public QObject

    Hyphenator(QWidget* parent, ScribusDoc *dok, ScribusApp* app);
    /*! There are languages having rule not to hyphen word shorter than
    MinWordLen */

        int MinWordLen;
        /*! Maximum number of hyphenations allowed following each other */
        int HyCount;
    /*! Language in use */
        QString Language;
    /*! Flag - if user set auto hyphen processing.*/
        bool Automatic;
    /*! Flag - obsolete? */
        bool AutoCheck;
    /*! Reference to the hyphen dictionary structure. */
        HyphenDict *hdict;
    /*! Embeded reference to the \see ScribusDoc filled by \a dok */
        ScribusDoc *doc;
    /*! Embeded reference to the \see ScribusApp filled by \a app */
        ScribusApp *Sap;
    /*! Flag - if is the dictionary without errors etc. If is it 'false'
        hyphen aborted. */

        bool useAble;
    /*! Qt text codec which handles local characters. */
        QTextCodec *codec;

public slots:
        void slotNewDict(QString name);
        void slotNewSettings(int Wordlen, bool Autom, bool ACheck, int Num);
        void slotHyphenateWord(PageItem* it, QString text, int firstC);
        void slotHyphenate(PageItem *it);
        void slotDeHyphenate(PageItem *it);