1 /* This file is part of the KDE project 2 * Copyright (C) 2007, 2010 Thomas Zander <zander@kde.org> 3 * Copyright (C) 2012 Gopalakrishna Bhat A <gopalakbhat@gmail.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public License 16 * along with this library; see the file COPYING.LIB. If not, write to 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef PARAGRAPHGENERAL_H 22 #define PARAGRAPHGENERAL_H 23 24 #include "CharacterGeneral.h" 25 26 #include <QList> 27 28 class KoParagraphStyle; 29 class KoStyleThumbnailer; 30 class KoStyleManager; 31 class KoImageCollection; 32 class KoUnit; 33 class ParagraphBulletsNumbers; 34 class ParagraphIndentSpacing; 35 class ParagraphLayout; 36 class ParagraphDecorations; 37 class ParagraphDropCaps; 38 class StylesModel; 39 40 class ParagraphGeneral : public CharacterGeneral 41 { 42 Q_OBJECT 43 public: 44 explicit ParagraphGeneral(QWidget *parent = 0); 45 46 void setStyle(KoParagraphStyle *style, int level, bool directFormattingMode); 47 void setUnit(const KoUnit &unit); 48 49 void switchToGeneralTab(); 50 void hideStyleName(bool hide); 51 bool isStyleChanged(); 52 QString styleName() const; 53 void selectName(); 54 55 void setImageCollection(KoImageCollection *imageCollection); 56 KoImageCollection *imageCollection(); 57 void setStyleManager(KoStyleManager *sm); 58 59 KoParagraphStyle *style() const; 60 61 public Q_SLOTS: 62 void save(KoParagraphStyle *style = 0); 63 64 Q_SIGNALS: 65 void nameChanged(const QString &name); 66 void styleAltered(const KoParagraphStyle *style); /// when saving 67 68 private Q_SLOTS: 69 void setPreviewParagraphStyle(); 70 71 private: 72 bool m_nameHidden; 73 74 ParagraphIndentSpacing *m_paragraphIndentSpacing; 75 ParagraphLayout *m_paragraphLayout; 76 ParagraphBulletsNumbers *m_paragraphBulletsNumbers; 77 ParagraphDecorations *m_paragraphDecorations; 78 ParagraphDropCaps *m_paragraphDropCaps; 79 80 KoParagraphStyle *m_style; 81 QList<KoParagraphStyle*> m_paragraphStyles; 82 KoStyleManager *m_styleManager; 83 84 KoStyleThumbnailer *m_thumbnail; 85 StylesModel *m_paragraphInheritedStyleModel; 86 }; 87 88 #endif 89