Back to index

scribus-ng  1.3.4.dfsg+svn20071115
loremipsum.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 
00016 #ifndef _LOREMIPSUM_H_
00017 #define _LOREMIPSUM_H_
00018 
00019 #include <qvariant.h>
00020 #include <qdialog.h>
00021 
00022 #include "scribusapi.h"
00023 
00024 class QVBoxLayout;
00025 class QHBoxLayout;
00026 class QGridLayout;
00027 class QSpacerItem;
00028 class QListView;
00029 class QListViewItem;
00030 class QLabel;
00031 class QSpinBox;
00032 class QCheckBox;
00033 class QPushButton;
00034 class QString;
00035 class QStringList;
00036 
00037 class ScribusDoc;
00038 class LanguageManager;
00039 
00040 
00045 class SCRIBUS_API LoremParser
00046 {
00047        public:
00050               LoremParser(QString filename);
00051               ~LoremParser(){};
00052 
00054               bool correct;
00056               QString name;
00058               QString author;
00060               QString url;
00062               QStringList loremIpsum;
00063 
00066               QString createLorem(uint parCount);
00067 };
00068 
00083 class SCRIBUS_API LoremManager : public QDialog
00084 {
00085        Q_OBJECT
00086 
00087        public:
00089               LoremManager(ScribusDoc* doc, QWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0);
00090               ~LoremManager();
00091 
00093               QMap<QString,QString> availableLorems;
00094 
00099               void insertLoremIpsum(QString name, int paraCount);
00100 
00101        public slots:
00102               virtual void okButton_clicked();
00103               virtual void cancelButton_clicked();
00104 
00105        protected:
00106               ScribusDoc* m_Doc;
00107               QListView* loremList;
00108               QLabel* paraLabel;
00109               QSpinBox* paraBox;
00110               QPushButton* okButton;
00111               QPushButton* cancelButton;
00112 
00113               QGridLayout* LoremManagerLayout;
00114               QVBoxLayout* layout3;
00115               QHBoxLayout* layout2;
00116               QSpacerItem* paraSpacer;
00117               QHBoxLayout* layout1;
00118               QSpacerItem* buttonSpacer;
00119               LanguageManager* langmgr;
00120               QString standardloremtext;
00121 
00122        protected slots:
00123               virtual void languageChange();
00124 
00125 };
00126 
00127 #endif