Scribus
Open source desktop publishing at your fingertips
CheckDocument Class Reference

Preflight Verifier GUI (P.V.) A tool to check document for errors (in P.V. profiles) which can be set up in Preferences dialog. More...

#include <checkDocument.h>

Inheritance diagram for CheckDocument:
Collaboration diagram for CheckDocument:

Public Types

enum  CheckMode {
  checkNULL, checkPDF, checkEPS, checkPrint,
  checkPrintPreview
}
 State of the P.V.
 

Public Slots

void slotSelect (QTreeWidgetItem *ite)
 Called when is selected a new item in error list. More...
 
void doReScan ()
 Do a manual rechecking.
 
void newScan (const QString &name)
 Process error checking itself. More...
 
- Public Slots inherited from ScrPaletteBase
virtual void setPaletteShown (bool)
 
virtual void setFontSize ()
 
virtual int exec ()
 
int exec (QWidget *newParent)
 

Signals

void selectElement (PageItem *, bool, int)
 Signal emitted when user selects any page item in error list.
 
void selectElementByItem (PageItem *, bool)
 
void selectPage (int)
 Signal emitted when user selects any page in error list.
 
void selectMasterPage (QString)
 Signal emitted when user selects any master page in error list.
 
void selectMasterPageElement (QString, int)
 Signal emitted when user selects any master page item in error list.
 
void ignoreAllErrors ()
 Signal emitted when user press the "ignore errors" button.
 
- Signals inherited from ScrPaletteBase
void paletteShown (bool)
 Let the action for this palette know when something changes and it hasnt caused it.
 

Public Member Functions

 CheckDocument (QWidget *parent, bool modal)
 
virtual void changeEvent (QEvent *e)
 
void setDoc (ScribusDoc *doc)
 
void clearErrorList ()
 Clean the list view tree and reset the P.V. attributes.
 
void buildErrorList (ScribusDoc *doc)
 Get all possible errors for given document. It walks through all errors filled in DocumentChecker::checkDocument() to create a tree structure of error items: More...
 
void setIgnoreEnabled (bool state)
 Enable/disable "ignore" button and noButton property. More...
 
bool isIgnoreEnabled ()
 Get the state of the "ignore" button. More...
 
- Public Member Functions inherited from ScrPaletteBase
 ScrPaletteBase (QWidget *parent=NULL, const QString &prefsContext=QString::null, bool modal=false, Qt::WindowFlags f=0)
 
virtual void hide ()
 Sample way to grab keystrokes, simply calls superclass at this point.
 
void startup ()
 

Public Attributes

CheckMode checkMode
 Current state of P.V.
 

Protected Types

enum  {
  PV_ANNOTATION, PV_APPLIED_MASTER_DIFF_SIDE, PV_EMPTY_IMAGE_FRAME, PV_EMPTY_TEXT_FRAME,
  PV_FONT_NOT_EMBEDDED, PV_HIGH_DPI, PV_IMAGE_FRAME_PART_FILLED, PV_IS_GIF,
  PV_LOW_DPI, PV_MISSING_GLYPH, PV_MISSING_IMAGE, PV_NON_ON_PAGE,
  PV_NOT_CMYK_SPOT, PV_RASTER_PDF, PV_TEXT_OVERFLOW, PV_TRANSPARENCY,
  PV_WRONG_FONT, PV_LAYER_TRANSPARENCY, PV_LAYER_BLENDMODE, PV_LAYER_PRINTVIS_MISMATCH
}
 enum for warning strings for common texts in GUI dialog tree
 

Protected Slots

virtual void languageChange ()
 
- Protected Slots inherited from ScrPaletteBase
virtual void reject ()
 

Protected Member Functions

void buildItem (QTreeWidgetItem *item, PreflightError errorType, PageItem *pageItem)
 Create content of QTreeWidgetItem based on error type and pageItem state. More...
 
- Protected Member Functions inherited from ScrPaletteBase
virtual void setPrefsContext (QString context)
 Set the Preferences context to be used for storage of startup visibility and position and size.
 
void storePosition ()
 
void storePosition (int newX, int newY)
 
void storeSize ()
 
void storeVisibility (bool)
 
virtual void showEvent (QShowEvent *showEvent)
 Restore the geometry of the window when showing it.
 
virtual void closeEvent (QCloseEvent *closeEvent)
 Captures the close event and changes it to hide.
 
virtual void hideEvent (QHideEvent *)
 Stores the geometry of the window when hiding.
 

Protected Attributes

QVBoxLayout * checkDocumentLayout
 
QHBoxLayout * layout1
 
QHBoxLayout * layout2
 
QMap< QTreeWidgetItem *, QPointer< PageItem > > itemMap
 Mappping Page Item - item nr.
 
QMap< QTreeWidgetItem *, ScPage * > pageMap
 Mappping Page - page nr.
 
QMap< QTreeWidgetItem *, ScPage * > masterPageMap
 Mappping Master Page - MP nr.
 
QMap< QTreeWidgetItem *, QPointer< PageItem > > masterPageItemMap
 Mappping MP Item - MP item nr.
 
QMap< QTreeWidgetItem *, int > posMap
 Mappping Page Item - cursor position in item.
 
ScribusDocm_Doc
 a reference to the current document
 
QPixmap graveError
 Icon for fatal error.
 
QPixmap onlyWarning
 Icon for warning.
 
QPixmap noErrors
 Icon for OK.
 
QMap< int, QPair< QString, QString > > warnMap
 Strings for common texts in GUI dialog tree.
 
bool noButton
 Flag if is ignore button shown. true = hidden, false = shown.
 
ScComboBoxcurCheckProfile
 
QLabel * textLabel1
 
QTreeWidget * reportDisplay
 
QPushButton * ignoreErrors
 
QPushButton * reScan
 
bool pageGraveError
 
bool itemError
 
bool showPagesWithoutErrors
 
bool showNonPrintingLayerErrors
 
int minResDPI
 
int maxResDPI
 
- Protected Attributes inherited from ScrPaletteBase
PrefsContextpalettePrefs
 
QString prefsContextName
 
bool visibleOnStartup
 
QWidget * originalParent
 
QWidget * tempParent
 

Detailed Description

Preflight Verifier GUI (P.V.) A tool to check document for errors (in P.V. profiles) which can be set up in Preferences dialog.

Member Function Documentation

void CheckDocument::buildErrorList ( ScribusDoc doc)

Get all possible errors for given document. It walks through all errors filled in DocumentChecker::checkDocument() to create a tree structure of error items:

  • some item e.g. page
  • - page item - its error if there is only one error
  • - another item
  • - - error 1
  • - - warning X etc.
  • another item...
    Parameters
    doca reference to the ScribusDoc
void CheckDocument::buildItem ( QTreeWidgetItem *  item,
PreflightError  errorType,
PageItem pageItem 
)
protected

Create content of QTreeWidgetItem based on error type and pageItem state.

Parameters
itema reference to current QTreeWidgetItem to fill the data
errorTypetype of PreflightError value. There is one big switch/case.
pageItemdata for item are taken here. Available columns of item: 1) items' group or item name 2) detailed problem text 3) membersip in layer 4) beginning of the text (textframes) or image path (imageframe) (removed)
bool CheckDocument::isIgnoreEnabled ( )

Get the state of the "ignore" button.

Return values
trueon button is visible
void CheckDocument::newScan ( const QString &  name)
slot

Process error checking itself.

Parameters
namea QString with P.V. profile name
void CheckDocument::setIgnoreEnabled ( bool  state)

Enable/disable "ignore" button and noButton property.

Parameters
statetrue to enable the button
void CheckDocument::slotSelect ( QTreeWidgetItem *  ite)
slot

Called when is selected a new item in error list.

Parameters
iteand item

The documentation for this class was generated from the following files: