/usr/include/scribus/loremipsum.h is in scribus 1.4.0.dfsg+r17300-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | /*
For general Scribus (>=1.3.2) copyright and licensing information please refer
to the COPYING file provided with the program. Following this notice may exist
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
/***************************************************************************
* *
* 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 <QDialog>
#include <QMap>
#include "scribusapi.h"
class QEvent;
class QGridLayout;
class QHBoxLayout;
class QLabel;
class QPushButton;
class QSpacerItem;
class QSpinBox;
class QCheckBox;
class QString;
class QStringList;
class QTreeWidget;
class QVBoxLayout;
class ScribusDoc;
// class LanguageManager;
/*! \brief XML parser for Lorem Ipsum file.
This helper class reads one file
\author Petr Vanek <petr@yarpen.cz>
*/
class SCRIBUS_API LoremParser
{
public:
/*! parse a XML file with given name
\param filename string fith the file name with full/relative path */
LoremParser(QString filename);
~LoremParser(){};
//! Is the LI correct?
bool correct;
//! 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, bool random = true);
};
/*! \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"?\>
\<lorem\>
\<name\>name to display\</name\>
\<author\>person name\</author\>
\<url\>web interface\</url\>
\<p\>text\</p\>
\<p\>...\</p\>
\</lorem\>
Files are in UTF8 encoding.
\author Petr Vanek <petr@yarpen.cz>
*/
class SCRIBUS_API LoremManager : public QDialog
{
Q_OBJECT
public:
/*! Reads all XML files in cfg directory. */
LoremManager(ScribusDoc* doc, QWidget* parent = 0);
~LoremManager();
virtual void changeEvent(QEvent *e);
//! all lorems with Public Name -> filename structure
QMap<QString,QString> availableLorems;
/*! Apply created LI into a frame
\param name filename of the selected LI
\param paraCount count of the paragraphs
*/
void insertLoremIpsum(QString name, int paraCount, bool random = true);
public slots:
virtual void okButton_clicked();
virtual void cancelButton_clicked();
protected:
ScribusDoc* m_Doc;
QTreeWidget* loremList;
QLabel* paraLabel;
QSpinBox* paraBox;
QCheckBox* randomCheckBox;
QPushButton* okButton;
QPushButton* cancelButton;
QGridLayout* LoremManagerLayout;
QVBoxLayout* layout3;
QHBoxLayout* layout2;
QSpacerItem* paraSpacer;
QHBoxLayout* layout1;
QSpacerItem* buttonSpacer;
// LanguageManager* langmgr;
QString standardloremtext;
protected slots:
virtual void languageChange();
};
#endif
|