Subversion Repositories Scribus


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

 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *

#ifndef _LOREMIPSUM_H_
#define _LOREMIPSUM_H_

#include <qvariant.h>
#include <qdialog.h>

class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QListView;
class QListViewItem;
class QLabel;
class QSpinBox;
class QCheckBox;
class QPushButton;
class QString;
class QStringList;

/*! \brief This module provides simple interface to the various Lorem Ipsum variants.
Scribus LI are stored in the set of XML files.
The file has followind structure:
                                   <?xml version="1.0" encoding="utf8"?>

                                   <name>name to display</name>
                                   <author>person name</author>
                                   <url>web interface</url>

Files are in UTF encoding.
\author Petr Vanek <>

/*! \brief XML parser for Lorem Ipsum file.
This helper class reads one ile
\author Petr Vanek <>

class LoremParser
                /*! parse a XML file with given name
                \param filename string fith the file name with full/relative path */

                LoremParser(QString filename);

                //! Name to display
                QString name;
                //! Author of the LI
                QString author;
                //! Website of the LI
                QString url;
                //! Paragraphs of the LI
                QStringList loremIpsum;

                /*! Construct a LI
                \param parCount count of the paragraphs */

                QString createLorem(uint parCount);

class LoremManager : public QDialog

                /*! Reads all XML files in cfg directory. */
                LoremManager(QWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0);

                //! all lorems with Public Name -> filename structure
                QMap<QString,QString> availableLorems;

        public slots:
                virtual void okButton_clicked();
                virtual void cancelButton_clicked();

                QListView* loremList;
                QLabel* paraLabel;
                QSpinBox* paraBox;
                QCheckBox* alwaysCheckBox;
                QPushButton* okButton;
                QPushButton* cancelButton;

                QGridLayout* LoremManagerLayout;
                QVBoxLayout* layout3;
                QHBoxLayout* layout2;
                QSpacerItem* paraSpacer;
                QHBoxLayout* layout1;
                QSpacerItem* buttonSpacer;

        protected slots:
                virtual void languageChange();