~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to words/part/dockers/KWStatistics.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of the KDE project
2
 
 * Copyright (C) 2005, 2007 Thomas Zander <zander@kde.org>
3
 
 * Copyright (C) 2012 Shreya Pandit <shreya@shreyapandit.com>
4
 
 * This library is free software; you can redistribute it and/or
5
 
 * modify it under the terms of the GNU Library General Public
6
 
 * License as published by the Free Software Foundation; either
7
 
 * version 2 of the License, or (at your option) any later version.
8
 
 *
9
 
 * This library is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 
 * Library General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU Library General Public License
15
 
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 
 * Boston, MA 02110-1301, USA.
18
 
 */
19
 
 
20
 
#ifndef KWSTATISTICS_H
21
 
#define KWSTATISTICS_H
22
 
 
23
 
 
24
 
#include<kglobal.h>
25
 
 
26
 
#include <QWidget>
27
 
 
28
 
#include <ui_KWStatisticsDocker.h>
29
 
 
30
 
class QTimer;
31
 
class QTextDocument;
32
 
class KoCanvasResourceManager;
33
 
class KoSelection;
34
 
class KWDocument;
35
 
class StatisticsPreferencesPopup;
36
 
class KConfigGroup;
37
 
 
38
 
class KWStatistics : public QWidget
39
 
{
40
 
    Q_OBJECT
41
 
public:
42
 
    KWStatistics(KoCanvasResourceManager *provider, KWDocument *m_document,
43
 
                 KoSelection *selection = 0, QWidget *parent = 0);
44
 
 
45
 
    virtual ~KWStatistics();
46
 
 
47
 
    void updateDataUi();
48
 
 
49
 
public slots:
50
 
    void wordsDisplayChanged(int);
51
 
    void sentencesDisplayChanged(int);
52
 
    void linesDisplayChanged(int);
53
 
    void syllablesDisplayChanged(int);
54
 
    void charspaceDisplayChanged(int);
55
 
    void charnospaceDisplayChanged(int);
56
 
    void eastDisplayChanged(int);
57
 
    void fleschDisplayChanged(int);
58
 
    void updateData();
59
 
    void selectionChanged();
60
 
 
61
 
private:
62
 
    int countCJKChars(const QString &text);
63
 
    Ui::KWStatisticsDocker widgetDocker;
64
 
 
65
 
    KoCanvasResourceManager *m_resourceManager;
66
 
    KoSelection *m_selection;
67
 
    KWDocument *m_document;
68
 
    QTextDocument *m_textDocument;
69
 
    QTimer *m_timer;
70
 
    StatisticsPreferencesPopup *m_menu;
71
 
 
72
 
    long m_charsWithSpace;
73
 
    long m_charsWithoutSpace;
74
 
    long m_words;
75
 
    long m_sentences;
76
 
    long m_lines;
77
 
    long m_syllables;
78
 
    long m_paragraphs;
79
 
    long m_cjkChars;
80
 
    bool m_showInDocker;
81
 
};
82
 
 
83
 
#endif