~ubuntu-branches/ubuntu/maverick/scribus-ng/maverick-backports

« back to all changes in this revision

Viewing changes to scribus/checkDocument.h

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2009-02-09 09:25:18 UTC
  • mfrom: (5.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090209092518-iqsxmh3pjspgrdyd
Tags: 1.3.5.dfsg~svn20090208-2
debian/control: Use "type-handling -n arm,armel,armeb any" to generate the
list of architectures to build on.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#ifndef CHECKDOCUMENT_H
8
8
#define CHECKDOCUMENT_H
9
9
 
10
 
#include <qvariant.h>
11
 
#include <qpixmap.h>
12
 
#include <qpushbutton.h>
13
 
#include <qdialog.h>
14
 
 
15
 
#include "scribusapi.h"
16
 
#include "scrpalettebase.h"
17
 
 
18
 
class QVBoxLayout;
 
10
#include <QMap>
 
11
 
 
12
class QEvent;
19
13
class QHBoxLayout;
20
 
class QGridLayout;
21
 
class QSpacerItem;
22
 
class QListView;
23
 
class QListViewItem;
24
 
class QComboBox;
25
14
class QLabel;
26
15
class QPushButton;
 
16
class QTreeWidget;
 
17
class QTreeWidgetItem;
 
18
class QVBoxLayout;
 
19
 
 
20
#include "scribusapi.h"
 
21
#include "scrpalettebase.h"
 
22
#include "scribusstructs.h"
 
23
 
27
24
class ScribusDoc;
 
25
class ScComboBox;
28
26
 
29
27
 
30
28
/*! \brief Preflight Verifier GUI (P.V.)
38
36
public:
39
37
        CheckDocument( QWidget* parent, bool modal );
40
38
        ~CheckDocument() {};
 
39
        
 
40
        virtual void changeEvent(QEvent *e);
41
41
 
42
42
        /*! \brief State of the P.V. */
43
43
        enum CheckMode { checkNULL, checkPDF, checkEPS, checkPrint, checkPrintPreview };
44
44
 
45
45
        /*! \brief Clean the list view tree and reset the P.V. attributes. */
46
46
        void clearErrorList();
47
 
        /*! \brief Get all possible errors for given document
 
47
        /*! \brief Get all possible errors for given document.
 
48
        It walks through all errors filled in DocumentChecker::checkDocument()
 
49
        to create a tree structure of error items:
 
50
        - some item e.g. page
 
51
        - - page item - its error if there is only one error
 
52
        - - another item
 
53
        - - - error 1
 
54
        - - - warning X etc.
 
55
        - another item...
48
56
        \param doc a reference to the ScribusDoc */
49
57
        void buildErrorList(ScribusDoc *doc);
50
58
        /*! \brief Enable/disable "ignore" button and noButton property
60
68
public slots:
61
69
        /*! \brief Called when is selected a new item in error list.
62
70
        \param ite and item */
63
 
        void slotSelect(QListViewItem* ite);
 
71
        void slotSelect(QTreeWidgetItem* ite);
64
72
        /*!\brief Do a manual rechecking. */
65
73
        void doReScan();
66
74
        /*! \brief Process error checking itself.
91
99
 
92
100
private:
93
101
        //! \brief Mappping Page Item - item nr.
94
 
        QMap<QListViewItem*, int> itemMap;
 
102
        QMap<QTreeWidgetItem*, int> itemMap;
95
103
        //! \brief Mappping Page - page nr.
96
 
        QMap<QListViewItem*, int> pageMap;
 
104
        QMap<QTreeWidgetItem*, int> pageMap;
97
105
        //! \brief Mappping Master Page - MP nr.
98
 
        QMap<QListViewItem*, QString> masterPageMap;
 
106
        QMap<QTreeWidgetItem*, QString> masterPageMap;
99
107
        //! \brief Mappping MP Item - MP item nr.
100
 
        QMap<QListViewItem*, int> masterPageItemMap;
 
108
        QMap<QTreeWidgetItem*, int> masterPageItemMap;
101
109
 
102
110
        //! \brief a reference to the current document
103
111
        ScribusDoc* m_Doc;
113
121
        QString textOverflow;
114
122
        QString notOnPage;
115
123
        QString missingImg;
 
124
        QString emptyImg;
116
125
        QString lowDPI;
117
126
        QString highDPI;
118
127
        QString transpar;
124
133
 
125
134
        //! \brief Flag if is ignore button shown. true = hidden, false = shown.
126
135
        bool noButton;
127
 
        QComboBox* curCheckProfile;
 
136
        ScComboBox* curCheckProfile;
128
137
        QLabel* textLabel1;
129
 
        QListView* reportDisplay;
 
138
        QTreeWidget* reportDisplay;
130
139
        QPushButton* ignoreErrors;
131
140
        QPushButton* reScan;
 
141
 
 
142
//      bool globalGraveError;
 
143
        bool pageGraveError;
 
144
        bool itemError;
 
145
 
 
146
        int minResDPI;
 
147
        int maxResDPI;
 
148
 
 
149
        /*! \brief Create content of QTreeWidgetItem based on error type
 
150
        and pageItem state.
 
151
        \param item a reference to current QTreeWidgetItem to fill the data
 
152
        \param errorType type of PreflightError value. There is one big switch/case.
 
153
        \param pageItem data for item are taken here.
 
154
        Available columns of item:
 
155
                1) items' group or item name
 
156
                2) detailed problem text
 
157
                3) membersip in layer
 
158
                4) beginning of the text (textframes) or image path (imageframe) (removed)
 
159
        */
 
160
        void buildItem(QTreeWidgetItem * item,
 
161
                                        PreflightError errorType,
 
162
                                        PageItem * pageItem);
132
163
};
133
164
 
134
165
#endif // CHECKDOCUMENT_H