pdfedit  0.4.5
About: PDFedit is a free and open source library for manipulating PDF documents.
  Fossies Dox: pdfedit-0.4.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
gui Namespace Reference

Graphical user interface namespace. More...

Classes

class  AboutWindow
 Window displaying program version and authors. More...
 
class  AddItemDialog
 Dialog for adding items to Dictionaries or Arrays. More...
 
class  AnnotDialog
 Dialog for adding annotations. More...
 
class  Base
 Script hosting base class. More...
 
class  BaseConsole
 Script hosting base class. More...
 
class  BaseCore
 Core scripting functions. More...
 
class  BaseGUI
 Script hosting base class. More...
 
class  BoolOption
 Widget to edit boolean option. More...
 
class  BoolProperty
 Property editor widget for editing CBool. More...
 
class  ColorTool
 Toolbar widget for changing current color. More...
 
class  ComboOption
 Widget to edit option by picking from list of choices. More...
 
class  CommandWindow
 
class  ConsoleWindow
 Commandline mode Main "window". More...
 
class  ConsoleWriter
 Abstract class for console output. More...
 
class  ConsoleWriterConsole
 Console output in commandline. More...
 
class  ConsoleWriterGui
 Console output in GUI. More...
 
class  DialogOption
 Abstract class for option editable as string and pickable by dialog. More...
 
class  TreeItemDragObject
 Drag and drop object. More...
 
class  DragListView
 Drag and drop enhanced QListView. More...
 
class  EditTool
 Toolbar widget for editing arbitrary text. More...
 
class  FileOption
 Widget to edit option by typing or picking a file. More...
 
class  FontOption
 Widget to edit option by typing or picking a font. More...
 
class  HelpWindow
 Help window. More...
 
class  IconCache
 Class caching loaded icons. More...
 
class  ImageWidget
 
class  IntOption
 Widget to edit integer option. More...
 
class  IntProperty
 Property editor widget for editing CInt. More...
 
class  InvalidMenuException
 Exception raised when encountering invalid menu item. More...
 
class  Menu
 Menu and Toolbar management. More...
 
struct  NodeData
 
class  ListItem
 
class  MergeArray
 Type for merge dialog result. More...
 
class  MergeDialog
 Dialog for merging documents. More...
 
class  MultiTreeWindow
 Treeview with tab support. More...
 
class  NameProperty
 Property editor widget for editing CName. More...
 
class  NullPointerException
 Exception raised when encountering NULL pointer when not expected. More...
 
class  NumberTool
 Toolbar widget for editing arbitrary text. More...
 
class  OperatorHint
 Mode controller wrapper. More...
 
class  Option
 Abstract class for option editing widget. More...
 
class  OptionWindow
 Window for showing/editing program settings. More...
 
class  TextLine
 
class  PageSpace
 
class  PageTool
 Toolbar widget for changing page. More...
 
class  DrawingObjectFactory
 
class  DrawingObject
 
class  DrawingLine
 
class  DrawingRect
 
class  DrawingRect2
 
class  DrawingRect3
 
class  PageViewModeFactory
 
class  PageViewMode
 
class  PageViewMode_NewObject
 
class  PageViewMode_TextSelection
 
class  PageViewMode_OperatorsSelection
 
class  PageViewMode_Annotations
 
class  PageViewMode_TextMarking
 
class  PageViewMode_GraphicalOperatorsSelection
 
class  PageViewS
 
class  PasswordDialog
 Window for asking password. More...
 
class  PdfEditWindow
 Main window of application. More...
 
class  ProgressBar
 
class  Property
 Abstract class for property editing widget. More...
 
class  PropertyEditor
 Property editor widget. More...
 
class  PropertyModeController
 Mode controller wrapper. More...
 
class  QSAnnotation
 QObject wrapper around CAnnotation object. More...
 
class  QSArray
 QObject wrapper around CArray. More...
 
class  QSCObject
 Common base class of all QObject wrappers used in scripting. More...
 
class  QSContentStream
 QObject wrapper around CContentStream. More...
 
class  QSDict
 QObject wrapper around CDict. More...
 
class  QSImporter
 QObject importer into scripting. More...
 
class  QSIProperty
 QObject wrapper around IProperty. More...
 
class  QSIPropertyArray
 QObject wrapper around array of arbitrary IProperty items. More...
 
class  QSMenu
 QObject wrapper around popup menu. More...
 
class  QSPage
 QObject wrapper around CPage. More...
 
class  QSPdf
 QObject wrapper around shared_ptr<CPdf>. More...
 
class  QSPdfOperator
 QObject wrapper around PdfOperator. More...
 
class  QSPdfOperatorIterator
 QObject wrapper around PdfOperator::Iterator. More...
 
class  QSPdfOperatorStack
 QObject wrapper around array (stack) of PDF Operators. More...
 
class  QSStream
 QObject wrapper around CStream. More...
 
class  QSTreeItem
 QObject wrapper around TreeItemAbstract (or its subclasses) More...
 
class  QSTreeItemContentStream
 QObject wrapper around TreeItemContentStream. More...
 
class  QSWrapper
 QObject Wrapper factory. More...
 
class  RealOption
 Widget to edit floating-point number option. More...
 
class  RealProperty
 Property editor widget for editing CReal. More...
 
class  BBoxOfObjectOnPage
 
class  RectArray
 
class  Rect2DArray
 
class  RefProperty
 Property editor widget for editing CRef. More...
 
class  RefPropertyDialog
 Dialog to pick reference target. More...
 
class  RefValidator
 Reference format validator. More...
 
class  RevisionTool
 Toolbar widget for changing revision. More...
 
class  SelectPagesDialog
 
class  SelectTool
 Toolbar widget for selecting arbitrary text. More...
 
class  SelfDestructiveWidget
 Widget destroying itself on certain signal. More...
 
class  Settings
 Saving and loading settings. More...
 
class  StaticSettings
 Loading static settings from file. More...
 
class  StatusBar
 Editor statusbar. More...
 
class  StringOption
 Widget to edit string option. More...
 
class  StringProperty
 Property editor widget for editing CString. More...
 
class  ToolBar
 Application toolbar. More...
 
class  ToolButton
 Pushbutton in application toolbar. More...
 
class  ToolFactory
 Special Toolbar item factory. More...
 
class  TreeData
 Tree parameters shared between tree and tree items. More...
 
class  TreeItem
 Tree item containing IProperty. More...
 
class  TreeItemAbstract
 Abstract tree item class. More...
 
class  TreeItemAnnotation
 Tree item containing CAnnotation. More...
 
class  TreeItemAnnotationContainer
 Tree item containing vector of Annotations. More...
 
class  TreeItemArray
 Tree item containing CArray. More...
 
class  TreeItemContentStream
 Tree item containing CContentStream. More...
 
class  TreeItemContentStreamObserver
 Observer for TreeItemContentStream. More...
 
class  TreeItemCStream
 Tree item containing CStream. More...
 
class  TreeItemDict
 Tree item containing CDict. More...
 
class  TreeItemGenericObserver
 Generic observer that will reload tree item on change. More...
 
class  TreeItemObserver
 Observer for TreeItem. More...
 
class  TreeItemOperatorContainer
 Tree item containing vector of PDF operators. More...
 
class  TreeItemOutline
 Tree item containing one outline. More...
 
class  TreeItemPage
 Tree item containing CPage. More...
 
class  TreeItemPageObserver
 Observer for TreeItemPage. More...
 
class  TreeItemPdf
 Tree item containing PDF document or special parts of it. More...
 
class  TreeItemPdfOperator
 Tree item containing PdfOperator. More...
 
class  TreeItemRef
 Tree item containing CRef. More...
 
class  TreeItemSimple
 Tree item containing simple property. More...
 
class  TreeWindow
 Object tree view widget. More...
 
class  Units
 Units conversion. More...
 
class  ZoomTool
 Toolbar widget for changing zoom level. More...
 

Typedefs

typedef vector< size_t > PageNums
 
typedef Q_PtrDict< Q_PtrDict
< void > > 
TreeBindingMap
 
typedef Q_PtrDictIterator
< QSTreeItem
TreeBindingMapIterator
 
typedef QMap< QString, QPixmap * > IconCacheData
 
typedef QMap< QString, QIcon * > IconSetsData
 
typedef QMap< QString, int > ActionMap
 
typedef QMap< int, QString > ActionMapInverse
 
typedef QMap< QString, ToolBar * > ToolBarList
 
typedef QMap< QString, QString > AccelList
 
typedef QMap< QString,
Q_PopupMenu * > 
MenuCache
 
typedef QMap< QMenuData
*, QString > 
MenuAccels
 
typedef QMap< QString, QString > MenuNames
 
typedef std::pair< QMenuData
*, int > 
MenuItemsValue
 
typedef std::pair< QString, int > MapKey
 
typedef QMap< MapKey,
MenuItemsValue
MenuItems
 
typedef QMap< MapKey, QWidget * > ToolbarItems
 
typedef std::pair< TreeType,
void * > 
TreeKey
 
typedef QMap< TreeKey,
TreeWindow * > 
TreeWindowList
 
typedef QMap< TreeWindow
*, TreeKey
TreeWindowListReverse
 
typedef PropertyMode PropertyFlags
 
typedef std::deque
< boost::shared_ptr
< PdfOperator > > 
pdfOpDeque
 
typedef int ChildType
 
typedef boost::shared_ptr
< IProperty
OutlineItem
 
typedef std::vector
< boost::shared_ptr
< pdfobjects::PdfOperator > > 
OperatorVector
 
typedef std::vector
< boost::shared_ptr
< pdfobjects::CAnnotation > > 
AnnotationVector
 

Enumerations

enum  TreeType {
  Tree_Invalid =0, Tree_Main, Tree_OperatorVector, Tree_IProperty,
  Tree_ContentStream
}
 
enum  TreeItemContentStreamMode { All, Text, Font, Graphic }
 
enum  childType {
  invalidItem =-1, pageList =1, outlineList, pageItem,
  outlineItem, dictItem
}
 

Functions

bool pdfWriterAskPassword (const QString &inFile, boost::shared_ptr< utils::PdfDocumentWriter > wr)
 
QString getDir (QFileDialog &fd)
 
QString openFileDialog (QWidget *parent, const QString &caption, const QString &settingName, const QString &filters, const QString &savePath)
 
QString openFileDialogPdf (QWidget *parent)
 
QString saveFileDialog (QWidget *parent, const QString &oldname, bool askOverwrite, const QString &caption, const QString &settingName, const QString &filters, const QString &savePath)
 
QString saveFileDialogPdf (QWidget *parent, const QString &oldname, bool askOverwrite)
 
QString saveFileDialogXml (QWidget *parent, const QString &oldname, bool askOverwrite)
 
QString readStringDialog (QWidget *parent, const QString &message, const QString &def)
 
QColor colorDialog (QWidget *parent)
 
bool questionDialog (QWidget *parent, const QString &msg)
 
void removeOperatorHint ()
 
void applyLookAndFeel (bool notify)
 
void applyStyle ()
 
PropertypropertyFactory (pdfobjects::IProperty *prop, const QString &_name, QWidget *parent)
 
void removePropertyModeController ()
 
QRegExp valid ("\\d+,\\d+")
 
QRegExp ivalid ("\\d*,?\\d*")
 

Variables

QString app =QString(APP_NAME) +" "+ QString(PDFEDIT_VERSION)
 
const Qt::WFlags aboutDialogFlags =Qt::WDestructiveClose | Qt::WType_Dialog
 
const int addDialogPropertyTypes =8
 
QString CMD = "gui/CommandLine/"
 
QString CMDSHOWHISTORY = "CmdShowHistory"
 
QString CMDSHOWLINE = "CmdShowLine"
 
QString CMDSHOWEDITOR = "CmdShowEditor"
 
QString HISTORYSIZE = "HistorySize"
 
QString HISTORYFILE = "HistoryFile"
 
QString HISTORYFILEITEMSEPARATOR = "HistoryFileItemSeparator"
 
QString DEFAULT__HISTORYFILE = ".pdfedit-history"
 
QString DEFAULT__HISTORYFILEITEMSEPARATOR = "<EndItem>"
 
int DEFAULT__HISTORYSIZE = 10
 
bool DEFAULT__CMDSHOWHISTORY = true
 
bool DEFAULT__CMDSHOWLINE = true
 
bool DEFAULT__CMDSHOWEDITOR = false
 
const char * TREEITEM_TYPE ="pdfedit/treeitem"
 
int iconCacheInstances =0
 
QStringList iconPath
 
QString iconStyleName
 
IconCacheData iconCache
 
IconSetsData setCache
 
const QString ROOT ="gui/items/"
 
const QString ROOT_ADD ="gui/items_add/"
 
const char MENUDEF_SEPARATOR =','
 
const char MENULIST_SEPARATOR =','
 
const char TOOLBARLIST_SEPARATOR =','
 
OperatorHintOperatorHintInstance =NULL
 
OperatorHinter hinter
 
StringConfigurationParser baseParserHint (StringConfigurationParser(NULL))
 
StringConfigurationParser parserHint (baseParserHint)
 
OptionWindowopt =NULL
 
QString PAGESPC = "gui/PageSpace/"
 
QString RESIZINGZONE = "ResizingZone"
 
int DEFAULT__RESIZINGZONE = 2
 
QString VIEWED_UNITS = "ViewedUnits"
 
QString DEFAULT__VIEWED_UNITS = "cm"
 
QString format = "x:%1 y:%2 %3"
 
int windowCount
 
const PropertyMode defaultPropertyMode =mdNormal
 
PropertyModeControllerpropertyModeControllerInstance =NULL
 
ModeController modeController
 
StringConfigurationParser baseParser (NULL)
 
ModeController::ConfParser parser (baseParser)
 
const int TMP_OFFSET =0x3fffffff
 
const QString APP_KEY = "/PDFedit/"
 
const QString CONFIG_FILE = "pdfeditrc"
 
const QString APP_PATH_VAR = "PDFEDIT_BIN"
 
const QString DATA_PATH_VAR = "PDFEDIT_DATA"
 
SettingsglobalSettings =NULL
 

Detailed Description

Graphical user interface namespace.

GUI namespace
This namespace contain all user-interface related classes (widgets, tree items, scripting wrappers and others)

Typedef Documentation

typedef QMap<QString, QString> gui::AccelList

Mapping from accel name to widget that have this accel

Definition at line 60 of file menu.h.

typedef QMap<QString, int> gui::ActionMap

Action map type: mapping from to

Definition at line 54 of file menu.h.

typedef QMap<int, QString> gui::ActionMapInverse

Inverse action map: mapping from to

Definition at line 56 of file menu.h.

typedef std::vector<boost::shared_ptr<pdfobjects::CAnnotation> > gui::AnnotationVector

Vector with annotationss

Definition at line 46 of file types.h.

typedef int gui::ChildType

Type of TreeItemAbstract's child.
The type is arbitrary integer and must be unique only across single type (different types must have different values).
Two distict TreeItemAbstract descendants can have collisions in types (same value meaning different type)
Types of childs from different items are never mixed or compared together

Definition at line 40 of file treeitemabstract.h.

typedef QMap<QString, QPixmap*> gui::IconCacheData

Icon Cache type: mapping from icon name to pixmap

Definition at line 53 of file iconcache.cc.

typedef QMap<QString, QIcon*> gui::IconSetsData

Icon Sets Cache type: mapping from icon name to icon set

Definition at line 55 of file iconcache.cc.

typedef std::pair<QString,int> gui::MapKey

Key type for MenuItems and ToolbarItems

Definition at line 70 of file menu.h.

typedef QMap<QMenuData*, QString> gui::MenuAccels

List of already used accelerators for specific popup menu

Definition at line 64 of file menu.h.

typedef QMap<QString, Q_PopupMenu*> gui::MenuCache

Cache of already defined menu items (some menus may be used on more than one place)

Definition at line 62 of file menu.h.

Pointer to of all items by item or "item class" name - menu items

Definition at line 72 of file menu.h.

typedef std::pair<QMenuData*,int> gui::MenuItemsValue

Value type for MenuItems type

Definition at line 68 of file menu.h.

typedef QMap<QString, QString> gui::MenuNames

Cache of already defined menu items (names)

Definition at line 66 of file menu.h.

typedef std::vector<boost::shared_ptr<pdfobjects::PdfOperator> > gui::OperatorVector

Vector with operators

Definition at line 43 of file types.h.

typedef boost::shared_ptr<IProperty> gui::OutlineItem

type representing one outline item

Definition at line 36 of file treeitemoutline.h.

typedef vector<size_t> gui::PageNums

(for pdftoxml)

Definition at line 72 of file base.cc.

typedef std::deque<boost::shared_ptr<PdfOperator> > gui::pdfOpDeque

Double ended queue with operators

Definition at line 38 of file qspdfoperatorstack.h.

Property flags (property mode - hidden, advanced ...)

Definition at line 41 of file property.h.

typedef QMap<MapKey,QWidget*> gui::ToolbarItems

Pointer to of all items by item or "item class" name - toolbar items

Definition at line 74 of file menu.h.

typedef QMap<QString, ToolBar*> gui::ToolBarList

Toolbar list type: mapping from toolbar name to toolbar object

Definition at line 58 of file menu.h.

Type containing binding between treeitem and its QSA wrapper.
Mapping is from TreeItemAbstract* to (QSTreeItem*)[]

Definition at line 44 of file basecore.h.

Iterator type for TreeBindingMap dictionary type

See Also
TreeBindingMap

Definition at line 56 of file basecore.h.

typedef std::pair<TreeType,void*> gui::TreeKey

Key type used to identify the tree in map

Definition at line 62 of file multitreewindow.h.

Mapping from TreeKey to associated Tree Window

Definition at line 65 of file multitreewindow.h.

Mapping from Tree Window to TreeKey associated with them (reverse mapping)

Definition at line 68 of file multitreewindow.h.

Enumeration Type Documentation

Child type specific for TreeItemPdf

Enumerator
invalidItem 
pageList 
outlineList 
pageItem 
outlineItem 
dictItem 

Definition at line 49 of file treeitempdf.cc.

What should be shown as children under tree item wit Content stream

Enumerator
All 

Show all operators

Text 

Show only text operators

Font 

Show only font operators

Graphic 

Show only graphical operators

Definition at line 46 of file treeitemcontentstream.h.

Possible types of tree - which item is in root

Enumerator
Tree_Invalid 

Invalid type

Tree_Main 

Main - the document

Tree_OperatorVector 

Vector with operators

Tree_IProperty 

IPproperty

Tree_ContentStream 

Content stream

Definition at line 53 of file multitreewindow.h.

Function Documentation

void gui::applyLookAndFeel ( bool  notify)

Applies look and feel settings from options

Parameters
notifyIf true, all fonts will be immediately changed in all widgets

Definition at line 501 of file optionwindow.cc.

References globalSettings, globalSettings, and globalSettings.

Referenced by gui::OptionWindow::apply(), and main().

void gui::applyStyle ( )

Apply current style to GUI (to all windows)

Definition at line 521 of file optionwindow.cc.

References globalSettings, globalSettings, and q_App.

QColor gui::colorDialog ( QWidget *  parent)

Invoke dialog to select color. Last selected color is remembered and offered as default next time. The 'initial default color' is red

Parameters
parentParent widget - will be disabled during the dialog.
Returns
selected color. If dialog is cancelled, 'invalid' color is returned

Definition at line 279 of file dialog.cc.

Referenced by gui::BaseGUI::pickColor().

QString gui::getDir ( QFileDialog &  fd)

Get current directory from File Dialog

Parameters
fdFile Dialog
Returns
current directory

Definition at line 54 of file dialog.cc.

References name, and name.

Referenced by openFileDialog(), and saveFileDialog().

QRegExp gui::ivalid ( "\\d*  ,
?\\d *"   
)

Regular expression for intermediate validation

Referenced by gui::RefValidator::validate().

QString gui::openFileDialog ( QWidget *  parent,
const QString &  caption,
const QString &  settingName,
const QString &  filters,
const QString &  savePath 
)

Generic "Open file" dialog. Wait for user to select one existing file and return its name. Will return NULL if user cancels the dialog.

Parameters
parentParent widget - will be disabled during the dialog.
captionCaption used in dialog title
settingNameKey in settings used to save/load dialog window position
savePathKey in settings used to identify where to save last used directory in the dialog
filtersFilters available to user to restrict shown filetypes in dialog
Returns
selected Filename (or NULL)

Definition at line 77 of file dialog.cc.

References getDir(), globalSettings, globalSettings, globalSettings, globalSettings, globalSettings, guiPrintDbg, name, and name.

Referenced by openFileDialogPdf().

QString gui::openFileDialogPdf ( QWidget *  parent)

Invoke "open file" dialog for PDF files. Specialization of openFileDialog

See Also
openFileDialog
Parameters
parentParent widget - will be disabled during the dialog.
Returns
selected Filename (or NULL)

Definition at line 137 of file dialog.cc.

References openFileDialog().

Referenced by gui::BaseGUI::fileOpenDialog().

bool gui::pdfWriterAskPassword ( const QString &  inFile,
boost::shared_ptr< utils::PdfDocumentWriter >  wr 
)

Common code to flattener and delinearizator Ask for password for opening the PDF file if one is needed

Parameters
inFilename of input file
wrPdfDocumentWriter
Returns
true if either valid password is entered or no password is needed

Definition at line 457 of file base.cc.

References gui::PasswordDialog::ask(), guiPrintDbg, and guiPrintDbg.

Referenced by gui::Base::delinearize(), and gui::Base::flatten().

Property * gui::propertyFactory ( pdfobjects::IProperty prop,
const QString &  _name,
QWidget *  parent 
)

Return one of the subclasses of Property widget for editing given property. If property is of unknown or uneditable type, NULL is returned

Parameters
propIProperty to create property from
parentParent widget
_nameName of this property
Returns
subclass of Property widget (or NULL)

Definition at line 52 of file propertyfactory.cc.

References pdfobjects::IProperty::getMode(), pdfobjects::IProperty::getType(), NULL, NULL, NULL, NULL, NULL, NULL, pdfobjects::pArray, pdfobjects::pBool, pdfobjects::pDict, pdfobjects::pInt, pdfobjects::pName, pdfobjects::pNull, pdfobjects::pOther, pdfobjects::pOther1, pdfobjects::pOther2, pdfobjects::pOther3, pdfobjects::pReal, pdfobjects::pRef, pdfobjects::pStream, and pdfobjects::pString.

bool gui::questionDialog ( QWidget *  parent,
const QString &  msg 
)

Asks question with Yes/No answer. "Yes" is default. Return true if user selected "yes", false if user selected "no"

Parameters
msgQuestion to display
parentParent widget - will be disabled during the dialog.
Returns
True if yes, false if no

Definition at line 293 of file dialog.cc.

References APP_NAME.

Referenced by gui::AddItemDialog::commit(), and gui::BaseGUI::question().

QString gui::readStringDialog ( QWidget *  parent,
const QString &  message,
const QString &  def 
)

Invoke "read string" dialog. Show message and wait for user to type any string. Will return NULL if user cancels the dialog.

Parameters
parentParent widget - will be disabled during the dialog.
messageMessage to show in the dialog
defDefault text that will be pre-typed in the dialog
Returns
typed text, or NULL if dialog cancelled

Definition at line 265 of file dialog.cc.

References APP_NAME.

void gui::removeOperatorHint ( )

atexit handler that will delete the single instance if it was allocated

Definition at line 62 of file operatorhint.cc.

References OperatorHintInstance, and OperatorHintInstance.

void gui::removePropertyModeController ( )

atexit handler that will delete the single instance if it was allocated

Definition at line 62 of file propertymodecontroller.cc.

References propertyModeControllerInstance, and propertyModeControllerInstance.

QString gui::saveFileDialog ( QWidget *  parent,
const QString &  oldname,
bool  askOverwrite,
const QString &  caption,
const QString &  settingName,
const QString &  filters,
const QString &  savePath 
)

Invoke generic "save file" dialog. Wait for user to select or type a single file and return its name. Will return NULL if user cancels the dialog.

Parameters
parentParent widget - will be disabled during the dialog.
oldnameName of file to be saved - if specified, this name will be pre-selected.
askOverwriteIf true and selected file exists, user will be asked to confirm overwriting it
captionCaption used in dialog title
settingNameKey in settings used to save/load dialog window position
savePathKey in settings used to identify where to save last used directory in the dialog
filtersFilters available to user to restrict shown filetypes in dialog
Returns
selected Filename (or NULL)

Definition at line 153 of file dialog.cc.

References APP_NAME, getDir(), globalSettings, globalSettings, globalSettings, globalSettings, globalSettings, globalSettings, guiPrintDbg, name, and name.

Referenced by gui::FileOption::dialog(), saveFileDialogPdf(), and saveFileDialogXml().

QString gui::saveFileDialogPdf ( QWidget *  parent,
const QString &  oldname,
bool  askOverwrite 
)

Invoke "save file" dialog for PDF files. Specialization of saveFileDialog

See Also
saveFileDialog
Parameters
parentParent widget - will be disabled during the dialog.
oldnameName of file to be saved - if specified, this name will be pre-selected.
askOverwriteIf true and selected file exists, user will be asked to confirm overwriting it
Returns
selected Filename (or NULL)

Definition at line 240 of file dialog.cc.

References saveFileDialog().

Referenced by gui::BaseGUI::fileSaveDialog(), and gui::BaseGUI::fileSaveDialogDiffer().

QString gui::saveFileDialogXml ( QWidget *  parent,
const QString &  oldname,
bool  askOverwrite 
)

Invoke "save file" dialog for xml files. Specialization of saveFileDialog

See Also
saveFileDialog
Parameters
parentParent widget - will be disabled during the dialog.
oldnameName of file to be saved - if specified, this name will be pre-selected.
askOverwriteIf true and selected file exists, user will be asked to confirm overwriting it
Returns
selected Filename (or NULL)

Definition at line 252 of file dialog.cc.

References saveFileDialog().

Referenced by gui::BaseGUI::fileSaveDialogXml().

QRegExp gui::valid ( "\\d+  ,
\\d+"   
)

Regular expression for validation

Referenced by gui::RefValidator::validate().

Variable Documentation

const Qt::WFlags gui::aboutDialogFlags =Qt::WDestructiveClose | Qt::WType_Dialog

About Dialog flags

Definition at line 49 of file aboutwindow.cc.

const int gui::addDialogPropertyTypes =8

Number of property types that can be added in AddItemDialog

Definition at line 49 of file additemdialog.h.

Referenced by gui::AddItemDialog::AddItemDialog(), and gui::AddItemDialog::AddItemDialog().

QString gui::app =QString(APP_NAME) +" "+ QString(PDFEDIT_VERSION)

Version of program

Definition at line 46 of file aboutwindow.cc.

Referenced by gui::AboutWindow::AboutWindow(), gui::AboutWindow::AboutWindow(), main(), main(), main(), main(), main(), main(), and main().

const QString gui::APP_KEY = "/PDFedit/"

"Root" item of all configuration settings, which are relative to this item

Definition at line 57 of file settings.cc.

Referenced by gui::Settings::read(), gui::Settings::write(), and gui::Settings::write().

const QString gui::APP_PATH_VAR = "PDFEDIT_BIN"

Name of variable which will be expanded to full path to the executable

Definition at line 61 of file settings.cc.

Referenced by gui::Settings::expand().

StringConfigurationParser gui::baseParser(NULL)

Low-level parser for simple configuration files (one line = one setting). This base parser is used by ConfParser, which is used by ModeController in loadFromFile

Referenced by TestUtils::modeControllerTC(), TestUtils::operatorHinterTC(), and configuration::ModeConfigurationParser::parse().

Low-level parser for simple configuration files (one line = one hint). This base parser is used by ConfParser, which is used by OperatorHinter in loadFromFile

QString gui::CMDSHOWEDITOR = "CmdShowEditor"

Settings key specifying if to show the script editor

Definition at line 57 of file commandwindow.cc.

Referenced by gui::CommandWindow::reloadSettings().

QString gui::CMDSHOWHISTORY = "CmdShowHistory"

Settings key specifying if to show the commandline

Definition at line 53 of file commandwindow.cc.

Referenced by gui::CommandWindow::reloadSettings().

QString gui::CMDSHOWLINE = "CmdShowLine"

Settings key specifying if the commandline is enables for editing or just as history drop-down

Definition at line 55 of file commandwindow.cc.

Referenced by gui::CommandWindow::reloadSettings().

const QString gui::CONFIG_FILE = "pdfeditrc"

Name of configuration file

Definition at line 59 of file settings.cc.

const QString gui::DATA_PATH_VAR = "PDFEDIT_DATA"

Name of variable which will be expanded to data directory

Definition at line 63 of file settings.cc.

Referenced by gui::Settings::expand().

bool gui::DEFAULT__CMDSHOWEDITOR = false

Default value of setting identified by key CMDSHOWEDITOR

Definition at line 75 of file commandwindow.cc.

Referenced by gui::CommandWindow::reloadSettings().

bool gui::DEFAULT__CMDSHOWHISTORY = true

Default value of setting identified by key CMDSHOWHISTORY

Definition at line 71 of file commandwindow.cc.

Referenced by gui::CommandWindow::reloadSettings().

bool gui::DEFAULT__CMDSHOWLINE = true

Default value of setting identified by key CMDSHOWLINE

Definition at line 73 of file commandwindow.cc.

Referenced by gui::CommandWindow::reloadSettings().

QString gui::DEFAULT__HISTORYFILE = ".pdfedit-history"

Default history file

Definition at line 65 of file commandwindow.cc.

Referenced by gui::CommandWindow::loadHistory(), and gui::CommandWindow::saveHistory().

QString gui::DEFAULT__HISTORYFILEITEMSEPARATOR = "<EndItem>"

Default history items separator

Definition at line 67 of file commandwindow.cc.

Referenced by gui::CommandWindow::loadHistory(), and gui::CommandWindow::saveHistory().

int gui::DEFAULT__HISTORYSIZE = 10

Default maximal size of history (in lines)

Definition at line 69 of file commandwindow.cc.

Referenced by gui::CommandWindow::CommandWindow().

int gui::DEFAULT__RESIZINGZONE = 2

Default value for resizing zone.

Definition at line 75 of file pagespace.cc.

Referenced by gui::PageSpace::getResizingZone(), and gui::PageSpace::setSelectionMode().

QString gui::DEFAULT__VIEWED_UNITS = "cm"

Default value for viewed units.

Definition at line 79 of file pagespace.cc.

Referenced by gui::PageSpace::PageSpace().

const PropertyMode gui::defaultPropertyMode =mdNormal

Default mode to be chosen if omitted in constructor

Definition at line 44 of file property.h.

QString gui::format = "x:%1 y:%2 %3"
Settings * gui::globalSettings =NULL

One object for application, holding all global settings. Should be thread-safe. This instance is used from other files

One object for application, holding all global settings.

Definition at line 67 of file settings.cc.

Referenced by gui::CommandWindow::addCommand(), gui::CommandWindow::addError(), gui::AddItemDialog::AddItemDialog(), gui::CommandWindow::addString(), gui::OptionWindow::apply(), applyLookAndFeel(), applyLookAndFeel(), applyLookAndFeel(), applyStyle(), applyStyle(), gui::BaseCore::BaseCore(), gui::BaseCore::BaseCore(), gui::PdfEditWindow::bigPixmap(), gui::BaseCore::call(), gui::BaseCore::call(), gui::PropertyEditor::checkOverrides(), gui::PropertyEditor::checkOverrides(), gui::TreeData::checkSetting(), gui::CommandWindow::CommandWindow(), gui::Settings::getInstance(), gui::Settings::getInstance(), gui::Settings::getInstance(), gui::PageSpace::getResizingZone(), gui::HelpWindow::HelpWindow(), gui::HelpWindow::HelpWindow(), gui::IconCache::IconCache(), gui::IconCache::IconCache(), gui::CommandWindow::loadHistory(), gui::CommandWindow::loadHistory(), gui::Menu::loadToolBars(), gui::Menu::loadToolBars(), gui::PdfEditWindow::loadVisibility(), main(), main(), main(), main(), main(), gui::PdfEditWindow::openFile(), openFileDialog(), openFileDialog(), openFileDialog(), openFileDialog(), openFileDialog(), gui::PageSpace::PageSpace(), gui::PdfEditWindow::PdfEditWindow(), gui::PdfEditWindow::PdfEditWindow(), gui::PdfEditWindow::PdfEditWindow(), gui::PdfEditWindow::PdfEditWindow(), gui::Menu::readItem(), gui::Menu::readItem(), gui::StringOption::readValue(), gui::BoolOption::readValue(), gui::DialogOption::readValue(), gui::ComboOption::readValue(), gui::CommandWindow::reloadSettings(), gui::CommandWindow::reloadSettings(), gui::CommandWindow::reloadSettings(), gui::Menu::restoreToolbars(), gui::CommandWindow::restoreWindowState(), gui::PdfEditWindow::restoreWindowState(), gui::PdfEditWindow::restoreWindowState(), gui::PdfEditWindow::restoreWindowState(), gui::PdfEditWindow::restoreWindowState(), gui::Base::run(), gui::BaseConsole::runInitScript(), gui::BaseConsole::runInitScript(), gui::BaseGUI::runInitScript(), gui::BaseGUI::runInitScript(), gui::BaseCore::runScript(), gui::BaseCore::runScript(), saveFileDialog(), saveFileDialog(), saveFileDialog(), saveFileDialog(), saveFileDialog(), saveFileDialog(), gui::CommandWindow::saveHistory(), gui::CommandWindow::saveHistory(), saveSettings(), gui::Menu::saveToolbars(), gui::Menu::saveToolbars(), gui::PdfEditWindow::saveVisibility(), gui::CommandWindow::saveWindowState(), gui::PdfEditWindow::saveWindowState(), gui::PdfEditWindow::saveWindowState(), gui::PdfEditWindow::saveWindowState(), gui::PdfEditWindow::saveWindowState(), gui::CommandWindow::setHistoryFile(), gui::CommandWindow::setHistorySize(), gui::AddItemDialog::setItem(), gui::AddItemDialog::setItem(), gui::PageSpace::setResizingZone(), gui::PageSpace::setSelectionMode(), gui::StringOption::writeValue(), gui::BoolOption::writeValue(), gui::DialogOption::writeValue(), gui::ComboOption::writeValue(), gui::ComboOption::writeValue(), gui::AddItemDialog::~AddItemDialog(), gui::HelpWindow::~HelpWindow(), and gui::OptionWindow::~OptionWindow().

OperatorHinter gui::hinter

Operator hinter instance

Definition at line 49 of file operatorhint.cc.

Referenced by gui::OperatorHint::get(), and gui::OperatorHint::hint().

QString gui::HISTORYFILE = "HistoryFile"
QString gui::HISTORYFILEITEMSEPARATOR = "HistoryFileItemSeparator"

Settings key identifying history items separator

Definition at line 63 of file commandwindow.cc.

Referenced by gui::CommandWindow::loadHistory(), and gui::CommandWindow::saveHistory().

QString gui::HISTORYSIZE = "HistorySize"

Settings key identifying maximal size of history (in lines)

Definition at line 59 of file commandwindow.cc.

Referenced by gui::CommandWindow::CommandWindow(), and gui::CommandWindow::setHistorySize().

int gui::iconCacheInstances =0

Number of concurrently existing icon cache instances. When last instance is deleted, cached data is deleted too

Definition at line 49 of file iconcache.cc.

Referenced by gui::IconCache::IconCache(), gui::IconCache::IconCache(), gui::IconCache::IconCache(), gui::IconCache::~IconCache(), gui::IconCache::~IconCache(), and gui::IconCache::~IconCache().

QStringList gui::iconPath

List with paths to application icons

Definition at line 59 of file iconcache.cc.

Referenced by gui::IconCache::IconCache().

QString gui::iconStyleName
const char gui::MENUDEF_SEPARATOR =','

Separator of fields in menu definition

Definition at line 47 of file menu.h.

Referenced by gui::QSMenu::addItemDef(), gui::Menu::parseName(), and gui::QSMenu::QSMenu().

const char gui::MENULIST_SEPARATOR =','

Separator of items in menu list

Definition at line 49 of file menu.h.

Referenced by gui::Menu::parseName().

OperatorHint* gui::OperatorHintInstance =NULL
OptionWindow* gui::opt =NULL

The only Option window
Pointer to running OptionWindow instance or NULL if none active.

Definition at line 67 of file optionwindow.cc.

Referenced by handleHelpOptions(), gui::OptionWindow::optionsDialog(), gui::OptionWindow::optionsDialog(), gui::OptionWindow::optionsDialog(), and gui::OptionWindow::optionsDialog().

QString gui::PAGESPC = "gui/PageSpace/"

Path to setting, where are stored settings for PageSpace.

Definition at line 71 of file pagespace.cc.

Referenced by gui::PageSpace::getResizingZone(), gui::PageSpace::PageSpace(), gui::PageSpace::setResizingZone(), and gui::PageSpace::setSelectionMode().

Configuration parser

QString gui::RESIZINGZONE = "ResizingZone"

Name of setting for resizing zone.

Definition at line 73 of file pagespace.cc.

Referenced by gui::PageSpace::getResizingZone(), gui::PageSpace::setResizingZone(), and gui::PageSpace::setSelectionMode().

const QString gui::ROOT ="gui/items/"

root key for system menu items

Definition at line 59 of file menu.cc.

Referenced by gui::Menu::readItem(), gui::Menu::readItem(), and gui::Menu::readItem().

const QString gui::ROOT_ADD ="gui/items_add/"

root key for user menu items appended to system menu items (lists)

Definition at line 61 of file menu.cc.

Referenced by gui::Menu::readItem().

const int gui::TMP_OFFSET =0x3fffffff
const char gui::TOOLBARLIST_SEPARATOR =','

Separator of items in list of existing toolbars

Definition at line 51 of file menu.h.

Referenced by gui::Menu::loadToolBars().

const char* gui::TREEITEM_TYPE ="pdfedit/treeitem"

Pseudo-mimetype for tree item

Definition at line 40 of file draglistview.cc.

Referenced by gui::DragListView::contentsDropEvent(), gui::TreeItemDragObject::encodedData(), and gui::TreeItemDragObject::format().

QString gui::VIEWED_UNITS = "ViewedUnits"

Name of setting for viewed units.

Definition at line 77 of file pagespace.cc.

Referenced by gui::PageSpace::PageSpace().

int gui::windowCount

number of active editor windows -> when last is closed, application terminates

Definition at line 68 of file pdfeditwindow.cc.

Referenced by gui::PdfEditWindow::closeEvent(), and gui::PdfEditWindow::create().